Просмотр исходного кода

update
1.国任爬虫报价接口调试

wks 10 месяцев назад
Родитель
Сommit
1f242e064b
12 измененных файлов с 714 добавлено и 1309 удалено
  1. 9 3
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/component/GuoRenCrawlerRequestComponent.java
  2. 48 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/constant/enums/InsuranceMap.java
  3. 425 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/dto/CiInsureDemandDTO.java
  4. 35 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/dto/PrptengageListDTO.java
  5. 37 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/po/InsuranceItem.java
  6. 78 456
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerCalculationPremiumRequest.java
  7. 18 9
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerGetCarPriceRequest.java
  8. 4 834
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerCalculationPremiumData.java
  9. 3 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerQueryCarModelData.java
  10. 9 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/GuoRenCrawlerQuoteProcessService.java
  11. 42 5
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/impl/GuoRenCrawlerQuoteProcessServiceImpl.java
  12. 6 2
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/impl/GuoRenCrawlerRequestImpl.java

+ 9 - 3
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/component/GuoRenCrawlerRequestComponent.java

@@ -56,7 +56,13 @@ public class GuoRenCrawlerRequestComponent {
      */
     public <Response> Response request(RequestUrl requestUrl, Object body, ParameterizedTypeReference<Response> parameterizedTypeReference, HttpHeaders httpHeaders) {
         String url = guoRenCrawlerProperties.getBaseUrl() + requestUrl.getUri();
-        return requestComponent.post(url, body, requestUrl.getRequestDescription(), parameterizedTypeReference, httpHeaders);
+        Response response = requestComponent.post(url, body, requestUrl.getRequestDescription(), parameterizedTypeReference, httpHeaders);
+        if (response instanceof GuoRenCrawlerBaseResponse) {
+            if (((GuoRenCrawlerBaseResponse<?>) response).getResultCode() == 1) {
+                throw new SystemException(((GuoRenCrawlerBaseResponse<?>) response).getResultMsg());
+            }
+        }
+        return response;
     }
 
     /**
@@ -234,7 +240,7 @@ public class GuoRenCrawlerRequestComponent {
                                                                                        QuoteVo quoteVo,
                                                                                        GuoRenCrawlerWriteBackAddressData ownersAddr, String relationShip, HttpHeaders httpHeaders) {
         GuoRenCrawlerGetCarPriceRequest getCarPriceRequest = new GuoRenCrawlerGetCarPriceRequest(queryCarModelData, prpTmainDTO, quoteVo, ownersAddr, relationShip);
-        GuoRenCrawlerBaseResponse<List<GuoRenCrawlerGetCarPriceData>> request =   request(RequestUrl.GET_CAR_PRICE, getCarPriceRequest, new ParameterizedTypeReference<>() {
+        GuoRenCrawlerBaseResponse<List<GuoRenCrawlerGetCarPriceData>> request = request(RequestUrl.GET_CAR_PRICE, getCarPriceRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return new GuoRenCrawlerCalculationPremiumRequest.BcDTO.PrpTitemCarDTO(getCarPriceRequest, request.getData().get(0));
     }
@@ -247,7 +253,7 @@ public class GuoRenCrawlerRequestComponent {
      * @return 保费计算响应
      */
     public GuoRenCrawlerCalculationPremiumData calculationPremium(GuoRenCrawlerCalculationPremiumRequest crawlerCalculationPremiumRequest, HttpHeaders httpHeaders) {
-        GuoRenCrawlerBaseResponse<GuoRenCrawlerCalculationPremiumData> request =  request(RequestUrl.CALCULATION_PREMIUM, crawlerCalculationPremiumRequest, new ParameterizedTypeReference<>() {
+        GuoRenCrawlerBaseResponse<GuoRenCrawlerCalculationPremiumData> request = request(RequestUrl.CALCULATION_PREMIUM, crawlerCalculationPremiumRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return request.getData();
     }

+ 48 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/constant/enums/InsuranceMap.java

@@ -0,0 +1,48 @@
+package com.jzg.quotation.guoren.crawler.constant.enums;
+
+import com.jzg.quotation.commons.constant.InsuranceCode;
+import com.jzg.quotation.guoren.crawler.entity.po.InsuranceItem;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public final class InsuranceMap {
+
+    public static final Map<String, InsuranceItem> INSURANCE_MAP = new HashMap<>();
+
+    static {
+        INSURANCE_MAP.put("20B", new InsuranceItem("20B", "机动车第三者责任保险", "33", " 1  1", "M"));
+        INSURANCE_MAP.put("20A", new InsuranceItem("20A", "机动车损失保险", "34", " 1  1", "M"));
+        INSURANCE_MAP.put("20D3", new InsuranceItem("20D3", "机动车车上人员责任保险(驾驶员)", "35", " 1  1", "M"));
+        INSURANCE_MAP.put("20D4", new InsuranceItem("20D4", "机动车车上人员责任保险(乘客)", "37", " 1  1", "M"));
+
+        INSURANCE_MAP.put("20E1", new InsuranceItem("20E1", "附加绝对免赔率特约险(机动车损失保险)", "39", " 2  0", "S"));
+        INSURANCE_MAP.put("20E3", new InsuranceItem("20E3", "附加绝对免赔率特约险(机动车第三者责任保险)", "41", " 2  0", "S"));
+        INSURANCE_MAP.put("20E4", new InsuranceItem("20E4", "附加绝对免赔率特约险(机动车车上人员责任保险(司机))", "42", " 2  0", "S"));
+        INSURANCE_MAP.put("20E5", new InsuranceItem("20E5", "附加绝对免赔率特约险(机动车车上人员责任保险(乘客))", "43", " 2  0", "S"));
+        INSURANCE_MAP.put("20J", new InsuranceItem("20J", "附加法定节假日限额翻倍险", "45", " 2  0", "S"));
+        INSURANCE_MAP.put("20L", new InsuranceItem("20L", "附加车身划痕损失险", "47", " 2  0", "S"));
+
+        INSURANCE_MAP.put("20Y", new InsuranceItem("20Y", "附加医保外医疗费用责任险-三者险", "54", " 2  0", "S"));
+        INSURANCE_MAP.put("20Y1", new InsuranceItem("20Y1", "附加医保外医疗费用责任险-驾驶员", "55", " 2  0", "S"));
+        INSURANCE_MAP.put("20Y2", new InsuranceItem("20Y2", "附加医保外医疗费用责任险-乘客", "56", " 2  0", "S"));
+
+        INSURANCE_MAP.put("21B", new InsuranceItem("21B", "新能源汽车第三者责任保险", "33", " 1  1", "M"));
+        INSURANCE_MAP.put("21A", new InsuranceItem("21A", "新能源汽车损失保险", "34", " 1  1", "M"));
+        INSURANCE_MAP.put("21D3", new InsuranceItem("21D3", "新能源汽车车上人员责任保险(司机)", "35", " 1  1", "M"));
+        INSURANCE_MAP.put("21D4", new InsuranceItem("21D4", "新能源汽车车上人员责任保险(乘客)", "37", " 1  1", "M"));
+
+        // 特别注意您提到的 "20Z1" 映射对象
+        INSURANCE_MAP.put("20Z1", new InsuranceItem("20Z1", "道路救援服务特约条款", "57", " 2  1", "S"));
+        INSURANCE_MAP.put("20Z2", new InsuranceItem("20Z2", "车辆安全检测特约条款", "58", " 2  1", "S"));
+        INSURANCE_MAP.put("20Z3", new InsuranceItem("20Z3", "代为驾驶服务特约条款", "59", " 2  1", "S"));
+        INSURANCE_MAP.put("20Z4", new InsuranceItem("20Z4", "代为送检服务特约条款", "38", " 2  1", "S"));
+
+        INSURANCE_MAP.put("21Z1", new InsuranceItem("21Z1", "道路救援服务特约条款(新能源车)", "66", " 2  1", "S"));
+        INSURANCE_MAP.put("21Z2", new InsuranceItem("21Z2", "车辆安全检测特约条款(新能源车)", "67", " 2  1", "S"));
+        INSURANCE_MAP.put("21Z3", new InsuranceItem("21Z3", "代为驾驶服务特约条款(新能源车)", "68", " 2  1", "S"));
+        INSURANCE_MAP.put("21Z4", new InsuranceItem("21Z4", "代为送检服务特约条款(新能源车)", "69", " 2  1", "S"));
+    }
+
+
+}

+ 425 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/dto/CiInsureDemandDTO.java

@@ -0,0 +1,425 @@
+package com.jzg.quotation.guoren.crawler.entity.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+@Data
+@NoArgsConstructor
+public class CiInsureDemandDTO  implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 7030392663342655159L;
+
+    @JsonProperty("demandNo")
+    private String demandNo;
+
+    @JsonProperty("errorCode")
+    private String errorCode;
+
+    @JsonProperty("checkCode")
+    private String checkCode;
+
+    @JsonProperty("ownerMessage")
+    private String ownerMessage;
+
+    @JsonProperty("commissionRateUpper")
+    private String commissionRateUpper;
+
+    @JsonProperty("companyCommissionRateUpper")
+    private String companyCommissionRateUpper;
+
+    @JsonProperty("claimEffectReason")
+    private String claimEffectReason;
+
+    @JsonProperty("newvehicleEffectReason")
+    private String newvehicleEffectReason;
+
+    @JsonProperty("produceReffectReason")
+    private String produceReffectReason;
+
+    @JsonProperty("busiLastYearEndDat")
+    private String busiLastYearEndDat;
+
+    @JsonProperty("transferFlag")
+    private String transferFlag;
+
+    @JsonProperty("highRiskFlag")
+    private String highRiskFlag;
+
+    @JsonProperty("effectReason")
+    private String effectReason;
+
+    @JsonProperty("lastyearCompanyId")
+    private String lastyearCompanyId;
+
+    @JsonProperty("licensePlateType")
+    private String licensePlateType;
+
+    @JsonProperty("color")
+    private String color;
+
+    @JsonProperty("vehicleOwnerName")
+    private String vehicleOwnerName;
+
+    @JsonProperty("displacement")
+    private String displacement;
+
+    @JsonProperty("channelType")
+    private String channelType;
+
+    @JsonProperty("salePrice")
+    private String salePrice;
+
+    @JsonProperty("motorTypeCode")
+    private String motorTypeCode;
+
+    @JsonProperty("contractNo")
+    private String contractNo;
+
+    @JsonProperty("contractValidDate")
+    private String contractValidDate;
+
+    @JsonProperty("contractExpireDate")
+    private String contractExpireDate;
+
+    @JsonProperty("pmVehicleMessage")
+    private String pmVehicleMessage;
+
+    @JsonProperty("useNatureMessage")
+    private String useNatureMessage;
+
+    @JsonProperty("chgOwnerMessage")
+    private String chgOwnerMessage;
+
+    @JsonProperty("scoreCode")
+    private String scoreCode;
+
+    @JsonProperty("score")
+    private String score;
+
+    @JsonProperty("updateTime")
+    private String updateTime;
+
+    @JsonProperty("insureYears")
+    private String insureYears;
+
+    @JsonProperty("claimTimes")
+    private String claimTimes;
+
+    @JsonProperty("claimAdjustLevel")
+    private String claimAdjustLevel;
+
+    @JsonProperty("newVehicleFlag")
+    private String newVehicleFlag;
+
+    @JsonProperty("insurerArea")
+    private String insurerArea;
+
+    @JsonProperty("busiInsurerArea")
+    private String busiInsurerArea;
+
+    @JsonProperty("biDemandNo")
+    private String biDemandNo;
+
+    @JsonProperty("unmatchVehicleframeTypeMessage")
+    private String unmatchVehicleframeTypeMessage;
+
+    @JsonProperty("updatetimeSH")
+    private String updatetimeSH;
+
+    @JsonProperty("ratingLevel")
+    private String ratingLevel;
+
+    @JsonProperty("exhaustScale")
+    private String exhaustScale;
+
+    @JsonProperty("operatorCode")
+    private String operatorCode;
+
+    @JsonProperty("startDate")
+    private String startDate;
+
+    @JsonProperty("endDate")
+    private String endDate;
+
+    @JsonProperty("policyNo")
+    private String policyNo;
+
+    @JsonProperty("modelCode")
+    private String modelCode;
+
+    @JsonProperty("lastYearEndDate")
+    private String lastYearEndDate;
+
+    @JsonProperty("billDate")
+    private String billDate;
+
+    @JsonProperty("reinsureFlag")
+    private String reinsureFlag;
+
+    @JsonProperty("lastBillDate")
+    private String lastBillDate;
+
+    @JsonProperty("rateFloatFlag")
+    private String rateFloatFlag;
+
+    @JsonProperty("peccancyAdjustReason")
+    private String peccancyAdjustReason;
+
+    @JsonProperty("claimAdjustReason")
+    private String claimAdjustReason;
+
+    @JsonProperty("driverRateReason")
+    private String driverRateReason;
+
+    @JsonProperty("districtRateReason")
+    private String districtRateReason;
+
+    @JsonProperty("safeAdjust")
+    private String safeAdjust;
+
+    @JsonProperty("nonclaimAdjust")
+    private String nonclaimAdjust;
+
+    @JsonProperty("loyaltyAdjust")
+    private String loyaltyAdjust;
+
+    @JsonProperty("useTypeSource")
+    private String useTypeSource;
+
+    @JsonProperty("queryPastDate")
+    private String queryPastDate;
+
+    @JsonProperty("transferDate")
+    private String transferDate;
+
+    @JsonProperty("loyaltyAdjustReason")
+    private String loyaltyAdjustReason;
+
+    @JsonProperty("busiLastYearEndDate")
+    private String busiLastYearEndDate;
+
+    @JsonProperty("busiAdjustStart")
+    private String busiAdjustStart;
+
+    @JsonProperty("busiAdjustEnd")
+    private String busiAdjustEnd;
+
+    @JsonProperty("certificateDate")
+    private String certificateDate;
+
+    @JsonProperty("reCoverMsg")
+    private String reCoverMsg;
+
+    @JsonProperty("policyCoeff")
+    private String policyCoeff;
+
+    @JsonProperty("noLoyaltyAdjustReason")
+    private String noLoyaltyAdjustReason;
+
+    @JsonProperty("lastPolicyNo")
+    private String lastPolicyNo;
+
+    @JsonProperty("ip")
+    private String ip;
+
+    @JsonProperty("usbKey")
+    private String usbKey;
+
+    @JsonProperty("peccancyStartDate")
+    private String peccancyStartDate;
+
+    @JsonProperty("peccancyEndDate")
+    private String peccancyEndDate;
+
+    @JsonProperty("kindAdjustValue")
+    private String kindAdjustValue;
+
+    @JsonProperty("kindAdjustReason")
+    private String kindAdjustReason;
+
+    @JsonProperty("noKindAdjustReason")
+    private String noKindAdjustReason;
+
+    @JsonProperty("noPeccancyReason")
+    private String noPeccancyReason;
+
+    @JsonProperty("lastBusinessNature")
+    private String lastBusinessNature;
+
+    @JsonProperty("question")
+    private String question;
+
+    @JsonProperty("fundRate")
+    private String fundRate;
+
+    @JsonProperty("fundAmount")
+    private String fundAmount;
+
+    @JsonProperty("proposalNo")
+    private String proposalNo;
+
+    @JsonProperty("comCode")
+    private String comCode;
+
+    @JsonProperty("noClaimAdjustReason")
+    private String noClaimAdjustReason;
+
+    @JsonProperty("flag")
+    private String flag;
+
+    @JsonProperty("searchSequenceNo")
+    private String searchSequenceNo;
+
+    @JsonProperty("dataSourceCode")
+    private String dataSourceCode;
+
+    @JsonProperty("completeKerbMass")
+    private String completeKerbMass;
+
+    @JsonProperty("frameNo")
+    private String frameNo;
+
+    @JsonProperty("riskCode")
+    private String riskCode;
+
+    @JsonProperty("makeDate")
+    private String makeDate;
+
+    @JsonProperty("amount")
+    private String amount;
+
+    @JsonProperty("useNatureCode")
+    private String useNatureCode;
+
+    @JsonProperty("carKindCode")
+    private String carKindCode;
+
+    @JsonProperty("enrollDate")
+    private String enrollDate;
+
+    @JsonProperty("seatCount")
+    private String seatCount;
+
+    @JsonProperty("tonCount")
+    private String tonCount;
+
+    @JsonProperty("vehicleBrand")
+    private String vehicleBrand;
+
+    @JsonProperty("licenseType")
+    private String licenseType;
+
+    @JsonProperty("basePremium")
+    private String basePremium;
+
+    @JsonProperty("premium")
+    private String premium;
+
+    @JsonProperty("brandName")
+    private String brandName;
+
+    @JsonProperty("licenseColorCode")
+    private String licenseColorCode;
+
+    @JsonProperty("fuelType")
+    private String fuelType;
+
+    @JsonProperty("restricFlag")
+    private String restricFlag;
+
+    @JsonProperty("remark")
+    private String remark;
+
+    @JsonProperty("errorMessage")
+    private String errorMessage;
+
+    @JsonProperty("errorMessageGo")
+    private String errorMessageGo;
+
+    @JsonProperty("validCheckDate")
+    private String validCheckDate;
+
+    @JsonProperty("manufacturerName")
+    private String manufacturerName;
+
+    @JsonProperty("brandCName")
+    private String brandCName;
+
+    @JsonProperty("checkDate")
+    private String checkDate;
+
+    @JsonProperty("endValidDate")
+    private String endValidDate;
+
+    @JsonProperty("carStatus")
+    private String carStatus;
+
+    @JsonProperty("haulage")
+    private String haulage;
+
+    @JsonProperty("benchmarkPremium")
+    private String benchmarkPremium;
+
+    @JsonProperty("peccancyCoeff")
+    private String peccancyCoeff;
+
+    @JsonProperty("claimCoeff")
+    private String claimCoeff;
+
+    @JsonProperty("driverCoeff")
+    private String driverCoeff;
+
+    @JsonProperty("districtCoeff")
+    private String districtCoeff;
+
+    @JsonProperty("commissionRate")
+    private String commissionRate;
+
+    @JsonProperty("demandTime")
+    private String demandTime;
+
+    @JsonProperty("proconfirmSequenceNo")
+    private String proconfirmSequenceNo;
+
+    @JsonProperty("proconfirmStartDate")
+    private String proconfirmStartDate;
+
+    @JsonProperty("proconfirmEndDate")
+    private String proconfirmEndDate;
+
+    @JsonProperty("preferentialPremium")
+    private String preferentialPremium;
+
+    @JsonProperty("preferentialFormula")
+    private String preferentialFormula;
+
+    @JsonProperty("preferentialDay")
+    private String preferentialDay;
+
+    @JsonProperty("lastYearStartDate")
+    private String lastYearStartDate;
+
+    @JsonProperty("engineNo")
+    private String engineNo;
+
+    @JsonProperty("licenseNo")
+    private String licenseNo;
+
+    @JsonProperty("renewalFlag")
+    private String renewalFlag;
+
+    @JsonProperty("carOwner")
+    private String carOwner;
+
+    public CiInsureDemandDTO(String demandNo, String checkCode) {
+        this.demandNo = demandNo;
+        this.checkCode = checkCode;
+    }
+    
+}

+ 35 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/dto/PrptengageListDTO.java

@@ -0,0 +1,35 @@
+package com.jzg.quotation.guoren.crawler.entity.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+@NoArgsConstructor
+public class PrptengageListDTO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 3992249594387723637L;
+
+    @JsonProperty("serialNo")
+    private Integer serialNo;
+
+    @JsonProperty("clauseCode")
+    private String clauseCode;
+
+    @JsonProperty("clauses")
+    private String clauses;
+
+    @JsonProperty("clausesContext")
+    private String clausesContext;
+
+    @JsonProperty("total")
+    private Integer total;
+
+    @JsonProperty("flag")
+    private String flag;
+
+}

+ 37 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/po/InsuranceItem.java

@@ -0,0 +1,37 @@
+package com.jzg.quotation.guoren.crawler.entity.po;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class InsuranceItem {
+
+    /**
+     * 保险代码
+     */
+    private String code;
+
+    /**
+     * 保险名称
+     */
+    private String name;
+
+    /**
+     * 第一个参数
+     */
+    private String itemKindNo;
+
+    /**
+     * 第二个参数
+     */
+    private String flag;
+
+    /**
+     * 主险
+     */
+    private String mainKindFlag;
+}

+ 78 - 456
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerCalculationPremiumRequest.java

@@ -3,15 +3,22 @@ package com.jzg.quotation.guoren.crawler.entity.request;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.*;
+import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.utils.TimeProcessing;
+import com.jzg.quotation.guoren.crawler.constant.enums.InsuranceMap;
+import com.jzg.quotation.guoren.crawler.entity.dto.CiInsureDemandDTO;
+import com.jzg.quotation.guoren.crawler.entity.dto.PrptengageListDTO;
+import com.jzg.quotation.guoren.crawler.entity.po.InsuranceItem;
 import com.jzg.quotation.guoren.crawler.entity.po.TaxResult;
 import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerGetAgentAgreementResponse;
 import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerGetCarPriceData;
 import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerInitSelectResponse;
 import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerWriteBackAddressData;
 import com.jzg.quotation.guoren.crawler.utils.VehicleTaxCalculator;
+import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.ObjectUtils;
 
 import java.time.LocalDateTime;
 import java.util.*;
@@ -47,7 +54,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
         } else {
             loginRiskCode = "0507";
         }
-        String today = TimeProcessing.nowDateTime();
+        String today = TimeProcessing.nowDate();
         CiDTO.PrpTcarshipTaxDTO prpTcarshipTax = new CiDTO.PrpTcarshipTaxDTO(quoteVo.getPolicyHolderInfo(), prpTmainDTO.getComCode(), prpTitemCar);
         this.basePartVo = new BasePartVoDTO(prpTmainDTO.getComCode(), loginRiskCode, prpTmainDTO.getOperatorCode());
         this.bi = new BiDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo(), today, prpTitemCar.getTermsSystem(), prpTitemCar.getClauseTypeSystem());
@@ -345,7 +352,12 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             @JsonProperty("noCarCodes")
             private String noCarCodes;
 
-            public PrpTmainDTO(GuoRenCrawlerInitSelectResponse.CodeDataDTO comCodeData, GuoRenCrawlerInitSelectResponse.CodeDataDTO agentCodeData, GuoRenCrawlerGetAgentAgreementResponse.PrpDagreeDetailDtoListDTO agentAgreement, GuoRenCrawlerInitSelectResponse.CodeDataDTO handlerCodeData, GuoRenCrawlerInitSelectResponse.CodeDataDTO unitMaintenanceCodeData, String businessSources, String username) {
+            @JsonProperty("cooprOutletsName")
+            private String cooprOutletsName;
+
+            public PrpTmainDTO(GuoRenCrawlerInitSelectResponse.CodeDataDTO comCodeData, GuoRenCrawlerInitSelectResponse.CodeDataDTO agentCodeData,
+                               GuoRenCrawlerGetAgentAgreementResponse.PrpDagreeDetailDtoListDTO agentAgreement, GuoRenCrawlerInitSelectResponse.CodeDataDTO handlerCodeData,
+                               GuoRenCrawlerInitSelectResponse.CodeDataDTO unitMaintenanceCodeData, String businessSources, String username) {
                 String today = TimeProcessing.nowDate();
                 this.agreementNo = agentAgreement.getAgreementNo();
                 this.project = "";
@@ -394,6 +406,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
                 this.goodCodes = Collections.emptyList();
                 this.noCarPremium = 0;
                 this.business = null;
+                this.cooprOutletsName = "";
                 this.operatorCode = username;
                 this.signDate = today;
                 this.loginComCode = comCodeData.getCodeCode();
@@ -808,7 +821,23 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             @JsonIgnore
             private String derailleurType;
 
+            @JsonProperty("enrollDateValueStatus")
+            private Integer enrollDateValueStatus;
+
+            @JsonProperty("postCode")
+            private String postCode;
+
+            @JsonProperty("ocr_invoice_flag")
+            private String ocrInvoiceFlag;
+
+            @JsonProperty("identiFication")
+            private Integer identiFication;
+
             public PrpTitemCarDTO(GuoRenCrawlerGetCarPriceRequest getCarPriceRequest, GuoRenCrawlerGetCarPriceData carPriceData) {
+                this.enrollDateValueStatus = getCarPriceRequest.getEnrollDateValueStatus();
+                this.postCode = getCarPriceRequest.getPostCode();
+                this.ocrInvoiceFlag = getCarPriceRequest.getOcrInvoiceFlag();
+
                 this.chargingpostFlag = getCarPriceRequest.getChargingpostFlag();
                 this.proposalNo = "";
                 this.carInsuredRelation = getCarPriceRequest.getCarInsuredRelation();
@@ -871,7 +900,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
                 this.lossConditionCode = getCarPriceRequest.getAgentCode();
                 this.idValidDate = getCarPriceRequest.getIdValidDate();
                 this.idvalidStartDate = getCarPriceRequest.getIdvalidStartDate();
-                this.sex = getCarPriceRequest.getCarProvinceName();
+                this.sex = getCarPriceRequest.getSex();
                 this.power = getCarPriceRequest.getPower();
                 this.powerLB = getCarPriceRequest.getPowerLB();
                 this.brandCode = getCarPriceRequest.getBrandCode();
@@ -928,6 +957,9 @@ public class GuoRenCrawlerCalculationPremiumRequest {
                 this.makeDate = carPriceData.getMakeDate();
                 this.identify = "1";
                 this.derailleurType = carPriceData.getDerailleurType();
+                this.powertypecode = carPriceData.getPowertypecode();
+                this.identiFication = getCarPriceRequest.getIdentiFication();
+
             }
         }
 
@@ -1241,7 +1273,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             @JsonProperty("insuredLinkerIdentifiNumber")
             private String insuredLinkerIdentifiNumber;
 
-            @JsonProperty("Birthday")
+            @JsonProperty("birthday")
             private String birthday;
 
             @JsonProperty("appliRegisteredCapital")
@@ -1271,7 +1303,21 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             @JsonProperty("insuredUnitcodeTimesLongFlag")
             private String insuredUnitcodeTimesLongFlag;
 
+            @JsonProperty("appliNationalityCode")
+            private String appliNationalityCode;
+
+            @JsonProperty("insuredNationalityCode")
+            private String insuredNationalityCode;
+
+            @JsonProperty("agentidcardtype")
+            private String agentidcardtype;
+
             public PrpTinsuredDTO(CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo, GuoRenCrawlerWriteBackAddressData policyHolderAddr, GuoRenCrawlerWriteBackAddressData insuredPersonAddr, String ownerBirthday) {
+
+                this.appliNationalityCode = "156";
+                this.insuredNationalityCode = "156";
+                this.agentidcardtype = "01";
+
                 this.appliName = policyHolderInfo.getName();
                 this.appliIdentifyType = "01";
                 this.appliIdentifyNumber = policyHolderInfo.getIdentifyNumber();
@@ -1279,17 +1325,17 @@ public class GuoRenCrawlerCalculationPremiumRequest {
                 this.appliMobile = policyHolderInfo.getMobile();
                 this.appliAddress = policyHolderInfo.getAddr();
                 this.appliPostCode = policyHolderAddr.getCityPostCode();
-                this.appliInsuredNature = policyHolderInfo.getPersonType();
+                this.appliInsuredNature = "3";
                 this.appliProvinceName = policyHolderInfo.getProvince();
                 this.appliCityName = policyHolderInfo.getCity();
                 this.appliSex = policyHolderInfo.getGender();
-                this.appliIDValidDate = policyHolderInfo.getIdentifyValidDate();
-                this.appliIDValidStartDate = policyHolderInfo.getIdentifyValidEndDate();
+                this.appliIDValidDate = policyHolderInfo.getIdentifyValidEndDate();
+                this.appliIDValidStartDate = policyHolderInfo.getIdentifyValidDate();
 
                 this.insuredIdentifyType = insuredPersonInfo.getIdentifyType();
                 this.insuredIdentifyNumber = insuredPersonInfo.getIdentifyNumber();
                 this.insuredCName = insuredPersonInfo.getName();
-                this.insuredInsuredNature = insuredPersonInfo.getPersonType();
+                this.insuredInsuredNature = "3";
                 this.insuredName = insuredPersonInfo.getName();
                 this.insuredUnitPhone = insuredPersonInfo.getMobile();
                 this.insuredLinkerName = insuredPersonInfo.getName();
@@ -1856,7 +1902,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
         private List<PrptitemkindListDTO> prptitemkindList;
 
         @JsonProperty("prptengageList")
-        private List<?> prptengageList;
+        private List<PrptengageListDTO> prptengageList;
 
         @JsonProperty("prpDclause")
         private List<?> prpDclause;
@@ -2375,7 +2421,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             this.blPrpTRealNameVerification = new ArrayList<>();
             this.prpTLastCarShipTax = new PrpTLastCarShipTaxDTO();
             this.duplicateInsuranceItemsSchema = new DuplicateInsuranceItemsSchemaDTO();
-            this.image = new ImageDTO();
+            this.image = new ImageDTO("data:image/png;base64,");
             this.inputRisk = 1;
             this.inputRisk0507 = 1;
             this.inputRisk0507t1 = 0;
@@ -2726,7 +2772,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
 
                 this.calLateFeeFlag = "";
                 this.calPayBalanceFeeFlag = "";
-                this.extendChar2 = "";
+                this.extendChar2 = prpTitemCar.getLicenseCategory();
                 this.lateFeeStartDate = null;
                 this.hisPolicyEndDate = null;
                 this.payStartDate = null;
@@ -2877,6 +2923,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
         public static class DuplicateInsuranceItemsSchemaDTO {
         }
 
+        @AllArgsConstructor
         @NoArgsConstructor
         @Data
         public static class ImageDTO {
@@ -2884,28 +2931,6 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             private String changingThisBreaksApplicationSecurity;
         }
 
-
-        @NoArgsConstructor
-        @Data
-        public static class PrptengageListDTO {
-            @JsonProperty("serialNo")
-            private Integer serialNo;
-
-            @JsonProperty("clauseCode")
-            private String clauseCode;
-
-            @JsonProperty("clauses")
-            private String clauses;
-
-            @JsonProperty("clausesContext")
-            private String clausesContext;
-
-            @JsonProperty("total")
-            private Integer total;
-
-            @JsonProperty("flag")
-            private String flag;
-        }
     }
 
     @NoArgsConstructor
@@ -3125,15 +3150,15 @@ public class GuoRenCrawlerCalculationPremiumRequest {
         private Integer endMinute;
 
         public PrpTmainDTO(RiskInfoVo biRiskInfoVo, String today) {
-            LocalDateTime startDate = TimeProcessing.parseDateTime(biRiskInfoVo.getStartDate());
-            this.startDate = startDate.getYear() + "-" + startDate.getMonthValue() + "-" + startDate.getDayOfMonth();
-            this.startHour = startDate.getHour();
-            this.startMinute = startDate.getMinute();
+            String startDate = TimeProcessing.dateTimeToDate(biRiskInfoVo.getStartDate());
+            this.startDate = startDate;
+            this.startHour = 0;
+            this.startMinute = 0;
 
-            LocalDateTime endDate = TimeProcessing.parseDateTime(biRiskInfoVo.getStartDate());
-            this.endDate = endDate.getYear() + "-" + endDate.getMonthValue() + "-" + endDate.getDayOfMonth();
-            this.endHour = endDate.getHour();
-            this.endMinute = endDate.getMinute();
+            String endDate = TimeProcessing.dateTimeToDate(biRiskInfoVo.getEndDate());
+            this.endDate = endDate;
+            this.endHour = 24;
+            this.endMinute = 0;
 
             this.period0530 = 30;
             this.immeValidStartDate = "";
@@ -3322,10 +3347,14 @@ public class GuoRenCrawlerCalculationPremiumRequest {
 
 
         public PrptitemkindListDTO(KindInfoVo kindInfoVo, PrpTmainDTO prpTmain) {
+            InsuranceItem insuranceItem = InsuranceMap.INSURANCE_MAP.get(kindInfoVo.getKindCode());
+            if (ObjectUtils.isEmpty(insuranceItem)) {
+                throw new SystemException("未知险种");
+            }
             this.checked = 1;
             this.kindCode = kindInfoVo.getKindCode();
             this.kindName = kindInfoVo.getKindName();
-            this.itemKindNo = "";
+            this.itemKindNo = insuranceItem.getItemKindNo();
             this.shortRateFlag = "2";
             this.shortRate = "100.0000";
             this.startDate = prpTmain.getStartDate();
@@ -3339,7 +3368,7 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             this.basePremium = "";
             this.benchMarkPremium = "";
             this.standardPremuim = "";
-            this.discount = "";
+            this.discount = "1";
             this.noTaxPremium = "";
             this.taxFee = "";
             this.taxRate = "0.06";
@@ -3349,8 +3378,8 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             this.quantity = kindInfoVo.getQuantity();
             this.adjustRate = "";
             this.channelrate = "";
-            this.flag = "";
-            this.mainKindFlag = "S";
+            this.flag = insuranceItem.getFlag();
+            this.mainKindFlag = insuranceItem.getMainKindFlag();
             this.isMedical = 1;
             this.isMental = 0;
             this.proposalNo = "";
@@ -3380,7 +3409,9 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             prptitemkindListDTO.setKindCode("BZ");
             prptitemkindListDTO.setKindName("机动车交通事故责任强制保险");
             prptitemkindListDTO.setItemKindNo("0");
+            prptitemkindListDTO.setDiscount("1");
             prptitemkindListDTO.setShortRateFlag("2");
+            prptitemkindListDTO.setRiskCode("0507");
             prptitemkindListDTO.setShortRate("100.0000");
             prptitemkindListDTO.setStartDate(prpTmain.getStartDate());
             prptitemkindListDTO.setStartHour(prpTmain.getStartHour());
@@ -3399,7 +3430,8 @@ public class GuoRenCrawlerCalculationPremiumRequest {
             prptitemkindListDTO.setNoTaxPremium("0.0");
             prptitemkindListDTO.setTaxFee("0.0");
             prptitemkindListDTO.setTaxRate("0.06");
-            prptitemkindListDTO.setFlag("2 03");
+            prptitemkindListDTO.setFlag(" 2  03");
+            prptitemkindListDTO.setCurrency("CNY");
             return List.of(prptitemkindListDTO);
         }
 
@@ -3437,416 +3469,6 @@ public class GuoRenCrawlerCalculationPremiumRequest {
         }
     }
 
-    @NoArgsConstructor
-    @Data
-    public static class CiInsureDemandDTO {
-        @JsonProperty("demandNo")
-        private String demandNo;
-
-        @JsonProperty("errorCode")
-        private String errorCode;
-
-        @JsonProperty("checkCode")
-        private String checkCode;
-
-        @JsonProperty("ownerMessage")
-        private String ownerMessage;
-
-        @JsonProperty("commissionRateUpper")
-        private String commissionRateUpper;
-
-        @JsonProperty("companyCommissionRateUpper")
-        private String companyCommissionRateUpper;
-
-        @JsonProperty("claimEffectReason")
-        private String claimEffectReason;
-
-        @JsonProperty("newvehicleEffectReason")
-        private String newvehicleEffectReason;
-
-        @JsonProperty("produceReffectReason")
-        private String produceReffectReason;
-
-        @JsonProperty("busiLastYearEndDat")
-        private String busiLastYearEndDat;
-
-        @JsonProperty("transferFlag")
-        private String transferFlag;
-
-        @JsonProperty("highRiskFlag")
-        private String highRiskFlag;
-
-        @JsonProperty("effectReason")
-        private String effectReason;
-
-        @JsonProperty("lastyearCompanyId")
-        private String lastyearCompanyId;
-
-        @JsonProperty("licensePlateType")
-        private String licensePlateType;
-
-        @JsonProperty("color")
-        private String color;
-
-        @JsonProperty("vehicleOwnerName")
-        private String vehicleOwnerName;
-
-        @JsonProperty("displacement")
-        private String displacement;
-
-        @JsonProperty("channelType")
-        private String channelType;
-
-        @JsonProperty("salePrice")
-        private String salePrice;
-
-        @JsonProperty("motorTypeCode")
-        private String motorTypeCode;
-
-        @JsonProperty("contractNo")
-        private String contractNo;
-
-        @JsonProperty("contractValidDate")
-        private String contractValidDate;
-
-        @JsonProperty("contractExpireDate")
-        private String contractExpireDate;
-
-        @JsonProperty("pmVehicleMessage")
-        private String pmVehicleMessage;
-
-        @JsonProperty("useNatureMessage")
-        private String useNatureMessage;
-
-        @JsonProperty("chgOwnerMessage")
-        private String chgOwnerMessage;
-
-        @JsonProperty("scoreCode")
-        private String scoreCode;
-
-        @JsonProperty("score")
-        private String score;
-
-        @JsonProperty("updateTime")
-        private String updateTime;
-
-        @JsonProperty("insureYears")
-        private String insureYears;
-
-        @JsonProperty("claimTimes")
-        private String claimTimes;
-
-        @JsonProperty("claimAdjustLevel")
-        private String claimAdjustLevel;
-
-        @JsonProperty("newVehicleFlag")
-        private String newVehicleFlag;
-
-        @JsonProperty("insurerArea")
-        private String insurerArea;
-
-        @JsonProperty("busiInsurerArea")
-        private String busiInsurerArea;
-
-        @JsonProperty("biDemandNo")
-        private String biDemandNo;
-
-        @JsonProperty("unmatchVehicleframeTypeMessage")
-        private String unmatchVehicleframeTypeMessage;
-
-        @JsonProperty("updatetimeSH")
-        private String updatetimeSH;
-
-        @JsonProperty("ratingLevel")
-        private String ratingLevel;
-
-        @JsonProperty("exhaustScale")
-        private String exhaustScale;
-
-        @JsonProperty("operatorCode")
-        private String operatorCode;
-
-        @JsonProperty("startDate")
-        private String startDate;
-
-        @JsonProperty("endDate")
-        private String endDate;
-
-        @JsonProperty("policyNo")
-        private String policyNo;
-
-        @JsonProperty("modelCode")
-        private String modelCode;
-
-        @JsonProperty("lastYearEndDate")
-        private String lastYearEndDate;
-
-        @JsonProperty("billDate")
-        private String billDate;
-
-        @JsonProperty("reinsureFlag")
-        private String reinsureFlag;
-
-        @JsonProperty("lastBillDate")
-        private String lastBillDate;
-
-        @JsonProperty("rateFloatFlag")
-        private String rateFloatFlag;
-
-        @JsonProperty("peccancyAdjustReason")
-        private String peccancyAdjustReason;
-
-        @JsonProperty("claimAdjustReason")
-        private String claimAdjustReason;
-
-        @JsonProperty("driverRateReason")
-        private String driverRateReason;
-
-        @JsonProperty("districtRateReason")
-        private String districtRateReason;
-
-        @JsonProperty("safeAdjust")
-        private String safeAdjust;
-
-        @JsonProperty("nonclaimAdjust")
-        private String nonclaimAdjust;
-
-        @JsonProperty("loyaltyAdjust")
-        private String loyaltyAdjust;
-
-        @JsonProperty("useTypeSource")
-        private String useTypeSource;
-
-        @JsonProperty("queryPastDate")
-        private String queryPastDate;
-
-        @JsonProperty("transferDate")
-        private String transferDate;
-
-        @JsonProperty("loyaltyAdjustReason")
-        private String loyaltyAdjustReason;
-
-        @JsonProperty("busiLastYearEndDate")
-        private String busiLastYearEndDate;
-
-        @JsonProperty("busiAdjustStart")
-        private String busiAdjustStart;
-
-        @JsonProperty("busiAdjustEnd")
-        private String busiAdjustEnd;
-
-        @JsonProperty("certificateDate")
-        private String certificateDate;
-
-        @JsonProperty("reCoverMsg")
-        private String reCoverMsg;
-
-        @JsonProperty("policyCoeff")
-        private String policyCoeff;
-
-        @JsonProperty("noLoyaltyAdjustReason")
-        private String noLoyaltyAdjustReason;
-
-        @JsonProperty("lastPolicyNo")
-        private String lastPolicyNo;
-
-        @JsonProperty("ip")
-        private String ip;
-
-        @JsonProperty("usbKey")
-        private String usbKey;
-
-        @JsonProperty("peccancyStartDate")
-        private String peccancyStartDate;
-
-        @JsonProperty("peccancyEndDate")
-        private String peccancyEndDate;
-
-        @JsonProperty("kindAdjustValue")
-        private String kindAdjustValue;
-
-        @JsonProperty("kindAdjustReason")
-        private String kindAdjustReason;
-
-        @JsonProperty("noKindAdjustReason")
-        private String noKindAdjustReason;
-
-        @JsonProperty("noPeccancyReason")
-        private String noPeccancyReason;
-
-        @JsonProperty("lastBusinessNature")
-        private String lastBusinessNature;
-
-        @JsonProperty("question")
-        private String question;
-
-        @JsonProperty("fundRate")
-        private String fundRate;
-
-        @JsonProperty("fundAmount")
-        private String fundAmount;
-
-        @JsonProperty("proposalNo")
-        private String proposalNo;
-
-        @JsonProperty("comCode")
-        private String comCode;
-
-        @JsonProperty("noClaimAdjustReason")
-        private String noClaimAdjustReason;
-
-        @JsonProperty("flag")
-        private String flag;
-
-        @JsonProperty("searchSequenceNo")
-        private String searchSequenceNo;
-
-        @JsonProperty("dataSourceCode")
-        private String dataSourceCode;
-
-        @JsonProperty("completeKerbMass")
-        private String completeKerbMass;
-
-        @JsonProperty("frameNo")
-        private String frameNo;
-
-        @JsonProperty("riskCode")
-        private String riskCode;
-
-        @JsonProperty("makeDate")
-        private String makeDate;
-
-        @JsonProperty("amount")
-        private String amount;
-
-        @JsonProperty("useNatureCode")
-        private String useNatureCode;
-
-        @JsonProperty("carKindCode")
-        private String carKindCode;
-
-        @JsonProperty("enrollDate")
-        private String enrollDate;
-
-        @JsonProperty("seatCount")
-        private String seatCount;
-
-        @JsonProperty("tonCount")
-        private String tonCount;
-
-        @JsonProperty("vehicleBrand")
-        private String vehicleBrand;
-
-        @JsonProperty("licenseType")
-        private String licenseType;
-
-        @JsonProperty("basePremium")
-        private String basePremium;
-
-        @JsonProperty("premium")
-        private String premium;
-
-        @JsonProperty("brandName")
-        private String brandName;
-
-        @JsonProperty("licenseColorCode")
-        private String licenseColorCode;
-
-        @JsonProperty("fuelType")
-        private String fuelType;
-
-        @JsonProperty("restricFlag")
-        private String restricFlag;
-
-        @JsonProperty("remark")
-        private String remark;
-
-        @JsonProperty("errorMessage")
-        private String errorMessage;
-
-        @JsonProperty("errorMessageGo")
-        private String errorMessageGo;
-
-        @JsonProperty("validCheckDate")
-        private String validCheckDate;
-
-        @JsonProperty("manufacturerName")
-        private String manufacturerName;
-
-        @JsonProperty("brandCName")
-        private String brandCName;
-
-        @JsonProperty("checkDate")
-        private String checkDate;
-
-        @JsonProperty("endValidDate")
-        private String endValidDate;
-
-        @JsonProperty("carStatus")
-        private String carStatus;
-
-        @JsonProperty("haulage")
-        private String haulage;
-
-        @JsonProperty("benchmarkPremium")
-        private String benchmarkPremium;
-
-        @JsonProperty("peccancyCoeff")
-        private String peccancyCoeff;
-
-        @JsonProperty("claimCoeff")
-        private String claimCoeff;
-
-        @JsonProperty("driverCoeff")
-        private String driverCoeff;
-
-        @JsonProperty("districtCoeff")
-        private String districtCoeff;
-
-        @JsonProperty("commissionRate")
-        private String commissionRate;
-
-        @JsonProperty("demandTime")
-        private String demandTime;
-
-        @JsonProperty("proconfirmSequenceNo")
-        private String proconfirmSequenceNo;
-
-        @JsonProperty("proconfirmStartDate")
-        private String proconfirmStartDate;
-
-        @JsonProperty("proconfirmEndDate")
-        private String proconfirmEndDate;
-
-        @JsonProperty("preferentialPremium")
-        private String preferentialPremium;
-
-        @JsonProperty("preferentialFormula")
-        private String preferentialFormula;
-
-        @JsonProperty("preferentialDay")
-        private String preferentialDay;
-
-        @JsonProperty("lastYearStartDate")
-        private String lastYearStartDate;
-
-        @JsonProperty("engineNo")
-        private String engineNo;
-
-        @JsonProperty("licenseNo")
-        private String licenseNo;
-
-        @JsonProperty("renewalFlag")
-        private String renewalFlag;
-
-        @JsonProperty("carOwner")
-        private String carOwner;
-
-        public CiInsureDemandDTO(String demandNo, String checkCode) {
-            this.demandNo = demandNo;
-            this.checkCode = checkCode;
-        }
-    }
 
     @NoArgsConstructor
     @Data

+ 18 - 9
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerGetCarPriceRequest.java

@@ -558,6 +558,9 @@ public class GuoRenCrawlerGetCarPriceRequest {
     @JsonProperty("carAddress")
     private String carAddress;
 
+    @JsonProperty("sex")
+    private String sex;
+
     public GuoRenCrawlerGetCarPriceRequest(GuoRenCrawlerQueryCarModelData.ContentDTO queryCarModelData, GuoRenCrawlerCalculationPremiumRequest.BcDTO.PrpTmainDTO prpTmainDTO, QuoteVo quoteVo, GuoRenCrawlerWriteBackAddressData ownersAddr, String relationShip) {
         String today = TimeProcessing.nowDate();
 
@@ -576,6 +579,8 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.chargingpostFlag = "0";
         this.productType = "0101";
         this.ownerAreas = ownersAddr.getArea();
+        this.postCode = ownersAddr.getCityPostCode();
+        this.powertypecode = queryCarModelData.getPowertypecode();
         this.relationShip = relationShip;
         if (relationShip.equals("1")) {
             this.carInsuredRelation = "1";
@@ -585,10 +590,10 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.carCertificateDate = "";
         this.newCaRegistration = "1";
         this.ocrInvoiceFlag = "0";
-        this.idvalidStartDate = ownersInfo.getIdentifyValidDate() + "T00:00:00.000Z";
+        this.idvalidStartDate = ownersInfo.getIdentifyValidDate();
         this.carOwnerNature = "0";
         this.birthday = ownersInfo.getBirthday();
-        this.idValidDate = ownersInfo.getIdentifyValidEndDate() + "T00:00:00.000Z";
+        this.idValidDate = ownersInfo.getIdentifyValidEndDate();
         this.carOwner = ownersInfo.getName();
         this.carOwnerIdentifyType = "01";
         this.carOwnerIdentifyNumber = ownersInfo.getIdentifyNumber();
@@ -596,7 +601,7 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.ownerAddress = ownersInfo.getAddr();
         this.enrollDateValueStatus = 1;
         this.enrollDate = carInfoVo.getRegisterDate();
-        this.chgOwnerDate = today;
+        this.chgOwnerDate = carInfoVo.getIssueDate();
         this.brandName = queryCarModelData.getModelName();
         this.useNatureCode = carInfoVo.getVehicleUseCode();
         this.carKindCode = carInfoVo.getCarKindCode();
@@ -642,7 +647,7 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.carOwnerLongFlag = "";
         this.addressRevise = "1";
         this.modelCode = queryCarModelData.getModelCode();
-        this.certifiCateDate = null;
+        this.certifiCateDate = "";
         this.brandCode = queryCarModelData.getModelCode();
         this.modelCodeOld = queryCarModelData.getModelCode();
         this.vehicleModel = queryCarModelData.getVehiclefgwCode();
@@ -650,7 +655,8 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.exhaustScalelb = queryCarModelData.getExhaustScalelb();
         this.vehicleBrand = queryCarModelData.getModelName();
         this.powerLB = Double.valueOf(queryCarModelData.getPowerLB());
-        this.newFuelModel = queryCarModelData.getNewfuelModel();
+        this.newFuelModel = "正常缴税";
+        this.newFuelModelName = "正常缴税";
         this.noticeType = queryCarModelData.getVehiclefgwCode();
         this.mvSpeed = null;
         if (StringUtils.hasLength(queryCarModelData.getTransmissionttype())) {
@@ -707,7 +713,7 @@ public class GuoRenCrawlerGetCarPriceRequest {
                 this.clauseType = "F57";
             }
         }
-
+        this.sex = ownersInfo.getGender();
         this.natureOfUse = 0;
         this.carUsage = queryCarModelData.getModelName();
         this.actualValue = "";
@@ -758,6 +764,7 @@ public class GuoRenCrawlerGetCarPriceRequest {
         this.deGentType = prpTmainDTO.getDeGentType();
         this.serviceLabelName = prpTmainDTO.getServiceLabelName();
         this.uniteBusinessFlag = prpTmainDTO.getUniteBusinessFlag() == 1;
+        this.powertypecode = queryCarModelData.getPowertypecode();
         this.noCarPremium = 0;
         this.operateDate = today;
         this.frameNo = carInfoVo.getVinNo();
@@ -787,13 +794,15 @@ public class GuoRenCrawlerGetCarPriceRequest {
             this.clauseTypeSystem = "05";
         } else {
             this.newEnergyFlag = "0";
-            this.termsSystem = "04";
+            this.termsSystem = "01";
             this.clauseTypeSystem = "04";
         }
         this.carProvinceName = ownersAddr.getProvince();
         this.carCityName = ownersAddr.getCity();
         this.carAddress = ownersAddr.getArea();
-
-
+        this.carOwnerLongFlag = "";
+        this.identiFication = 1;
+        this.mvSpeed = null;
+        this.natureOfUse = 1;
     }
 }

+ 4 - 834
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerCalculationPremiumData.java

@@ -1,6 +1,8 @@
 package com.jzg.quotation.guoren.crawler.entity.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.guoren.crawler.entity.dto.CiInsureDemandDTO;
+import com.jzg.quotation.guoren.crawler.entity.dto.PrptengageListDTO;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -38,6 +40,7 @@ public class GuoRenCrawlerCalculationPremiumData {
     @NoArgsConstructor
     @Data
     public static class BiDTO {
+
         @JsonProperty("prpTmain")
         private PrpTmainDTO prpTmain;
 
@@ -51,7 +54,7 @@ public class GuoRenCrawlerCalculationPremiumData {
         private List<?> blPrpTequity;
 
         @JsonProperty("prptengageList")
-        private List<?> prptengageList;
+        private List<PrptengageListDTO> prptengageList;
 
         @JsonProperty("prptcardeviceList")
         private List<?> prptcardeviceList;
@@ -1427,412 +1430,6 @@ public class GuoRenCrawlerCalculationPremiumData {
             private String rybLogo;
         }
 
-        @NoArgsConstructor
-        @Data
-        public static class CiInsureDemandDTO {
-            @JsonProperty("demandNo")
-            private String demandNo;
-
-            @JsonProperty("errorCode")
-            private String errorCode;
-
-            @JsonProperty("checkCode")
-            private String checkCode;
-
-            @JsonProperty("ownerMessage")
-            private String ownerMessage;
-
-            @JsonProperty("commissionRateUpper")
-            private String commissionRateUpper;
-
-            @JsonProperty("companyCommissionRateUpper")
-            private String companyCommissionRateUpper;
-
-            @JsonProperty("claimEffectReason")
-            private String claimEffectReason;
-
-            @JsonProperty("newvehicleEffectReason")
-            private String newvehicleEffectReason;
-
-            @JsonProperty("produceReffectReason")
-            private String produceReffectReason;
-
-            @JsonProperty("busiLastYearEndDat")
-            private String busiLastYearEndDat;
-
-            @JsonProperty("transferFlag")
-            private String transferFlag;
-
-            @JsonProperty("highRiskFlag")
-            private String highRiskFlag;
-
-            @JsonProperty("effectReason")
-            private String effectReason;
-
-            @JsonProperty("lastyearCompanyId")
-            private String lastyearCompanyId;
-
-            @JsonProperty("licensePlateType")
-            private String licensePlateType;
-
-            @JsonProperty("color")
-            private String color;
-
-            @JsonProperty("vehicleOwnerName")
-            private String vehicleOwnerName;
-
-            @JsonProperty("displacement")
-            private String displacement;
-
-            @JsonProperty("channelType")
-            private String channelType;
-
-            @JsonProperty("salePrice")
-            private String salePrice;
-
-            @JsonProperty("motorTypeCode")
-            private String motorTypeCode;
-
-            @JsonProperty("contractNo")
-            private String contractNo;
-
-            @JsonProperty("contractValidDate")
-            private String contractValidDate;
-
-            @JsonProperty("contractExpireDate")
-            private String contractExpireDate;
-
-            @JsonProperty("pmVehicleMessage")
-            private String pmVehicleMessage;
-
-            @JsonProperty("useNatureMessage")
-            private String useNatureMessage;
-
-            @JsonProperty("chgOwnerMessage")
-            private String chgOwnerMessage;
-
-            @JsonProperty("scoreCode")
-            private String scoreCode;
-
-            @JsonProperty("score")
-            private String score;
-
-            @JsonProperty("updateTime")
-            private String updateTime;
-
-            @JsonProperty("insureYears")
-            private String insureYears;
-
-            @JsonProperty("claimTimes")
-            private String claimTimes;
-
-            @JsonProperty("claimAdjustLevel")
-            private String claimAdjustLevel;
-
-            @JsonProperty("newVehicleFlag")
-            private String newVehicleFlag;
-
-            @JsonProperty("insurerArea")
-            private String insurerArea;
-
-            @JsonProperty("busiInsurerArea")
-            private String busiInsurerArea;
-
-            @JsonProperty("biDemandNo")
-            private String biDemandNo;
-
-            @JsonProperty("unmatchVehicleframeTypeMessage")
-            private String unmatchVehicleframeTypeMessage;
-
-            @JsonProperty("updatetimeSH")
-            private String updatetimeSH;
-
-            @JsonProperty("ratingLevel")
-            private String ratingLevel;
-
-            @JsonProperty("restricFlag")
-            private String restricFlag;
-
-            @JsonProperty("proposalNo")
-            private String proposalNo;
-
-            @JsonProperty("premium")
-            private String premium;
-
-            @JsonProperty("errorMessageGo")
-            private String errorMessageGo;
-
-            @JsonProperty("licenseType")
-            private String licenseType;
-
-            @JsonProperty("validCheckDate")
-            private String validCheckDate;
-
-            @JsonProperty("manufacturerName")
-            private String manufacturerName;
-
-            @JsonProperty("brandCName")
-            private String brandCName;
-
-            @JsonProperty("checkDate")
-            private String checkDate;
-
-            @JsonProperty("endValidDate")
-            private String endValidDate;
-
-            @JsonProperty("carStatus")
-            private String carStatus;
-
-            @JsonProperty("haulage")
-            private String haulage;
-
-            @JsonProperty("benchmarkPremium")
-            private String benchmarkPremium;
-
-            @JsonProperty("peccancyCoeff")
-            private String peccancyCoeff;
-
-            @JsonProperty("claimCoeff")
-            private String claimCoeff;
-
-            @JsonProperty("driverCoeff")
-            private String driverCoeff;
-
-            @JsonProperty("districtCoeff")
-            private String districtCoeff;
-
-            @JsonProperty("commissionRate")
-            private String commissionRate;
-
-            @JsonProperty("demandTime")
-            private String demandTime;
-
-            @JsonProperty("proconfirmSequenceNo")
-            private String proconfirmSequenceNo;
-
-            @JsonProperty("operatorCode")
-            private String operatorCode;
-
-            @JsonProperty("startDate")
-            private String startDate;
-
-            @JsonProperty("endDate")
-            private String endDate;
-
-            @JsonProperty("policyNo")
-            private String policyNo;
-
-            @JsonProperty("riskCode")
-            private String riskCode;
-
-            @JsonProperty("makeDate")
-            private String makeDate;
-
-            @JsonProperty("amount")
-            private String amount;
-
-            @JsonProperty("useNatureCode")
-            private String useNatureCode;
-
-            @JsonProperty("carKindCode")
-            private String carKindCode;
-
-            @JsonProperty("enrollDate")
-            private String enrollDate;
-
-            @JsonProperty("seatCount")
-            private String seatCount;
-
-            @JsonProperty("tonCount")
-            private String tonCount;
-
-            @JsonProperty("searchSequenceNo")
-            private String searchSequenceNo;
-
-            @JsonProperty("vehicleBrand")
-            private String vehicleBrand;
-
-            @JsonProperty("remark")
-            private String remark;
-
-            @JsonProperty("certificateDate")
-            private String certificateDate;
-
-            @JsonProperty("modelCode")
-            private String modelCode;
-
-            @JsonProperty("licenseColorCode")
-            private String licenseColorCode;
-
-            @JsonProperty("fuelType")
-            private String fuelType;
-
-            @JsonProperty("basePremium")
-            private String basePremium;
-
-            @JsonProperty("renewalFlag")
-            private String renewalFlag;
-
-            @JsonProperty("brandName")
-            private String brandName;
-
-            @JsonProperty("dataSourceCode")
-            private String dataSourceCode;
-
-            @JsonProperty("noClaimAdjustReason")
-            private String noClaimAdjustReason;
-
-            @JsonProperty("flag")
-            private String flag;
-
-            @JsonProperty("ip")
-            private String ip;
-
-            @JsonProperty("nonclaimAdjust")
-            private String nonclaimAdjust;
-
-            @JsonProperty("safeAdjust")
-            private String safeAdjust;
-
-            @JsonProperty("frameNo")
-            private String frameNo;
-
-            @JsonProperty("exhaustScale")
-            private String exhaustScale;
-
-            @JsonProperty("completeKerbMass")
-            private String completeKerbMass;
-
-            @JsonProperty("errorMessage")
-            private String errorMessage;
-
-            @JsonProperty("engineNo")
-            private String engineNo;
-
-            @JsonProperty("licenseNo")
-            private String licenseNo;
-
-            @JsonProperty("proconfirmStartDate")
-            private String proconfirmStartDate;
-
-            @JsonProperty("proconfirmEndDate")
-            private String proconfirmEndDate;
-
-            @JsonProperty("preferentialPremium")
-            private String preferentialPremium;
-
-            @JsonProperty("preferentialFormula")
-            private String preferentialFormula;
-
-            @JsonProperty("preferentialDay")
-            private String preferentialDay;
-
-            @JsonProperty("lastYearStartDate")
-            private String lastYearStartDate;
-
-            @JsonProperty("lastYearEndDate")
-            private String lastYearEndDate;
-
-            @JsonProperty("billDate")
-            private String billDate;
-
-            @JsonProperty("reinsureFlag")
-            private String reinsureFlag;
-
-            @JsonProperty("lastBillDate")
-            private String lastBillDate;
-
-            @JsonProperty("rateFloatFlag")
-            private String rateFloatFlag;
-
-            @JsonProperty("peccancyAdjustReason")
-            private String peccancyAdjustReason;
-
-            @JsonProperty("claimAdjustReason")
-            private String claimAdjustReason;
-
-            @JsonProperty("driverRateReason")
-            private String driverRateReason;
-
-            @JsonProperty("districtRateReason")
-            private String districtRateReason;
-
-            @JsonProperty("loyaltyAdjust")
-            private String loyaltyAdjust;
-
-            @JsonProperty("useTypeSource")
-            private String useTypeSource;
-
-            @JsonProperty("queryPastDate")
-            private String queryPastDate;
-
-            @JsonProperty("transferDate")
-            private String transferDate;
-
-            @JsonProperty("loyaltyAdjustReason")
-            private String loyaltyAdjustReason;
-
-            @JsonProperty("busiLastYearEndDate")
-            private String busiLastYearEndDate;
-
-            @JsonProperty("busiAdjustStart")
-            private String busiAdjustStart;
-
-            @JsonProperty("busiAdjustEnd")
-            private String busiAdjustEnd;
-
-            @JsonProperty("reCoverMsg")
-            private String reCoverMsg;
-
-            @JsonProperty("policyCoeff")
-            private String policyCoeff;
-
-            @JsonProperty("noLoyaltyAdjustReason")
-            private String noLoyaltyAdjustReason;
-
-            @JsonProperty("lastPolicyNo")
-            private String lastPolicyNo;
-
-            @JsonProperty("usbKey")
-            private String usbKey;
-
-            @JsonProperty("peccancyStartDate")
-            private String peccancyStartDate;
-
-            @JsonProperty("peccancyEndDate")
-            private String peccancyEndDate;
-
-            @JsonProperty("kindAdjustValue")
-            private String kindAdjustValue;
-
-            @JsonProperty("kindAdjustReason")
-            private String kindAdjustReason;
-
-            @JsonProperty("noKindAdjustReason")
-            private String noKindAdjustReason;
-
-            @JsonProperty("noPeccancyReason")
-            private String noPeccancyReason;
-
-            @JsonProperty("lastBusinessNature")
-            private String lastBusinessNature;
-
-            @JsonProperty("question")
-            private String question;
-
-            @JsonProperty("fundRate")
-            private String fundRate;
-
-            @JsonProperty("fundAmount")
-            private String fundAmount;
-
-            @JsonProperty("carOwner")
-            private String carOwner;
-
-            @JsonProperty("comCode")
-            private String comCode;
-        }
-
         @NoArgsConstructor
         @Data
         public static class CiInsureValidDTO {
@@ -3370,412 +2967,6 @@ public class GuoRenCrawlerCalculationPremiumData {
             private String rybLogo;
         }
 
-        @NoArgsConstructor
-        @Data
-        public static class CiInsureDemandDTO {
-            @JsonProperty("demandNo")
-            private String demandNo;
-
-            @JsonProperty("errorCode")
-            private String errorCode;
-
-            @JsonProperty("checkCode")
-            private String checkCode;
-
-            @JsonProperty("ownerMessage")
-            private String ownerMessage;
-
-            @JsonProperty("commissionRateUpper")
-            private String commissionRateUpper;
-
-            @JsonProperty("companyCommissionRateUpper")
-            private String companyCommissionRateUpper;
-
-            @JsonProperty("claimEffectReason")
-            private String claimEffectReason;
-
-            @JsonProperty("newvehicleEffectReason")
-            private String newvehicleEffectReason;
-
-            @JsonProperty("produceReffectReason")
-            private String produceReffectReason;
-
-            @JsonProperty("busiLastYearEndDat")
-            private String busiLastYearEndDat;
-
-            @JsonProperty("transferFlag")
-            private String transferFlag;
-
-            @JsonProperty("highRiskFlag")
-            private String highRiskFlag;
-
-            @JsonProperty("effectReason")
-            private String effectReason;
-
-            @JsonProperty("lastyearCompanyId")
-            private String lastyearCompanyId;
-
-            @JsonProperty("licensePlateType")
-            private String licensePlateType;
-
-            @JsonProperty("color")
-            private String color;
-
-            @JsonProperty("vehicleOwnerName")
-            private String vehicleOwnerName;
-
-            @JsonProperty("displacement")
-            private String displacement;
-
-            @JsonProperty("channelType")
-            private String channelType;
-
-            @JsonProperty("salePrice")
-            private String salePrice;
-
-            @JsonProperty("motorTypeCode")
-            private String motorTypeCode;
-
-            @JsonProperty("contractNo")
-            private String contractNo;
-
-            @JsonProperty("contractValidDate")
-            private String contractValidDate;
-
-            @JsonProperty("contractExpireDate")
-            private String contractExpireDate;
-
-            @JsonProperty("pmVehicleMessage")
-            private String pmVehicleMessage;
-
-            @JsonProperty("useNatureMessage")
-            private String useNatureMessage;
-
-            @JsonProperty("chgOwnerMessage")
-            private String chgOwnerMessage;
-
-            @JsonProperty("scoreCode")
-            private String scoreCode;
-
-            @JsonProperty("score")
-            private String score;
-
-            @JsonProperty("updateTime")
-            private String updateTime;
-
-            @JsonProperty("insureYears")
-            private String insureYears;
-
-            @JsonProperty("claimTimes")
-            private String claimTimes;
-
-            @JsonProperty("claimAdjustLevel")
-            private String claimAdjustLevel;
-
-            @JsonProperty("newVehicleFlag")
-            private String newVehicleFlag;
-
-            @JsonProperty("insurerArea")
-            private String insurerArea;
-
-            @JsonProperty("busiInsurerArea")
-            private String busiInsurerArea;
-
-            @JsonProperty("biDemandNo")
-            private String biDemandNo;
-
-            @JsonProperty("unmatchVehicleframeTypeMessage")
-            private String unmatchVehicleframeTypeMessage;
-
-            @JsonProperty("updatetimeSH")
-            private String updatetimeSH;
-
-            @JsonProperty("ratingLevel")
-            private String ratingLevel;
-
-            @JsonProperty("restricFlag")
-            private String restricFlag;
-
-            @JsonProperty("proposalNo")
-            private String proposalNo;
-
-            @JsonProperty("premium")
-            private String premium;
-
-            @JsonProperty("errorMessageGo")
-            private String errorMessageGo;
-
-            @JsonProperty("licenseType")
-            private String licenseType;
-
-            @JsonProperty("validCheckDate")
-            private String validCheckDate;
-
-            @JsonProperty("manufacturerName")
-            private String manufacturerName;
-
-            @JsonProperty("brandCName")
-            private String brandCName;
-
-            @JsonProperty("checkDate")
-            private String checkDate;
-
-            @JsonProperty("endValidDate")
-            private String endValidDate;
-
-            @JsonProperty("carStatus")
-            private String carStatus;
-
-            @JsonProperty("haulage")
-            private String haulage;
-
-            @JsonProperty("benchmarkPremium")
-            private String benchmarkPremium;
-
-            @JsonProperty("peccancyCoeff")
-            private String peccancyCoeff;
-
-            @JsonProperty("claimCoeff")
-            private String claimCoeff;
-
-            @JsonProperty("driverCoeff")
-            private String driverCoeff;
-
-            @JsonProperty("districtCoeff")
-            private String districtCoeff;
-
-            @JsonProperty("commissionRate")
-            private String commissionRate;
-
-            @JsonProperty("demandTime")
-            private String demandTime;
-
-            @JsonProperty("proconfirmSequenceNo")
-            private String proconfirmSequenceNo;
-
-            @JsonProperty("operatorCode")
-            private String operatorCode;
-
-            @JsonProperty("startDate")
-            private String startDate;
-
-            @JsonProperty("endDate")
-            private String endDate;
-
-            @JsonProperty("policyNo")
-            private String policyNo;
-
-            @JsonProperty("riskCode")
-            private String riskCode;
-
-            @JsonProperty("makeDate")
-            private String makeDate;
-
-            @JsonProperty("amount")
-            private String amount;
-
-            @JsonProperty("useNatureCode")
-            private String useNatureCode;
-
-            @JsonProperty("carKindCode")
-            private String carKindCode;
-
-            @JsonProperty("enrollDate")
-            private String enrollDate;
-
-            @JsonProperty("seatCount")
-            private String seatCount;
-
-            @JsonProperty("tonCount")
-            private String tonCount;
-
-            @JsonProperty("searchSequenceNo")
-            private String searchSequenceNo;
-
-            @JsonProperty("vehicleBrand")
-            private String vehicleBrand;
-
-            @JsonProperty("remark")
-            private String remark;
-
-            @JsonProperty("certificateDate")
-            private String certificateDate;
-
-            @JsonProperty("modelCode")
-            private String modelCode;
-
-            @JsonProperty("licenseColorCode")
-            private String licenseColorCode;
-
-            @JsonProperty("fuelType")
-            private String fuelType;
-
-            @JsonProperty("basePremium")
-            private String basePremium;
-
-            @JsonProperty("renewalFlag")
-            private String renewalFlag;
-
-            @JsonProperty("brandName")
-            private String brandName;
-
-            @JsonProperty("dataSourceCode")
-            private String dataSourceCode;
-
-            @JsonProperty("noClaimAdjustReason")
-            private String noClaimAdjustReason;
-
-            @JsonProperty("flag")
-            private String flag;
-
-            @JsonProperty("ip")
-            private String ip;
-
-            @JsonProperty("nonclaimAdjust")
-            private String nonclaimAdjust;
-
-            @JsonProperty("safeAdjust")
-            private String safeAdjust;
-
-            @JsonProperty("frameNo")
-            private String frameNo;
-
-            @JsonProperty("exhaustScale")
-            private String exhaustScale;
-
-            @JsonProperty("completeKerbMass")
-            private String completeKerbMass;
-
-            @JsonProperty("errorMessage")
-            private String errorMessage;
-
-            @JsonProperty("engineNo")
-            private String engineNo;
-
-            @JsonProperty("licenseNo")
-            private String licenseNo;
-
-            @JsonProperty("proconfirmStartDate")
-            private String proconfirmStartDate;
-
-            @JsonProperty("proconfirmEndDate")
-            private String proconfirmEndDate;
-
-            @JsonProperty("preferentialPremium")
-            private String preferentialPremium;
-
-            @JsonProperty("preferentialFormula")
-            private String preferentialFormula;
-
-            @JsonProperty("preferentialDay")
-            private String preferentialDay;
-
-            @JsonProperty("lastYearStartDate")
-            private String lastYearStartDate;
-
-            @JsonProperty("lastYearEndDate")
-            private String lastYearEndDate;
-
-            @JsonProperty("billDate")
-            private String billDate;
-
-            @JsonProperty("reinsureFlag")
-            private String reinsureFlag;
-
-            @JsonProperty("lastBillDate")
-            private String lastBillDate;
-
-            @JsonProperty("rateFloatFlag")
-            private String rateFloatFlag;
-
-            @JsonProperty("peccancyAdjustReason")
-            private String peccancyAdjustReason;
-
-            @JsonProperty("claimAdjustReason")
-            private String claimAdjustReason;
-
-            @JsonProperty("driverRateReason")
-            private String driverRateReason;
-
-            @JsonProperty("districtRateReason")
-            private String districtRateReason;
-
-            @JsonProperty("loyaltyAdjust")
-            private String loyaltyAdjust;
-
-            @JsonProperty("useTypeSource")
-            private String useTypeSource;
-
-            @JsonProperty("queryPastDate")
-            private String queryPastDate;
-
-            @JsonProperty("transferDate")
-            private String transferDate;
-
-            @JsonProperty("loyaltyAdjustReason")
-            private String loyaltyAdjustReason;
-
-            @JsonProperty("busiLastYearEndDate")
-            private String busiLastYearEndDate;
-
-            @JsonProperty("busiAdjustStart")
-            private String busiAdjustStart;
-
-            @JsonProperty("busiAdjustEnd")
-            private String busiAdjustEnd;
-
-            @JsonProperty("reCoverMsg")
-            private String reCoverMsg;
-
-            @JsonProperty("policyCoeff")
-            private String policyCoeff;
-
-            @JsonProperty("noLoyaltyAdjustReason")
-            private String noLoyaltyAdjustReason;
-
-            @JsonProperty("lastPolicyNo")
-            private String lastPolicyNo;
-
-            @JsonProperty("usbKey")
-            private String usbKey;
-
-            @JsonProperty("peccancyStartDate")
-            private String peccancyStartDate;
-
-            @JsonProperty("peccancyEndDate")
-            private String peccancyEndDate;
-
-            @JsonProperty("kindAdjustValue")
-            private String kindAdjustValue;
-
-            @JsonProperty("kindAdjustReason")
-            private String kindAdjustReason;
-
-            @JsonProperty("noKindAdjustReason")
-            private String noKindAdjustReason;
-
-            @JsonProperty("noPeccancyReason")
-            private String noPeccancyReason;
-
-            @JsonProperty("lastBusinessNature")
-            private String lastBusinessNature;
-
-            @JsonProperty("question")
-            private String question;
-
-            @JsonProperty("fundRate")
-            private String fundRate;
-
-            @JsonProperty("fundAmount")
-            private String fundAmount;
-
-            @JsonProperty("carOwner")
-            private String carOwner;
-
-            @JsonProperty("comCode")
-            private String comCode;
-        }
-
         @NoArgsConstructor
         @Data
         public static class PrpTitemCarDTO {
@@ -4327,27 +3518,6 @@ public class GuoRenCrawlerCalculationPremiumData {
             private String uwELRrel;
         }
 
-        @NoArgsConstructor
-        @Data
-        public static class PrptengageListDTO {
-            @JsonProperty("serialNo")
-            private Integer serialNo;
-
-            @JsonProperty("clauseCode")
-            private String clauseCode;
-
-            @JsonProperty("clauses")
-            private String clauses;
-
-            @JsonProperty("clausesContext")
-            private String clausesContext;
-
-            @JsonProperty("total")
-            private Integer total;
-
-            @JsonProperty("flag")
-            private String flag;
-        }
     }
 
     @NoArgsConstructor

+ 3 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerQueryCarModelData.java

@@ -167,6 +167,9 @@ public class GuoRenCrawlerQueryCarModelData implements Serializable {
         @JsonProperty("exhaustScalelb")
         private Double exhaustScalelb;
 
+        @JsonProperty("powertypecode")
+        private String powertypecode;
+
 
         @Override
         public String getCarYear() {

+ 9 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/GuoRenCrawlerQuoteProcessService.java

@@ -3,6 +3,7 @@ package com.jzg.quotation.guoren.crawler.service;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.guoren.crawler.entity.request.GuoRenCrawlerCalculationPremiumRequest;
+import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerCalculationPremiumData;
 import org.springframework.http.HttpHeaders;
 
 public interface GuoRenCrawlerQuoteProcessService {
@@ -28,4 +29,12 @@ public interface GuoRenCrawlerQuoteProcessService {
      * @param attributionInformationVo 归属配置信息
      */
     GuoRenCrawlerCalculationPremiumRequest.BcDTO.PrpTmainDTO buildAttributionInformation(AttributionInformationVo attributionInformationVo, HttpHeaders headers);
+
+    /**
+     * 投保验证码处理
+     *
+     * @param crawlerCalculationPremiumRequest 保费计算请求
+     * @param calculationPremium 保费计算响应
+     */
+    GuoRenCrawlerCalculationPremiumData insuranceVerificationCodeProcessing(GuoRenCrawlerCalculationPremiumRequest crawlerCalculationPremiumRequest, GuoRenCrawlerCalculationPremiumData calculationPremium, HttpHeaders headers);
 }

+ 42 - 5
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/impl/GuoRenCrawlerQuoteProcessServiceImpl.java

@@ -2,8 +2,10 @@ package com.jzg.quotation.guoren.crawler.service.impl;
 
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
+import com.jzg.commons.entity.quote.vo.identify.ReinsuranceCaptchaVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.guoren.crawler.component.GuoRenCrawlerCacheComponent;
@@ -12,10 +14,7 @@ import com.jzg.quotation.guoren.crawler.constant.enums.BusinessSources;
 import com.jzg.quotation.guoren.crawler.entity.GuoRenCrawlerConfigureParameters;
 import com.jzg.quotation.guoren.crawler.entity.request.GuoRenCrawlerCalculationPremiumRequest;
 import com.jzg.quotation.guoren.crawler.entity.request.GuoRenCrawlerInitSelectRequest;
-import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerGetAgentAgreementResponse;
-import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerGetLoginComInfoResponse;
-import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerInitSelectResponse;
-import com.jzg.quotation.guoren.crawler.entity.response.GuoRenCrawlerTokenData;
+import com.jzg.quotation.guoren.crawler.entity.response.*;
 import com.jzg.quotation.guoren.crawler.service.GuoRenCrawlerQuoteProcessService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpHeaders;
@@ -31,6 +30,9 @@ public class GuoRenCrawlerQuoteProcessServiceImpl implements GuoRenCrawlerQuoteP
 
     private final GuoRenCrawlerCacheComponent guoRenCrawlerCacheComponent;
 
+    private final ExteriorUtilsRequest exteriorUtilsRequest;
+
+
     // 常量定义,消除魔法字符串
     private static final String CODE_TYPE_COM_CODE = "ComCode";
 
@@ -51,7 +53,7 @@ public class GuoRenCrawlerQuoteProcessServiceImpl implements GuoRenCrawlerQuoteP
     public HttpHeaders getHeaders(String username) {
         HttpHeaders headers = new HttpHeaders();
 //        String token = guoRenCrawlerCacheComponent.getToken(username);
-        String token = "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJXMzAwMDM5OSIsInVzZXJJZCI6IjQ5NjE4MSIsIm5hbWUiOiLmnY7mmKXmooUiLCJleHAiOjE3NjQxMjg2NDZ9.CkFEYo0D_mNj8S9mPXzRogpkIaUcocsqXYLmW_AgRG1tKAYfQNucZjHXf4bFNrstOkBxwqaxMenyZmj015V3cOOCa47s0QKIURUDl6qu4fj9WiuZeVBJ9O1hNYDnOag5f9GlTkLdrXWciGYAGucpPQSkzEqyKOoDzUO7kmDG5PM";
+        String token = "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJXMzAwMDM5OSIsInVzZXJJZCI6IjQ5NjE4MSIsIm5hbWUiOiLmnY7mmKXmooUiLCJleHAiOjE3NjQzMTM2MDN9.gxAetCuOMbxH8LuTl2gCacRlz65psaQItr7GUKo502DqAZxbMUjqamV527_XDVexFlS4-zRAdsS84nz_MnmeQImE28jRqy_8ggy5C3Ss9Teg-FOf4uLvQ2evje6PXtiU65nSE5O_Y_blog0dHxm4nqqJtPGXK1yIztIIsIB8zF8";
         if (!StringUtils.hasText(token)) {
             throw new SystemException("登录失败,请重新登录");
         }
@@ -136,4 +138,39 @@ public class GuoRenCrawlerQuoteProcessServiceImpl implements GuoRenCrawlerQuoteP
     }
 
 
+    @Override
+    public GuoRenCrawlerCalculationPremiumData insuranceVerificationCodeProcessing(GuoRenCrawlerCalculationPremiumRequest crawlerCalculationPremiumRequest, GuoRenCrawlerCalculationPremiumData calculationPremium, HttpHeaders headers) {
+        //
+        String demandNoCi = calculationPremium.getCi().getCiInsureDemand().getDemandNo();
+        //
+        String demandNoBi = calculationPremium.getBi().getCiInsureDemand().getDemandNo();
+        if(!StringUtils.hasText(demandNoCi) && !StringUtils.hasText(demandNoBi)){
+            return calculationPremium;
+        }
+
+        ReinsuranceCaptchaVo reinsuranceCaptchaVo = new ReinsuranceCaptchaVo();
+        if(StringUtils.hasText(demandNoCi)){
+            reinsuranceCaptchaVo.setCiCaptcha(calculationPremium.getCi().getCiInsureDemand().getCheckCode());
+            crawlerCalculationPremiumRequest.getCi().getCiInsureDemand().setDemandNo(demandNoCi);
+            crawlerCalculationPremiumRequest.getCi().getCiInsureDemand().setCheckCode(calculationPremium.getCi().getCiInsureDemand().getCheckCode());
+        }
+        if(StringUtils.hasText(demandNoBi)){
+            reinsuranceCaptchaVo.setBiCaptcha(calculationPremium.getBi().getCiInsureDemand().getCheckCode());
+            crawlerCalculationPremiumRequest.getBi().getCiInsureDemand().setDemandNo(demandNoBi);
+        }
+
+        ReinsuranceCaptchaVo reinsuranceCaptchaVo1 = exteriorUtilsRequest.reinsuranceCaptchaIdentify(reinsuranceCaptchaVo);
+        crawlerCalculationPremiumRequest.getCi().getPrpTmain().setDemandNo(demandNoCi);
+        crawlerCalculationPremiumRequest.getCi().getPrpTmain().setAnswer(reinsuranceCaptchaVo1.getCiCaptcha());
+        crawlerCalculationPremiumRequest.getCi().getPrpTmain().setCertiNo(calculationPremium.getCi().getPrpTmain().getCertiNo());
+        crawlerCalculationPremiumRequest.getCi().setCiInsureDemand(calculationPremium.getCi().getCiInsureDemand());
+        crawlerCalculationPremiumRequest.getCi().setPrptengageList(calculationPremium.getCi().getPrptengageList());
+
+        crawlerCalculationPremiumRequest.getBi().getPrpTmain().setDemandNo(demandNoBi);
+        crawlerCalculationPremiumRequest.getBi().getPrpTmain().setAnswer(reinsuranceCaptchaVo1.getBiCaptcha());
+        crawlerCalculationPremiumRequest.getBi().getPrpTmain().setCertiNo(calculationPremium.getBi().getPrpTmain().getCertiNo());
+        crawlerCalculationPremiumRequest.getBi().setCiInsureDemand(calculationPremium.getBi().getCiInsureDemand());
+        crawlerCalculationPremiumRequest.getBi().setPrptengageList(calculationPremium.getBi().getPrptengageList());
+        return guoRenCrawlerRequestComponent.calculationPremium(crawlerCalculationPremiumRequest, headers);
+    }
 }

+ 6 - 2
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/service/impl/GuoRenCrawlerRequestImpl.java

@@ -81,6 +81,10 @@ public class GuoRenCrawlerRequestImpl implements GuoRenCrawlerRequest {
         // 保费计算
         GuoRenCrawlerCalculationPremiumRequest crawlerCalculationPremiumRequest = new GuoRenCrawlerCalculationPremiumRequest(quoteVo, prpTmainDTO, prpTitemCar, policyHolderAddr, insuredPersonAddr, insuredTypeTmp);
         GuoRenCrawlerCalculationPremiumData calculationPremium = guoRenCrawlerRequestComponent.calculationPremium(crawlerCalculationPremiumRequest, headers);
+
+        // 投保验证码处理
+        calculationPremium = guoRenCrawlerQuoteProcessService.insuranceVerificationCodeProcessing(crawlerCalculationPremiumRequest, calculationPremium, headers);
+
         // 保存投保单号
         GuoRenCrawlerProposalNoSaveData proposalNoSave = guoRenCrawlerRequestComponent.proposalNoSave(crawlerCalculationPremiumRequest, headers);
 
@@ -101,8 +105,7 @@ public class GuoRenCrawlerRequestImpl implements GuoRenCrawlerRequest {
         // 获取订单信息
         GuoRenCrawlerOrder guoRenCrawlerOrder = guoRenCrawlerOrderService.getById(underwritingVo.getOrder().getOrdersNo());
         // 提交核保
-        GuoRenCrawlerSubmitUnderwriteData guoRenCrawlerSubmitUnderwriteData = guoRenCrawlerRequestComponent.submitUnderwrite(guoRenCrawlerOrder.getCiPolicyNumber(), guoRenCrawlerOrder.getBiPolicyNumber(), username, headers);
-
+        GuoRenCrawlerSubmitUnderwriteData submitUnderwrite = guoRenCrawlerRequestComponent.submitUnderwrite(guoRenCrawlerOrder.getCiPolicyNumber(), guoRenCrawlerOrder.getBiPolicyNumber(), username, headers);
 
         return null;
     }
@@ -121,6 +124,7 @@ public class GuoRenCrawlerRequestImpl implements GuoRenCrawlerRequest {
         OrderCommon orderCommon = getOrderCommon(insuranceUploadImageVo.getOrder());
         // 上传影像
         guoRenCrawlerRequestComponent.uploadImage(insuranceUploadImageVo.getImageVoList(), orderCommon.getBusinessNo(), orderCommon.getUsername(), orderCommon.getComCode(), orderCommon.getHttpHeaders());
+
     }
 
     @Override