75d18a3c by 冯轩

Merge branch 'feature/CHINARPA-4962'

2 parents e456a99e d8413b41
...@@ -2458,7 +2458,7 @@ def se_bs_compare(license_en, ocr_res_dict, strip_list, is_auto, aa_type): ...@@ -2458,7 +2458,7 @@ def se_bs_compare(license_en, ocr_res_dict, strip_list, is_auto, aa_type):
2458 return result_field_list, field_img_path_dict 2458 return result_field_list, field_img_path_dict
2459 2459
2460 2460
2461 def se_compare_license(license_en, ocr_res_dict, field_list): 2461 def se_compare_license(license_en, ocr_res_dict, field_list, is_auto):
2462 ocr_field, compare_logic, special_expiry_date = consts.SE_COMPARE_FIELD[license_en] 2462 ocr_field, compare_logic, special_expiry_date = consts.SE_COMPARE_FIELD[license_en]
2463 2463
2464 is_find = False 2464 is_find = False
...@@ -2513,6 +2513,14 @@ def se_compare_license(license_en, ocr_res_dict, field_list): ...@@ -2513,6 +2513,14 @@ def se_compare_license(license_en, ocr_res_dict, field_list):
2513 ocr_res_list[res_idx].get(consts.LOWER_AMOUNT_FIELD, ''), 2513 ocr_res_list[res_idx].get(consts.LOWER_AMOUNT_FIELD, ''),
2514 ocr_res_list[res_idx].get(consts.UPPER_AMOUNT_FIELD, ''), 2514 ocr_res_list[res_idx].get(consts.UPPER_AMOUNT_FIELD, ''),
2515 ) 2515 )
2516 # auto 保单 保险费合计 ocr结果需要加上一个基数,再与cms结果做比对
2517 elif is_auto and ocr_field == consts.BD_FIELD and name == consts.SE_BD_FIELD[10]:
2518 ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0])
2519 compare_log.info('{0} [bd_4962_price] [ori ocr_str:{1}] '.format(log_base, ocr_str))
2520 add_price = conf.BD_PRICE
2521 compare_log.info('{0} [bd_4962_price] [add_price:{1}] '.format(log_base, add_price))
2522 ocr_str = str(float(ocr_str) + float(add_price))
2523 compare_log.info('{0} [bd_4962_price] [final ocr_str:{1}] '.format(log_base, ocr_str))
2516 else: 2524 else:
2517 ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0]) 2525 ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0])
2518 2526
...@@ -3287,7 +3295,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list ...@@ -3287,7 +3295,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list
3287 license_en, id_res_list, strip_list, is_auto) 3295 license_en, id_res_list, strip_list, is_auto)
3288 else: 3296 else:
3289 result_field_list, no_ocr_result, field_img_path_dict = se_compare_license( 3297 result_field_list, no_ocr_result, field_img_path_dict = se_compare_license(
3290 license_en, ocr_res_dict, strip_list) 3298 license_en, ocr_res_dict, strip_list, is_auto)
3291 each_license_failed_count = 0 3299 each_license_failed_count = 0
3292 for name, value, result, ocr_str, img_path, error_type, cn_reason in result_field_list: 3300 for name, value, result, ocr_str, img_path, error_type, cn_reason in result_field_list:
3293 if license_en not in consts.SKIP_CARD or not no_ocr_result: 3301 if license_en not in consts.SKIP_CARD or not no_ocr_result:
...@@ -3346,7 +3354,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list ...@@ -3346,7 +3354,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list
3346 elif license_en == consts.FS_EN: 3354 elif license_en == consts.FS_EN:
3347 result_field_list, field_img_path_dict = se_fs_compare(license_en, ocr_res_dict, strip_list) 3355 result_field_list, field_img_path_dict = se_fs_compare(license_en, ocr_res_dict, strip_list)
3348 else: 3356 else:
3349 result_field_list, _, field_img_path_dict = se_compare_license(license_en, ocr_res_dict, strip_list) 3357 result_field_list, _, field_img_path_dict = se_compare_license(license_en, ocr_res_dict, strip_list, is_auto)
3350 3358
3351 each_license_failed_count = 0 3359 each_license_failed_count = 0
3352 for name, value, result, ocr_str, img_path, error_type, cn_reason in result_field_list: 3360 for name, value, result, ocr_str, img_path, error_type, cn_reason in result_field_list:
......
...@@ -16,3 +16,4 @@ BASE_URL = https://sfocr-prod.bmwgroup.net ...@@ -16,3 +16,4 @@ BASE_URL = https://sfocr-prod.bmwgroup.net
16 16
17 DELAY_SECONDS = 60 17 DELAY_SECONDS = 60
18 18
19 BD_PRICE = 950
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -15,3 +15,5 @@ DEALER_CODE = ocr_situ_group ...@@ -15,3 +15,5 @@ DEALER_CODE = ocr_situ_group
15 BASE_URL = https://staging-bmw-ocr.situdata.com 15 BASE_URL = https://staging-bmw-ocr.situdata.com
16 16
17 DELAY_SECONDS = 60 17 DELAY_SECONDS = 60
18
19 BD_PRICE = 950
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -15,3 +15,5 @@ DEALER_CODE = ocr_situ_group ...@@ -15,3 +15,5 @@ DEALER_CODE = ocr_situ_group
15 BASE_URL = https://sfocr-uat.bmwgroup.net 15 BASE_URL = https://sfocr-uat.bmwgroup.net
16 16
17 DELAY_SECONDS = 60 17 DELAY_SECONDS = 60
18
19 BD_PRICE = 950
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!