|
|
@@ -99,7 +99,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
// 车辆信息
|
|
|
this.insuredObject = new InsuredObjectDto(carInfo, fullCarDataDto);
|
|
|
// 保险信息
|
|
|
- this.contract = new ContractDto().getContract(riskList, kindList, i - 1,vesselTax,actualValueResponse);
|
|
|
+ this.contract = new ContractDto().getContract(riskList, kindList, i - 1,vesselTax,actualValueResponse,huaTaiConfigureParameters);
|
|
|
// 客户信息
|
|
|
this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
|
//销售信息
|
|
|
@@ -147,6 +147,9 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
public static class PolicyCarDto implements Serializable{
|
|
|
+ //CY 座位数
|
|
|
+ @JSONField(name="approvedPassengersCapacity")
|
|
|
+ private int approvedPassengersCapacity;
|
|
|
//Y 排量(单位:升)
|
|
|
@JSONField(name="displacement")
|
|
|
private double displacement;
|
|
|
@@ -192,6 +195,9 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//CY 整备质量
|
|
|
@JSONField(name="UnladenMass")
|
|
|
private String unladenMass;
|
|
|
+ //Y 能源种类
|
|
|
+ @JSONField(name="FullType")
|
|
|
+ private String FullType;
|
|
|
//CY 车辆来历凭证种类(新车,北京上海机构出单必录)
|
|
|
@JSONField(name="CertificateType")
|
|
|
private String CertificateType;
|
|
|
@@ -266,6 +272,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String plateColorCode;
|
|
|
|
|
|
public PolicyCarDto(CarInfoVo carInfoVo,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
|
|
|
+ this.approvedPassengersCapacity = fullCarDataDto.getApprovedPassengersCapacity();
|
|
|
this.displacement = fullCarDataDto.getDisplacement();
|
|
|
this.plateNo = carInfoVo.getLicenseNo();
|
|
|
this.registerDate = carInfoVo.getRegisterDate() + " " + TimeConstants.START_TIME;
|
|
|
@@ -286,6 +293,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
this.loanStatus = "0";
|
|
|
this.modelName = fullCarDataDto.getModelName();
|
|
|
this.unladenMass = fullCarDataDto.getUnladenMass();
|
|
|
+ this.FullType = fullCarDataDto.getEnergyTypes();
|
|
|
this.motorTypeCode = "A0";
|
|
|
this.motorUsageTypeCode = "8A";
|
|
|
this.plateType = "02";
|
|
|
@@ -346,6 +354,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
this.agentCode = huaTaiConfigureParameters.getAgentCode();
|
|
|
this.agreementNo = huaTaiConfigureParameters.getAgreementNo();
|
|
|
this.comCode = huaTaiConfigureParameters.getComCode();
|
|
|
+ this.promoteSalePlanID = "2200000001";//后期需维护
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -371,11 +380,11 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@JSONField(name="ChargingPost")
|
|
|
private List<ChargingPostDto> chargingPost;
|
|
|
|
|
|
- public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,VehicleAndVesselTax vesselTax, HuaTaiActualValueResponse actualValueResponse) {
|
|
|
+ public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,VehicleAndVesselTax vesselTax, HuaTaiActualValueResponse actualValueResponse, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
List<ContractDto> contractDTOS = new ArrayList<>();
|
|
|
for (RiskInfoVo riskInfoVo : riskInfoVos) {
|
|
|
ContractDto contractDto = new ContractDto();
|
|
|
- this.contractMain = new ContractMainDto(riskInfoVo);
|
|
|
+ this.contractMain = new ContractMainDto(riskInfoVo,huaTaiConfigureParameters);
|
|
|
contractDto.setContractMain(contractMain);
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
contractDto.coverage = Collections.singletonList(new ContractDto.CoverageDto().fetchTraffic(contractMain));
|
|
|
@@ -409,8 +418,10 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//Y 生成日期(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JSONField(name="productionDate")
|
|
|
private String productionDate;
|
|
|
- public ContractMainDto(RiskInfoVo riskInfoVo) {
|
|
|
+ public ContractMainDto(RiskInfoVo riskInfoVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
this.riskCode = InsuranceTypeCorrespondence.getHuaTaiRisk().get(riskInfoVo.getRiskCode());
|
|
|
+ this.handlerCode = huaTaiConfigureParameters.getOperatorCode();
|
|
|
String startDate = riskInfoVo.getStartDate();
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
LocalDate localDate = LocalDate.parse(startDate, formatter);
|
|
|
@@ -427,7 +438,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
this.expiryDate = expiryDateTime.format(formatter);
|
|
|
}
|
|
|
|
|
|
- this.productionDate = "";
|
|
|
+ this.productionDate = df.format(new Date());
|
|
|
}
|
|
|
}
|
|
|
@NoArgsConstructor
|
|
|
@@ -477,8 +488,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
CoverageDto coverageDto = new CoverageDto();
|
|
|
String code = kindInfoVo.getKindCode();
|
|
|
int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), code);
|
|
|
- String s = InsuranceTypeCorrespondence.getZmConnectInsuranceType()[i];
|
|
|
- ContractEnum contractEnum = Enum.valueOf(ContractEnum.class, "C_" + s);
|
|
|
+ String s = InsuranceTypeCorrespondence.getHuaTaiConnectInsuranceType()[i];
|
|
|
+ ContractEnum contractEnum = Enum.valueOf(ContractEnum.class, "H_" + s);
|
|
|
coverageDto.kindCode = contractEnum.getKindCode();
|
|
|
coverageDto.kindName = contractEnum.getKindName();
|
|
|
coverageDto.amount = (int) kindInfoVo.getAmount();
|
|
|
@@ -516,8 +527,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
*/
|
|
|
public CoverageDto fetchTraffic(ContractMainDto contractMain) {
|
|
|
this.amount = 200000;
|
|
|
- this.kindName = ContractEnum.C_BZ.getKindName();
|
|
|
- this.kindCode = ContractEnum.C_BZ.getKindCode();
|
|
|
+ this.kindName = ContractEnum.H_BZ.getKindName();
|
|
|
+ this.kindCode = ContractEnum.H_BZ.getKindCode();
|
|
|
this.validDate = contractMain.getValidDate();
|
|
|
this.expiryDate = contractMain.getExpiryDate();
|
|
|
return this;
|
|
|
@@ -679,7 +690,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
this.mobile = customerInfoVo.getMobile();
|
|
|
this.type = "1";
|
|
|
this.role = role;
|
|
|
- //this.occupationCode = "";
|
|
|
+ this.occupationCode = "20114";//后续需要根据接口维护返参到表里
|
|
|
this.identifyValidDate = customerInfoVo.getIdentifyValidDate() + " " + TimeConstants.START_TIME;
|
|
|
this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate() + " " + TimeConstants.END_TIME;
|
|
|
if("2".equals(role)){
|