|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ydtech.modules.order.entity.api.bohai.request;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.ydtech.modules.admin.model.vo.PersonAreaVo;
|
|
|
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.*;
|
|
|
@@ -40,22 +41,23 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
private InsurederDTO insureder;
|
|
|
|
|
|
|
|
|
- public VehicleConfirmationReqeust(BoHaiConfigureParameters parameters, BaseQuoteInfoVo quoteInfoVo,
|
|
|
- VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO,
|
|
|
- String orderNo) {
|
|
|
+ public VehicleConfirmationReqeust(BoHaiConfigureParameters parameters, BaseQuoteInfoVo quoteInfoVo,
|
|
|
+ VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO,
|
|
|
+ String orderNo, PersonAreaVo ownerInfoArea, PersonAreaVo insuredPersonArea,
|
|
|
+ PersonAreaVo policyHolderArea) {
|
|
|
this.setBaseParam(parameters, RequestType.Z00005.getCode(), orderNo);
|
|
|
// 车辆信息
|
|
|
CarInfoVo carInfo = quoteInfoVo.getCarInfo();
|
|
|
this.vehicle = new VehicleDTO(carInfo, vehicleModelsDTO);
|
|
|
// 车主
|
|
|
CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
|
|
|
- this.carOwner = new CarOwnerDTO(ownerInfo);
|
|
|
+ this.carOwner = new CarOwnerDTO(ownerInfo, ownerInfoArea);
|
|
|
// 投保人
|
|
|
CustomerInfoVo policyHolderInfo = quoteInfoVo.getPolicyHolderInfo();
|
|
|
- this.holder = new HolderDTO(policyHolderInfo);
|
|
|
+ this.holder = new HolderDTO(policyHolderInfo, policyHolderArea);
|
|
|
// 被保人
|
|
|
CustomerInfoVo insuredPersonInfo = quoteInfoVo.getInsuredPersonInfo();
|
|
|
- this.insureder = new InsurederDTO(insuredPersonInfo);
|
|
|
+ this.insureder = new InsurederDTO(insuredPersonInfo, insuredPersonArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -183,9 +185,16 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("transferDate")
|
|
|
private String transferDate;
|
|
|
|
|
|
+ @JsonProperty("vehicleTypeOfDrivingPermit")
|
|
|
+ private String vehicleTypeOfDrivingPermit;
|
|
|
+
|
|
|
+ @JsonProperty("secondHandVehicleFlag")
|
|
|
+ private String secondHandVehicleFlag;
|
|
|
+
|
|
|
+
|
|
|
public VehicleDTO(CarInfoVo carInfo, VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO) {
|
|
|
this.carVin = carInfo.getVinNo();
|
|
|
- this.vehicleModelCode = vehicleModelsDTO.getMoldCharacterCode();
|
|
|
+ this.vehicleModelCode = vehicleModelsDTO.getVehicleModelCode();
|
|
|
this.engineNo = carInfo.getEngineNo();
|
|
|
this.plateNo = carInfo.getLicenseNo();
|
|
|
this.registerDate = carInfo.getRegisterDate();
|
|
|
@@ -198,16 +207,20 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
this.fuelType = carInfo.getEnergyType();
|
|
|
this.emptyWeight = carInfo.getCompleteKerbMass();
|
|
|
this.exhaustMeasure = vehicleModelsDTO.getExhaustMeasure();
|
|
|
- VehicleKind vehicleKindEnum = VehicleKind.valueOf(carInfo.getCimodelclass());
|
|
|
+ VehicleKind vehicleKindEnum = VehicleKind.valueOf("VK_" + carInfo.getCimodelclass());
|
|
|
this.vehicleKind = vehicleKindEnum.getCode();
|
|
|
this.vehicleAffNature = VehicleAffNature.VAN_1.getCode();
|
|
|
- VehicleUsage vehicleUsageEnum = VehicleUsage.valueOf(carInfo.getCarnature());
|
|
|
+ // 车辆使用性质
|
|
|
+ VehicleUsage vehicleUsageEnum = VehicleUsage.valueOf("VU_" + carInfo.getCarnature());
|
|
|
this.vehicleUsage = vehicleUsageEnum.getCode();
|
|
|
- VehicleUsageDetail vehicleUsageDetailEnum = VehicleUsageDetail.valueOf(carInfo.getVehicleUse());
|
|
|
+ // 车辆用途
|
|
|
+ VehicleUsageDetail vehicleUsageDetailEnum = VehicleUsageDetail.valueOf("VUD_" + carInfo.getVehicleUse());
|
|
|
this.vehicleUsageDetail = vehicleUsageDetailEnum.getCode();
|
|
|
this.isTransfer = carInfo.isTransferFlag() ? "1" : "0";
|
|
|
this.transferDate = carInfo.getTransferDate();
|
|
|
|
|
|
+ this.vehicleTypeOfDrivingPermit = carInfo.getCartype();
|
|
|
+ this.secondHandVehicleFlag = "0";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -232,8 +245,73 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("phoneNumber")
|
|
|
private String phoneNumber;
|
|
|
|
|
|
- public CarOwnerDTO(CustomerInfoVo ownerInfo) {
|
|
|
+ /**
|
|
|
+ * 客户类型
|
|
|
+ */
|
|
|
+ @JsonProperty("customerType")
|
|
|
+ private String customerType;
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @JsonProperty("certiType")
|
|
|
+ private String certiType;
|
|
|
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ @JsonProperty("email")
|
|
|
+ private String email;
|
|
|
+ /**
|
|
|
+ * 省份代码
|
|
|
+ */
|
|
|
+ @JsonProperty("provCode")
|
|
|
+ private String provCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份名称
|
|
|
+ */
|
|
|
+ @JsonProperty("provName")
|
|
|
+ private String provName;
|
|
|
+ /**
|
|
|
+ * 城市代码
|
|
|
+ */
|
|
|
+ @JsonProperty("cityCode")
|
|
|
+ private String cityCode;
|
|
|
+ /**
|
|
|
+ * 城市名称
|
|
|
+ */
|
|
|
+ @JsonProperty("cityName")
|
|
|
+ private String cityName;
|
|
|
+ /**
|
|
|
+ * 区县代码
|
|
|
+ */
|
|
|
+ @JsonProperty("distCode")
|
|
|
+ private String distCode;
|
|
|
+ /**
|
|
|
+ * 区县名称
|
|
|
+ */
|
|
|
+ @JsonProperty("distName")
|
|
|
+ private String distName;
|
|
|
+
|
|
|
+ @JsonProperty("residentialAddress")
|
|
|
+ private String residentialAddress;
|
|
|
+
|
|
|
+ public CarOwnerDTO(CustomerInfoVo ownerInfo, PersonAreaVo ownerInfoArea) {
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
+ this.ownerName = ownerInfo.getName();
|
|
|
+ this.certNo = ownerInfo.getIdentifyNumber();
|
|
|
+ this.address = ownerInfo.getAddr();
|
|
|
+ this.phoneNumber = ownerInfo.getMobile();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ this.email = ownerInfo.getEmail();
|
|
|
+ this.certiType = ownerInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
+ this.residentialAddress = ownerInfo.getAddr();
|
|
|
+ this.provCode = ownerInfoArea.getProvinceCode();
|
|
|
+ this.provName = ownerInfoArea.getProvinceName();
|
|
|
+ this.cityCode = ownerInfoArea.getCityCode();
|
|
|
+ this.cityName = ownerInfoArea.getCityName();
|
|
|
+ this.distCode = ownerInfoArea.getCountyCode();
|
|
|
+ this.distName = ownerInfoArea.getCountyName();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -288,25 +366,71 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("elecApplicationFlag")
|
|
|
private String elecApplicationFlag;
|
|
|
|
|
|
+ @JsonProperty("customerType")
|
|
|
+ private String customerType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份代码
|
|
|
+ */
|
|
|
+ @JsonProperty("provCode")
|
|
|
+ private String provCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份名称
|
|
|
+ */
|
|
|
+ @JsonProperty("provName")
|
|
|
+ private String provName;
|
|
|
+ /**
|
|
|
+ * 城市代码
|
|
|
+ */
|
|
|
+ @JsonProperty("cityCode")
|
|
|
+ private String cityCode;
|
|
|
+ /**
|
|
|
+ * 城市名称
|
|
|
+ */
|
|
|
+ @JsonProperty("cityName")
|
|
|
+ private String cityName;
|
|
|
+ /**
|
|
|
+ * 区县代码
|
|
|
+ */
|
|
|
+ @JsonProperty("distCode")
|
|
|
+ private String distCode;
|
|
|
+ /**
|
|
|
+ * 区县名称
|
|
|
+ */
|
|
|
+ @JsonProperty("distName")
|
|
|
+ private String distName;
|
|
|
+
|
|
|
+ @JsonProperty("residentialAddress")
|
|
|
+ private String residentialAddress;
|
|
|
|
|
|
|
|
|
- public HolderDTO(CustomerInfoVo policyHolderInfo) {
|
|
|
- this.certType = certType;
|
|
|
+ public HolderDTO(CustomerInfoVo policyHolderInfo, PersonAreaVo policyHolderArea) {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
this.holderName = policyHolderInfo.getName();
|
|
|
+ this.certNo = policyHolderInfo.getIdentifyNumber();
|
|
|
+ this.address = policyHolderInfo.getAddr();
|
|
|
+ this.phoneNumber = policyHolderInfo.getMobile();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ this.email = policyHolderInfo.getEmail();
|
|
|
+ this.certiType = policyHolderInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
+
|
|
|
+ // 个别参数
|
|
|
+ this.invoiceType = InvoiceType.IT_1.getCode();
|
|
|
+ this.bizFormatType = FormatType.FT_1.getCode();
|
|
|
+ this.forceFormatType = FormatType.FT_1.getCode();
|
|
|
+
|
|
|
+ // 省市县
|
|
|
+ this.provCode = policyHolderArea.getProvinceCode();
|
|
|
+ this.provName = policyHolderArea.getProvinceName();
|
|
|
+ this.cityCode = policyHolderArea.getCityCode();
|
|
|
+ this.cityName = policyHolderArea.getCityName();
|
|
|
+ this.distCode = policyHolderArea.getCountyCode();
|
|
|
+ this.distName = policyHolderArea.getCountyName();
|
|
|
+
|
|
|
+ this.residentialAddress = policyHolderInfo.getAddr();
|
|
|
|
|
|
- this.certNo = certNo;
|
|
|
- this.address = address;
|
|
|
- this.phoneNumber = phoneNumber;
|
|
|
- this.nation = nation;
|
|
|
- this.certiStartDate = certiStartDate;
|
|
|
- this.certiEndDate = certiEndDate;
|
|
|
- this.certiType = certiType;
|
|
|
- this.issuer = issuer;
|
|
|
- this.email = email;
|
|
|
- this.invoiceType = "";
|
|
|
- this.bizFormatType = bizFormatType;
|
|
|
- this.forceFormatType = forceFormatType;
|
|
|
- this.elecApplicationFlag = elecApplicationFlag;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -343,9 +467,68 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
|
|
|
@JsonProperty("certiType")
|
|
|
private String certiType;
|
|
|
|
|
|
- public InsurederDTO(CustomerInfoVo insuredPersonInfo) {
|
|
|
+ @JsonProperty("customerType")
|
|
|
+ private String customerType;
|
|
|
|
|
|
+ @JsonProperty("email")
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份代码
|
|
|
+ */
|
|
|
+ @JsonProperty("provCode")
|
|
|
+ private String provCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份名称
|
|
|
+ */
|
|
|
+ @JsonProperty("provName")
|
|
|
+ private String provName;
|
|
|
+ /**
|
|
|
+ * 城市代码
|
|
|
+ */
|
|
|
+ @JsonProperty("cityCode")
|
|
|
+ private String cityCode;
|
|
|
+ /**
|
|
|
+ * 城市名称
|
|
|
+ */
|
|
|
+ @JsonProperty("cityName")
|
|
|
+ private String cityName;
|
|
|
+ /**
|
|
|
+ * 区县代码
|
|
|
+ */
|
|
|
+ @JsonProperty("distCode")
|
|
|
+ private String distCode;
|
|
|
+ /**
|
|
|
+ * 区县名称
|
|
|
+ */
|
|
|
+ @JsonProperty("distName")
|
|
|
+ private String distName;
|
|
|
+
|
|
|
+ @JsonProperty("residentialAddress")
|
|
|
+ private String residentialAddress;
|
|
|
+
|
|
|
+
|
|
|
+ public InsurederDTO(CustomerInfoVo insuredPersonInfo, PersonAreaVo insuredPersonArea) {
|
|
|
+ // 通用参数
|
|
|
+ this.certType = CertType.CT_111.getCode();
|
|
|
+ this.insuredName = insuredPersonInfo.getName();
|
|
|
+ this.certNo = insuredPersonInfo.getIdentifyNumber();
|
|
|
+ this.address = insuredPersonInfo.getAddr();
|
|
|
+ this.phoneNumber = insuredPersonInfo.getMobile();
|
|
|
+ this.customerType = CustomerType.CT_2.getCode();
|
|
|
+ this.email = insuredPersonInfo.getEmail();
|
|
|
+ this.certiType = insuredPersonInfo.getIdentifyValidEndDate().contains("9999") ? "1" : "0";
|
|
|
+ this.residentialAddress = insuredPersonInfo.getAddr();
|
|
|
+ // 省市县
|
|
|
+ this.provCode = insuredPersonArea.getProvinceCode();
|
|
|
+ this.provName = insuredPersonArea.getProvinceName();
|
|
|
+ this.cityCode = insuredPersonArea.getCityCode();
|
|
|
+ this.cityName = insuredPersonArea.getCityName();
|
|
|
+ this.distCode = insuredPersonArea.getCountyCode();
|
|
|
+ this.distName = insuredPersonArea.getCountyName();
|
|
|
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|