|
@@ -48,7 +48,8 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
@JsonProperty("businessData")
|
|
@JsonProperty("businessData")
|
|
|
private BusinessDataDTO businessData;
|
|
private BusinessDataDTO businessData;
|
|
|
|
|
|
|
|
- public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo, ZmConfigureParameters zmConfigureParameters) {
|
|
|
|
|
|
|
+ public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO,
|
|
|
|
|
+ AccidentalDrivingVo accidentalDrivingVo, ZmConfigureParameters zmConfigureParameters) {
|
|
|
this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo, zmConfigureParameters);
|
|
this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo, zmConfigureParameters);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -89,7 +90,8 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
@JsonProperty("productPlan")
|
|
@JsonProperty("productPlan")
|
|
|
private String productPlan;
|
|
private String productPlan;
|
|
|
|
|
|
|
|
- public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo, ZmConfigureParameters zmConfigureParameters) {
|
|
|
|
|
|
|
+ public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO,
|
|
|
|
|
+ AccidentalDrivingVo accidentalDrivingVo, ZmConfigureParameters zmConfigureParameters) {
|
|
|
CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
|
|
CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
|
|
|
List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
|
|
List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
|
|
|
List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
|
|
List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
|
|
@@ -98,18 +100,19 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
CustomerInfoVo insuredPersonInfo = baseQuoteInfoVo.getInsuredPersonInfo();
|
|
CustomerInfoVo insuredPersonInfo = baseQuoteInfoVo.getInsuredPersonInfo();
|
|
|
int i = Integer.parseInt(carInfo.getSeatCount());
|
|
int i = Integer.parseInt(carInfo.getSeatCount());
|
|
|
//产品编码
|
|
//产品编码
|
|
|
- this.productPlan=InsuranceTypeCorrespondence.getZhongMei_PRODUCT().get(simpleStadarCarDTO.getEnergyTypes());
|
|
|
|
|
|
|
+ this.productPlan = InsuranceTypeCorrespondence.getZhongMei_PRODUCT().get(simpleStadarCarDTO.getEnergyTypes());
|
|
|
// 保单归属地
|
|
// 保单归属地
|
|
|
this.policyLocation = new PolicyLocationDTO(zmConfigureParameters);
|
|
this.policyLocation = new PolicyLocationDTO(zmConfigureParameters);
|
|
|
// 车辆信息
|
|
// 车辆信息
|
|
|
this.insuredObject = new InsuredObjectDTO(carInfo, simpleStadarCarDTO);
|
|
this.insuredObject = new InsuredObjectDTO(carInfo, simpleStadarCarDTO);
|
|
|
// 保险信息
|
|
// 保险信息
|
|
|
- this.contract = new ContractDTO().getContract(riskList, kindList, i - 1,simpleStadarCarDTO.getEnergyTypes());
|
|
|
|
|
|
|
+ this.contract = new ContractDTO().getContract(riskList, kindList, i - 1, simpleStadarCarDTO.getEnergyTypes());
|
|
|
// 客户信息
|
|
// 客户信息
|
|
|
this.customer = new CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
this.customer = new CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
|
// 驾意险
|
|
// 驾意险
|
|
|
if (!StringUtils.isEmpty(accidentalDrivingVo.getRideRiskCode())) {
|
|
if (!StringUtils.isEmpty(accidentalDrivingVo.getRideRiskCode())) {
|
|
|
- this.accident = Collections.singletonList(new AccidentDTO(accidentalDrivingVo.getRideRiskCode(), accidentalDrivingVo.getQuantity()));
|
|
|
|
|
|
|
+ this.accident = Collections.singletonList(new AccidentDTO(accidentalDrivingVo.getRideRiskCode(),
|
|
|
|
|
+ accidentalDrivingVo.getQuantity()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -278,11 +281,12 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
@JsonProperty("coverage")
|
|
@JsonProperty("coverage")
|
|
|
private List<CoverageDTO> coverage;
|
|
private List<CoverageDTO> coverage;
|
|
|
|
|
|
|
|
- public List<ContractDTO> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,String energyTypes) {
|
|
|
|
|
|
|
+ public List<ContractDTO> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,
|
|
|
|
|
+ String energyTypes) {
|
|
|
List<ContractDTO> contractDTOS = new ArrayList<>();
|
|
List<ContractDTO> contractDTOS = new ArrayList<>();
|
|
|
for (RiskInfoVo riskInfoVo : riskInfoVos) {
|
|
for (RiskInfoVo riskInfoVo : riskInfoVos) {
|
|
|
ContractDTO contractDTO = new ContractDTO();
|
|
ContractDTO contractDTO = new ContractDTO();
|
|
|
- contractDTO.contractMain = new ContractMainDTO(riskInfoVo,energyTypes);
|
|
|
|
|
|
|
+ contractDTO.contractMain = new ContractMainDTO(riskInfoVo, energyTypes);
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
contractDTO.coverage = Collections.singletonList(new CoverageDTO().fetchTraffic());
|
|
contractDTO.coverage = Collections.singletonList(new CoverageDTO().fetchTraffic());
|
|
|
}
|
|
}
|
|
@@ -316,7 +320,7 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
@JsonProperty("reinsuranceFlag")
|
|
@JsonProperty("reinsuranceFlag")
|
|
|
private String reinsuranceFlag;
|
|
private String reinsuranceFlag;
|
|
|
|
|
|
|
|
- public ContractMainDTO(RiskInfoVo riskInfoVo,String energyTypes) {
|
|
|
|
|
|
|
+ public ContractMainDTO(RiskInfoVo riskInfoVo, String energyTypes) {
|
|
|
this.riskCode = InsuranceTypeCorrespondence.getZhongMei_RISK().get(energyTypes).get(riskInfoVo.getRiskCode());
|
|
this.riskCode = InsuranceTypeCorrespondence.getZhongMei_RISK().get(energyTypes).get(riskInfoVo.getRiskCode());
|
|
|
String startDate = riskInfoVo.getStartDate();
|
|
String startDate = riskInfoVo.getStartDate();
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
@@ -404,6 +408,10 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
|
|
if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
|
|
|
coverageDTO.deductible = "-" + kindInfoVo.getDeductibleRate();
|
|
coverageDTO.deductible = "-" + kindInfoVo.getDeductibleRate();
|
|
|
}
|
|
}
|
|
|
|
|
+ // 增值服务
|
|
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), code) >= 0) {
|
|
|
|
|
+ coverageDTO.quantity = kindInfoVo.getServiceTimes();
|
|
|
|
|
+ }
|
|
|
list.add(coverageDTO);
|
|
list.add(coverageDTO);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -495,7 +503,8 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public List<CustomerDTO> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
|
|
public List<CustomerDTO> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
|
|
|
- return Arrays.asList(new CustomerDTO(ownerInfo, "3"), new CustomerDTO(policyHolderInfo, "1"), new CustomerDTO(insuredPersonInfo, "2"));
|
|
|
|
|
|
|
+ return Arrays.asList(new CustomerDTO(ownerInfo, "3"), new CustomerDTO(policyHolderInfo, "1"),
|
|
|
|
|
+ new CustomerDTO(insuredPersonInfo, "2"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|