|
|
@@ -0,0 +1,331 @@
|
|
|
+package com.jzg.quotation.renbao.crawler.entity.request;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
|
|
|
+import com.jzg.commons.util.IDCardUtils;
|
|
|
+import com.jzg.quotation.renbao.crawler.entity.dto.PrpCmainDTO;
|
|
|
+import com.jzg.quotation.renbao.crawler.entity.response.RenBaoCrawlerCustomQueryPData;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@NoArgsConstructor
|
|
|
+@Data
|
|
|
+public class RenBaoCrawlerCustomPersonUpdateRequest {
|
|
|
+
|
|
|
+ @JsonProperty("comCode")
|
|
|
+ private String comCode;
|
|
|
+
|
|
|
+ @JsonProperty("userCode")
|
|
|
+ private String userCode;
|
|
|
+
|
|
|
+ @JsonProperty("index")
|
|
|
+ private String index;
|
|
|
+
|
|
|
+ @JsonProperty("type")
|
|
|
+ private String type;
|
|
|
+
|
|
|
+ @JsonProperty("isBusinessType")
|
|
|
+ private String isBusinessType;
|
|
|
+
|
|
|
+ @JsonProperty("ischeckimagefromhead")
|
|
|
+ private String ischeckimagefromhead;
|
|
|
+
|
|
|
+ @JsonProperty("insuredSunECMFlag")
|
|
|
+ private String insuredSunECMFlag;
|
|
|
+
|
|
|
+ @JsonProperty("cifversion")
|
|
|
+ private String cifversion;
|
|
|
+
|
|
|
+ @JsonProperty("versionNo")
|
|
|
+ private String versionNo;
|
|
|
+
|
|
|
+ @JsonProperty("email")
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ @JsonProperty("prpDcustomerPerson")
|
|
|
+ private PrpDcustomerPersonDTO prpDcustomerPerson;
|
|
|
+
|
|
|
+ @JsonProperty("newAddress")
|
|
|
+ private NewAddressDTO newAddress;
|
|
|
+
|
|
|
+ @JsonProperty("newAddress")
|
|
|
+ private OldAddressDTO oldAddress;
|
|
|
+
|
|
|
+ @JsonProperty("newPhone")
|
|
|
+ private List<NewPhoneDTO> newPhone;
|
|
|
+
|
|
|
+ @JsonProperty("oldEmail")
|
|
|
+ private OldEmailDTO oldEmail;
|
|
|
+
|
|
|
+ @JsonProperty("groupCustFlag")
|
|
|
+ private String groupCustFlag;
|
|
|
+
|
|
|
+ @JsonProperty("isGroupFlag")
|
|
|
+ private String isGroupFlag;
|
|
|
+
|
|
|
+ public RenBaoCrawlerCustomPersonUpdateRequest(RenBaoCrawlerCustomQueryPData customQueryPData, PrpCmainDTO prpCmainDTO, CustomerInfoVo customerInfoVo){
|
|
|
+ this.comCode = prpCmainDTO.getComCode();
|
|
|
+ this.userCode = prpCmainDTO.getUserCode();
|
|
|
+ this.index = "0";
|
|
|
+ this.type = "";
|
|
|
+ this.isBusinessType = "I";
|
|
|
+ this.ischeckimagefromhead = "";
|
|
|
+ this.insuredSunECMFlag = "0";
|
|
|
+ this.cifversion = "1";
|
|
|
+ this.versionNo = customQueryPData.getVersionNo();
|
|
|
+ this.email = customerInfoVo.getEmail();
|
|
|
+ this.prpDcustomerPerson = new PrpDcustomerPersonDTO(customQueryPData,customerInfoVo);
|
|
|
+ this.newPhone = List.of(new NewPhoneDTO(customerInfoVo));
|
|
|
+ this.newAddress = new NewAddressDTO(customQueryPData,customerInfoVo);
|
|
|
+ this.oldAddress = new OldAddressDTO();
|
|
|
+ this.oldEmail = new OldEmailDTO();
|
|
|
+ this.groupCustFlag = "0";
|
|
|
+ this.isGroupFlag = "0";
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class OldEmailDTO {
|
|
|
+
|
|
|
+ @JsonProperty("emailSeqNo")
|
|
|
+ private Integer emailSeqNo;
|
|
|
+
|
|
|
+ @JsonProperty("email")
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ @JsonProperty("emailE")
|
|
|
+ private String emailE;
|
|
|
+
|
|
|
+ public OldEmailDTO(){
|
|
|
+ this.emailSeqNo = 0;
|
|
|
+ this.email = "";
|
|
|
+ this.emailE = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class NewPhoneDTO {
|
|
|
+ @JsonProperty("mobilephoneNumber")
|
|
|
+ private String mobilephoneNumber;
|
|
|
+
|
|
|
+ @JsonProperty("phoneNumber")
|
|
|
+ private String phoneNumber;
|
|
|
+
|
|
|
+ @JsonProperty("phoneExtensionIntl")
|
|
|
+ private String phoneExtensionIntl;
|
|
|
+
|
|
|
+ @JsonProperty("phoneExtension")
|
|
|
+ private String phoneExtension;
|
|
|
+
|
|
|
+ @JsonProperty("extensionNumber")
|
|
|
+ private String extensionNumber;
|
|
|
+
|
|
|
+ @JsonProperty("phoneType")
|
|
|
+ private String phoneType;
|
|
|
+
|
|
|
+ @JsonProperty("versionNo")
|
|
|
+ private String versionNo;
|
|
|
+
|
|
|
+ @JsonProperty("phoneProperties")
|
|
|
+ private String phoneProperties;
|
|
|
+
|
|
|
+ @JsonProperty("isDefault")
|
|
|
+ private Boolean isDefault;
|
|
|
+
|
|
|
+ @JsonProperty("delFlag")
|
|
|
+ private Boolean delFlag;
|
|
|
+
|
|
|
+ @JsonProperty("addFlag")
|
|
|
+ private Boolean addFlag;
|
|
|
+
|
|
|
+ @JsonProperty("indexNum")
|
|
|
+ private Integer indexNum;
|
|
|
+
|
|
|
+ @JsonProperty("phoneSeqNo")
|
|
|
+ private Integer phoneSeqNo;
|
|
|
+
|
|
|
+ public NewPhoneDTO(CustomerInfoVo customerInfoVo){
|
|
|
+ this.mobilephoneNumber = customerInfoVo.getMobile();
|
|
|
+ this.phoneNumber = "";
|
|
|
+ this.phoneExtensionIntl = "";
|
|
|
+ this.phoneExtension = "";
|
|
|
+ this.extensionNumber = "";
|
|
|
+ this.phoneType = "1";
|
|
|
+ this.versionNo = null;
|
|
|
+ this.phoneProperties = "01";
|
|
|
+ this.isDefault = true;
|
|
|
+ this.phoneSeqNo = 1;
|
|
|
+ this.delFlag = false;
|
|
|
+ this.addFlag = false;
|
|
|
+ this.indexNum = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class PrpDcustomerPersonDTO {
|
|
|
+
|
|
|
+ @JsonProperty("customerCode")
|
|
|
+ private String customerCode;
|
|
|
+
|
|
|
+ @JsonProperty("versionNo")
|
|
|
+ private String versionNo;
|
|
|
+
|
|
|
+ @JsonProperty("auditStatus")
|
|
|
+ private String auditStatus;
|
|
|
+
|
|
|
+ @JsonProperty("customerCName")
|
|
|
+ private String customerCName;
|
|
|
+
|
|
|
+ @JsonProperty("customerEName")
|
|
|
+ private String customerEName;
|
|
|
+
|
|
|
+ @JsonProperty("identifyType")
|
|
|
+ private String identifyType;
|
|
|
+
|
|
|
+ @JsonProperty("identifyNumberE")
|
|
|
+ private String identifyNumberE;
|
|
|
+
|
|
|
+ @JsonProperty("identifyNumber")
|
|
|
+ private String identifyNumber;
|
|
|
+
|
|
|
+ @JsonProperty("dateValid")
|
|
|
+ private String dateValid;
|
|
|
+
|
|
|
+ @JsonProperty("startDateValid")
|
|
|
+ private String startDateValid;
|
|
|
+
|
|
|
+ @JsonProperty("nationality")
|
|
|
+ private String nationality;
|
|
|
+
|
|
|
+ @JsonProperty("resident")
|
|
|
+ private String resident;
|
|
|
+
|
|
|
+ @JsonProperty("gender")
|
|
|
+ private String gender;
|
|
|
+
|
|
|
+ @JsonProperty("birthDate")
|
|
|
+ private String birthDate;
|
|
|
+
|
|
|
+ @JsonProperty("financeFlag")
|
|
|
+ private String financeFlag;
|
|
|
+
|
|
|
+ @JsonProperty("emailSeqNo")
|
|
|
+ private Integer emailSeqNo;
|
|
|
+
|
|
|
+ @JsonProperty("email")
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ @JsonProperty("emailE")
|
|
|
+ private String emailE;
|
|
|
+
|
|
|
+ @JsonProperty("selfYearIncome")
|
|
|
+ private String selfYearIncome;
|
|
|
+
|
|
|
+ @JsonProperty("professional")
|
|
|
+ private String professional;
|
|
|
+
|
|
|
+ public PrpDcustomerPersonDTO(RenBaoCrawlerCustomQueryPData customQueryPData, CustomerInfoVo customerInfoVo){
|
|
|
+ this.customerCode = customQueryPData.getCustomerCodeAll();
|
|
|
+ this.versionNo = customQueryPData.getVersionNo();
|
|
|
+ this.auditStatus = "";
|
|
|
+ this.customerCName = customQueryPData.getInsuredName();
|
|
|
+ this.customerEName = "";
|
|
|
+ this.identifyType = customQueryPData.getIdentifyType();
|
|
|
+ this.identifyNumberE = "";
|
|
|
+ this.identifyNumber = customerInfoVo.getIdentifyNumber();
|
|
|
+ this.dateValid = customerInfoVo.getIdentifyValidEndDate();
|
|
|
+ this.startDateValid = customerInfoVo.getIdentifyValidDate();
|
|
|
+ this.nationality = "CHN";
|
|
|
+ this.resident = "A"; // A 居民 B 非居民
|
|
|
+ this.gender = customerInfoVo.getGender();
|
|
|
+ this.birthDate = IDCardUtils.GetBirthday(customerInfoVo.getIdentifyNumber());
|
|
|
+ this.financeFlag = "3";
|
|
|
+ this.emailSeqNo = 0;
|
|
|
+ this.email = "";
|
|
|
+ this.emailE = "";
|
|
|
+ this.selfYearIncome = "";
|
|
|
+ this.professional = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class NewAddressDTO {
|
|
|
+ @JsonProperty("addressType")
|
|
|
+ private String addressType;
|
|
|
+
|
|
|
+ @JsonProperty("province")
|
|
|
+ private String province;
|
|
|
+
|
|
|
+ @JsonProperty("city")
|
|
|
+ private String city;
|
|
|
+
|
|
|
+ @JsonProperty("area")
|
|
|
+ private String area;
|
|
|
+
|
|
|
+ @JsonProperty("addressCName")
|
|
|
+ private String addressCName;
|
|
|
+
|
|
|
+ @JsonProperty("addressCNameE")
|
|
|
+ private String addressCNameE;
|
|
|
+
|
|
|
+ @JsonProperty("versionNo")
|
|
|
+ private String versionNo;
|
|
|
+
|
|
|
+ @JsonProperty("postCode")
|
|
|
+ private String postCode;
|
|
|
+
|
|
|
+ @JsonProperty("insuredAddressSeqNo")
|
|
|
+ private Integer insuredAddressSeqNo;
|
|
|
+
|
|
|
+ public NewAddressDTO(RenBaoCrawlerCustomQueryPData customQueryPData, CustomerInfoVo customerInfoVo){
|
|
|
+ this.addressType = "3"; // 家庭地址 1 单位地址 2 户口所在地 3
|
|
|
+ this.province = customerInfoVo.getProvinceCode();
|
|
|
+ this.city = customerInfoVo.getCityCode();
|
|
|
+ this.area = customerInfoVo.getCountyCode();
|
|
|
+ this.addressCName = customerInfoVo.getAddr();
|
|
|
+ this.versionNo = customQueryPData.getVersionNo();
|
|
|
+ this.postCode = "";
|
|
|
+ this.insuredAddressSeqNo = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class OldAddressDTO {
|
|
|
+ @JsonProperty("addressType")
|
|
|
+ private String addressType;
|
|
|
+
|
|
|
+ @JsonProperty("province")
|
|
|
+ private String province;
|
|
|
+
|
|
|
+ @JsonProperty("city")
|
|
|
+ private String city;
|
|
|
+
|
|
|
+ @JsonProperty("area")
|
|
|
+ private String area;
|
|
|
+
|
|
|
+ @JsonProperty("addressCName")
|
|
|
+ private String addressCName;
|
|
|
+
|
|
|
+ @JsonProperty("addressCNameE")
|
|
|
+ private String addressCNameE;
|
|
|
+
|
|
|
+ @JsonProperty("insuredAddressSeqNo")
|
|
|
+ private Integer insuredAddressSeqNo;
|
|
|
+
|
|
|
+ public OldAddressDTO(){
|
|
|
+ this.addressType = ""; // 家庭地址 1 单位地址 2 户口所在地 3
|
|
|
+ this.province = "";
|
|
|
+ this.city = "";
|
|
|
+ this.area = "";
|
|
|
+ this.addressCName = "";
|
|
|
+ this.insuredAddressSeqNo = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|