51567871 by 周伟奇

fix bug

1 parent d32e1dd5
......@@ -885,7 +885,9 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True):
dealer_name = '' if len(dealer_name_list) == 0 else dealer_name_list[-1]
# 个人信息证件------------------------------------------------------------------------------------------------------
is_cdfl = True # 车贷分离
# is_cdfl = True # 车贷分离
is_cdfl_bo = False # 车贷分离,主借
is_cdfl_co = False # 车贷分离,共借
# province = cms_info.get('province', '')
for individual_info in cms_info.get('applicantInformation', []):
all_id_num = []
......@@ -899,10 +901,10 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True):
# 车贷分离判断
is_corporate = individual_info.get('customersubType', '') == 'Corporate'
if individual_info['applicantType'] == consts.APPLICANT_TYPE_ORDER[1] and not is_corporate:
is_cdfl = False
if individual_info['applicantType'] == consts.APPLICANT_TYPE_ORDER[0] and is_corporate:
is_cdfl = False
if individual_info['applicantType'] == consts.APPLICANT_TYPE_ORDER[1] and is_corporate:
is_cdfl_co = True
if individual_info['applicantType'] == consts.APPLICANT_TYPE_ORDER[0] and not is_corporate:
is_cdfl_bo = True
for id_info in individual_info.get('IDInformation', []):
if id_info.get('idType') in consts.SE_CMS_FIRST_ID_FIELD_MAPPING:
......@@ -963,10 +965,22 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True):
# hmh_name, _, hmh_id = main_role_info[applicant_type][0]
break
# co_name = co_id = bo_name = bo_id = ''
# if is_cdfl:
# co_name, _, co_id = main_role_info[consts.APPLICANT_TYPE_ORDER[1]][0]
# bo_name, _, bo_id = main_role_info[consts.APPLICANT_TYPE_ORDER[0]][0]
co_name = co_id = bo_name = bo_id = ''
is_cdfl = is_cdfl_bo and is_cdfl_co
if is_cdfl:
if len(main_role_info.get(consts.APPLICANT_TYPE_ORDER[1], [])) > 0:
co_name, _, co_id = main_role_info[consts.APPLICANT_TYPE_ORDER[1]][0]
else:
co_name = co_id = ''
if len(main_role_info.get(consts.APPLICANT_TYPE_ORDER[0], [])) > 0:
bo_name, _, bo_id = main_role_info[consts.APPLICANT_TYPE_ORDER[0]][0]
else:
bo_name = bo_id = ''
# dda_name_list = []
# dda_num_list = []
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!