8bc45eee by wangling

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

1 parent 0a08bff7
...@@ -1990,8 +1990,8 @@ BD_COMPARE_LOGIC = { ...@@ -1990,8 +1990,8 @@ BD_COMPARE_LOGIC = {
1990 '机动车损失保险金额': ('机动车损失保险金额', 'se_amount_lte_compare', {}, '保单车损险异常'), 1990 '机动车损失保险金额': ('机动车损失保险金额', 'se_amount_lte_compare', {}, '保单车损险异常'),
1991 '第三者责任保险金额': ('机动车第三者责任保险金额', 'se_amount_lte_compare', {}, '保单三者险异常'), 1991 '第三者责任保险金额': ('机动车第三者责任保险金额', 'se_amount_lte_compare', {}, '保单三者险异常'),
1992 '绝对免赔率': ('机动车损失保险绝对免赔率/绝对免赔额', 'se_one_compare', {}, '保单无绝对免赔项'), 1992 '绝对免赔率': ('机动车损失保险绝对免赔率/绝对免赔额', 'se_one_compare', {}, '保单无绝对免赔项'),
1993 '保险起始日期': ('保险起始日期', 'se_bd_date_compare', {'start': True}, '保单起始时间有误'), 1993 '保险起始日期': ('保险起始日期', 'se_bd_date_2_compare', {'start': True}, '保单起始时间有误'),
1994 '保险截止日期': ('保险截止日期', 'se_bd_date_compare', {}, '保单截止时间有误'), 1994 '保险截止日期': ('保险截止日期', 'se_bd_date_2_compare', {}, '保单截止时间有误'),
1995 '保单章': ('保单章', 'se_common_compare', {}, '保单无保单章'), 1995 '保单章': ('保单章', 'se_common_compare', {}, '保单无保单章'),
1996 '第一受益人': ('特别约定第一受益人', 'se_common_compare', {}, '保单第一受益人需人工核查'), 1996 '第一受益人': ('特别约定第一受益人', 'se_common_compare', {}, '保单第一受益人需人工核查'),
1997 '保险费合计': ('保险费合计', 'se_amount_lte_compare', {}, '保单保费疑似无法覆盖ASP保险融资'), 1997 '保险费合计': ('保险费合计', 'se_amount_lte_compare', {}, '保单保费疑似无法覆盖ASP保险融资'),
......
...@@ -1306,13 +1306,13 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d ...@@ -1306,13 +1306,13 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
1306 (consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离 1306 (consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离
1307 (consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离 1307 (consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离
1308 (consts.SE_BD_FIELD[2], vin_no), 1308 (consts.SE_BD_FIELD[2], vin_no),
1309 (consts.SE_BD_FIELD[3], ssx_amount), 1309 # (consts.SE_BD_FIELD[3], ssx_amount),
1310 (consts.SE_BD_FIELD[4], dszx_amount), 1310 # (consts.SE_BD_FIELD[4], dszx_amount),
1311 (consts.SE_BD_FIELD[5], consts.JDMPV_VALUE), 1311 # (consts.SE_BD_FIELD[5], consts.JDMPV_VALUE),
1312 (consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')), 1312 (consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')),
1313 (consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')), 1313 (consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')),
1314 (consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE), 1314 (consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE),
1315 (consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE), 1315 # (consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE),
1316 ] 1316 ]
1317 if is_insurance == 1: 1317 if is_insurance == 1:
1318 bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price)) 1318 bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price))
...@@ -1871,13 +1871,13 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect ...@@ -1871,13 +1871,13 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
1871 (consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离 1871 (consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离
1872 (consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离 1872 (consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离
1873 (consts.SE_BD_FIELD[2], vin_no), 1873 (consts.SE_BD_FIELD[2], vin_no),
1874 (consts.SE_BD_FIELD[3], ssx_amount), 1874 # (consts.SE_BD_FIELD[3], ssx_amount),
1875 (consts.SE_BD_FIELD[4], dszx_amount), 1875 # (consts.SE_BD_FIELD[4], dszx_amount),
1876 (consts.SE_BD_FIELD[5], consts.JDMPV_VALUE), 1876 # (consts.SE_BD_FIELD[5], consts.JDMPV_VALUE),
1877 (consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')), 1877 (consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')),
1878 (consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')), 1878 (consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')),
1879 (consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE), 1879 (consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE),
1880 (consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE), 1880 # (consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE),
1881 ] 1881 ]
1882 if is_insurance == 1: 1882 if is_insurance == 1:
1883 bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price)) 1883 bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price))
......
...@@ -603,6 +603,32 @@ class Comparison: ...@@ -603,6 +603,32 @@ class Comparison:
603 except Exception as e: 603 except Exception as e:
604 return self.RESULT_N 604 return self.RESULT_N
605 605
606
607 def se_bd_date_2_compare(self, input_str, ocr_str, **kwargs):
608 try:
609 # Convert strings to date objects
610 input_date = datetime.strptime(input_str, "%Y-%m-%d").date()
611 ocr_date = datetime.strptime(ocr_str, "%Y-%m-%d").date()
612
613 # Get today's date
614 today_date = datetime.today().date()
615
616 if kwargs.get('start', False):
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:
619 return self.RESULT_Y
620 else:
621 # Check if dates are equal and ocr_date is greater than tomorrow
622 tomorrow_date = today_date + relativedelta(days=1)
623 if input_date == ocr_date and ocr_date > tomorrow_date:
624 return self.RESULT_Y
625
626 # Default return value if conditions are not met
627 return self.RESULT_N
628 except Exception as e:
629 # Return RESULT_N in case of any exception
630 return self.RESULT_N
631
606 def se_bs_print_date_compare(self, input_str, ocr_str, **kwargs): 632 def se_bs_print_date_compare(self, input_str, ocr_str, **kwargs):
607 try: 633 try:
608 input_date = datetime.strptime(input_str, "%Y-%m-%d") 634 input_date = datetime.strptime(input_str, "%Y-%m-%d")
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!