|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.quotation.hengbang.crawler.entity.request;
|
|
package com.jzg.quotation.hengbang.crawler.entity.request;
|
|
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.jzg.commons.entity.quote.vo.CarInfoVo;
|
|
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.QuoteVo;
|
|
import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
@@ -7,9 +8,15 @@ import com.jzg.quotation.hengbang.crawler.entity.HengBangCrawlerConfigureParamet
|
|
|
import com.jzg.quotation.hengbang.crawler.entity.dto.HbEncDTO;
|
|
import com.jzg.quotation.hengbang.crawler.entity.dto.HbEncDTO;
|
|
|
import com.jzg.quotation.hengbang.crawler.entity.response.HbCrawlerQueryCarResponse;
|
|
import com.jzg.quotation.hengbang.crawler.entity.response.HbCrawlerQueryCarResponse;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
import java.io.Serial;
|
|
import java.io.Serial;
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
|
+import java.time.ZoneId;
|
|
|
|
|
+import java.time.ZonedDateTime;
|
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @description: 恒邦财险 报价第一步 提交基础数据,返回投保单号
|
|
* @description: 恒邦财险 报价第一步 提交基础数据,返回投保单号
|
|
@@ -17,6 +24,7 @@ import java.io.Serializable;
|
|
|
* @date: 2025/4/9 09:56
|
|
* @date: 2025/4/9 09:56
|
|
|
**/
|
|
**/
|
|
|
@Data
|
|
@Data
|
|
|
|
|
+@NoArgsConstructor
|
|
|
public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
@Serial
|
|
@Serial
|
|
|
private static final long serialVersionUID = -4097447719083993314L;
|
|
private static final long serialVersionUID = -4097447719083993314L;
|
|
@@ -36,8 +44,8 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
//设置车辆信息
|
|
//设置车辆信息
|
|
|
carInsureItemDTO.setEnergyType(carInfoVo.getEnergyTypeCode());
|
|
carInsureItemDTO.setEnergyType(carInfoVo.getEnergyTypeCode());
|
|
|
carInsureItemDTO.setLicenseNo(carInfoVo.getLicenseNo());
|
|
carInsureItemDTO.setLicenseNo(carInfoVo.getLicenseNo());
|
|
|
- carInsureItemDTO.setEnrollDate(carInfoVo.getRegisterDate());
|
|
|
|
|
- carInsureItemDTO.setIssueDate(carInfoVo.getIssueDate());
|
|
|
|
|
|
|
+ carInsureItemDTO.setEnrollDate(dateFormat(carInfoVo.getRegisterDate()));
|
|
|
|
|
+ carInsureItemDTO.setIssueDate(dateFormat(carInfoVo.getIssueDate()));
|
|
|
carInsureItemDTO.setFrameNo(carInfoVo.getVinNo());
|
|
carInsureItemDTO.setFrameNo(carInfoVo.getVinNo());
|
|
|
carInsureItemDTO.setEngineNo(carInfoVo.getEngineNo());
|
|
carInsureItemDTO.setEngineNo(carInfoVo.getEngineNo());
|
|
|
carInsureItemDTO.setPrintBrandName(contentDTO.getModelCName());
|
|
carInsureItemDTO.setPrintBrandName(contentDTO.getModelCName());
|
|
@@ -45,19 +53,31 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
carInsureItemDTO.setCarKindCode(carInfoVo.getCarKindCode());
|
|
carInsureItemDTO.setCarKindCode(carInfoVo.getCarKindCode());
|
|
|
carInsureItemDTO.setUsenatureCode(carInfoVo.getCarNatureCode());
|
|
carInsureItemDTO.setUsenatureCode(carInfoVo.getCarNatureCode());
|
|
|
carInsureItemDTO.setCarUseType(carInfoVo.getVehicleUseCode());
|
|
carInsureItemDTO.setCarUseType(carInfoVo.getVehicleUseCode());
|
|
|
- carInsureItemDTO.setNegotiationValue(Integer.parseInt(depreciationPrice));
|
|
|
|
|
|
|
+ carInsureItemDTO.setNegotiationValue(Double.parseDouble(depreciationPrice));
|
|
|
carInsureItemDTO.setLicenseKindCode(carInfoVo.getLicenseKindCode());
|
|
carInsureItemDTO.setLicenseKindCode(carInfoVo.getLicenseKindCode());
|
|
|
carInsureItemDTO.setVehicleType(carInfoVo.getCarTypeCode());
|
|
carInsureItemDTO.setVehicleType(carInfoVo.getCarTypeCode());
|
|
|
carInsureItemDTO.setTransferDate(carInfoVo.getTransferDate());
|
|
carInsureItemDTO.setTransferDate(carInfoVo.getTransferDate());
|
|
|
carInsureItemDTO.setSeatCount(contentDTO.getSeatCount());
|
|
carInsureItemDTO.setSeatCount(contentDTO.getSeatCount());
|
|
|
- carInsureItemDTO.setPurchasePrice(Integer.parseInt(contentDTO.getPurchasePriceNotTax()));
|
|
|
|
|
- carInsureItemDTO.setExhaustscale(String.valueOf(contentDTO.getExhaustScale()));
|
|
|
|
|
|
|
+ carInsureItemDTO.setPurchasePrice(Double.parseDouble(contentDTO.getPurchasePriceNotTax()));
|
|
|
carInsureItemDTO.setExhaustscale(String.valueOf(contentDTO.getExhaustScale()));
|
|
carInsureItemDTO.setExhaustscale(String.valueOf(contentDTO.getExhaustScale()));
|
|
|
|
|
+ carInsureItemDTO.setExhaustScale1(String.valueOf(contentDTO.getExhaustScale()));
|
|
|
carInsureItemDTO.setPower(contentDTO.getPower());
|
|
carInsureItemDTO.setPower(contentDTO.getPower());
|
|
|
carInsureItemDTO.setTonCount(carInfoVo.getTonCount());
|
|
carInsureItemDTO.setTonCount(carInfoVo.getTonCount());
|
|
|
carInsureItemDTO.setCompleteKerbMass(String.valueOf(contentDTO.getCompleteKerbMass()));
|
|
carInsureItemDTO.setCompleteKerbMass(String.valueOf(contentDTO.getCompleteKerbMass()));
|
|
|
- carInsureItemDTO.setActualValue(Integer.parseInt(depreciationPrice));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ carInsureItemDTO.setActualValue(Double.parseDouble(depreciationPrice));
|
|
|
|
|
+ carInsureItemDTO.setModelCode(contentDTO.getModelCode());
|
|
|
|
|
+ carInsureItemDTO.setFamilyName(contentDTO.getFamilyName());
|
|
|
|
|
+ carInsureItemDTO.setAttachNature(carInfoVo.getPropertyCode());
|
|
|
|
|
+ carInsureItemDTO.setCiModelCode(contentDTO.getCimodelCode());
|
|
|
|
|
+ carInsureItemDTO.setPurchasePriceNotTax(Double.parseDouble(contentDTO.getPurchasePriceNotTax()));
|
|
|
|
|
+ carInsureItemDTO.setStyleUniqueId(contentDTO.getVehicleStyleUniqueId());
|
|
|
|
|
+ carInsureItemDTO.setCountyCode(ownersInfo.getCountyCode());
|
|
|
|
|
+ carInsureItemDTO.setCountyNameArray(new StringBuilder(ownersInfo.getProvince()).append(",").append(ownersInfo.getCity()).append(",").append(ownersInfo.getCounty()).toString());
|
|
|
|
|
+ carInsureItemDTO.setCountyCodeArray(new StringBuilder(ownersInfo.getProvinceCode()).append(",").append(ownersInfo.getCityCode()).append(",").append(ownersInfo.getCountyCode()).toString());
|
|
|
|
|
+ carInsureItemDTO.setPostCode(ownersInfo.getCountyCode());
|
|
|
|
|
+ carInsureItemDTO.setChgownerFlag(carInfoVo.isTransfer()? "1" : "0");
|
|
|
|
|
+ carInsureItemDTO.setSpecialCarFlag("1");
|
|
|
|
|
+ this.carInsureItem = carInsureItemDTO;
|
|
|
//设置被保人
|
|
//设置被保人
|
|
|
CarInsureRiskRelatedPartyDTO riskRelatedPartyDTO = new CarInsureRiskRelatedPartyDTO();
|
|
CarInsureRiskRelatedPartyDTO riskRelatedPartyDTO = new CarInsureRiskRelatedPartyDTO();
|
|
|
riskRelatedPartyDTO.setName(insuredPersonInfo.getName());
|
|
riskRelatedPartyDTO.setName(insuredPersonInfo.getName());
|
|
@@ -67,13 +87,20 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
riskRelatedPartyDTO.setBirthday(insuredPersonInfo.getBirthday());
|
|
riskRelatedPartyDTO.setBirthday(insuredPersonInfo.getBirthday());
|
|
|
riskRelatedPartyDTO.setEmail(insuredPersonInfo.getEmail());
|
|
riskRelatedPartyDTO.setEmail(insuredPersonInfo.getEmail());
|
|
|
riskRelatedPartyDTO.setCountyCode(insuredPersonInfo.getCountyCode());
|
|
riskRelatedPartyDTO.setCountyCode(insuredPersonInfo.getCountyCode());
|
|
|
- riskRelatedPartyDTO.setCountyNameArray(new StringBuilder(insuredPersonInfo.getProvince()).append(",").append(insuredPersonInfo.getCity()).append(",").append(insuredPersonInfo.getCounty()).toString());
|
|
|
|
|
- riskRelatedPartyDTO.setCountyCodeArray(new StringBuilder(insuredPersonInfo.getProvinceCode()).append(",").append(insuredPersonInfo.getCityCode()).append(",").append(insuredPersonInfo.getCountyCode()).toString());
|
|
|
|
|
|
|
+ riskRelatedPartyDTO.setPostCode(insuredPersonInfo.getCountyCode());
|
|
|
|
|
+ riskRelatedPartyDTO.setCountyNameArray(new StringBuilder(insuredPersonInfo.getProvince()).append(",").append(insuredPersonInfo.getCity()).append(",").append(insuredPersonInfo.getCounty()).toString());
|
|
|
|
|
+ riskRelatedPartyDTO.setCountyCodeArray(new StringBuilder(insuredPersonInfo.getProvinceCode()).append(",").append(insuredPersonInfo.getCityCode()).append(",").append(insuredPersonInfo.getCountyCode()).toString());
|
|
|
riskRelatedPartyDTO.setSex(insuredPersonInfo.getGender());
|
|
riskRelatedPartyDTO.setSex(insuredPersonInfo.getGender());
|
|
|
riskRelatedPartyDTO.setAddress(insuredPersonInfo.getAddr());
|
|
riskRelatedPartyDTO.setAddress(insuredPersonInfo.getAddr());
|
|
|
- riskRelatedPartyDTO.setValidityBegintime(insuredPersonInfo.getIdentifyValidDate());
|
|
|
|
|
- riskRelatedPartyDTO.setValidityEndTime(insuredPersonInfo.getIdentifyValidEndDate());
|
|
|
|
|
-
|
|
|
|
|
|
|
+ riskRelatedPartyDTO.setValidityBegintime(dateFormat(insuredPersonInfo.getIdentifyValidDate()));
|
|
|
|
|
+ riskRelatedPartyDTO.setValidityEndTime(dateFormat(insuredPersonInfo.getIdentifyValidEndDate()));
|
|
|
|
|
+ riskRelatedPartyDTO.setInsuredType("1");
|
|
|
|
|
+ riskRelatedPartyDTO.setCompany("00");
|
|
|
|
|
+ riskRelatedPartyDTO.setPosition("60");
|
|
|
|
|
+ riskRelatedPartyDTO.setCustomerType("00");
|
|
|
|
|
+ riskRelatedPartyDTO.setVipInd("0");
|
|
|
|
|
+ riskRelatedPartyDTO.setRelationshipToInsrnt(policyHolderInfo.getName().equals(insuredPersonInfo.getName())? "6" : "0");
|
|
|
|
|
+ this.carInsureRiskRelatedParty = riskRelatedPartyDTO;
|
|
|
//设置投保人数据
|
|
//设置投保人数据
|
|
|
CarInsureRelatedPartyDTO carInsureRelatedPartyDTO = new CarInsureRelatedPartyDTO();
|
|
CarInsureRelatedPartyDTO carInsureRelatedPartyDTO = new CarInsureRelatedPartyDTO();
|
|
|
carInsureRelatedPartyDTO.setName(policyHolderInfo.getName());
|
|
carInsureRelatedPartyDTO.setName(policyHolderInfo.getName());
|
|
@@ -83,14 +110,20 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
carInsureRelatedPartyDTO.setBirthday(policyHolderInfo.getBirthday());
|
|
carInsureRelatedPartyDTO.setBirthday(policyHolderInfo.getBirthday());
|
|
|
carInsureRelatedPartyDTO.setEmail(policyHolderInfo.getEmail());
|
|
carInsureRelatedPartyDTO.setEmail(policyHolderInfo.getEmail());
|
|
|
carInsureRelatedPartyDTO.setCountyCode(policyHolderInfo.getCountyCode());
|
|
carInsureRelatedPartyDTO.setCountyCode(policyHolderInfo.getCountyCode());
|
|
|
- carInsureRelatedPartyDTO.setCountyNameArray(new StringBuilder(policyHolderInfo.getProvince()).append(",").append(policyHolderInfo.getCity()).append(",").append(policyHolderInfo.getCounty()).toString());
|
|
|
|
|
- carInsureRelatedPartyDTO.setCountyCodeArray(new StringBuilder(policyHolderInfo.getProvinceCode()).append(",").append(policyHolderInfo.getCityCode()).append(",").append(policyHolderInfo.getCountyCode()).toString());
|
|
|
|
|
|
|
+ carInsureRelatedPartyDTO.setPostCode(policyHolderInfo.getCountyCode());
|
|
|
|
|
+ carInsureRelatedPartyDTO.setCountyNameArray(new StringBuilder(policyHolderInfo.getProvince()).append(",").append(policyHolderInfo.getCity()).append(",").append(policyHolderInfo.getCounty()).toString());
|
|
|
|
|
+ carInsureRelatedPartyDTO.setCountyCodeArray(new StringBuilder(policyHolderInfo.getProvinceCode()).append(",").append(policyHolderInfo.getCityCode()).append(",").append(policyHolderInfo.getCountyCode()).toString());
|
|
|
carInsureRelatedPartyDTO.setSex(policyHolderInfo.getGender());
|
|
carInsureRelatedPartyDTO.setSex(policyHolderInfo.getGender());
|
|
|
carInsureRelatedPartyDTO.setAddress(policyHolderInfo.getAddr());
|
|
carInsureRelatedPartyDTO.setAddress(policyHolderInfo.getAddr());
|
|
|
- carInsureRelatedPartyDTO.setValidityBegintime(policyHolderInfo.getIdentifyValidDate());
|
|
|
|
|
- carInsureRelatedPartyDTO.setValidityEndTime(insuredPersonInfo.getIdentifyValidEndDate());
|
|
|
|
|
- carInsureRelatedPartyDTO.setInsuredType(parameters.getInvoiceType());
|
|
|
|
|
-
|
|
|
|
|
|
|
+ carInsureRelatedPartyDTO.setValidityBegintime(dateFormat(policyHolderInfo.getIdentifyValidDate()));
|
|
|
|
|
+ carInsureRelatedPartyDTO.setValidityEndTime(dateFormat(insuredPersonInfo.getIdentifyValidEndDate()));
|
|
|
|
|
+ carInsureRelatedPartyDTO.setInsuredType("1");
|
|
|
|
|
+ carInsureRelatedPartyDTO.setCompany("00");
|
|
|
|
|
+ carInsureRelatedPartyDTO.setPosition("60");
|
|
|
|
|
+ carInsureRelatedPartyDTO.setCustomerType("00");
|
|
|
|
|
+ carInsureRelatedPartyDTO.setVipInd("0");
|
|
|
|
|
+ carInsureRelatedPartyDTO.setInvoiceRequest("05");
|
|
|
|
|
+ this.carInsureRelatedParty = carInsureRelatedPartyDTO;
|
|
|
//设置归属数据
|
|
//设置归属数据
|
|
|
CarInsureMainDTO carInsureMainDTO = new CarInsureMainDTO();
|
|
CarInsureMainDTO carInsureMainDTO = new CarInsureMainDTO();
|
|
|
HbEncDTO.SalesManDTO salesMan = saleInfo.getSalesMan();
|
|
HbEncDTO.SalesManDTO salesMan = saleInfo.getSalesMan();
|
|
@@ -110,9 +143,38 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
carInsureMainDTO.setMobile(salesMan.getMobile());
|
|
carInsureMainDTO.setMobile(salesMan.getMobile());
|
|
|
carInsureMainDTO.setSalesmanname(salesMan.getSalesmanname());
|
|
carInsureMainDTO.setSalesmanname(salesMan.getSalesmanname());
|
|
|
carInsureMainDTO.setUsertype(salesMan.getUsertype());
|
|
carInsureMainDTO.setUsertype(salesMan.getUsertype());
|
|
|
- carInsureMainDTO.setInvoiceRequest(parameters.getInvoiceType());
|
|
|
|
|
|
|
+ carInsureMainDTO.setInvoiceRequest("05");
|
|
|
carInsureMainDTO.setOperatorCode(quoteVo.getOrder().getAttributionInformationVo().getUsername());
|
|
carInsureMainDTO.setOperatorCode(quoteVo.getOrder().getAttributionInformationVo().getUsername());
|
|
|
carInsureMainDTO.setCreator(quoteVo.getOrder().getAttributionInformationVo().getUsername());
|
|
carInsureMainDTO.setCreator(quoteVo.getOrder().getAttributionInformationVo().getUsername());
|
|
|
|
|
+ carInsureMainDTO.setBusinessMode("2");
|
|
|
|
|
+ carInsureMainDTO.setBusinessModeName("代理");
|
|
|
|
|
+ carInsureMainDTO.setResourceType("HBXSH");
|
|
|
|
|
+ carInsureMainDTO.setAccountPeriod("账期");
|
|
|
|
|
+ this.carInsureMain = carInsureMainDTO;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private String dateFormat(String date){
|
|
|
|
|
+ // 1. 解析为 LocalDateTime
|
|
|
|
|
+ ZonedDateTime zdt = null;
|
|
|
|
|
+ if (date.length() == 10){
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
+ LocalDate ld = LocalDate.parse(date, formatter);
|
|
|
|
|
+ // 2. 补上 00:00:00,变成 LocalDateTime
|
|
|
|
|
+ LocalDateTime ldt = ld.atStartOfDay(); // 等价于 "2025-08-19T00:00:00"
|
|
|
|
|
+
|
|
|
|
|
+ // 3. 设置时区为 +08:00(北京/上海)
|
|
|
|
|
+ ZoneId zone = ZoneId.of("Asia/Shanghai");
|
|
|
|
|
+ zdt = ldt.atZone(zone);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ LocalDateTime ldt = LocalDateTime.parse(date, formatter);
|
|
|
|
|
+ // 2. 指定时区(这里用 +08:00)
|
|
|
|
|
+ ZoneId zone = ZoneId.of("Asia/Shanghai"); // 等价于 +08:00
|
|
|
|
|
+ zdt = ldt.atZone(zone);
|
|
|
|
|
+ }
|
|
|
|
|
+ // 3. 格式化为 ISO-8601 带时区偏移的字符串
|
|
|
|
|
+ String result = zdt.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
|
|
|
|
|
+ return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -214,7 +276,7 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
/**
|
|
/**
|
|
|
* 协商价格
|
|
* 协商价格
|
|
|
*/
|
|
*/
|
|
|
- private Integer negotiationValue;
|
|
|
|
|
|
|
+ private Double negotiationValue;
|
|
|
/**
|
|
/**
|
|
|
* 车牌种类
|
|
* 车牌种类
|
|
|
*/
|
|
*/
|
|
@@ -242,15 +304,17 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
/**
|
|
/**
|
|
|
* 新车购置价
|
|
* 新车购置价
|
|
|
*/
|
|
*/
|
|
|
- private Integer purchasePrice;
|
|
|
|
|
|
|
+ private Double purchasePrice;
|
|
|
/**
|
|
/**
|
|
|
* 排量(cc)
|
|
* 排量(cc)
|
|
|
*/
|
|
*/
|
|
|
|
|
+ @JsonProperty("exhaustscale")
|
|
|
private String exhaustscale;
|
|
private String exhaustscale;
|
|
|
/**
|
|
/**
|
|
|
* 排量
|
|
* 排量
|
|
|
*/
|
|
*/
|
|
|
- private String exhaustScale;
|
|
|
|
|
|
|
+ @JsonProperty("exhaustScale")
|
|
|
|
|
+ private String exhaustScale1;
|
|
|
/**
|
|
/**
|
|
|
* 功率(KW)
|
|
* 功率(KW)
|
|
|
*/
|
|
*/
|
|
@@ -286,11 +350,11 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
/**
|
|
/**
|
|
|
* 折旧价
|
|
* 折旧价
|
|
|
*/
|
|
*/
|
|
|
- private Integer actualValue;
|
|
|
|
|
|
|
+ private Double actualValue;
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
- private Integer purchasePriceNotTax;
|
|
|
|
|
|
|
+ private Double purchasePriceNotTax;
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
@@ -323,6 +387,8 @@ public class HbCrawlerQuoteimmediatelyRequest extends HbBaseRequest {
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
private String countyNameArray;
|
|
private String countyNameArray;
|
|
|
|
|
+
|
|
|
|
|
+ private String postCode;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Data
|
|
@Data
|