cf9842d1 by wangling

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

1 parent 8c0ddf7e
...@@ -611,15 +611,18 @@ class Comparison: ...@@ -611,15 +611,18 @@ class Comparison:
611 611
612 # Get today's date 612 # Get today's date
613 today_date = datetime.today().date() 613 today_date = datetime.today().date()
614 614 '''
615 开始时间<后天(不包含), 结束时间>昨天(不包含)
616 '''
615 if kwargs.get('start', False): 617 if kwargs.get('start', False):
616 # Check if dates are equal and within the range of yesterday to today 618 # 开始时间 < 后天(不包含)
617 if ocr_date < today_date: 619 day_after_tomorrow_date = today_date + relativedelta(days=2)
620 if ocr_date < day_after_tomorrow_date:
618 return self.RESULT_Y 621 return self.RESULT_Y
619 else: 622 else:
620 # Check if dates are equal and ocr_date is greater than tomorrow 623 # 结束时间>昨天(不包含)
621 tomorrow_date = today_date + relativedelta(days=1) 624 yesterday_date = today_date + relativedelta(days=-1)
622 if ocr_date > tomorrow_date: 625 if ocr_date > yesterday_date:
623 return self.RESULT_Y 626 return self.RESULT_Y
624 627
625 # Default return value if conditions are not met 628 # 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!