c3532ca6 by wangling

保单比对规则修改,去掉机动车损失保险金额,第三种责任限额金额,绝对免赔率,第一受益人的校验,修改保险开始日期,保险截止日期的校验,保险开始日期<今天,保险截止日期>明天

1 parent 8bc45eee
...@@ -12,6 +12,7 @@ import logging ...@@ -12,6 +12,7 @@ import logging
12 12
13 compare_log = logging.getLogger('compare') 13 compare_log = logging.getLogger('compare')
14 14
15
15 class Comparison: 16 class Comparison:
16 17
17 def __init__(self): 18 def __init__(self):
...@@ -221,7 +222,7 @@ class Comparison: ...@@ -221,7 +222,7 @@ class Comparison:
221 for idx in range(len(src_str)): 222 for idx in range(len(src_str)):
222 if src_str[idx].isdigit(): 223 if src_str[idx].isdigit():
223 replace_char_list.append(src_str[idx]) 224 replace_char_list.append(src_str[idx])
224 elif idx == len(src_str)-3: 225 elif idx == len(src_str) - 3:
225 replace_char_list.append('.') 226 replace_char_list.append('.')
226 return ''.join(replace_char_list) 227 return ''.join(replace_char_list)
227 228
...@@ -603,7 +604,6 @@ class Comparison: ...@@ -603,7 +604,6 @@ class Comparison:
603 except Exception as e: 604 except Exception as e:
604 return self.RESULT_N 605 return self.RESULT_N
605 606
606
607 def se_bd_date_2_compare(self, input_str, ocr_str, **kwargs): 607 def se_bd_date_2_compare(self, input_str, ocr_str, **kwargs):
608 try: 608 try:
609 # Convert strings to date objects 609 # Convert strings to date objects
...@@ -615,12 +615,12 @@ class Comparison: ...@@ -615,12 +615,12 @@ class Comparison:
615 615
616 if kwargs.get('start', False): 616 if kwargs.get('start', False):
617 # Check if dates are equal and within the range of yesterday to today 617 # Check if dates are equal and within the range of yesterday to today
618 if input_date == ocr_date and ocr_date < today_date: 618 if ocr_date < today_date:
619 return self.RESULT_Y 619 return self.RESULT_Y
620 else: 620 else:
621 # Check if dates are equal and ocr_date is greater than tomorrow 621 # Check if dates are equal and ocr_date is greater than tomorrow
622 tomorrow_date = today_date + relativedelta(days=1) 622 tomorrow_date = today_date + relativedelta(days=1)
623 if input_date == ocr_date and ocr_date > tomorrow_date: 623 if ocr_date > tomorrow_date:
624 return self.RESULT_Y 624 return self.RESULT_Y
625 625
626 # Default return value if conditions are not met 626 # Default return value if conditions are not met
...@@ -704,5 +704,3 @@ class Comparison: ...@@ -704,5 +704,3 @@ class Comparison:
704 704
705 705
706 cp = Comparison() 706 cp = Comparison()
707
708
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!