cf9842d1 by wangling

保单比对规则修改,开始时间<后天(不包含), 结束时间>昨天(不包含)

1 parent 8c0ddf7e
......@@ -611,15 +611,18 @@ class Comparison:
# Get today's date
today_date = datetime.today().date()
'''
开始时间<后天(不包含), 结束时间>昨天(不包含)
'''
if kwargs.get('start', False):
# Check if dates are equal and within the range of yesterday to today
if ocr_date < today_date:
# 开始时间 < 后天(不包含)
day_after_tomorrow_date = today_date + relativedelta(days=2)
if ocr_date < day_after_tomorrow_date:
return self.RESULT_Y
else:
# Check if dates are equal and ocr_date is greater than tomorrow
tomorrow_date = today_date + relativedelta(days=1)
if ocr_date > tomorrow_date:
# 结束时间>昨天(不包含)
yesterday_date = today_date + relativedelta(days=-1)
if ocr_date > yesterday_date:
return self.RESULT_Y
# Default return value if conditions are not met
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!