|
|
@@ -2,6 +2,7 @@ package com.ydtech.modules.order.entity.api.huatai.request;
|
|
|
|
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
|
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.RiskInfoVo;
|
|
|
import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
|
|
|
@@ -18,6 +19,7 @@ import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.joda.time.DateTime;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -69,6 +71,10 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
@JSONField(name = "saleInfo")
|
|
|
private SaleInfoDto saleInfo;
|
|
|
|
|
|
+ // 投保车辆信息
|
|
|
+ @JSONField(name = "insuredObject")
|
|
|
+ private InsuredObjectDto insuredObject;
|
|
|
+
|
|
|
public BusinessDataDto(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany,
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
|
|
|
List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
|
|
|
@@ -85,7 +91,8 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo, huaTaiConfigureParameters);
|
|
|
//销售信息
|
|
|
this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
|
|
|
-
|
|
|
+ // 投保车辆信息
|
|
|
+ this.insuredObject = new InsuredObjectDto(yaQuoteInfoVo.getCarInfo());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -261,6 +268,9 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
//Y 手机号码
|
|
|
@JSONField(name = "mobile")
|
|
|
private String mobile;
|
|
|
+ // CY 单位电话(机构客户出单必传)
|
|
|
+ @JSONField(name = "unitPhoneNumber")
|
|
|
+ private String unitPhoneNumber;
|
|
|
//Y 证件有效起期(格式:YYYY-MM-DD HH24:MI:SS)
|
|
|
@JSONField(name = "identifyValidDate")
|
|
|
private String identifyValidDate;
|
|
|
@@ -402,12 +412,43 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
|
|
|
|
|
|
|
|
|
public CustomerDto(CustomerInfoVo customerInfoVo, String role, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
- this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
- this.identifyType = "01";
|
|
|
+ if (customerInfoVo.getProperty() != null && "0".equals(customerInfoVo.getProperty())) {
|
|
|
+ this.organizeCode = customerInfoVo.getOrganizationCode();
|
|
|
+ this.identifyType = "99";
|
|
|
+ this.type = "2";
|
|
|
+ this.businessSource = "L749";
|
|
|
+ this.equityStructure = "3";
|
|
|
+ this.businessDetail = customerInfoVo.getScope();
|
|
|
+ this.leaderName = customerInfoVo.getLegalPerson();
|
|
|
+ this.leaderOtherIdentifyType = "01";
|
|
|
+ this.leaderOtherEffectiveDate = customerInfoVo.getLeaderOtherEffectiveDate();
|
|
|
+ this.leaderOtherIdentifyNumber = customerInfoVo.getLeaderIdentifyNumber();
|
|
|
+ this.leaderIdentifyNumber = customerInfoVo.getLeaderIdentifyNumber();
|
|
|
+ this.nationalityCode = customerInfoVo.getProvince().substring(0, 4);
|
|
|
+ this.registCurrency = "CNY";
|
|
|
+ this.registFund = customerInfoVo.getRegisteredCapital();
|
|
|
+ this.revenueCode = customerInfoVo.getOrganizationCode();
|
|
|
+ this.supportDocuName = customerInfoVo.getName();
|
|
|
+ this.supportDocuNumber = customerInfoVo.getOrganizationCode();
|
|
|
+ this.supportDocuValidDate = customerInfoVo.getIdentifyValidEndDate();
|
|
|
+ this.transactorName = customerInfoVo.getLegalPerson();
|
|
|
+ this.transactorIdentifyType = "01";
|
|
|
+ this.transactorIdentifyCode = customerInfoVo.getLeaderIdentifyNumber();
|
|
|
+ this.transactorMobile = customerInfoVo.getMobile();
|
|
|
+ this.transactorExpiryDate = customerInfoVo.getLeaderOtherEffectiveDate();
|
|
|
+ this.unitPhoneNumber = customerInfoVo.getMobile();
|
|
|
+ }
|
|
|
+ if (customerInfoVo.getProperty() != null && "1".equals(customerInfoVo.getProperty())) {
|
|
|
+ this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.identifyType = "01";
|
|
|
+ this.type = "1";
|
|
|
+ }
|
|
|
+ this.province = huaTaiConfigureParameters.getProvince();
|
|
|
+ this.city = huaTaiConfigureParameters.getCity();
|
|
|
+ this.district = huaTaiConfigureParameters.getDistrict();
|
|
|
this.name = customerInfoVo.getName();
|
|
|
this.mobile = customerInfoVo.getMobile();
|
|
|
this.role = role;
|
|
|
- this.type = "1";
|
|
|
this.occupationCode = "20114";//后续需要根据接口维护返参到表里
|
|
|
this.identifyValidDate = customerInfoVo.getIdentifyValidDate() + " " + TimeConstants.START_TIME;
|
|
|
this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate() + " " + TimeConstants.END_TIME;
|
|
|
@@ -438,6 +479,47 @@ 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 DateTime 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
|
|
|
@NoArgsConstructor
|