|
@@ -2,11 +2,13 @@ package com.jzg.quotation.huatai.api.entity.request;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
|
import com.jzg.commons.constants.InsuranceRisk;
|
|
import com.jzg.commons.constants.InsuranceRisk;
|
|
|
-import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
|
|
|
|
|
|
|
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
|
|
|
import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
|
|
import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
|
|
|
import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
|
|
|
+import com.jzg.quotation.commons.constant.InsuranceTypeCorrespondence;
|
|
|
import com.jzg.quotation.huatai.api.constant.HuaTaiTransCode;
|
|
import com.jzg.quotation.huatai.api.constant.HuaTaiTransCode;
|
|
|
import com.jzg.quotation.huatai.api.constant.TimeConstants;
|
|
import com.jzg.quotation.huatai.api.constant.TimeConstants;
|
|
|
|
|
+import com.jzg.quotation.huatai.api.constant.enums.HuaTaiRiskCode;
|
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiApiOrder;
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiApiOrder;
|
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiBaseRequestHead;
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiBaseRequestHead;
|
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiConfigureParameters;
|
|
import com.jzg.quotation.huatai.api.entity.HuaTaiConfigureParameters;
|
|
@@ -15,12 +17,14 @@ import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import java.io.Serial;
|
|
import java.io.Serial;
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
@@ -54,6 +58,7 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
|
|
|
this.businessData = new BusinessDataDto(huaTaiApiOrder, huaTaiConfigureParameters, engageList);
|
|
this.businessData = new BusinessDataDto(huaTaiApiOrder, huaTaiConfigureParameters, engageList);
|
|
|
this.loginCom = huaTaiConfigureParameters.getComCode();
|
|
this.loginCom = huaTaiConfigureParameters.getComCode();
|
|
|
|
|
+ this.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@@ -76,12 +81,19 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
// 销售信息
|
|
// 销售信息
|
|
|
@JSONField(name = "saleInfo")
|
|
@JSONField(name = "saleInfo")
|
|
|
private SaleInfoDto saleInfo;
|
|
private SaleInfoDto saleInfo;
|
|
|
|
|
+ // 投保车辆信息
|
|
|
|
|
+ @JSONField(name = "insuredObject")
|
|
|
|
|
+ private InsuredObjectDto insuredObject;
|
|
|
|
|
|
|
|
public BusinessDataDto(HuaTaiApiOrder huaTaiApiOrder,
|
|
public BusinessDataDto(HuaTaiApiOrder huaTaiApiOrder,
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
|
|
|
List<RiskInfoVo> riskList = new ArrayList<>();
|
|
List<RiskInfoVo> riskList = new ArrayList<>();
|
|
|
- riskList.add(huaTaiApiOrder.getBiRiskInfoVo());
|
|
|
|
|
- riskList.add(huaTaiApiOrder.getCiRiskInfoVo());
|
|
|
|
|
|
|
+ if (ObjectUtils.anyNotNull(huaTaiApiOrder.getBiRiskInfoVo())){
|
|
|
|
|
+ riskList.add(huaTaiApiOrder.getBiRiskInfoVo());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.anyNotNull(huaTaiApiOrder.getCiRiskInfoVo())){
|
|
|
|
|
+ riskList.add(huaTaiApiOrder.getCiRiskInfoVo());
|
|
|
|
|
+ }
|
|
|
CustomerInfoVo ownerInfo = huaTaiApiOrder.getOwnersInfo();
|
|
CustomerInfoVo ownerInfo = huaTaiApiOrder.getOwnersInfo();
|
|
|
|
|
|
|
|
CustomerInfoVo policyHolderInfo = huaTaiApiOrder.getPolicyHolderInfo();
|
|
CustomerInfoVo policyHolderInfo = huaTaiApiOrder.getPolicyHolderInfo();
|
|
@@ -95,6 +107,8 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo, huaTaiConfigureParameters);
|
|
this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo, huaTaiConfigureParameters);
|
|
|
//销售信息
|
|
//销售信息
|
|
|
this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
|
|
this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
|
|
|
|
|
+ // 投保车辆信息
|
|
|
|
|
+ this.insuredObject = new InsuredObjectDto(huaTaiApiOrder.getCarInfo());
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -187,7 +201,7 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
private String remark;
|
|
private String remark;
|
|
|
|
|
|
|
|
public ContractMainDto(RiskInfoVo riskInfoVo, HuaTaiApiOrder huaTaiApiOrder) {
|
|
public ContractMainDto(RiskInfoVo riskInfoVo, HuaTaiApiOrder huaTaiApiOrder) {
|
|
|
- if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
|
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode()) || HuaTaiRiskCode.R_1002.getCode().equals(riskInfoVo.getRiskCode())) {
|
|
|
this.contractNo = huaTaiApiOrder.getJqApplyNo();
|
|
this.contractNo = huaTaiApiOrder.getJqApplyNo();
|
|
|
this.totalPremium = Double.parseDouble(huaTaiApiOrder.getJqPremium());
|
|
this.totalPremium = Double.parseDouble(huaTaiApiOrder.getJqPremium());
|
|
|
this.validDate = riskInfoVo.getStartDate();
|
|
this.validDate = riskInfoVo.getStartDate();
|
|
@@ -409,6 +423,9 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
|
|
|
|
|
|
|
|
|
|
public CustomerDto(CustomerInfoVo customerInfoVo, String role, HuaTaiConfigureParameters huaTaiConfigureParameters, CustomerInfoVo ownerInfo) {
|
|
public CustomerDto(CustomerInfoVo customerInfoVo, String role, HuaTaiConfigureParameters huaTaiConfigureParameters, CustomerInfoVo ownerInfo) {
|
|
|
|
|
+ this.province = customerInfoVo.getProvinceCode();
|
|
|
|
|
+ this.city = customerInfoVo.getCityCode();
|
|
|
|
|
+ this.district = customerInfoVo.getCountyCode();
|
|
|
this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
this.identifyType = "01";
|
|
this.identifyType = "01";
|
|
|
this.name = customerInfoVo.getName();
|
|
this.name = customerInfoVo.getName();
|
|
@@ -446,6 +463,48 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ @NoArgsConstructor
|
|
|
|
|
+ @Data
|
|
|
|
|
+ public static class InsuredObjectDto implements Serializable {
|
|
|
|
|
+ @JSONField(name = "policyCar")
|
|
|
|
|
+ private PolicyCarDto policyCar;
|
|
|
|
|
+
|
|
|
|
|
+ public InsuredObjectDto(CarInfoVo carInfoVo) {
|
|
|
|
|
+ this.policyCar = new PolicyCarDto(carInfoVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @NoArgsConstructor
|
|
|
|
|
+ @Data
|
|
|
|
|
+ public static class PolicyCarDto implements Serializable {
|
|
|
|
|
+
|
|
|
|
|
+ // Y 验车状态(1-未验车;2-免验车;4-已验车)
|
|
|
|
|
+ @JSONField(name = "CarCheckStatus")
|
|
|
|
|
+ private String carCheckStatus;
|
|
|
|
|
+
|
|
|
|
|
+ // CY 验车人(已验车必传)
|
|
|
|
|
+ @JSONField(name = "CarChecker")
|
|
|
|
|
+ private String carChecker;
|
|
|
|
|
+
|
|
|
|
|
+ // CY 验车时间(已验车必传)(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
|
|
+ @JSONField(name = "CarCheckTime")
|
|
|
|
|
+ private Date carCheckTime;
|
|
|
|
|
+
|
|
|
|
|
+ // CY 验车记录(已验车必传)
|
|
|
|
|
+ @JSONField(name = "CarCheckRecord")
|
|
|
|
|
+ private String carCheckRecord;
|
|
|
|
|
+
|
|
|
|
|
+ // N 车况(0-好;1-中;2-差)
|
|
|
|
|
+ @JSONField(name = "VehicleCondition")
|
|
|
|
|
+ private String vehicleCondition;
|
|
|
|
|
+
|
|
|
|
|
+ public PolicyCarDto(CarInfoVo carInfoVo) {
|
|
|
|
|
+ this.carCheckStatus = "2";
|
|
|
|
|
+ this.vehicleCondition = "0";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
@NoArgsConstructor
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
@Data
|