|
|
@@ -6,6 +6,7 @@ import com.jzg.quotation.chengtai.crawler.entity.bo.ChengTaiSaleInfoBo;
|
|
|
import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiClientIdentifyResponse;
|
|
|
import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiFindCarModelResponse;
|
|
|
import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiGetCIModelCodeResponse;
|
|
|
+import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiPremiumcaResponse;
|
|
|
import com.jzg.quotation.chengtai.crawler.utils.CarDepreciationCalculator;
|
|
|
import com.jzg.quotation.commons.utils.TimeProcessing;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
@@ -14,7 +15,10 @@ import lombok.NoArgsConstructor;
|
|
|
|
|
|
import java.io.Serial;
|
|
|
import java.io.Serializable;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -76,10 +80,11 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
ChengTaiClientIdentifyResponse policyHolder, ChengTaiClientIdentifyResponse insuredPerson,
|
|
|
ChengTaiSaleInfoBo saleInfoBo,
|
|
|
ChengTaiGetCIModelCodeResponse ciModelCode,
|
|
|
- CarDepreciationCalculator.DepreciationResult depreciationResult) {
|
|
|
+ CarDepreciationCalculator.DepreciationResult depreciationResult,
|
|
|
+ String name) {
|
|
|
this.combo = new ComboDTO("1");
|
|
|
// 主要信息
|
|
|
- this.businessMain = new BusinessMainDTO(saleInfoBo.getSaleInfo(), "");
|
|
|
+ this.businessMain = new BusinessMainDTO(saleInfoBo.getSaleInfo(), "",name);
|
|
|
this.flag = new FlagDTO(false, false);
|
|
|
// 归属信息
|
|
|
this.saleInfo = saleInfoBo.getSaleInfo();
|
|
|
@@ -96,7 +101,11 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
// 交强险
|
|
|
this.ciContract = new CiContractDTO(quoteVo.getCiRiskInfoVo(), policyHolder);
|
|
|
// 商业险
|
|
|
- this.biContract = new BiContractDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
|
|
|
+ RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
|
|
|
+ if (biRiskInfoVo != null) {
|
|
|
+ this.biContract = new BiContractDTO(biRiskInfoVo, quoteVo.getKindInfoVo());
|
|
|
+ }
|
|
|
+ this.submitReqBody = new SubmitReqBodyDTO();
|
|
|
}
|
|
|
|
|
|
@AllArgsConstructor
|
|
|
@@ -220,9 +229,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
private String paymentmark;
|
|
|
// end submit
|
|
|
|
|
|
- public BusinessMainDTO(SaleInfoDTO saleInfoDTO, String planCode) {
|
|
|
- this.operatorCode = saleInfoDTO.getUserCode();
|
|
|
- this.operatorName = saleInfoDTO.getUserName();
|
|
|
+ public BusinessMainDTO(SaleInfoDTO saleInfoDTO, String planCode,String name) {
|
|
|
+ this.operatorCode = name;
|
|
|
+ this.operatorName = "太原天勤";
|
|
|
this.operateDate = TimeProcessing.nowDate();
|
|
|
this.issueDate = TimeProcessing.nowDateTime();
|
|
|
this.inputDate = this.operateDate;
|
|
|
@@ -290,6 +299,10 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
private String userCode;
|
|
|
@JsonProperty("userName")
|
|
|
private String userName;
|
|
|
+ @JsonProperty("riskBusinessType")
|
|
|
+ private String riskBusinessType;
|
|
|
+ @JsonProperty("riskBusinessTypeName")
|
|
|
+ private String riskBusinessTypeName;
|
|
|
|
|
|
// start submit 添加的参数
|
|
|
@JsonProperty("id")
|
|
|
@@ -458,7 +471,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
// end 参数
|
|
|
|
|
|
public PolicyCarDTO(CarInfoVo carInfoVo, CarDepreciationCalculator.DepreciationResult depreciationResult, ChengTaiFindCarModelResponse.DataDTO carModel, ChengTaiGetCIModelCodeResponse ciModelCode) {
|
|
|
-
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
this.vhlInfoType = "1";
|
|
|
this.plateNo = carInfoVo.getLicenseNo();
|
|
|
this.vin = carInfoVo.getVinNo();
|
|
|
@@ -475,24 +488,24 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.carKindName = carInfoVo.getCarKindName();
|
|
|
this.useNatureCode = carInfoVo.getVehicleUseCode();
|
|
|
this.useNatureName = carInfoVo.getVehicleUseName();
|
|
|
- this.attachNature = carInfoVo.getProperty();
|
|
|
+ this.attachNature = carInfoVo.getPropertyCode();
|
|
|
this.attachNatureName = carInfoVo.getPropertyName();
|
|
|
this.purchasePrice = Integer.valueOf(carModel.getPurchasepricenottax());
|
|
|
this.orignPurchasePrice = Integer.valueOf(carModel.getPurchasepricenottax());
|
|
|
this.actualValue = depreciationResult.getActualValue().toString();
|
|
|
this.consultValue = depreciationResult.getActualValue().toString();
|
|
|
this.plateType = carInfoVo.getLicenseColorCode();
|
|
|
- this.plateTypeName = carInfoVo.getLicenseColorName();
|
|
|
+ this.plateTypeName = Optional.ofNullable(carInfoVo.getLicenseColorName()).orElse("小型汽车号牌");
|
|
|
this.vehicleType = carInfoVo.getCarTypeCode();
|
|
|
- this.vehicleTypeName = carInfoVo.getCarTypeName();
|
|
|
+ this.vehicleTypeName = Optional.ofNullable(carInfoVo.getCarTypeName()).orElse("轿车");
|
|
|
this.energyTypes = carInfoVo.getEnergyTypeCode();
|
|
|
- this.carCheckStatus = "";
|
|
|
- this.carCheckerName = "";
|
|
|
- this.carCheckTime = "";
|
|
|
+ this.carCheckStatus = "2";
|
|
|
+ this.carCheckerName = "李锴";
|
|
|
+ this.carCheckTime = format.format(new Date());
|
|
|
this.approvedPassengersCapacity = Integer.valueOf(carInfoVo.getSeatCount());
|
|
|
- this.approvedLoad = Integer.valueOf("");
|
|
|
+ this.approvedLoad = 0;
|
|
|
this.power = carModel.getPower();
|
|
|
- this.displacement = Integer.valueOf(carModel.getExhaustscale());
|
|
|
+ this.displacement = Integer.valueOf(carModel.getExhaustscale().replace(".0",""));
|
|
|
this.exhaustScaleUnit = "cc";
|
|
|
this.loanVehicleFlag = "0";
|
|
|
this.ecdemicVehicleFlag = "0";
|
|
|
@@ -504,7 +517,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.brand = carModel.getCarbrand();
|
|
|
this.shortHandCode = carModel.getShorthandcode();
|
|
|
this.vehicleKindCode = "V";
|
|
|
- this.carName = ciModelCode.getCarName();
|
|
|
+ this.carName = Optional.ofNullable(ciModelCode.getCarName()).orElse(carModel.getModelcname());
|
|
|
this.monthDepRate = depreciationResult.getMonthDepRate();
|
|
|
this.matchCiModelCode = ciModelCode.getJyModelCode();
|
|
|
this.unladenMass = "";
|
|
|
@@ -610,6 +623,17 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
@JsonProperty("comCode")
|
|
|
private String comCode;
|
|
|
|
|
|
+ @JsonProperty("relationWithCar")
|
|
|
+ private String relationWithCar;
|
|
|
+
|
|
|
+ @JsonProperty("relationWithInsured")
|
|
|
+ private String relationWithInsured;
|
|
|
+
|
|
|
+ @JsonProperty("sameType")
|
|
|
+ private String sameType;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// start submit 添加的参数
|
|
|
@JsonProperty("id")
|
|
|
private String id;
|
|
|
@@ -625,14 +649,14 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.customerId = policyHolder.getCustomerId();
|
|
|
this.name = policyHolder.getName();
|
|
|
this.identifyTypeCode = policyHolder.getIdentifyTypeCode();
|
|
|
- this.identifyTypeName = policyHolder.getIdentifyTypeName();
|
|
|
+ this.identifyTypeName = Optional.ofNullable(policyHolder.getIdentifyTypeName()).orElse("");
|
|
|
this.identifyNumber = policyHolder.getIdentifyNumber();
|
|
|
this.province = policyHolder.getProvince();
|
|
|
this.city = policyHolder.getCity();
|
|
|
this.district = policyHolder.getDistrict();
|
|
|
- this.provinceName = policyHolder.getProvinceName();
|
|
|
- this.cityName = policyHolder.getCityName();
|
|
|
- this.districtName = policyHolder.getDistrictName();
|
|
|
+ this.provinceName = Optional.ofNullable(policyHolder.getProvinceName()).orElse("");
|
|
|
+ this.cityName = Optional.ofNullable(policyHolder.getCityName()).orElse("");
|
|
|
+ this.districtName = Optional.ofNullable(policyHolder.getDistrictName()).orElse("");
|
|
|
this.addr = policyHolder.getAddr();
|
|
|
this.completeAddress = policyHolder.getCompleteAddress();
|
|
|
this.mobile = policyHolder.getMobile();
|
|
|
@@ -651,7 +675,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.microBusinessesInd = policyHolder.getMicroBusinessesInd();
|
|
|
this.signedbyOrig = "0";
|
|
|
this.comCode = policyHolder.getComCode();
|
|
|
-
|
|
|
+ this.relationWithCar="1";
|
|
|
+ this.relationWithInsured="7";
|
|
|
+ this.sameType="1";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -684,6 +710,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
@JsonProperty("longTerm")
|
|
|
private String longTerm;
|
|
|
|
|
|
+ @JsonProperty("sameType")
|
|
|
+ private String sameType;
|
|
|
+
|
|
|
// start submit 添加的参数
|
|
|
@JsonProperty("id")
|
|
|
private String id;
|
|
|
@@ -697,7 +726,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.role = "3";
|
|
|
this.name = ownersInfo.getName();
|
|
|
this.identifyTypeCode = ownersInfo.getIdentifyType();
|
|
|
- this.identifyTypeName = ownersInfo.getIdentifyTypeName();
|
|
|
+ this.identifyTypeName = Optional.ofNullable(ownersInfo.getIdentifyTypeName()).orElse("居民身份证");
|
|
|
this.identifyNumber = ownersInfo.getIdentifyNumber();
|
|
|
this.sex = ownersInfo.getGender();
|
|
|
this.age = ownersInfo.getAge();
|
|
|
@@ -705,6 +734,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
this.identifyValidDate = ownersInfo.getIdentifyValidDate();
|
|
|
this.identifyValidEndDate = ownersInfo.getIdentifyValidEndDate();
|
|
|
this.longTerm = "0";
|
|
|
+ this.sameType = "1";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -743,7 +773,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
|
|
|
|
|
|
public ContractMainDTO(RiskInfoVo biRiskInfoVo) {
|
|
|
- this.riskCode = riskCode;
|
|
|
+ this.riskCode = biRiskInfoVo.getRiskCode();
|
|
|
this.riskName = riskName;
|
|
|
this.validAtOnce = validAtOnce;
|
|
|
this.validDate = biRiskInfoVo.getStartDate();
|
|
|
@@ -834,6 +864,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
@JsonProperty("tax")
|
|
|
private TaxDTO tax;
|
|
|
|
|
|
+ @JsonProperty("platFormMessage")
|
|
|
+ private PlatFormMessageDTO platFormMessage;
|
|
|
+
|
|
|
public CiContractDTO(RiskInfoVo ciRiskInfoVo, ChengTaiClientIdentifyResponse policyHolder) {
|
|
|
this.contractMain = new ContractMainDTO(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
|
|
|
this.coverage = CoverageDTO.getCoverage(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
|
|
|
@@ -957,6 +990,22 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
return List.of(coverageDTO);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class PlatFormMessageDTO {
|
|
|
+ @JsonProperty("querySequenceNo")
|
|
|
+ private String querySequenceNo;
|
|
|
+ @JsonProperty("reinsuranceFlag")
|
|
|
+ private String reinsuranceFlag;
|
|
|
+ @JsonProperty("question")
|
|
|
+ private String question;
|
|
|
+ @JsonProperty("ciCarKind")
|
|
|
+ private String ciCarKind;
|
|
|
+ @JsonProperty("answer")
|
|
|
+ private String answer;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@@ -1075,7 +1124,6 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @NoArgsConstructor
|
|
|
@Data
|
|
|
public static class SubmitReqBodyDTO {
|
|
|
@JsonProperty("businessType")
|
|
|
@@ -1110,6 +1158,13 @@ public class ChengTaiPremiumcaRequest implements Serializable {
|
|
|
|
|
|
@JsonProperty("smscheckFlag")
|
|
|
private String smscheckFlag;
|
|
|
+
|
|
|
+ public SubmitReqBodyDTO(){
|
|
|
+ this.businessType= "PROPOSAL";
|
|
|
+ this.acciRelatedFlag= "0";
|
|
|
+ this.mandatoryReviewFlag= false;
|
|
|
+ this.reinsuranceFlag= "0";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|