1fe3d253 by 冯轩

MOD:财报导致的其他合同变更

1 parent cd074ed9
......@@ -972,25 +972,28 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
license_dict[license_en] = field_input
all_id_num.append(id_num)
# 营业执照 --------------------------------------------------------------------------------------------------
elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
# 4660 修改比对营业执照文档必要性的判断条件
# elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
elif is_bo_tccor:
# ['companyName', 'legalRepName', 'businessLicenseNo', 'organizationCreditCode',
# 'taxRegistrationCertificateNo', 'establishmentDate', 'businessLicenseDueDate']
id_num = decode_des(id_info.get('idNum', ''), des_key)
# bl_field_input = [
# ('companyName', customer_name),
# ('legalRepName', legal_name),
# ('businessLicenseNo', id_num),
# ('organizationCreditCode', id_num),
# ('taxRegistrationCertificateNo', id_num),
# ('businessLicenseDueDate', id_info.get('idExpiryDate', '')),
# ]
bl_field_input = [
('companyName', customer_name),
('legalRepName', legal_name),
('businessLicenseNo', id_num),
('organizationCreditCode', id_num),
('taxRegistrationCertificateNo', id_num),
('businessLicenseDueDate', id_info.get('idExpiryDate', '')),
]
if is_corporate:
company_info_list.append((customer_name, id_num, legal_name))
# else:
# bl_field_input.append(('establishmentDate', establishment_date))
else:
bl_field_input.append(('establishmentDate', establishment_date))
# license_dict[consts.BL_EN] = bl_field_input
compare_log.info('{0} [bl_field_input] [{1}]'.format(log_base, bl_field_input))
license_dict[consts.BL_EN] = bl_field_input
all_id_num.append(id_num)
# SME营业执照---------------------------------------------------------------------------------------------------
......@@ -1006,6 +1009,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
(customer_name, '、'.join(all_id_num), all_id_num[0])
)
compare_log.info('{0} [license_dict] [{1}]'.format(log_base, license_dict))
if len(license_dict) > 0:
individual_info_dict.setdefault(individual_info['applicantType'], []).append(license_dict)
......@@ -1400,7 +1404,10 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
hil_contract_1_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if key == '承租人签字' and is_bo_tccor:
hil_contract_1_input.append((key, legal_name))
else:
hil_contract_1_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
hil_contract_1_input.append((key, field_idx))
if not is_find and is_force:
......@@ -1442,7 +1449,10 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
hil_contract_2_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if key == '抵押人签字' and is_bo_tccor:
hil_contract_2_input.append((key, legal_name))
else:
hil_contract_2_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
hil_contract_2_input.append((key, field_idx))
if not is_find and is_force:
......@@ -1509,7 +1519,10 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
afc_contract_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if (key == '借款人签字及时间' or key == '主借人签字') and is_bo_tccor:
afc_contract_input.append((key, legal_name))
else:
afc_contract_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
afc_contract_input.append((key, field_idx))
if not is_find and is_force:
......@@ -1598,7 +1611,9 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
license_dict[license_en] = field_input
all_id_num.append(id_num)
# 营业执照 --------------------------------------------------------------------------------------------------
elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
# 4660 修改比对营业执照文档必要性的判断条件
# elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
elif is_bo_tccor:
# ['companyName', 'legalRepName', 'businessLicenseNo', 'organizationCreditCode',
# 'taxRegistrationCertificateNo', 'establishmentDate', 'businessLicenseDueDate']
id_num = decode_des(id_info.get('idNum', ''), des_key)
......@@ -1616,6 +1631,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
else:
bl_field_input.append(('establishmentDate', establishment_date))
compare_log.info('{0} [bl_field_input] [{1}]'.format(log_base, bl_field_input))
license_dict[consts.BL_EN] = bl_field_input
all_id_num.append(id_num)
......@@ -1632,6 +1648,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
(customer_name, '、'.join(all_id_num), all_id_num[0])
)
compare_log.info('{0} [license_dict] [{1}]'.format(log_base, license_dict))
if len(license_dict) > 0:
individual_info_dict.setdefault(individual_info['applicantType'], []).append(license_dict)
......@@ -1989,7 +2006,10 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
hil_contract_1_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if key == '承租人签字' and is_bo_tccor:
hil_contract_1_input.append((key, legal_name))
else:
hil_contract_1_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
hil_contract_1_input.append((key, field_idx))
if not is_find and is_force:
......@@ -2008,7 +2028,10 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
(consts.SE_HIL_CON_3_FIELD[6], main_id),
]
if online_sign:
hil_contract_3_input.append((consts.SE_HIL_CON_3_FIELD[7], main_name))
if is_bo_tccor:
hil_contract_3_input.append((consts.SE_HIL_CON_3_FIELD[7], legal_name))
else:
hil_contract_3_input.append((consts.SE_HIL_CON_3_FIELD[7], main_name))
contract_info[consts.HIL_CONTRACT_3_EN] = hil_contract_3_input
# HIL合同 车辆租赁抵押合同 --------------------------------------------------------------------------------------
......@@ -2031,7 +2054,10 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
hil_contract_2_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if key == '抵押人签字' and is_bo_tccor:
hil_contract_2_input.append((key, legal_name))
else:
hil_contract_2_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
hil_contract_2_input.append((key, field_idx))
if not is_find and is_force:
......@@ -2098,7 +2124,10 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if len(main_role_info[app_type]) >= id_idx+1:
is_find = True
if isinstance(field_idx, int):
afc_contract_input.append((key, main_role_info[app_type][id_idx][field_idx]))
if (key == '借款人签字及时间' or key == '主借人签字') and is_bo_tccor:
afc_contract_input.append((key, legal_name))
else:
afc_contract_input.append((key, main_role_info[app_type][id_idx][field_idx]))
else:
afc_contract_input.append((key, field_idx))
if not is_find and is_force:
......@@ -3184,6 +3213,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list
for info_key, info_value in compare_info.items():
if info_key in ['individualCusInfo', 'applicantInformation']:
for idx, license_list in info_value.items():
compare_log.info('{0} [compare license_list] [entity={1}]'.format(log_base, license_list))
for license_dict in license_list:
for license_en, field_list in license_dict.items():
strip_list = []
......@@ -3239,6 +3269,7 @@ def se_compare_process(compare_info, ocr_res_dict, is_gsyh, is_auto, id_res_list
each_license_failed_count, len(result_field_list)))
else:
for license_en, field_list in info_value.items():
compare_log.info('{0} [compare license_en] [entity={1}]'.format(log_base, license_en))
strip_list = []
for a, b in field_list:
if isinstance(b, str):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!