|
|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.quotation.zhongan.crawler.entity.request;
|
|
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
|
|
|
import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
|
import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
|
@@ -8,6 +9,7 @@ import com.jzg.quotation.zhongan.crawler.entity.ZhongAnCrawlerConfigureParameter
|
|
|
import lombok.Data;
|
|
|
|
|
|
import java.io.Serial;
|
|
|
+import java.util.Optional;
|
|
|
|
|
|
/**
|
|
|
* @description: 众安保险 确认订单 请求参数
|
|
|
@@ -15,15 +17,27 @@ import java.io.Serial;
|
|
|
* @date: 2025/5/13 11:36
|
|
|
**/
|
|
|
@Data
|
|
|
-public class ZhongAnCrawlerConfirmOrderRequest extends ZhongAnCrawlerBaseRequest {
|
|
|
+public class ZhongAnCrawlerConfirmOrderRequest{
|
|
|
@Serial
|
|
|
private static final long serialVersionUID = -1296055575580182977L;
|
|
|
|
|
|
+ @JsonProperty("flowId")
|
|
|
+ private String flowId;
|
|
|
+
|
|
|
+ @JsonProperty("page")
|
|
|
+ private String page;
|
|
|
+
|
|
|
+ @JsonProperty("flag")
|
|
|
+ private String flag;
|
|
|
+
|
|
|
+ @JsonProperty("i")
|
|
|
+ private String i;
|
|
|
+
|
|
|
public ZhongAnCrawlerConfirmOrderRequest(ZhongAnCrawlerConfigureParameters parameters, QuoteVo quoteVo) {
|
|
|
- super.setFlowId(parameters.getFlowId());
|
|
|
- super.setPage(ZhongAnRequestConstant.ORDER_PAGE);
|
|
|
- super.setFlag(parameters.getFlag());
|
|
|
- super.setI(ZhongAnRequestConstant.I_PARAM);
|
|
|
+ this.setFlowId(parameters.getFlowId());
|
|
|
+ this.setPage(ZhongAnRequestConstant.ORDER_PAGE);
|
|
|
+ this.setFlag(parameters.getFlag());
|
|
|
+ this.setI(ZhongAnRequestConstant.I_PARAM);
|
|
|
|
|
|
RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
|
|
|
if (biRiskInfoVo != null && biRiskInfoVo.getStartDate() != null) {
|
|
|
@@ -37,105 +51,168 @@ public class ZhongAnCrawlerConfirmOrderRequest extends ZhongAnCrawlerBaseRequest
|
|
|
} else {
|
|
|
this.compelElectronicPolicy = "0";
|
|
|
}
|
|
|
+ this.setDesOwnerMobile("");
|
|
|
//车主信息
|
|
|
CustomerInfoVo ownersInfo = quoteVo.getOwnersInfo();
|
|
|
this.ownerName = ownersInfo.getName();
|
|
|
this.ownerMobile = ownersInfo.getMobile();
|
|
|
this.ownerCertificateNo = ownersInfo.getIdentifyNumber();
|
|
|
- this.ownerSex = ownersInfo.getGender();
|
|
|
+ this.ownerSex = (ownersInfo.getGender().equals("1")?"M":"W");
|
|
|
this.ownerBirth = ownersInfo.getBirthday();
|
|
|
- this.ownerEmail = ownersInfo.getEmail();
|
|
|
+ this.ownerEmail = Optional.ofNullable(ownersInfo.getEmail()).orElse("123456@qq.com");
|
|
|
this.ownerProvinceCode = ownersInfo.getProvinceCode();
|
|
|
this.ownerCityCode = ownersInfo.getCityCode();
|
|
|
this.ownerAreaCode = ownersInfo.getCountyCode();
|
|
|
this.ownerDetailAddress = ownersInfo.getAddr();
|
|
|
- this.ownerCertificateType = ownersInfo.getDocumentsTypeCode();
|
|
|
+ this.ownerCertificateType = ownersInfo.getDocumentsTypeCode().equals("01") ? "I":"U";
|
|
|
+ this.ownerStreetCode="";
|
|
|
//投保人信息
|
|
|
CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
|
|
|
- this.applicantCertificateType = policyHolderInfo.getDocumentsTypeCode();
|
|
|
+ this.applicantCertificateType = policyHolderInfo.getDocumentsTypeCode().equals("01") ? "I":"U";
|
|
|
this.applicantName = policyHolderInfo.getName();
|
|
|
this.applicantCertificateNo = policyHolderInfo.getIdentifyNumber();
|
|
|
this.applicantMobile = policyHolderInfo.getMobile();
|
|
|
- this.applicantEmail = policyHolderInfo.getEmail();
|
|
|
+ this.applicantEmail = Optional.ofNullable(policyHolderInfo.getEmail()).orElse("123456@qq.com");
|
|
|
this.applicantProvinceCode = policyHolderInfo.getProvinceCode();
|
|
|
this.applicantCityCode = policyHolderInfo.getCityCode();
|
|
|
this.applicantAreaCode = policyHolderInfo.getCountyCode();
|
|
|
this.applicantDetailAddress = policyHolderInfo.getAddr();
|
|
|
- this.applicantSex = policyHolderInfo.getGender();
|
|
|
+ this.applicantSex = policyHolderInfo.getGender().equals("1")?"M":"W";
|
|
|
this.applicantBirth = policyHolderInfo.getBirthday();
|
|
|
this.applicantCertiStartDate = policyHolderInfo.getIdentifyValidDate();
|
|
|
this.applicantCertiEndDate = policyHolderInfo.getIdentifyValidEndDate();
|
|
|
//被保人信息
|
|
|
CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
|
|
|
- this.insureCertificateType = insuredPersonInfo.getDocumentsTypeCode();
|
|
|
+ this.insureCertificateType = insuredPersonInfo.getDocumentsTypeCode().equals("01") ? "I":"U";
|
|
|
this.insureName = insuredPersonInfo.getName();
|
|
|
this.insureCertificateNo = insuredPersonInfo.getIdentifyNumber();
|
|
|
this.insureMobile = insuredPersonInfo.getMobile();
|
|
|
- this.insureEmail = insuredPersonInfo.getEmail();
|
|
|
+ this.insureEmail = Optional.ofNullable(insuredPersonInfo.getEmail()).orElse("123456@qq.com");
|
|
|
this.insureProvinceCode = insuredPersonInfo.getProvinceCode();
|
|
|
this.insureCityCode = insuredPersonInfo.getCityCode();
|
|
|
this.insureAreaCode = insuredPersonInfo.getCountyCode();
|
|
|
this.insureDetailAddress = insuredPersonInfo.getAddr();
|
|
|
- this.insureSex = insuredPersonInfo.getGender();
|
|
|
+ this.insureSex = insuredPersonInfo.getGender().equals("1")?"M":"W";
|
|
|
this.insureBirth = insuredPersonInfo.getBirthday();
|
|
|
- this.insureType = insuredPersonInfo.getPersonType();
|
|
|
- this.insuredIsOwner = String.valueOf(insuredPersonInfo.getCarOwner());
|
|
|
+ //客户类型
|
|
|
+ this.insureType = insuredPersonInfo.getProperty();
|
|
|
+ int carOwner = insuredPersonInfo.getCarOwner();
|
|
|
+ //是否为车主,平台页面未传
|
|
|
+ this.insuredIsOwner = String.valueOf(Optional.ofNullable(carOwner).orElse(1));
|
|
|
+
|
|
|
+ this.setPayStyle("individual");
|
|
|
+ this.quoteGreenWay = "0";
|
|
|
+ this.id="";
|
|
|
+ this.setSpecialPromiseReqJsonStr(new String[0]);
|
|
|
}
|
|
|
|
|
|
+ @JsonProperty("desOwnerMobile")
|
|
|
private String desOwnerMobile;
|
|
|
- private String compelElectronicPolicy;
|
|
|
- private String bizElectronicPolicy;
|
|
|
//车主信息
|
|
|
+ @JsonProperty("ownerName")
|
|
|
private String ownerName;
|
|
|
+ @JsonProperty("ownerMobile")
|
|
|
private String ownerMobile;
|
|
|
+ @JsonProperty("ownerCertificateNo")
|
|
|
private String ownerCertificateNo;
|
|
|
+ @JsonProperty("ownerSex")
|
|
|
private String ownerSex;
|
|
|
+ @JsonProperty("ownerBirth")
|
|
|
private String ownerBirth;
|
|
|
+ @JsonProperty("ownerEmail")
|
|
|
private String ownerEmail;
|
|
|
+ @JsonProperty("compelElectronicPolicy")
|
|
|
+ private String compelElectronicPolicy;
|
|
|
+ @JsonProperty("bizElectronicPolicy")
|
|
|
+ private String bizElectronicPolicy;
|
|
|
+ @JsonProperty("ownerProvinceCode")
|
|
|
private String ownerProvinceCode;
|
|
|
+ @JsonProperty("ownerCityCode")
|
|
|
private String ownerCityCode;
|
|
|
+ @JsonProperty("ownerAreaCode")
|
|
|
private String ownerAreaCode;
|
|
|
+
|
|
|
+ @JsonProperty("ownerStreetCode")
|
|
|
private String ownerStreetCode;
|
|
|
+ @JsonProperty("ownerDetailAddress")
|
|
|
private String ownerDetailAddress;
|
|
|
+ @JsonProperty("ownerCertificateType")
|
|
|
private String ownerCertificateType;
|
|
|
//投保人信息
|
|
|
+ @JsonProperty("applicantCertificateType")
|
|
|
private String applicantCertificateType;
|
|
|
+ @JsonProperty("applicantName")
|
|
|
private String applicantName;
|
|
|
+ @JsonProperty("applicantCertificateNo")
|
|
|
private String applicantCertificateNo;
|
|
|
+ @JsonProperty("applicantMobile")
|
|
|
private String applicantMobile;
|
|
|
+ @JsonProperty("applicantEmail")
|
|
|
private String applicantEmail;
|
|
|
+ @JsonProperty("applicantProvinceCode")
|
|
|
private String applicantProvinceCode;
|
|
|
+ @JsonProperty("applicantCityCode")
|
|
|
private String applicantCityCode;
|
|
|
+ @JsonProperty("applicantAreaCode")
|
|
|
private String applicantAreaCode;
|
|
|
+
|
|
|
+ @JsonProperty("applicantStreetCode")
|
|
|
private String applicantStreetCode;
|
|
|
+ @JsonProperty("applicantDetailAddress")
|
|
|
private String applicantDetailAddress;
|
|
|
+ @JsonProperty("applicantSex")
|
|
|
private String applicantSex;
|
|
|
+ @JsonProperty("applicantBirth")
|
|
|
private String applicantBirth;
|
|
|
+ @JsonProperty("applicantCertiStartDate")
|
|
|
private String applicantCertiStartDate;
|
|
|
+ @JsonProperty("applicantCertiEndDate")
|
|
|
private String applicantCertiEndDate;
|
|
|
|
|
|
//被保人信息
|
|
|
+ @JsonProperty("insureCertificateType")
|
|
|
private String insureCertificateType;
|
|
|
+ @JsonProperty("insureName")
|
|
|
private String insureName;
|
|
|
+ @JsonProperty("insureCertificateNo")
|
|
|
private String insureCertificateNo;
|
|
|
+ @JsonProperty("insureMobile")
|
|
|
private String insureMobile;
|
|
|
+ @JsonProperty("insureEmail")
|
|
|
private String insureEmail;
|
|
|
+ @JsonProperty("insureProvinceCode")
|
|
|
private String insureProvinceCode;
|
|
|
+ @JsonProperty("insureCityCode")
|
|
|
private String insureCityCode;
|
|
|
+ @JsonProperty("insureAreaCode")
|
|
|
private String insureAreaCode;
|
|
|
+
|
|
|
+ @JsonProperty("insureStreetCode")
|
|
|
private String insureStreetCode;
|
|
|
+ @JsonProperty("insureDetailAddress")
|
|
|
private String insureDetailAddress;
|
|
|
+ @JsonProperty("insureSex")
|
|
|
private String insureSex;
|
|
|
+ @JsonProperty("insureBirth")
|
|
|
private String insureBirth;
|
|
|
+ @JsonProperty("insureType")
|
|
|
private String insureType;
|
|
|
+ @JsonProperty("insuredIsOwner")
|
|
|
private String insuredIsOwner;
|
|
|
|
|
|
-
|
|
|
+ @JsonProperty("payStyle")
|
|
|
private String payStyle;
|
|
|
- private String individual;
|
|
|
+
|
|
|
+ @JsonProperty("quoteGreenWay")
|
|
|
private String quoteGreenWay;
|
|
|
+
|
|
|
+ @JsonProperty("id")
|
|
|
private String id;
|
|
|
+
|
|
|
+ @JsonProperty("specialPromiseCode")
|
|
|
private String specialPromiseCode;
|
|
|
- private String specialPromiseReqJsonStr;
|
|
|
+
|
|
|
+ @JsonProperty("specialPromiseReqJsonStr")
|
|
|
+ private String[] specialPromiseReqJsonStr;
|
|
|
|
|
|
}
|