helixiao 10 месяцев назад
Родитель
Сommit
9074c6cfca

+ 1 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/component/ChengTaiRequestCrawlerComponent.java

@@ -49,7 +49,7 @@ public class ChengTaiRequestCrawlerComponent {
      */
     public <Response> ResponseEntity<ChengTaiBaseResponse<Response>> requestBasePost(ChengTaiAPI requestUrl, Object body, ParameterizedTypeReference<ChengTaiBaseResponse<Response>> responseClass, HttpHeaders headers) {
         String url = chengTaiCrawlerProperties.getBaseUrl() + requestUrl.uri();
-        String s = requestComponent.basePostString(url, body, headers);
+//        String s = requestComponent.basePostString(url, body, headers);
         return requestComponent.basePost(url, body, responseClass, headers);
     }
 

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

@@ -111,7 +111,7 @@ public class ChengTaiClientIdentifyRequest implements Serializable {
     private String comCode;
 
     public ChengTaiClientIdentifyRequest(CustomerInfoVo customerInfoVo, String role, String comCode) {
-//        this.type = type;
+        this.type =customerInfoVo.getProperty();
         this.role = role;
         this.isTerror = "0";
         this.name = customerInfoVo.getName();

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

@@ -96,7 +96,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         // 交强险
         this.ciContract = new CiContractDTO(quoteVo.getCiRiskInfoVo(), policyHolder);
         // 商业险
-        this.biContract = new BiContractDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
+//        this.biContract = new BiContractDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
     }
 
     @AllArgsConstructor
@@ -490,7 +490,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
                 this.carCheckerName = "";
                 this.carCheckTime = "";
                 this.approvedPassengersCapacity = Integer.valueOf(carInfoVo.getSeatCount());
-                this.approvedLoad = Integer.valueOf("");
+//                this.approvedLoad = Integer.valueOf("");
                 this.power = carModel.getPower();
                 this.displacement = Integer.valueOf(carModel.getExhaustscale());
                 this.exhaustScaleUnit = "cc";

+ 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();
         String chengTaiLoginToken = chengTaiCrawlerCacheComponent.getChengTaiLoginToken();
 //        httpHeaders.set("token",chengTaiLoginToken);
-        httpHeaders.set("token","eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM1OTg3MjYsImV4cCI6MTc2MzYwOTUyNiwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MENVa1ZZMmZ5a1NVd3Z5NWFRR0tZWUZmQ3d1NFNCV1ZSdDFvVE1lSUFFSm0tLUw1T1paVk1hTVFGMmM3eF9vZzVjY2M0V2RFdXU3dHYwcHZWNzBJampTb2xUcWdNQXc4NGtvVDBDX094TjNLaW5zNDBoQzNGdFpieGh0UWtoRjlPeDFYWjBpcXRxZjF6TVdKSnlLTEFBb0swZHZ2cXJZQlJnZDFuUzFCWFA3c01qRnNNSU85QjlDREVKY0hZek5WdDM5SlhDUFVhWEw1bThwRmJXV3BxN0dzeHJHTlYtc2E4Tk9PYzEwS3UtUTJDeGxvb1JTMjhVdkRiMEpTZ29fZlBmU05tOE5PZFhIVjdUX0pvclplX3lSZ2w4WlAzVnVhUUdCYi1HcG00M1lBIn0.HMC5waV806VGBGBVeB8JhSrwEv7KJpjESXUiMjzfr6OlatFvRBF-QwSdwDX0nel5dg8KtUtTt7RRnUnIUudlMA");
+        httpHeaders.set("token","eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM2ODUwNTEsImV4cCI6MTc2MzY5NTg1MSwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MkhFa2xxRXhxVVZsZnc5RGZEbXlCM1FjYUNUZnllTmNoT01GZ1pKNi1NZHVzSDEwTlIyS09rQ2xNdFlDVTgwTGRPcFpmTVFUVlBkeDE5MHBZbHpFMTlWbjYwSWZiaC1wVUoyWmlucU8yUzVhaW5zNDBoQzNGdFpieGh0UWtoRjlPeDFYWjBpcXRxZjF6TVdKSnlLTEFBb0swZHZ2cXJZQlJnZDFuUzFCWFA3c01qRnNNSU85QjlDREVKY0hZek5WdDM5SlhDUFVhWEw1bThwRmJXV3BxN0dzeHJHTlYtc2E4Tk9PYzEwS3UtUTJDeGxvb1JTMjhVdkRiMEpTZ29fZk1zZlJlMWFwWG5XdjB2YUdyTzVHR2hSdmZtYUtNbHl6VmZjR0FIS050LU5nIn0.irb7BRiVDdaPdu94z4NmrOpe_jcASR6V7dlSABQ4CwIQrFPKyJLUUnF7zNvpRUjWezYvuRIBF-59lJ_aH7pITw");
         return httpHeaders;
     }
 

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

@@ -1,6 +1,7 @@
 package com.jzg.quotation.chengtai.crawler.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
@@ -73,7 +74,7 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
 
         ChengTaiFindCarModelResponse.DataDTO carModel = chengTaiRequestCrawlerComponent.findCarModel(quoteVo.getCarInfoVo(), modelCode, httpHeaders);
 
-        ChengTaiGetCIModelCodeResponse ciModelCode = chengTaiRequestCrawlerComponent.getCIModelCode(carModel.getModelcode(), httpHeaders);
+        ChengTaiGetCIModelCodeResponse ciModelCode = chengTaiRequestCrawlerComponent.getCIModelCode(modelCode, httpHeaders);
         // 步骤四 新车购置价
         CarDepreciationCalculator.DepreciationResult depreciationResult = chengTaiCrawlerQuoteProcessService.generateClaimableValue(quoteVo.getCarInfoVo(), fullCarData.getPurchasePrice().toString());
         // 步骤五 客户识别
@@ -87,7 +88,9 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
             insuredPerson = chengTaiRequestCrawlerComponent.clientIdentify(insuredPersonInfo, "2", saleInfoBo.getSaleInfo().getComCode(), httpHeaders);
         }
         // 步骤五 报价
-        ChengTaiPremiumcaRequest request = new ChengTaiPremiumcaRequest(quoteVo, carModel, policyHolder, insuredPerson, saleInfoBo, ciModelCode, depreciationResult);
+        ChengTaiPremiumcaRequest request = new ChengTaiPremiumcaRequest(quoteVo, carModel1, policyHolder, insuredPerson, saleInfoBo, ciModelCode, depreciationResult);
+        Object json = JSONObject.toJSON(request);
+        System.out.println(json);
         ChengTaiPremiumcaResponse premiumca = chengTaiRequestCrawlerComponent.premiumca(request, httpHeaders);
         // 步骤六 获取特别约定
         Map<String, List<ChengTaiGetEngageListResponse.ResponseBodyDTO.EngageListDTO>> engageMap = chengTaiCrawlerQuoteProcessService.getEngageList(request, premiumca, httpHeaders);
@@ -160,7 +163,7 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         dataDTO.setJqxclassid(fullCarData.getInsCarClass());
         dataDTO.setCimodelclass(fullCarData.getInsCarClassName());
         dataDTO.setShorthandcode(fullCarData.getShortHandCode());
-        dataDTO.setExhaustscale(fullCarData.getDisplacement().toString());
+        dataDTO.setExhaustscale(fullCarData.getDisplacement().toString().replace(".0",""));
         dataDTO.setSeatcount(fullCarData.getApprovedPassengersCapacity().toString().replace(".0",""));
         dataDTO.setCaryear(fullCarData.getCarYear());
         dataDTO.setTransmissionttype(fullCarData.getTransmissionType());

+ 1 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java

@@ -221,7 +221,7 @@ public class RequestComponent {
      */
     public <Response> Response get(String url, Map<String, Object> param, String description, ParameterizedTypeReference<Response> bodyTypeReference, HttpHeaders headers) {
         ResponseEntity<Response> responseEntity = webClient.get()
-                .uri(url, param)
+                .uri(url)
                 .headers(setHeaders(headers))
                 .retrieve()
                 .toEntity(bodyTypeReference)