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):
return result_field_list, field_img_path_dict
def se_compare_license(license_en, ocr_res_dict, field_list):
def se_compare_license(license_en, ocr_res_dict, field_list, is_auto):
ocr_field, compare_logic, special_expiry_date = consts.SE_COMPARE_FIELD[license_en]
is_find = False
......@@ -2513,6 +2513,14 @@ def se_compare_license(license_en, ocr_res_dict, field_list):
ocr_res_list[res_idx].get(consts.LOWER_AMOUNT_FIELD, ''),
ocr_res_list[res_idx].get(consts.UPPER_AMOUNT_FIELD, ''),
)
# auto 保单 保险费合计 ocr结果需要加上一个基数,再与cms结果做比对
elif is_auto and ocr_field == consts.BD_FIELD and name == consts.SE_BD_FIELD[10]:
ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0])
compare_log.info('{0} [bd_4962_price] [ori ocr_str:{1}] '.format(log_base, ocr_str))
add_price = conf.BD_PRICE
compare_log.info('{0} [bd_4962_price] [add_price:{1}] '.format(log_base, add_price))
ocr_str = str(float(ocr_str) + float(add_price))
compare_log.info('{0} [bd_4962_price] [final ocr_str:{1}] '.format(log_base, ocr_str))
else:
ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0])
......@@ -3287,7 +3295,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list
license_en, id_res_list, strip_list, is_auto)
else:
result_field_list, no_ocr_result, field_img_path_dict = se_compare_license(
license_en, ocr_res_dict, strip_list)
license_en, ocr_res_dict, strip_list, is_auto)
each_license_failed_count = 0
for name, value, result, ocr_str, img_path, error_type, cn_reason in result_field_list:
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
elif license_en == consts.FS_EN:
result_field_list, field_img_path_dict = se_fs_compare(license_en, ocr_res_dict, strip_list)
else:
result_field_list, _, field_img_path_dict = se_compare_license(license_en, ocr_res_dict, strip_list)
result_field_list, _, field_img_path_dict = se_compare_license(license_en, ocr_res_dict, strip_list, is_auto)
each_license_failed_count = 0
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
DELAY_SECONDS = 60
BD_PRICE = 950
\ No newline at end of file
......
......@@ -14,4 +14,6 @@ DEALER_CODE = ocr_situ_group
BASE_URL = https://staging-bmw-ocr.situdata.com
DELAY_SECONDS = 60
\ No newline at end of file
DELAY_SECONDS = 60
BD_PRICE = 950
\ No newline at end of file
......
......@@ -14,4 +14,6 @@ DEALER_CODE = ocr_situ_group
BASE_URL = https://sfocr-uat.bmwgroup.net
DELAY_SECONDS = 60
\ No newline at end of file
DELAY_SECONDS = 60
BD_PRICE = 950
\ 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!