helixiao hai 9 meses
pai
achega
3e7cf7394c

+ 21 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/request/ChengTaiPremiumcaRequest.java

@@ -6,6 +6,7 @@ import com.jzg.quotation.chengtai.crawler.entity.bo.ChengTaiSaleInfoBo;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiClientIdentifyResponse;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiClientIdentifyResponse;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiFindCarModelResponse;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiFindCarModelResponse;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiGetCIModelCodeResponse;
 import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiGetCIModelCodeResponse;
+import com.jzg.quotation.chengtai.crawler.entity.response.ChengTaiPremiumcaResponse;
 import com.jzg.quotation.chengtai.crawler.utils.CarDepreciationCalculator;
 import com.jzg.quotation.chengtai.crawler.utils.CarDepreciationCalculator;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
@@ -513,7 +514,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
                 this.brand = carModel.getCarbrand();
                 this.brand = carModel.getCarbrand();
                 this.shortHandCode = carModel.getShorthandcode();
                 this.shortHandCode = carModel.getShorthandcode();
                 this.vehicleKindCode = "V";
                 this.vehicleKindCode = "V";
-                this.carName = ciModelCode.getCarName();
+                this.carName = Optional.ofNullable(ciModelCode.getCarName()).orElse(carModel.getModelcname());
                 this.monthDepRate = depreciationResult.getMonthDepRate();
                 this.monthDepRate = depreciationResult.getMonthDepRate();
                 this.matchCiModelCode = ciModelCode.getJyModelCode();
                 this.matchCiModelCode = ciModelCode.getJyModelCode();
                 this.unladenMass = "";
                 this.unladenMass = "";
@@ -860,6 +861,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         @JsonProperty("tax")
         @JsonProperty("tax")
         private TaxDTO tax;
         private TaxDTO tax;
 
 
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDTO platFormMessage;
+
         public CiContractDTO(RiskInfoVo ciRiskInfoVo, ChengTaiClientIdentifyResponse policyHolder) {
         public CiContractDTO(RiskInfoVo ciRiskInfoVo, ChengTaiClientIdentifyResponse policyHolder) {
             this.contractMain = new ContractMainDTO(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
             this.contractMain = new ContractMainDTO(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
             this.coverage = CoverageDTO.getCoverage(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
             this.coverage = CoverageDTO.getCoverage(ciRiskInfoVo.getStartDate(), ciRiskInfoVo.getEndDate());
@@ -983,6 +987,22 @@ public class ChengTaiPremiumcaRequest implements Serializable {
                 return List.of(coverageDTO);
                 return List.of(coverageDTO);
             }
             }
         }
         }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDTO {
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
+            @JsonProperty("question")
+            private String question;
+            @JsonProperty("ciCarKind")
+            private String ciCarKind;
+            @JsonProperty("answer")
+            private String answer;
+        }
+
     }
     }
 
 
     @NoArgsConstructor
     @NoArgsConstructor

+ 43 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/response/ChengTaiPremiumcaResponse.java

@@ -4,9 +4,11 @@ package com.jzg.quotation.chengtai.crawler.entity.response;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.io.Serial;
 import java.io.Serial;
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -83,6 +85,9 @@ public class ChengTaiPremiumcaResponse implements Serializable {
         @JsonProperty("adjust")
         @JsonProperty("adjust")
         private List<AdjustDTO> adjust;
         private List<AdjustDTO> adjust;
 
 
+        @JsonProperty("accident")
+        private List<AccidentDTO> accident;
+
         @JsonProperty("tax")
         @JsonProperty("tax")
         private TaxDTO tax;
         private TaxDTO tax;
 
 
@@ -139,6 +144,8 @@ public class ChengTaiPremiumcaResponse implements Serializable {
             private String expireDate;
             private String expireDate;
             @JsonProperty("reinsuranceFlag")
             @JsonProperty("reinsuranceFlag")
             private String reinsuranceFlag;
             private String reinsuranceFlag;
+            @JsonProperty("question")
+            private String question;
             @JsonProperty("lastPolicyEffectiveDate")
             @JsonProperty("lastPolicyEffectiveDate")
             private String lastPolicyEffectiveDate;
             private String lastPolicyEffectiveDate;
             @JsonProperty("lastPolicyExpireDate")
             @JsonProperty("lastPolicyExpireDate")
@@ -149,6 +156,7 @@ public class ChengTaiPremiumcaResponse implements Serializable {
             private String claimaAdjustReason;
             private String claimaAdjustReason;
             @JsonProperty("claimaAdjustReasonName")
             @JsonProperty("claimaAdjustReasonName")
             private String claimaAdjustReasonName;
             private String claimaAdjustReasonName;
+
         }
         }
 
 
         @NoArgsConstructor
         @NoArgsConstructor
@@ -246,6 +254,37 @@ public class ChengTaiPremiumcaResponse implements Serializable {
             @JsonProperty("policyId")
             @JsonProperty("policyId")
             private String policyId;
             private String policyId;
         }
         }
+
+        @NoArgsConstructor
+        @Data
+        public static class AccidentDTO {
+
+            @JsonProperty("claimAmount")
+            private String claimAmount;
+
+            @JsonProperty("claimCloseTime")
+            private String claimCloseTime;
+
+            @JsonProperty("claimRegistrationNo")
+            private String claimRegistrationNo;
+
+            @JsonProperty("claimSequenceNo")
+            private String claimSequenceNo;
+
+            @JsonProperty("insurerCode")
+            private String insurerCode;
+
+            @JsonProperty("insurerName")
+            private String insurerName;
+
+            @JsonProperty("lossTime")
+            @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private Date lossTime;
+
+            @JsonProperty("policyNo")
+            private String policyNo;
+        }
+
     }
     }
 
 
     @NoArgsConstructor
     @NoArgsConstructor
@@ -602,8 +641,12 @@ public class ChengTaiPremiumcaResponse implements Serializable {
             private String ruleSetName;
             private String ruleSetName;
             @JsonProperty("riskCode")
             @JsonProperty("riskCode")
             private String riskCode;
             private String riskCode;
+            @JsonProperty("ruleId")
+            private String ruleId;
             @JsonProperty("finalRuleResult")
             @JsonProperty("finalRuleResult")
             private String finalRuleResult;
             private String finalRuleResult;
+            @JsonProperty("collegiateScenariosNam")
+            private String collegiateScenariosNam;
         }
         }
     }
     }
 
 

+ 1 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerQuoteProcessServiceImpl.java

@@ -89,7 +89,7 @@ public class ChengTaiCrawlerQuoteProcessServiceImpl implements ChengTaiCrawlerQu
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
         String chengTaiLoginToken = chengTaiCrawlerCacheComponent.getChengTaiLoginToken();
         String chengTaiLoginToken = chengTaiCrawlerCacheComponent.getChengTaiLoginToken();
 //        httpHeaders.set("token",chengTaiLoginToken);
 //        httpHeaders.set("token",chengTaiLoginToken);
-        httpHeaders.set("token","eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM5Njg1MjEsImV4cCI6MTc2Mzk3OTMyMSwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MjF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SFltM1FVQlM0dndhZGVKT215ei1oZnVfN1RWZnJYSG1uREdETEltZEE1d1dxcDRubHZUX2w1UFJ5SjFtNVE4M1lJclFCQnNuUm5zOU5TSFpiVVJrcFVhY0wifQ.ukRZLyyrQvgwd7niQmVBibqMtZbeEfxWMQHXTu1utfYzgYqgBV6OXLDScm9ag6k-aYIVXGGzX0VNgpLih0V8fQ");
         return httpHeaders;
         return httpHeaders;
     }
     }
 
 

+ 22 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerRequestImpl.java

@@ -7,6 +7,7 @@ import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
+import com.jzg.commons.entity.quote.vo.identify.ReinsuranceCaptchaVo;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.chengtai.crawler.build.ChengTaiCrawlerQuoteResultsVoBuild;
 import com.jzg.quotation.chengtai.crawler.build.ChengTaiCrawlerQuoteResultsVoBuild;
@@ -23,6 +24,7 @@ import com.jzg.quotation.chengtai.crawler.utils.CarDepreciationCalculator;
 import com.jzg.quotation.chengtai.crawler.utils.ZipImageExample;
 import com.jzg.quotation.chengtai.crawler.utils.ZipImageExample;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.constant.InsuranceCode;
+import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
@@ -41,6 +43,8 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
 
 
     private final ChengTaiCrawlerCacheComponent chengTaiCrawlerCacheComponent;
     private final ChengTaiCrawlerCacheComponent chengTaiCrawlerCacheComponent;
 
 
+    private final ExteriorUtilsRequest exteriorUtilsRequest;
+
     private final static String USER_NAME="0105B122";
     private final static String USER_NAME="0105B122";
     private final static String PASS_WORD="Tqct2025..";
     private final static String PASS_WORD="Tqct2025..";
 
 
@@ -92,6 +96,24 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         Object json = JSONObject.toJSON(request);
         Object json = JSONObject.toJSON(request);
         System.out.println(json);
         System.out.println(json);
         ChengTaiPremiumcaResponse premiumca = chengTaiRequestCrawlerComponent.premiumca(request, httpHeaders);
         ChengTaiPremiumcaResponse premiumca = chengTaiRequestCrawlerComponent.premiumca(request, httpHeaders);
+        Object json1 = JSONObject.toJSON(premiumca);
+        System.out.println(json1);
+        ChengTaiPremiumcaResponse.CiContractDTO.PlatFormMessageDTO platFormMessage = premiumca.getCiContract().getPlatFormMessage();
+        if (platFormMessage != null) {
+            String question = platFormMessage.getQuestion();
+            if (question != null) {
+                String s = exteriorUtilsRequest.captchaIdentify(question);
+                ChengTaiPremiumcaRequest.CiContractDTO.PlatFormMessageDTO platFormMessageDTO = new ChengTaiPremiumcaRequest.CiContractDTO.PlatFormMessageDTO();
+                BeanUtil.copyProperties(platFormMessage,platFormMessageDTO);
+                platFormMessageDTO.setAnswer(s);
+                request.getCiContract().setPlatFormMessage(platFormMessageDTO);
+                premiumca = chengTaiRequestCrawlerComponent.premiumca(request, httpHeaders);
+                Object jsona = JSONObject.toJSON(premiumca);
+                System.out.println(jsona);
+            }
+
+        }
+
         // 步骤六 获取特别约定
         // 步骤六 获取特别约定
         Map<String, List<ChengTaiGetEngageListResponse.ResponseBodyDTO.EngageListDTO>> engageMap = chengTaiCrawlerQuoteProcessService.getEngageList(request, premiumca, httpHeaders);
         Map<String, List<ChengTaiGetEngageListResponse.ResponseBodyDTO.EngageListDTO>> engageMap = chengTaiCrawlerQuoteProcessService.getEngageList(request, premiumca, httpHeaders);
         // 步骤七 保存订单
         // 步骤七 保存订单