Merge branch 'feature/CHINARPA-4623'
Showing
1 changed file
with
35 additions
and
1 deletions
... | @@ -1251,9 +1251,9 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d | ... | @@ -1251,9 +1251,9 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d |
1251 | tmp_gzs_list = [amount, ] | 1251 | tmp_gzs_list = [amount, ] |
1252 | 1252 | ||
1253 | # 保单 ----------------------------------------------------------------------------------------------------------- | 1253 | # 保单 ----------------------------------------------------------------------------------------------------------- |
1254 | # 以前被注释的 start | ||
1254 | # is_insurance = 0 | 1255 | # is_insurance = 0 |
1255 | # fp_campaign = cms_info.get('fpCampaign', '') | 1256 | # fp_campaign = cms_info.get('fpCampaign', '') |
1256 | fp_group = cms_info.get('fpGroup', '') | ||
1257 | # insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '') | 1257 | # insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '') |
1258 | # if insurance_type == 'Waive Insurance' and isinstance(insurance_price, str): | 1258 | # if insurance_type == 'Waive Insurance' and isinstance(insurance_price, str): |
1259 | # is_insurance = 1 | 1259 | # is_insurance = 1 |
... | @@ -1283,6 +1283,40 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d | ... | @@ -1283,6 +1283,40 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d |
1283 | # if is_insurance == 1: | 1283 | # if is_insurance == 1: |
1284 | # bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price)) | 1284 | # bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price)) |
1285 | # other_info[consts.BD_EN] = bd_field_input | 1285 | # other_info[consts.BD_EN] = bd_field_input |
1286 | # 以前被注释的 end | ||
1287 | |||
1288 | is_insurance = 0 | ||
1289 | fp_campaign = cms_info.get('fpCampaign', '') | ||
1290 | fp_group = cms_info.get('fpGroup', '') | ||
1291 | insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '') | ||
1292 | if isinstance(insurance_price, str): | ||
1293 | is_insurance = 1 | ||
1294 | elif insurance_type == 'Comprehensive Insurance': | ||
1295 | is_insurance = 2 | ||
1296 | if is_insurance != 0: | ||
1297 | if fp_campaign.find('OCU') == -1: | ||
1298 | ssx_amount = amount | ||
1299 | else: | ||
1300 | ssx_amount = format(float(amount) * 0.8, '.2f') | ||
1301 | if fp_campaign.find('Joy_Plus') == -1 or fp_campaign.find('JoyPlus') == -1: | ||
1302 | dszx_amount = '200000' | ||
1303 | else: | ||
1304 | dszx_amount = '500000' | ||
1305 | bd_field_input = [ | ||
1306 | (consts.SE_BD_FIELD[0], [co_name, bo_name] if is_cdfl else [main_name, ]), # 车贷分离 | ||
1307 | (consts.SE_BD_FIELD[1], [co_id, bo_id] if is_cdfl else [main_id, ]), # 车贷分离 | ||
1308 | (consts.SE_BD_FIELD[2], vin_no), | ||
1309 | (consts.SE_BD_FIELD[3], ssx_amount), | ||
1310 | (consts.SE_BD_FIELD[4], dszx_amount), | ||
1311 | (consts.SE_BD_FIELD[5], consts.JDMPV_VALUE), | ||
1312 | (consts.SE_BD_FIELD[6], cms_info.get('insuranceDetails', {}).get('startDate', '')), | ||
1313 | (consts.SE_BD_FIELD[7], cms_info.get('insuranceDetails', {}).get('endDate', '')), | ||
1314 | (consts.SE_BD_FIELD[8], consts.SE_STAMP_VALUE), | ||
1315 | (consts.SE_BD_FIELD[9], consts.SE_DYSYR_VALUE), | ||
1316 | ] | ||
1317 | if is_insurance == 1: | ||
1318 | bd_field_input.append((consts.SE_BD_FIELD[10], insurance_price)) | ||
1319 | other_info[consts.BD_EN] = bd_field_input | ||
1286 | 1320 | ||
1287 | if len(other_info) > 0: | 1321 | if len(other_info) > 0: |
1288 | compare_info['other'] = other_info | 1322 | compare_info['other'] = other_info | ... | ... |
-
Please register or sign in to post a comment