diff --git a/src/apps/doc/consts.py b/src/apps/doc/consts.py index f8ff044..b253877 100644 --- a/src/apps/doc/consts.py +++ b/src/apps/doc/consts.py @@ -1947,7 +1947,8 @@ HIL_CONTRACT_3_COMPARE_LOGIC = { HT_COMPARE_LOGIC = { '合同编号-每页': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), - '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {'pop_last': True}, '合同编号与系统不一致'), + # '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {'pop_last': True}, '合同编号与系统不一致'), + '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), '所购车辆价格-小写-重要条款': ('所购车辆价格-小写-重要条款', 'se_amount_str_compare', {}, '合同首页中车辆价格与系统不一致'), '车架号-重要条款': ('车架号-重要条款', 'se_common_compare', {}, '合同首页中车架号与系统不一致'), '贷款本金金额-重要条款': ('贷款本金金额-重要条款', 'se_amount_str_compare', {}, '合同首页中贷款本金与系统不一致'), diff --git a/src/celery_compare/tasks.py b/src/celery_compare/tasks.py index 486cec1..cdda6b0 100644 --- a/src/celery_compare/tasks.py +++ b/src/celery_compare/tasks.py @@ -1189,7 +1189,8 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore # fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') # fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp for asp_name, _, asp_fin in asp_list: - if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1: + if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1 and \ + asp_name.find('机动车辆保险') == -1: gzs_status = consts.GZS_STATUS[0] fin_total += float(asp_fin) asp_list.append( @@ -2367,11 +2368,13 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): ocr_str = empty_str else: ocr_str_or_list = ocr_res.get(compare_logic[name][0]) + # 银行信息 if ocr_str_or_list is None and license_en == consts.AFC_CONTRACT_EN \ and is_gsyh is True and name in consts.CON_BANK_FIELD: result = consts.RESULT_Y ocr_str = empty_str reason = compare_logic[name][3] + # 其他字段 elif isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): if is_gsyh is True and name in consts.CON_BANK_FIELD: update_args = {'is_gsyh': is_gsyh} @@ -2380,6 +2383,9 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): else: update_args = compare_logic[name][2] if isinstance(ocr_str_or_list, list): + # no-asp 合同编号-每页(no-asp) + if name == consts.SE_AFC_CON_FIELD[23]: + ocr_str_or_list.pop() ocr_str = json.dumps(ocr_str_or_list, ensure_ascii=False) else: ocr_str_or_list = ocr_str_or_list.strip() diff --git a/src/common/tools/comparison.py b/src/common/tools/comparison.py index de6aa2e..85d38e2 100644 --- a/src/common/tools/comparison.py +++ b/src/common/tools/comparison.py @@ -173,14 +173,14 @@ class Comparison: return self.RESULT_Y return self.RESULT_N else: - if kwargs.get('pop_last', False): - for item in ocr_str_or_list[:-1]: - if item != input_str_or_list: - return self.RESULT_N - else: - for item in ocr_str_or_list: - if item != input_str_or_list: - return self.RESULT_N + # if kwargs.get('pop_last', False): + # for item in ocr_str_or_list[:-1]: + # if item != input_str_or_list: + # return self.RESULT_N + # else: + for item in ocr_str_or_list: + if item != input_str_or_list: + return self.RESULT_N return self.RESULT_Y else: return self.RESULT_N