|
|
@@ -1,6 +1,14 @@
|
|
|
package com.ydtech.modules.order.entity.api.bohai.request;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.api.bohai.constants.VehicleAffNature;
|
|
|
+import com.ydtech.modules.order.entity.api.bohai.constants.VehicleKind;
|
|
|
+import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsage;
|
|
|
+import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsageDetail;
|
|
|
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
@@ -16,7 +24,7 @@ import java.io.Serializable;
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
-public class VehicleConfirmationReqeust extends BohaiBaseRequest {
|
|
|
+public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
|
|
|
private static final long serialVersionUID = -3897773355946250398L;
|
|
|
|
|
|
@@ -30,74 +38,194 @@ public class VehicleConfirmationReqeust extends BohaiBaseRequest {
|
|
|
private HolderDTO holder;
|
|
|
|
|
|
@JsonProperty("insureder")
|
|
|
-
|
|
|
private InsurederDTO insureder;
|
|
|
|
|
|
+
|
|
|
+ public VehicleConfirmationReqeust(BaseQuoteInfoVo quoteInfoVo) {
|
|
|
+ // 车辆信息
|
|
|
+ CarInfoVo carInfo = quoteInfoVo.getCarInfo();
|
|
|
+ this.vehicle = new VehicleDTO(carInfo);
|
|
|
+
|
|
|
+ // 车主
|
|
|
+ CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
|
|
|
+ this.carOwner = new CarOwnerDTO(ownerInfo);
|
|
|
+
|
|
|
+ // 投保人
|
|
|
+ CustomerInfoVo policyHolderInfo = quoteInfoVo.getPolicyHolderInfo();
|
|
|
+ this.holder = new HolderDTO(policyHolderInfo);
|
|
|
+
|
|
|
+ // 被保人
|
|
|
+ CustomerInfoVo insuredPersonInfo = quoteInfoVo.getInsuredPersonInfo();
|
|
|
+ this.insureder = new InsurederDTO(insuredPersonInfo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
public static class VehicleDTO implements Serializable {
|
|
|
|
|
|
+ private static final long serialVersionUID = -2343894775576071422L;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车辆识别代号/车架号
|
|
|
+ */
|
|
|
@JsonProperty("carVin")
|
|
|
private String carVin;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车型编码
|
|
|
+ */
|
|
|
@JsonProperty("vehicleModelCode")
|
|
|
private String vehicleModelCode;
|
|
|
|
|
|
+ /**
|
|
|
+ * 发动机号
|
|
|
+ */
|
|
|
@JsonProperty("engineNo")
|
|
|
private String engineNo;
|
|
|
|
|
|
+ /**
|
|
|
+ * 号牌号码
|
|
|
+ */
|
|
|
@JsonProperty("plateNo")
|
|
|
private String plateNo;
|
|
|
|
|
|
+ /**
|
|
|
+ * 初登日期
|
|
|
+ */
|
|
|
@JsonProperty("registerDate")
|
|
|
private String registerDate;
|
|
|
|
|
|
+ /**
|
|
|
+ * 指导价格
|
|
|
+ */
|
|
|
@JsonProperty("purchasePrice")
|
|
|
private String purchasePrice;
|
|
|
|
|
|
- @JsonProperty("specialCarFlag")
|
|
|
- private String specialCarFlag;
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 是否新车
|
|
|
+ */
|
|
|
@JsonProperty("newVehicleFlag")
|
|
|
private String newVehicleFlag;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车型名称 (品牌型号)
|
|
|
+ */
|
|
|
@JsonProperty("moldName")
|
|
|
private String moldName;
|
|
|
|
|
|
+ /**
|
|
|
+ * 座位数
|
|
|
+ */
|
|
|
@JsonProperty("seatCount")
|
|
|
private String seatCount;
|
|
|
|
|
|
+
|
|
|
@JsonProperty("purchaseinvoicesDate")
|
|
|
private String purchaseinvoicesDate;
|
|
|
|
|
|
+ /**
|
|
|
+ * 核定载质量(KG)
|
|
|
+ */
|
|
|
@JsonProperty("tonNumber")
|
|
|
private String tonNumber;
|
|
|
|
|
|
+ /**
|
|
|
+ * 燃料类型
|
|
|
+ */
|
|
|
@JsonProperty("fuelType")
|
|
|
private String fuelType;
|
|
|
|
|
|
+ /**
|
|
|
+ * 整备质量(KG)
|
|
|
+ */
|
|
|
@JsonProperty("emptyWeight")
|
|
|
private String emptyWeight;
|
|
|
|
|
|
+ /**
|
|
|
+ * 排气量(L)
|
|
|
+ */
|
|
|
@JsonProperty("exhaustMeasure")
|
|
|
private String exhaustMeasure;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车辆种类
|
|
|
+ */
|
|
|
@JsonProperty("vehicleKind")
|
|
|
private String vehicleKind;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车辆所属性质
|
|
|
+ */
|
|
|
@JsonProperty("vehicleAffNature")
|
|
|
private String vehicleAffNature;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车辆使用性质
|
|
|
+ */
|
|
|
@JsonProperty("vehicleUsage")
|
|
|
private String vehicleUsage;
|
|
|
|
|
|
+ /**
|
|
|
+ * 车辆使用性质细分
|
|
|
+ */
|
|
|
+ @JsonProperty("vehicleUsageDetail")
|
|
|
+ private String vehicleUsageDetail;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否过户
|
|
|
+ */
|
|
|
@JsonProperty("isTransfer")
|
|
|
private String isTransfer;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 过户日期
|
|
|
+ */
|
|
|
+ @JsonProperty("transferDate")
|
|
|
+ private String transferDate;
|
|
|
+
|
|
|
+ public VehicleDTO(CarInfoVo carInfo) {
|
|
|
+ this.carVin = carInfo.getVinNo();
|
|
|
+ this.vehicleModelCode = vehicleModelCode;
|
|
|
+
|
|
|
+ this.engineNo = carInfo.getEngineNo();
|
|
|
+ this.plateNo = carInfo.getLicenseNo();
|
|
|
+ this.registerDate = carInfo.getRegisterDate();
|
|
|
+
|
|
|
+ this.purchasePrice = purchasePrice;
|
|
|
+
|
|
|
+ // 新车
|
|
|
+ this.newVehicleFlag = StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "0" : "1";
|
|
|
+
|
|
|
+ this.moldName = moldName;
|
|
|
+
|
|
|
+ this.seatCount = carInfo.getSeatCount();
|
|
|
+ this.tonNumber = carInfo.getLimitLoad();
|
|
|
+
|
|
|
+ this.fuelType = carInfo.getEnergyType();
|
|
|
+ this.emptyWeight = carInfo.getCompleteKerbMass();
|
|
|
+
|
|
|
+ this.exhaustMeasure = exhaustMeasure;
|
|
|
+
|
|
|
+ VehicleKind vehicleKindEnum = VehicleKind.valueOf(carInfo.getCimodelclass());
|
|
|
+ this.vehicleKind = vehicleKindEnum.getCode();
|
|
|
+ this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
|
+ VehicleUsage vehicleUsageEnum = VehicleUsage.valueOf(carInfo.getCarnature());
|
|
|
+ this.vehicleUsage = vehicleUsageEnum.getCode();
|
|
|
+ VehicleUsageDetail vehicleUsageDetailEnum = VehicleUsageDetail.valueOf(carInfo.getVehicleUse());
|
|
|
+ this.vehicleUsageDetail = vehicleUsageDetailEnum.getCode();
|
|
|
+ this.isTransfer = carInfo.isTransferFlag() ? "1" : "0";
|
|
|
+ this.transferDate = carInfo.getTransferDate();
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
- public static class CarOwnerDTO {
|
|
|
+ public static class CarOwnerDTO implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 8709315851618789033L;
|
|
|
+
|
|
|
@JsonProperty("certType")
|
|
|
private String certType;
|
|
|
|
|
|
@@ -112,11 +240,17 @@ public class VehicleConfirmationReqeust extends BohaiBaseRequest {
|
|
|
|
|
|
@JsonProperty("phoneNumber")
|
|
|
private String phoneNumber;
|
|
|
+
|
|
|
+ public CarOwnerDTO(CustomerInfoVo ownerInfo) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
- public static class HolderDTO {
|
|
|
+ public static class HolderDTO implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = -2088635630636574306L;
|
|
|
|
|
|
@JsonProperty("certType")
|
|
|
private String certType;
|
|
|
@@ -162,11 +296,18 @@ public class VehicleConfirmationReqeust extends BohaiBaseRequest {
|
|
|
|
|
|
@JsonProperty("elecApplicationFlag")
|
|
|
private String elecApplicationFlag;
|
|
|
+
|
|
|
+ public HolderDTO(CustomerInfoVo policyHolderInfo) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
- public static class InsurederDTO {
|
|
|
+ public static class InsurederDTO implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1045840175935280892L;
|
|
|
+
|
|
|
@JsonProperty("certType")
|
|
|
private String certType;
|
|
|
|
|
|
@@ -193,5 +334,10 @@ public class VehicleConfirmationReqeust extends BohaiBaseRequest {
|
|
|
|
|
|
@JsonProperty("certiType")
|
|
|
private String certiType;
|
|
|
+
|
|
|
+ public InsurederDTO(CustomerInfoVo insuredPersonInfo) {
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|