|
@@ -1,9 +1,11 @@
|
|
|
package com.ydtech.modules.order.entity.api.bohai.request;
|
|
package com.ydtech.modules.order.entity.api.bohai.request;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
+import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.modules.admin.model.vo.PersonAreaVo;
|
|
import com.ydtech.modules.admin.model.vo.PersonAreaVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
|
|
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
import com.ydtech.modules.order.entity.api.bohai.constants.*;
|
|
import com.ydtech.modules.order.entity.api.bohai.constants.*;
|
|
|
import com.ydtech.modules.order.entity.api.bohai.response.VehicleTypeQueryResponse;
|
|
import com.ydtech.modules.order.entity.api.bohai.response.VehicleTypeQueryResponse;
|
|
|
import com.ydtech.modules.order.entity.config.BoHaiConfigureParameters;
|
|
import com.ydtech.modules.order.entity.config.BoHaiConfigureParameters;
|
|
@@ -14,6 +16,8 @@ import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -44,11 +48,22 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
public VehicleConfirmationReqeust(BoHaiConfigureParameters parameters, BaseQuoteInfoVo quoteInfoVo,
|
|
public VehicleConfirmationReqeust(BoHaiConfigureParameters parameters, BaseQuoteInfoVo quoteInfoVo,
|
|
|
VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO,
|
|
VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO,
|
|
|
String orderNo, PersonAreaVo ownerInfoArea, PersonAreaVo insuredPersonArea,
|
|
String orderNo, PersonAreaVo ownerInfoArea, PersonAreaVo insuredPersonArea,
|
|
|
- PersonAreaVo policyHolderArea) {
|
|
|
|
|
|
|
+ PersonAreaVo policyHolderArea, List<RiskInfoVo> riskList) {
|
|
|
|
|
+
|
|
|
|
|
+ List<RiskInfoVo> riskInfoVos =
|
|
|
|
|
+ riskList.stream().filter(x -> InsuranceRisk.BUSINESS.getCode().equals(x.getRiskCode())).collect(Collectors.toList());
|
|
|
|
|
+ String effectDate;
|
|
|
|
|
+ if (!riskInfoVos.isEmpty()) {
|
|
|
|
|
+ effectDate = riskInfoVos.get(0).getStartDate();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ effectDate = riskList.get(0).getStartDate();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
this.setBaseParam(parameters, RequestType.Z00005.getCode(), orderNo);
|
|
this.setBaseParam(parameters, RequestType.Z00005.getCode(), orderNo);
|
|
|
// 车辆信息
|
|
// 车辆信息
|
|
|
CarInfoVo carInfo = quoteInfoVo.getCarInfo();
|
|
CarInfoVo carInfo = quoteInfoVo.getCarInfo();
|
|
|
- this.vehicle = new VehicleDTO(carInfo, vehicleModelsDTO);
|
|
|
|
|
|
|
+ this.vehicle = new VehicleDTO(carInfo, vehicleModelsDTO, effectDate);
|
|
|
// 车主
|
|
// 车主
|
|
|
CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
|
|
CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
|
|
|
this.carOwner = new CarOwnerDTO(ownerInfo, ownerInfoArea);
|
|
this.carOwner = new CarOwnerDTO(ownerInfo, ownerInfoArea);
|
|
@@ -91,6 +106,9 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("plateNo")
|
|
@JsonProperty("plateNo")
|
|
|
private String plateNo;
|
|
private String plateNo;
|
|
|
|
|
|
|
|
|
|
+ @JsonProperty("licenseType")
|
|
|
|
|
+ private String licenseType;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 初登日期
|
|
* 初登日期
|
|
|
*/
|
|
*/
|
|
@@ -115,6 +133,8 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("moldName")
|
|
@JsonProperty("moldName")
|
|
|
private String moldName;
|
|
private String moldName;
|
|
|
|
|
|
|
|
|
|
+ @JsonProperty("modelCode")
|
|
|
|
|
+ private String modelCode;
|
|
|
/**
|
|
/**
|
|
|
* 座位数
|
|
* 座位数
|
|
|
*/
|
|
*/
|
|
@@ -143,6 +163,12 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("emptyWeight")
|
|
@JsonProperty("emptyWeight")
|
|
|
private String emptyWeight;
|
|
private String emptyWeight;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 保险起期
|
|
|
|
|
+ */
|
|
|
|
|
+ @JsonProperty("effectDate")
|
|
|
|
|
+ private String effectDate;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 排气量(L)
|
|
* 排气量(L)
|
|
|
*/
|
|
*/
|
|
@@ -192,22 +218,26 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private String secondHandVehicleFlag;
|
|
private String secondHandVehicleFlag;
|
|
|
|
|
|
|
|
|
|
|
|
|
- public VehicleDTO(CarInfoVo carInfo, VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO) {
|
|
|
|
|
|
|
+ public VehicleDTO(CarInfoVo carInfo, VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO, String effectDate) {
|
|
|
this.carVin = carInfo.getVinNo();
|
|
this.carVin = carInfo.getVinNo();
|
|
|
this.vehicleModelCode = vehicleModelsDTO.getVehicleModelCode();
|
|
this.vehicleModelCode = vehicleModelsDTO.getVehicleModelCode();
|
|
|
this.engineNo = carInfo.getEngineNo();
|
|
this.engineNo = carInfo.getEngineNo();
|
|
|
this.plateNo = carInfo.getLicenseNo();
|
|
this.plateNo = carInfo.getLicenseNo();
|
|
|
|
|
+ this.licenseType = "02";
|
|
|
this.registerDate = carInfo.getRegisterDate();
|
|
this.registerDate = carInfo.getRegisterDate();
|
|
|
this.purchasePrice = vehicleModelsDTO.getPurchasePrice();
|
|
this.purchasePrice = vehicleModelsDTO.getPurchasePrice();
|
|
|
// 新车
|
|
// 新车
|
|
|
this.newVehicleFlag = StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "0" : "1";
|
|
this.newVehicleFlag = StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "0" : "1";
|
|
|
this.moldName = vehicleModelsDTO.getMoldName();
|
|
this.moldName = vehicleModelsDTO.getMoldName();
|
|
|
|
|
+ this.modelCode = vehicleModelsDTO.getModelCode();
|
|
|
|
|
+
|
|
|
this.seatCount = carInfo.getSeatCount();
|
|
this.seatCount = carInfo.getSeatCount();
|
|
|
this.tonNumber = carInfo.getLimitLoad();
|
|
this.tonNumber = carInfo.getLimitLoad();
|
|
|
this.fuelType = carInfo.getEnergyType();
|
|
this.fuelType = carInfo.getEnergyType();
|
|
|
this.emptyWeight = carInfo.getCompleteKerbMass();
|
|
this.emptyWeight = carInfo.getCompleteKerbMass();
|
|
|
this.exhaustMeasure = vehicleModelsDTO.getExhaustMeasure();
|
|
this.exhaustMeasure = vehicleModelsDTO.getExhaustMeasure();
|
|
|
VehicleKind vehicleKindEnum = VehicleKind.valueOf("VK_" + carInfo.getCimodelclass());
|
|
VehicleKind vehicleKindEnum = VehicleKind.valueOf("VK_" + carInfo.getCimodelclass());
|
|
|
|
|
+ this.effectDate = effectDate;
|
|
|
this.vehicleKind = vehicleKindEnum.getCode();
|
|
this.vehicleKind = vehicleKindEnum.getCode();
|
|
|
this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
|
// 车辆使用性质
|
|
// 车辆使用性质
|
|
@@ -402,7 +432,7 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private String distName;
|
|
private String distName;
|
|
|
|
|
|
|
|
@JsonProperty("residentialAddress")
|
|
@JsonProperty("residentialAddress")
|
|
|
- private String residentialAddress;
|
|
|
|
|
|
|
+ private String residentialAddress;
|
|
|
|
|
|
|
|
|
|
|
|
|
public HolderDTO(CustomerInfoVo policyHolderInfo, PersonAreaVo policyHolderArea) {
|
|
public HolderDTO(CustomerInfoVo policyHolderInfo, PersonAreaVo policyHolderArea) {
|