c3532ca6 by wangling

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

1 parent 8bc45eee
......@@ -12,6 +12,7 @@ import logging
compare_log = logging.getLogger('compare')
class Comparison:
def __init__(self):
......@@ -221,7 +222,7 @@ class Comparison:
for idx in range(len(src_str)):
if src_str[idx].isdigit():
replace_char_list.append(src_str[idx])
elif idx == len(src_str)-3:
elif idx == len(src_str) - 3:
replace_char_list.append('.')
return ''.join(replace_char_list)
......@@ -603,7 +604,6 @@ class Comparison:
except Exception as e:
return self.RESULT_N
def se_bd_date_2_compare(self, input_str, ocr_str, **kwargs):
try:
# Convert strings to date objects
......@@ -615,12 +615,12 @@ class Comparison:
if kwargs.get('start', False):
# Check if dates are equal and within the range of yesterday to today
if input_date == ocr_date and ocr_date < today_date:
if ocr_date < today_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 input_date == ocr_date and ocr_date > tomorrow_date:
if ocr_date > tomorrow_date:
return self.RESULT_Y
# Default return value if conditions are not met
......@@ -704,5 +704,3 @@ class Comparison:
cp = Comparison()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!