|
|
@@ -1,20 +1,27 @@
|
|
|
package com.ydtech.modules.order.entity.api.huatai.request;
|
|
|
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.KindInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.RiskInfoVo;
|
|
|
+import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequest;
|
|
|
import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequestHead;
|
|
|
+import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiModelsQueryResponse;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.BaseRequestHead;
|
|
|
+import com.ydtech.modules.order.entity.api.zhongmei.constants.TimeConstants;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.constants.TransCode;
|
|
|
+import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.ContractEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.request.QuotedPriceRequest;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.response.ModelsQueryResponse;
|
|
|
import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
|
|
|
import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
|
|
|
import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.VehicleAndVesselTax;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
@@ -22,9 +29,10 @@ import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @Author: CXP
|
|
|
@@ -41,8 +49,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@JsonProperty("businessData")
|
|
|
private BusinessDataDto businessData;
|
|
|
|
|
|
- public HuaTaiQuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
- this.businessData = new HuaTaiQuotedPriceRequest.BusinessDataDto(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo, huaTaiConfigureParameters);
|
|
|
+ public HuaTaiQuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto, AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
+ this.businessData = new BusinessDataDto(baseQuoteInfoVo, fullCarDataDto, accidentalDrivingVo, huaTaiConfigureParameters);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -76,10 +84,11 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@JsonProperty("saleInfo")
|
|
|
private SaleInfoDto saleInfo;
|
|
|
|
|
|
- public BusinessDataDto(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
+ public BusinessDataDto(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto, AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
|
|
|
List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
|
|
|
List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
|
|
|
+ VehicleAndVesselTax vesselTax = baseQuoteInfoVo.getVehicleAndVesselTax();
|
|
|
CustomerInfoVo ownerInfo = baseQuoteInfoVo.getOwnerInfo();
|
|
|
CustomerInfoVo policyHolderInfo = baseQuoteInfoVo.getPolicyHolderInfo();
|
|
|
CustomerInfoVo insuredPersonInfo = baseQuoteInfoVo.getInsuredPersonInfo();
|
|
|
@@ -87,12 +96,12 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
// 保单归属地
|
|
|
this.businessMain = new BusinessMainDto(huaTaiConfigureParameters);
|
|
|
// 车辆信息
|
|
|
- /* this.insuredObject = new QuotedPriceRequest.BusinessDataDTO.InsuredObjectDTO(carInfo, simpleStadarCarDTO);
|
|
|
+ this.insuredObject = new InsuredObjectDto(carInfo, fullCarDataDto);
|
|
|
// 保险信息
|
|
|
- this.contract = new QuotedPriceRequest.ContractDTO().getContract(riskList, kindList, i - 1);
|
|
|
+ this.contract = new ContractDto().getContract(riskList, kindList, i - 1,vesselTax);
|
|
|
// 客户信息
|
|
|
- this.customer = new QuotedPriceRequest.CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
|
-*/
|
|
|
+ this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
|
+ //销售信息
|
|
|
this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
|
|
|
|
|
|
}
|
|
|
@@ -121,24 +130,28 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@Data
|
|
|
public static class InsuredObjectDto implements Serializable{
|
|
|
//Y 保险采集和管理车信息
|
|
|
- @JsonProperty("simpleStadarCar")
|
|
|
+ @JsonProperty("policyCar")
|
|
|
private PolicyCarDto policyCar;
|
|
|
//Y 简化版精友信息
|
|
|
@JsonProperty("simpleStadarCar")
|
|
|
private SimpleStadarCarDto simpleStadarCar;
|
|
|
|
|
|
+ public InsuredObjectDto(CarInfoVo carInfo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
|
|
|
+ this.policyCar = new PolicyCarDto(carInfo,fullCarDataDto);
|
|
|
+ this.simpleStadarCar = new SimpleStadarCarDto(carInfo,fullCarDataDto);
|
|
|
+ }
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
public static class PolicyCarDto implements Serializable{
|
|
|
//Y 排量(单位:升)
|
|
|
@JsonProperty("displacement")
|
|
|
private double displacement;
|
|
|
- //Y 排量(单位:升)
|
|
|
+ //Y 车牌号
|
|
|
@JsonProperty("plateNo")
|
|
|
private String plateNo;
|
|
|
//Y 初次登记日期(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("registerDate")
|
|
|
- private Date registerDate;
|
|
|
+ private String registerDate;
|
|
|
//Y 行驶证发证日期(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("issueDate")
|
|
|
private String issueDate;
|
|
|
@@ -162,10 +175,10 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String specialCarFlag;
|
|
|
//CY 过户日期(过户车必传)(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("transferDate")
|
|
|
- private Date transferDate;
|
|
|
+ private String transferDate;
|
|
|
//Y 车架号
|
|
|
@JsonProperty("vIN")
|
|
|
- private String vIN;
|
|
|
+ private String vin;
|
|
|
//Y 是否贷款购车标志(0-非贷款车;1-是贷款车)
|
|
|
@JsonProperty("loanStatus")
|
|
|
private String loanStatus;
|
|
|
@@ -174,8 +187,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String modelName;
|
|
|
//CY 整备质量
|
|
|
@JsonProperty("UnladenMass")
|
|
|
- private String UnladenMass;
|
|
|
- //CY 车辆来历凭证种类(新车,北京上海机构出单必录)
|
|
|
+ private String unladenMass;
|
|
|
+ /*//CY 车辆来历凭证种类(新车,北京上海机构出单必录)
|
|
|
@JsonProperty("CertificateType")
|
|
|
private String CertificateType;
|
|
|
//CY 车辆来历凭证编号(新车,北京机构出单必录)
|
|
|
@@ -183,16 +196,16 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String CertificateNo;
|
|
|
//CY 车辆来历凭证所载日期(新车,北京机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("CertificateDate")
|
|
|
- private String CertificateDate;
|
|
|
+ private String CertificateDate;*/
|
|
|
//CY 参见车辆种类代码
|
|
|
@JsonProperty("MotorTypeCode")
|
|
|
- private String MotorTypeCode;
|
|
|
+ private String motorTypeCode;
|
|
|
//CY 参见使用性质代码
|
|
|
@JsonProperty("MotorUsageTypeCode")
|
|
|
- private String MotorUsageTypeCode;
|
|
|
+ private String motorUsageTypeCode;
|
|
|
//CY 参见号牌种类代码
|
|
|
@JsonProperty("PlateType")
|
|
|
- private String PlateType;
|
|
|
+ private String plateType;
|
|
|
//CY 功率(纯电摩托车必录)
|
|
|
@JsonProperty("Power")
|
|
|
private String Power;
|
|
|
@@ -201,8 +214,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String MaximumSpeed;
|
|
|
//CY 参见所属性质代码
|
|
|
@JsonProperty("Property")
|
|
|
- private String Property;
|
|
|
- //CY 新车销售公司名称(广东机构新车出单必录)
|
|
|
+ private String property;
|
|
|
+ /*//CY 新车销售公司名称(广东机构新车出单必录)
|
|
|
@JsonProperty("NewCarSalesCompanyName")
|
|
|
private String NewCarSalesCompanyName;
|
|
|
//CY 销售公司所在省(广东机构出单新车必录)
|
|
|
@@ -219,34 +232,67 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
private String IsFourSShop;
|
|
|
//CY 购车发票日期(上海机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("InvoiceDate")
|
|
|
- private Date InvoiceDate;
|
|
|
+ private Date InvoiceDate;*/
|
|
|
//CY 参见车身颜色代码
|
|
|
@JsonProperty("ColorCode")
|
|
|
- private String ColorCode;
|
|
|
+ private String colorCode;
|
|
|
//CY 验车状态代码(1-未验车;2-免验车;4-已验车)
|
|
|
@JsonProperty("CarCheckStatus")
|
|
|
- private String CarCheckStatus;
|
|
|
+ private String carCheckStatus;
|
|
|
//CY 验车人(已验车必录)
|
|
|
@JsonProperty("CarChecker")
|
|
|
- private String CarChecker;
|
|
|
+ private String carChecker;
|
|
|
//CY 验车时间(已验车必录)(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("CarCheckTime")
|
|
|
- private String CarCheckTime;
|
|
|
+ private String carCheckTime;
|
|
|
//CY 验车记录(已验车必录)
|
|
|
@JsonProperty("CarCheckRecord")
|
|
|
- private String CarCheckRecord;
|
|
|
+ private String carCheckRecord;
|
|
|
//CY 车况(0-好;1-中;2-差)
|
|
|
@JsonProperty("VehicleCondition")
|
|
|
- private String VehicleCondition;
|
|
|
+ private String vehicleCondition;
|
|
|
//Y 参见交管车辆类型代码
|
|
|
@JsonProperty("VehicleType")
|
|
|
- private String VehicleType;
|
|
|
+ private String vehicleType;
|
|
|
//CY 行驶证车型
|
|
|
@JsonProperty("RegistModelCode")
|
|
|
- private String RegistModelCode;
|
|
|
+ private String registModelCode;
|
|
|
//CY 参见号牌底色代码
|
|
|
@JsonProperty("PlateColorCode")
|
|
|
- private String PlateColorCode;
|
|
|
+ private String plateColorCode;
|
|
|
+
|
|
|
+ public PolicyCarDto(CarInfoVo carInfoVo,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
|
|
|
+ this.displacement = fullCarDataDto.getDisplacement()/1000;
|
|
|
+ this.plateNo = carInfoVo.getLicenseNo();
|
|
|
+ this.registerDate = carInfoVo.getRegisterDate() + " " + TimeConstants.START_TIME;
|
|
|
+ this.issueDate = carInfoVo.getIssueDate() + " " + TimeConstants.START_TIME;
|
|
|
+ this.purchasePrice = String.valueOf(fullCarDataDto.getPurchasePrice());
|
|
|
+ this.hKFlag = false;
|
|
|
+ this.engine = carInfoVo.getEngineNo();
|
|
|
+ this.ecdemicVehicleFlag = false;
|
|
|
+ if (carInfoVo.isTransferFlag()) {
|
|
|
+ this.chgOwnerFlag = "1";
|
|
|
+ this.specialCarFlag = "1";
|
|
|
+ this.transferDate = carInfoVo.getTransferDate() + " " + TimeConstants.START_TIME;
|
|
|
+ } else {
|
|
|
+ this.chgOwnerFlag = "0";
|
|
|
+ this.specialCarFlag = "";
|
|
|
+ }
|
|
|
+ this.vin = carInfoVo.getFrameNo();
|
|
|
+ this.loanStatus = "0";
|
|
|
+ this.modelName = fullCarDataDto.getModelName();
|
|
|
+ this.unladenMass = fullCarDataDto.getUnladenMass();
|
|
|
+ this.motorTypeCode = "";
|
|
|
+ this.motorUsageTypeCode = InsuranceTypeCorrespondence.getZM_CAR_MotorUsageTypeCode().get(carInfoVo.getCarnature());
|
|
|
+ this.plateType = "";
|
|
|
+ this.property = "";
|
|
|
+ this.colorCode = null;
|
|
|
+ this.carCheckStatus = null;
|
|
|
+ this.vehicleCondition = "0";
|
|
|
+ this.vehicleType = "0";
|
|
|
+ this.registModelCode = null;
|
|
|
+ this.plateColorCode = "01";
|
|
|
+ }
|
|
|
}
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
@@ -263,6 +309,17 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//Y 参见能源种类代码
|
|
|
@JsonProperty("energyTypes")
|
|
|
private String energyTypes;
|
|
|
+
|
|
|
+ public SimpleStadarCarDto(CarInfoVo carInfoVo,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
|
|
|
+
|
|
|
+ this.modelCode = fullCarDataDto.getModelCode();
|
|
|
+ this.approvedPassengersCapacity = fullCarDataDto.getApprovedPassengersCapacity();
|
|
|
+ if(carInfoVo.getSeatCount()!=null){
|
|
|
+ this.approvedPassengersCapacity = Integer.parseInt(carInfoVo.getSeatCount());
|
|
|
+ }
|
|
|
+ this.localModelCode = fullCarDataDto.getLocalModelCode();
|
|
|
+ this.energyTypes = fullCarDataDto.getEnergyTypes();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -308,6 +365,22 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
@JsonProperty("ChargingPost")
|
|
|
private List<ChargingPostDto> chargingPost;
|
|
|
|
|
|
+ public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,VehicleAndVesselTax vesselTax) {
|
|
|
+ List<ContractDto> contractDTOS = new ArrayList<>();
|
|
|
+ for (RiskInfoVo riskInfoVo : riskInfoVos) {
|
|
|
+ ContractDto contractDto = new ContractDto();
|
|
|
+ contractMain = new ContractMainDto(riskInfoVo);
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
+ contractDto.coverage = Collections.singletonList(new ContractDto.CoverageDto().fetchTraffic(contractMain));
|
|
|
+ contractDto.tax = new ContractDto.TaxDto(vesselTax);
|
|
|
+ }
|
|
|
+ if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
+ contractDto.coverage = new ContractDto.CoverageDto().getBusiness(kindInfoVos, quantity,contractMain);
|
|
|
+ }
|
|
|
+ contractDTOS.add(contractDto);
|
|
|
+ }
|
|
|
+ return contractDTOS;
|
|
|
+ }
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
public static class ContractMainDto implements Serializable{
|
|
|
@@ -329,6 +402,26 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//Y 生成日期(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JsonProperty("productionDate")
|
|
|
private String productionDate;
|
|
|
+ public ContractMainDto(RiskInfoVo riskInfoVo) {
|
|
|
+ this.riskCode = InsuranceTypeCorrespondence.getRisk().get(riskInfoVo.getRiskCode());
|
|
|
+ String startDate = riskInfoVo.getStartDate();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ LocalDate localDate = LocalDate.parse(startDate, formatter);
|
|
|
+ LocalDate nextYears = localDate.plusYears(1);
|
|
|
+ if (startDate.contains(TimeConstants.START_TIME)) {
|
|
|
+ LocalDate expiry = nextYears.minusDays(1);
|
|
|
+ this.validDate = riskInfoVo.getStartDate();
|
|
|
+ this.expiryDate = expiry + " " + TimeConstants.END_TIME;
|
|
|
+ } else {
|
|
|
+ // 及时
|
|
|
+ LocalDateTime localDateTime = LocalDateTime.parse(startDate, formatter);
|
|
|
+ LocalDateTime expiryDateTime = localDateTime.plusYears(1);
|
|
|
+ this.validDate = startDate;
|
|
|
+ this.expiryDate = expiryDateTime.format(formatter);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.productionDate = "";
|
|
|
+ }
|
|
|
}
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
@@ -363,6 +456,66 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//CY 可选免赔额(附加绝对免赔率特约条款必传,传值要求参见险别代码)
|
|
|
@JsonProperty("deductible")
|
|
|
private String deductible;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商业险
|
|
|
+ *
|
|
|
+ * @param kindInfoVos 商业险
|
|
|
+ * @param quantity 乘客数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<CoverageDto> getBusiness(List<KindInfoVo> kindInfoVos, int quantity,ContractMainDto contractMain) {
|
|
|
+ List<CoverageDto> list = new ArrayList<>();
|
|
|
+ for (KindInfoVo kindInfoVo : kindInfoVos) {
|
|
|
+ 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);
|
|
|
+ coverageDto.kindCode = contractEnum.getKindCode();
|
|
|
+ coverageDto.kindName = contractEnum.getKindName();
|
|
|
+ coverageDto.amount = (int) kindInfoVo.getAmount();
|
|
|
+ coverageDto.validDate = contractMain.getValidDate();
|
|
|
+ coverageDto.expiryDate = contractMain.getExpiryDate();
|
|
|
+ coverageDto.unitAmount = String.valueOf(kindInfoVo.getUnitAmount());
|
|
|
+ // 车损
|
|
|
+ if ("A".equals(code)) {//中煤特殊处理
|
|
|
+ //车损险保额,第三方若有实际价值判断逻辑,可按照第三方规则送保额,中煤会校验保额是否在新车购置价浮动范围期间内;
|
|
|
+ //若第三方无实际价值判断逻辑,可保额直接送0,中煤会按照中煤实际价值逻辑自动覆盖;
|
|
|
+ coverageDto.amount = 0;
|
|
|
+ }
|
|
|
+ // 司机
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
|
|
|
+ coverageDto.quantity = "1";
|
|
|
+ coverageDto.unitAmount = String.valueOf( kindInfoVo.getAmount());
|
|
|
+ }
|
|
|
+ // 乘客
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
|
|
|
+ coverageDto.quantity = String.valueOf(quantity);
|
|
|
+ coverageDto.amount = (int) kindInfoVo.getUnitAmount() * quantity;
|
|
|
+ }
|
|
|
+ // 绝对免赔
|
|
|
+ if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getAbsoluteDeductible(), code) >= 0) {
|
|
|
+ coverageDto.deductible = "-" + kindInfoVo.getDeductibleRate();
|
|
|
+ }
|
|
|
+ list.add(coverageDto);
|
|
|
+
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 交强险
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public CoverageDto fetchTraffic(ContractMainDto contractMain) {
|
|
|
+ this.amount = 200000;
|
|
|
+ this.kindName = ContractEnum.C_BZ.getKindName();
|
|
|
+ this.kindCode = ContractEnum.C_BZ.getKindCode();
|
|
|
+ this.validDate = contractMain.getValidDate();
|
|
|
+ this.expiryDate = contractMain.getExpiryDate();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@@ -386,7 +539,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
public static class TaxDto implements Serializable{
|
|
|
//Y 参见纳税类型代码
|
|
|
@JsonProperty("TaxConditionCode")
|
|
|
- private String TaxConditionCode;
|
|
|
+ private String taxConditionCode;
|
|
|
//CY 缴税起期(完税必传)
|
|
|
@JsonProperty("TaxStartDate")
|
|
|
private String TaxStartDate;
|
|
|
@@ -432,6 +585,12 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//CY 减免比例(取值区间为0-100之间,减免方案为2时必传)
|
|
|
@JsonProperty("DeductionDueProportion")
|
|
|
private double DeductionDueProportion;
|
|
|
+
|
|
|
+ public TaxDto(VehicleAndVesselTax vesselTax){
|
|
|
+
|
|
|
+ this.taxConditionCode = "";
|
|
|
+ this.isSameWithOwner ="1";
|
|
|
+ }
|
|
|
}
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
@@ -506,6 +665,25 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
|
|
|
//Y 车辆与被保险人所属关系(1-所有;2-使用;3-管理)
|
|
|
@JsonProperty("carInsuredRelation")
|
|
|
private String carInsuredRelation;
|
|
|
+
|
|
|
+ public CustomerDto(CustomerInfoVo customerInfoVo, String role) {
|
|
|
+ this.name = customerInfoVo.getName();
|
|
|
+ this.identifyType = "01";
|
|
|
+ this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.mobile = customerInfoVo.getMobile();
|
|
|
+ this.type = "1";
|
|
|
+ this.role = role;
|
|
|
+ //this.occupationCode = "";
|
|
|
+ this.identifyValidDate = customerInfoVo.getIdentifyValidDate() + " " + TimeConstants.START_TIME;
|
|
|
+ this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate() + " " + TimeConstants.END_TIME;
|
|
|
+ if("2".equals(role)){
|
|
|
+ this.carInsuredRelation = "1";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<CustomerDto> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
|
|
|
+ return Arrays.asList(new CustomerDto(ownerInfo, "3"), new CustomerDto(policyHolderInfo, "1"), new CustomerDto(insuredPersonInfo, "2"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|