fix no-asp afc-ht
Showing
3 changed files
with
14 additions
and
7 deletions
... | @@ -1947,7 +1947,8 @@ HIL_CONTRACT_3_COMPARE_LOGIC = { | ... | @@ -1947,7 +1947,8 @@ HIL_CONTRACT_3_COMPARE_LOGIC = { |
1947 | 1947 | ||
1948 | HT_COMPARE_LOGIC = { | 1948 | HT_COMPARE_LOGIC = { |
1949 | '合同编号-每页': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), | 1949 | '合同编号-每页': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), |
1950 | '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {'pop_last': True}, '合同编号与系统不一致'), | 1950 | # '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {'pop_last': True}, '合同编号与系统不一致'), |
1951 | '合同编号-每页(no-asp)': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), | ||
1951 | '所购车辆价格-小写-重要条款': ('所购车辆价格-小写-重要条款', 'se_amount_str_compare', {}, '合同首页中车辆价格与系统不一致'), | 1952 | '所购车辆价格-小写-重要条款': ('所购车辆价格-小写-重要条款', 'se_amount_str_compare', {}, '合同首页中车辆价格与系统不一致'), |
1952 | '车架号-重要条款': ('车架号-重要条款', 'se_common_compare', {}, '合同首页中车架号与系统不一致'), | 1953 | '车架号-重要条款': ('车架号-重要条款', 'se_common_compare', {}, '合同首页中车架号与系统不一致'), |
1953 | '贷款本金金额-重要条款': ('贷款本金金额-重要条款', 'se_amount_str_compare', {}, '合同首页中贷款本金与系统不一致'), | 1954 | '贷款本金金额-重要条款': ('贷款本金金额-重要条款', 'se_amount_str_compare', {}, '合同首页中贷款本金与系统不一致'), | ... | ... |
... | @@ -1189,7 +1189,8 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1189,7 +1189,8 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1189 | # fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') | 1189 | # fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') |
1190 | # fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp | 1190 | # fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp |
1191 | for asp_name, _, asp_fin in asp_list: | 1191 | for asp_name, _, asp_fin in asp_list: |
1192 | if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1: | 1192 | if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1 and \ |
1193 | asp_name.find('机动车辆保险') == -1: | ||
1193 | gzs_status = consts.GZS_STATUS[0] | 1194 | gzs_status = consts.GZS_STATUS[0] |
1194 | fin_total += float(asp_fin) | 1195 | fin_total += float(asp_fin) |
1195 | asp_list.append( | 1196 | asp_list.append( |
... | @@ -2367,11 +2368,13 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): | ... | @@ -2367,11 +2368,13 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): |
2367 | ocr_str = empty_str | 2368 | ocr_str = empty_str |
2368 | else: | 2369 | else: |
2369 | ocr_str_or_list = ocr_res.get(compare_logic[name][0]) | 2370 | ocr_str_or_list = ocr_res.get(compare_logic[name][0]) |
2371 | # 银行信息 | ||
2370 | if ocr_str_or_list is None and license_en == consts.AFC_CONTRACT_EN \ | 2372 | if ocr_str_or_list is None and license_en == consts.AFC_CONTRACT_EN \ |
2371 | and is_gsyh is True and name in consts.CON_BANK_FIELD: | 2373 | and is_gsyh is True and name in consts.CON_BANK_FIELD: |
2372 | result = consts.RESULT_Y | 2374 | result = consts.RESULT_Y |
2373 | ocr_str = empty_str | 2375 | ocr_str = empty_str |
2374 | reason = compare_logic[name][3] | 2376 | reason = compare_logic[name][3] |
2377 | # 其他字段 | ||
2375 | elif isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): | 2378 | elif isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): |
2376 | if is_gsyh is True and name in consts.CON_BANK_FIELD: | 2379 | if is_gsyh is True and name in consts.CON_BANK_FIELD: |
2377 | update_args = {'is_gsyh': is_gsyh} | 2380 | update_args = {'is_gsyh': is_gsyh} |
... | @@ -2380,6 +2383,9 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): | ... | @@ -2380,6 +2383,9 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): |
2380 | else: | 2383 | else: |
2381 | update_args = compare_logic[name][2] | 2384 | update_args = compare_logic[name][2] |
2382 | if isinstance(ocr_str_or_list, list): | 2385 | if isinstance(ocr_str_or_list, list): |
2386 | # no-asp 合同编号-每页(no-asp) | ||
2387 | if name == consts.SE_AFC_CON_FIELD[23]: | ||
2388 | ocr_str_or_list.pop() | ||
2383 | ocr_str = json.dumps(ocr_str_or_list, ensure_ascii=False) | 2389 | ocr_str = json.dumps(ocr_str_or_list, ensure_ascii=False) |
2384 | else: | 2390 | else: |
2385 | ocr_str_or_list = ocr_str_or_list.strip() | 2391 | ocr_str_or_list = ocr_str_or_list.strip() | ... | ... |
... | @@ -173,11 +173,11 @@ class Comparison: | ... | @@ -173,11 +173,11 @@ class Comparison: |
173 | return self.RESULT_Y | 173 | return self.RESULT_Y |
174 | return self.RESULT_N | 174 | return self.RESULT_N |
175 | else: | 175 | else: |
176 | if kwargs.get('pop_last', False): | 176 | # if kwargs.get('pop_last', False): |
177 | for item in ocr_str_or_list[:-1]: | 177 | # for item in ocr_str_or_list[:-1]: |
178 | if item != input_str_or_list: | 178 | # if item != input_str_or_list: |
179 | return self.RESULT_N | 179 | # return self.RESULT_N |
180 | else: | 180 | # else: |
181 | for item in ocr_str_or_list: | 181 | for item in ocr_str_or_list: |
182 | if item != input_str_or_list: | 182 | if item != input_str_or_list: |
183 | return self.RESULT_N | 183 | return self.RESULT_N | ... | ... |
-
Please register or sign in to post a comment