保单比对规则修改,开始时间<后天(不包含), 结束时间>昨天(不包含)
Showing
1 changed file
with
9 additions
and
6 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment