|
|
@@ -254,7 +254,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
|
|
|
log.info("ziJinCrawlerSaveProposalResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerSaveProposalResponse));
|
|
|
|
|
|
ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, ziJinCrawlerSaveProposalResponse, ziJinCrawlerSaveQuoteInfoResponse.getOrderNo(), ziJinCrawlerQuotationRequest.getOrderId(), true);
|
|
|
- return ZiJinCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo.getOrder().getOrdersNo(), ziJinCrawlerQuotationResponse, ziJinCrawlerSaveProposalResponse);
|
|
|
+ return ZiJinCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo, ziJinCrawlerQuotationResponse, ziJinCrawlerSaveProposalResponse);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1080,8 +1080,6 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
|
|
|
ciItem.setKindCode(MotorVehicleInsuranceEnum.MVI_BZ.getCode());
|
|
|
ciItem.setKindName(MotorVehicleInsuranceEnum.MVI_BZ.getName());
|
|
|
ciItem.setRiskCode(RiskCodeEnum.TRAFFIC_CODE);
|
|
|
- // ciItem.setBasePremium("950.0000");
|
|
|
- // ciItem.setBenchMarkPremium("950.0000");
|
|
|
itemKindList.add(ciItem);
|
|
|
}
|
|
|
|
|
|
@@ -1104,219 +1102,6 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
|
|
|
return itemKindList;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 根据平台险种代码构建紫金险种对象
|
|
|
- *
|
|
|
- * @param zgKindCode 平台险种代码
|
|
|
- * @param kindItem 平台险种信息
|
|
|
- * @param seatCount 座位数
|
|
|
- * @param actualValue 车辆实际价值
|
|
|
- * @return ZiJinCrawlerQuotationRequest.ItemKindList
|
|
|
- */
|
|
|
- private ZiJinCrawlerQuotationRequest.ItemKindList buildZiJinKindItem(String zgKindCode, KindInfoVo kindItem,
|
|
|
- int seatCount, Double actualValue) {
|
|
|
- ZiJinCrawlerQuotationRequest.ItemKindList item = new ZiJinCrawlerQuotationRequest.ItemKindList();
|
|
|
-
|
|
|
- switch (zgKindCode) {
|
|
|
- case "A": // 机动车损失保险
|
|
|
- item.setKindCode("A");
|
|
|
- item.setKindName("机动车损失保险");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(actualValue != null ? actualValue.longValue() : 0);
|
|
|
- item.setValue("0");
|
|
|
- break;
|
|
|
-
|
|
|
- case "B": // 机动车第三者责任保险
|
|
|
- item.setKindCode("B");
|
|
|
- item.setKindName("机动车第三者责任保险");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- item.setAmount(Long.parseLong(kindItem.getAmount()));
|
|
|
- }
|
|
|
- // item.setBasePremium("515.8200");
|
|
|
- // item.setBenchMarkPremium("687.7600");
|
|
|
- break;
|
|
|
-
|
|
|
- case "D3": // 机动车车上人员责任保险(司机)
|
|
|
- item.setKindCode("D3");
|
|
|
- item.setKindName("机动车车上人员责任保险(司机)");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- item.setAmount(Long.parseLong(kindItem.getAmount()));
|
|
|
- item.setUnitAmount(kindItem.getAmount());
|
|
|
- }
|
|
|
- item.setQuantity(1);
|
|
|
- break;
|
|
|
-
|
|
|
- case "D4": // 机动车车上人员责任保险(乘客)
|
|
|
- item.setKindCode("D4");
|
|
|
- item.setKindName("机动车车上人员责任保险(乘客)");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- long perSeatAmount = Long.parseLong(kindItem.getAmount());
|
|
|
- int passengerCount = seatCount - 1;
|
|
|
- item.setAmount(perSeatAmount * passengerCount);
|
|
|
- item.setUnitAmount(kindItem.getAmount());
|
|
|
- item.setQuantity(passengerCount);
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "L": // 附加车身划痕损失险
|
|
|
- item.setKindCode("L");
|
|
|
- item.setKindName("附加车身划痕损失险");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(kindItem.getAmount());
|
|
|
- break;
|
|
|
-
|
|
|
- case "BD": // 附加法定节假日限额翻倍险
|
|
|
- item.setKindCode("B2");
|
|
|
- item.setKindName("附加法定节假日限额翻倍险");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- item.setAmount(Long.parseLong(kindItem.getAmount()));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "SY_FJ_YBW1": // 附加医保外用药责任险(机动车第三者责任保险)
|
|
|
- item.setKindCode("S1");
|
|
|
- item.setKindName("附加医保外用药责任险(机动车第三者责任保险)");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(kindItem.getAmount());
|
|
|
- // item.setBasePremium("32.0000");
|
|
|
- // item.setBenchMarkPremium("42.6700");
|
|
|
- break;
|
|
|
-
|
|
|
- case "SY_FJ_YBW3": // 附加医保外用药责任险(司机)
|
|
|
- item.setKindCode("S2");
|
|
|
- item.setKindName("附加医保外用药责任险(机动车车上人员责任保险(司机))");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- item.setAmount(Long.parseLong(kindItem.getAmount()));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "SY_FJ_YBW2": // 附加医保外用药责任险(乘客)
|
|
|
- item.setKindCode("S3");
|
|
|
- item.setKindName("附加医保外用药责任险(机动车车上人员责任保险(乘客))");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- if (StringUtils.hasLength(kindItem.getAmount())) {
|
|
|
- long perSeatAmount = Long.parseLong(kindItem.getAmount());
|
|
|
- int passengerCount = seatCount - 1;
|
|
|
- item.setAmount(perSeatAmount * passengerCount);
|
|
|
- item.setUnitAmount(kindItem.getAmount());
|
|
|
- item.setQuantity(passengerCount);
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "TY1": // 道路救援服务特约条款
|
|
|
- item.setKindCode("T1");
|
|
|
- item.setKindName("道路救援服务特约条款");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setServiceTimes(StringUtils.hasLength(kindItem.getServiceTimes()) ?
|
|
|
- kindItem.getServiceTimes() : kindItem.getAmount());
|
|
|
- break;
|
|
|
-
|
|
|
- case "TY2": // 车辆安全检测特约条款
|
|
|
- item.setKindCode("T2");
|
|
|
- item.setKindName("车辆安全检测特约条款");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setServiceTimes(StringUtils.hasLength(kindItem.getServiceTimes()) ?
|
|
|
- kindItem.getServiceTimes() : kindItem.getAmount());
|
|
|
- break;
|
|
|
-
|
|
|
- case "TY3": // 代为驾驶服务特约条款
|
|
|
- item.setKindCode("T3");
|
|
|
- item.setKindName("代为驾驶服务特约条款");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setServiceTimes(StringUtils.hasLength(kindItem.getServiceTimes()) ?
|
|
|
- kindItem.getServiceTimes() : kindItem.getAmount());
|
|
|
- break;
|
|
|
-
|
|
|
- case "TY4": // 代为送检服务特约条款
|
|
|
- item.setKindCode("T4");
|
|
|
- item.setKindName("代为送检服务特约条款");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setServiceTimes(StringUtils.hasLength(kindItem.getServiceTimes()) ?
|
|
|
- kindItem.getServiceTimes() : kindItem.getAmount());
|
|
|
- break;
|
|
|
-
|
|
|
- case "MJ1": // 附加绝对免赔率特约险(车损险)
|
|
|
- item.setKindCode("FA");
|
|
|
- item.setKindName("附加绝对免赔率特约险(机动车损失保险)");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(0);
|
|
|
- if (StringUtils.hasLength(kindItem.getDeductibleRate())) {
|
|
|
- // 提取数字部分
|
|
|
- String deductibleRate = kindItem.getDeductibleRate().replaceAll("[^0-9]", "");
|
|
|
- item.setDeductibleRate(Integer.parseInt(deductibleRate));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "MJ2": // 附加绝对免赔率特约条款(三者险)
|
|
|
- item.setKindCode("FB");
|
|
|
- item.setKindName("附加绝对免赔率特约险(机动车第三者责任保险)");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(0);
|
|
|
- if (StringUtils.hasLength(kindItem.getDeductibleRate())) {
|
|
|
- String deductibleRate = kindItem.getDeductibleRate().replaceAll("[^0-9]", "");
|
|
|
- item.setDeductibleRate(Integer.parseInt(deductibleRate));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "MJ3": // 附加绝对免赔率特约险(司机)
|
|
|
- item.setKindCode("FD3");
|
|
|
- item.setKindName("附加绝对免赔率特约险(机动车车上人员责任保险(司机))");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(0);
|
|
|
- if (StringUtils.hasLength(kindItem.getDeductibleRate())) {
|
|
|
- String deductibleRate = kindItem.getDeductibleRate().replaceAll("[^0-9]", "");
|
|
|
- item.setDeductibleRate(Integer.parseInt(deductibleRate));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- case "MJ4": // 附加绝对免赔率特约险(乘客)
|
|
|
- item.setKindCode("FD4");
|
|
|
- item.setKindName("附加绝对免赔率特约险(机动车车上人员责任保险(乘客))");
|
|
|
- item.setRiskCode(RiskCodeEnum.BUSINESS_CODE);
|
|
|
- item.setAmount(0);
|
|
|
- if (StringUtils.hasLength(kindItem.getDeductibleRate())) {
|
|
|
- String deductibleRate = kindItem.getDeductibleRate().replaceAll("[^0-9]", "");
|
|
|
- item.setDeductibleRate(Integer.parseInt(deductibleRate));
|
|
|
- }
|
|
|
- break;
|
|
|
-
|
|
|
- default:
|
|
|
- // 未知险种代码,返回null
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- return item;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 构建附加保单信息列表
|
|
|
- *
|
|
|
- * @return List<ZiJinCrawlerQuotationRequest.CarPolicySubInfoList>
|
|
|
- */
|
|
|
-// private List<ZiJinCrawlerQuotationRequest.CarPolicySubInfoList> buildCarPolicySubInfoList() {
|
|
|
-// List<ZiJinCrawlerQuotationRequest.CarPolicySubInfoList> carPolicySubInfoList = new ArrayList<>();
|
|
|
-//
|
|
|
-// ZiJinCrawlerQuotationRequest.CarPolicySubInfoList carPolicySubInfo1 = new ZiJinCrawlerQuotationRequest.CarPolicySubInfoList();
|
|
|
-// carPolicySubInfo1.setPlanName("山西9座以内非营业客车驾乘险10万档:36元/座-10万+1万+30元/天");
|
|
|
-// carPolicySubInfo1.setInsureGradeNo("214000737028");
|
|
|
-// carPolicySubInfo1.setIsUseInsured("1");
|
|
|
-// carPolicySubInfo1.setQuantity("1");
|
|
|
-// carPolicySubInfo1.setRiskCode("0737");
|
|
|
-// carPolicySubInfo1.setRiskName("驾乘人员人身意外伤害保险");
|
|
|
-// carPolicySubInfo1.setSumAmount(577000);
|
|
|
-// carPolicySubInfo1.setSumPremium(180);
|
|
|
-// carPolicySubInfo1.setActualPremium("180.00");
|
|
|
-// carPolicySubInfo1.setProductCode("ZKICATM_GRDL_Plan");
|
|
|
-// carPolicySubInfoList.add(carPolicySubInfo1);
|
|
|
-// return carPolicySubInfoList;
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 构建附加保单信息列表
|
|
|
*
|
|
|
@@ -1340,12 +1125,11 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
|
|
|
|
|
|
for (AccidentalDrivingVo accidentalDriving : quoteVo.getAccidentalDrivings()) {
|
|
|
ZiJinCrawlerQuotationRequest.CarPolicySubInfoList carPolicySubInfo = new ZiJinCrawlerQuotationRequest.CarPolicySubInfoList();
|
|
|
+ carPolicySubInfo.setInsureGradeNo(accidentalDriving.getProductCode());
|
|
|
+ carPolicySubInfo.setProductCode(accidentalDriving.getProductCode());
|
|
|
carPolicySubInfo.setPlanName(accidentalDriving.getProductName());
|
|
|
- carPolicySubInfo.setInsureGradeNo("200000736004"); // 前端没传
|
|
|
- carPolicySubInfo.setProductCode(accidentalDriving.getProductCode());// 这个值前端传过来的是乱码200000736004%%0736%%%0
|
|
|
- carPolicySubInfo.setPlanName(accidentalDriving.getProductName());
|
|
|
- carPolicySubInfo.setRiskCode(accidentalDriving.getRiskCode()); // 完了要调整编码,是否要转换
|
|
|
- carPolicySubInfo.setRiskName(accidentalDriving.getProductName()); // 前端没传
|
|
|
+ carPolicySubInfo.setRiskCode(accidentalDriving.getRiskCode());
|
|
|
+ carPolicySubInfo.setRiskName(accidentalDriving.getProductName());
|
|
|
carPolicySubInfo.setSumAmount(ObjectUtils.isEmpty(accidentalDriving.getSumAmount()) ? 0 : (int) Double.parseDouble(accidentalDriving.getSumAmount()));
|
|
|
carPolicySubInfo.setQuantity(accidentalDriving.getQuantity() == 0 ? "0" : String.valueOf(accidentalDriving.getQuantity()));
|
|
|
carPolicySubInfo.setIsUseInsured("1");
|
|
|
@@ -1355,67 +1139,6 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
|
|
|
return carPolicySubInfoList;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 构建紫金驾驶人意外伤害保险(riskCode=0733)信息
|
|
|
- *
|
|
|
- * @param drivingInsurance 驾乘险信息
|
|
|
- * @return ZiJinCrawlerQuotationRequest.CarPolicySubInfoList
|
|
|
- */
|
|
|
- private ZiJinCrawlerQuotationRequest.CarPolicySubInfoList buildRideRisk0733(AccidentalDrivingVo drivingInsurance) {
|
|
|
- ZiJinCrawlerQuotationRequest.CarPolicySubInfoList subInfo = new ZiJinCrawlerQuotationRequest.CarPolicySubInfoList();
|
|
|
-
|
|
|
- // 默认值
|
|
|
- subInfo.setPlanName("全国家用驾驶人意外险50万档:160元-50万+5万+150元/天");
|
|
|
- subInfo.setInsureGradeNo("200000733009");
|
|
|
- subInfo.setIsUseInsured("1");
|
|
|
- subInfo.setQuantity("1");
|
|
|
- subInfo.setRiskCode("0733");
|
|
|
- subInfo.setRiskName("紫金驾驶人意外伤害保险");
|
|
|
- subInfo.setSumAmount(577000);
|
|
|
- subInfo.setSumPremium(160);
|
|
|
- subInfo.setProductCode("ZKICATM_Driver_Plan_Common");
|
|
|
-
|
|
|
- // 根据 planId(这里用 productCode 代替)匹配具体计划
|
|
|
- String planId = drivingInsurance.getProductCode();
|
|
|
- if (StringUtils.hasLength(planId)) {
|
|
|
- switch (planId) {
|
|
|
- case "214000733008":
|
|
|
- subInfo.setPlanName("山西驾驶20座(不含)以下非营业型客车(不包括摩托车、拖拉机、农用运输车、电瓶车)2.5万档:25元/车-2.5万+2500元");
|
|
|
- subInfo.setInsureGradeNo("214000733008");
|
|
|
- subInfo.setSumAmount(27500);
|
|
|
- subInfo.setSumPremium(25);
|
|
|
- break;
|
|
|
- case "200000733007":
|
|
|
- subInfo.setPlanName("全国家用驾驶人意外险30万档:120元-30万+3万+100元/天");
|
|
|
- subInfo.setInsureGradeNo("200000733007");
|
|
|
- subInfo.setSumAmount(348000);
|
|
|
- subInfo.setSumPremium(120);
|
|
|
- break;
|
|
|
- case "200000733009":
|
|
|
- // 默认值就是这个计划,无需修改
|
|
|
- break;
|
|
|
- case "214000733004":
|
|
|
- subInfo.setPlanName("太原驾驶人意外险5万档:50元-5万+0.5万");
|
|
|
- subInfo.setInsureGradeNo("214000733004");
|
|
|
- subInfo.setSumAmount(55000);
|
|
|
- subInfo.setSumPremium(2607);
|
|
|
- break;
|
|
|
- // 其他计划可以继续添加
|
|
|
- default:
|
|
|
- // 使用默认值
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 设置实际保费
|
|
|
- if (subInfo.getSumPremium() != null) {
|
|
|
- subInfo.setActualPremium(String.format("%.2f", subInfo.getSumPremium().doubleValue()));
|
|
|
- }
|
|
|
-
|
|
|
- return subInfo;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 构建车辆信息对象
|
|
|
*
|