0a08bff7 by 冯轩

Merge branch 'feature/CHINARPA-4623'

2 parents 8e60898e 5ab31037
......@@ -1251,9 +1251,9 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
tmp_gzs_list = [amount, ]
# 保单 -----------------------------------------------------------------------------------------------------------
# 以前被注释的 start
# is_insurance = 0
# fp_campaign = cms_info.get('fpCampaign', '')
fp_group = cms_info.get('fpGroup', '')
# insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '')
# if insurance_type == 'Waive Insurance' and isinstance(insurance_price, str):
# is_insurance = 1
......@@ -1283,6 +1283,40 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
# if is_insurance == 1:
# bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price))
# other_info[consts.BD_EN] = bd_field_input
# 以前被注释的 end
is_insurance = 0
fp_campaign = cms_info.get('fpCampaign', '')
fp_group = cms_info.get('fpGroup', '')
insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '')
if isinstance(insurance_price, str):
is_insurance = 1
elif insurance_type == 'Comprehensive Insurance':
is_insurance = 2
if is_insurance != 0:
if fp_campaign.find('OCU') == -1:
ssx_amount = amount
else:
ssx_amount = format(float(amount) * 0.8, '.2f')
if fp_campaign.find('Joy_Plus') == -1 or fp_campaign.find('JoyPlus') == -1:
dszx_amount = '200000'
else:
dszx_amount = '500000'
bd_field_input = [
(consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离
(consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离
(consts.SE_BD_FIELD[2], vin_no),
(consts.SE_BD_FIELD[3], ssx_amount),
(consts.SE_BD_FIELD[4], dszx_amount),
(consts.SE_BD_FIELD[5], consts.JDMPV_VALUE),
(consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')),
(consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')),
(consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE),
(consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE),
]
if is_insurance == 1:
bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price))
other_info[consts.BD_EN] = bd_field_input
if len(other_info) > 0:
compare_info['other'] = other_info
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!