Преглед изворни кода

登录以及业务员属性

helixiao пре 9 месеци
родитељ
комит
71bb0a8d80
11 измењених фајлова са 324 додато и 15 уклоњено
  1. 3 2
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/client/ChengTaiAPI.java
  2. 16 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/component/ChengTaiCrawlerCacheComponent.java
  3. 25 2
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/component/ChengTaiRequestCrawlerComponent.java
  4. 2 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/ChengTaiCrawlerConfigureParameters.java
  5. 6 6
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/request/ChengTaiFindCarModelRequest.java
  6. 35 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/request/ChengTaiQueryCarInfoRequest.java
  7. 109 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/response/ChengTaiQueryCarInfoResponse.java
  8. 10 1
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerQuoteProcessServiceImpl.java
  9. 96 3
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerRequestImpl.java
  10. 21 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  11. 1 1
      tenant/organization/src/main/java/com/jzg/organization/client/OrgClient.java

+ 3 - 2
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/client/ChengTaiAPI.java

@@ -8,13 +8,14 @@ public enum ChengTaiAPI implements CrawlerRequestUrlStandard {
     CHECK_CAPTCHA("/api/upms/captcha/check", "验证验证码"),
     LOGIN("/api/upms/login", "登录"),
     // 归属信息
-    FIND_ATTRIBUTION_ORG_BY_USER("api/vehicle/insure/channel/findAttributionOrgByUser", "查询登录用户可用的业务归属机构"),
+    FIND_ATTRIBUTION_ORG_BY_USER("/api/vehicle/insure/channel/findAttributionOrgByUser", "查询登录用户可用的业务归属机构"),
     FIND_SALE_MAN_VO_BY_DEPT_CODE("/api/vehicle/insure/channel/findSaleManVoByDeptCode", "查询业务人员"),
     FIND_CORE_CONFER_INFO_BY_HANDLE_CODE("/api/vehicle/insure/channel/findCoreConferInfoByHandleCode", "查询务人员可用的中介协议和代理机构"),
     QUERY_RISK_AUTHORITY("/api/vehicle/insure/channel/queryRiskAuthority", "查询业务人员可用的信息"),
 
+    QUERY_CAR_INFO("/api/vehicle/core/queryCarInfo","车辆查询"),
     FIND_CAR_MODEL("/api/vehicle/insure/findCarModel", "查询车型"),
-    GET_CI_MODEL_CODE("api/vehicle/core/getCIModelCode/", "查询车系"),
+    GET_CI_MODEL_CODE("/api/vehicle/core/getCIModelCode/", "查询车系"),
     CLIENT_IDENTIFY("/api/vehicle/core/clientIdentify", "身份识别"),
     PREMIUMCAL("/api/vehicle/core/premiumcal", "保费计算"),
     GET_ENGAGE_LIST("/api/vehicle/core/getEngageList", "特别约定"),

+ 16 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/component/ChengTaiCrawlerCacheComponent.java

@@ -17,6 +17,7 @@ public class ChengTaiCrawlerCacheComponent {
     private final RedissonClient redissonClient;
 
     public static final String CHENGTAI_SAVE = "chengtai:save:";
+    public static final String LOGIN_TOKEN = "login:token";
 
     public static final Duration CHENGTAISAVE_TIME = Duration.ofHours(3L);
 
@@ -42,4 +43,19 @@ public class ChengTaiCrawlerCacheComponent {
         return JSON.parseObject(bucket.get(), ChengTaiUnderwritingRequest.class);
     }
 
+    /**
+     * 登录token
+     * @param token
+     */
+    public void cacheChengTaiLoginToken(String token) {
+        RBucket<String> bucket = redissonClient.getBucket(LOGIN_TOKEN);
+        bucket.set(token, CHENGTAISAVE_TIME);
+    }
+
+    public String getChengTaiLoginToken() {
+        RBucket<String> bucket = redissonClient.getBucket(LOGIN_TOKEN);
+        return bucket.get();
+    }
+
+
 }

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

@@ -6,6 +6,7 @@ import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.chengtai.crawler.client.ChengTaiAPI;
+import com.jzg.quotation.chengtai.crawler.entity.ChengTaiCrawlerConfigureParameters;
 import com.jzg.quotation.chengtai.crawler.entity.bo.ChengTaiSaleInfoBo;
 import com.jzg.quotation.chengtai.crawler.entity.request.*;
 import com.jzg.quotation.chengtai.crawler.entity.response.*;
@@ -48,9 +49,15 @@ 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);
         return requestComponent.basePost(url, body, responseClass, headers);
     }
 
+    public <Response> ResponseEntity<ChengTaiBaseResponse<Response>> requestBaseGet(ChengTaiAPI requestUrl, Object body, ParameterizedTypeReference<ChengTaiBaseResponse<Response>> responseClass, HttpHeaders headers) {
+        String url = chengTaiCrawlerProperties.getBaseUrl() + requestUrl.uri();
+        return requestComponent.chengTaiGet(url, body, responseClass, headers);
+    }
+
     /**
      * 获取响应内容
      *
@@ -65,6 +72,11 @@ public class ChengTaiRequestCrawlerComponent {
         return response.getBody();
     }
 
+    public <Response> Response requestGet(ChengTaiAPI requestUrl, Object body, ParameterizedTypeReference<ChengTaiBaseResponse<Response>> responseClass, HttpHeaders headers) {
+        ChengTaiBaseResponse<Response> response = requestBaseGet(requestUrl, body, responseClass, headers).getBody();
+        return response.getBody();
+    }
+
     /**
      * 获取公钥
      *
@@ -117,7 +129,7 @@ public class ChengTaiRequestCrawlerComponent {
      * @return 归属机构
      */
     public ChengTaiFindAttributionOrgByUserResponse findAttributionOrgByUser(String deptCode, HttpHeaders httpHeaders) {
-        List<ChengTaiFindAttributionOrgByUserResponse> response = requestPost(ChengTaiAPI.FIND_ATTRIBUTION_ORG_BY_USER, null, new ParameterizedTypeReference<>() {
+        List<ChengTaiFindAttributionOrgByUserResponse> response = requestGet(ChengTaiAPI.FIND_ATTRIBUTION_ORG_BY_USER, null, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         return response.stream().filter(x -> deptCode.equals(x.getDeptCode())).findFirst().orElseThrow(() -> new SystemException("获取归属机构失败"));
     }
@@ -178,7 +190,7 @@ public class ChengTaiRequestCrawlerComponent {
      * @param httpHeaders 请求头
      * @return 车辆信息
      */
-    public ChengTaiFindCarModelResponse.DataDTO findCarModel(CarInfoVo carInfoVo, HttpHeaders httpHeaders) {
+    public ChengTaiFindCarModelResponse.DataDTO findCarModel(CarInfoVo carInfoVo,String modelCode, HttpHeaders httpHeaders) {
         ChengTaiFindCarModelRequest chengTaiFindCarModelRequest = new ChengTaiFindCarModelRequest(carInfoVo.getBrandName());
         ChengTaiFindCarModelResponse chengTaiFindCarModelResponse = requestPost(ChengTaiAPI.FIND_CAR_MODEL, chengTaiFindCarModelRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
@@ -326,4 +338,15 @@ public class ChengTaiRequestCrawlerComponent {
     }
 
 
+    public ChengTaiQueryCarInfoResponse.CarModelListDTO queryCarInfo(CarInfoVo carInfoVo, ChengTaiCrawlerConfigureParameters parameters, HttpHeaders httpHeaders) {
+        ChengTaiQueryCarInfoRequest chengTaiQueryCarInfoRequest = new ChengTaiQueryCarInfoRequest(parameters.getComCode(), carInfoVo.getLicenseNo(), carInfoVo.getVinNo());
+
+        ChengTaiQueryCarInfoResponse chengTaiQueryCarInfoResponse = requestPost(ChengTaiAPI.QUERY_CAR_INFO, chengTaiQueryCarInfoRequest, new ParameterizedTypeReference<>() {
+        }, httpHeaders);
+        List<ChengTaiQueryCarInfoResponse.CarModelListDTO> carModel = Optional.ofNullable(chengTaiQueryCarInfoResponse)
+                .map(ChengTaiQueryCarInfoResponse::getCarModelList)
+                .orElseThrow(() -> new SystemException("获取车辆信息失败"));
+
+        return carModel.get(0);
+    }
 }

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

@@ -35,5 +35,7 @@ public class ChengTaiCrawlerConfigureParameters implements ConfigureParameters {
      */
     private String agreementCode;
 
+    private String comCode;
+
 }
 

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

@@ -24,8 +24,8 @@ public class ChengTaiFindCarModelRequest implements Serializable {
     @Serial
     private static final long serialVersionUID = -2517394103523954743L;
 
-    @JsonProperty("horthandcode")
-    private String horthandcode;
+    @JsonProperty("shorthandcode")
+    private String shorthandcode;
 
     @JsonProperty("purchasepriceStart")
     private String purchasepriceStart;
@@ -54,16 +54,16 @@ public class ChengTaiFindCarModelRequest implements Serializable {
     @JsonProperty("pageSize")
     private Integer pageSize;
 
-    public ChengTaiFindCarModelRequest(String modelcname) {
-        this.horthandcode = "";
+    public ChengTaiFindCarModelRequest(String modelCode) {
+        this.shorthandcode = "";
         this.purchasepriceStart = "";
         this.purchasepriceEnd = "";
-        this.modelcname = modelcname;
+        this.modelcname = modelCode;
         this.carbrand = "";
         this.modelcode = "";
         this.familyname = "";
         this.factory = "";
         this.pageNo = 1;
-        this.pageSize = 20;
+        this.pageSize = 5;
     }
 }

+ 35 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/request/ChengTaiQueryCarInfoRequest.java

@@ -0,0 +1,35 @@
+package com.jzg.quotation.chengtai.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serial;
+
+@Data
+public class ChengTaiQueryCarInfoRequest {
+
+    @Serial
+    private static final long serialVersionUID = -1L;
+
+    @JsonProperty("comCode")
+    private String comCode;
+
+    @JsonProperty("plateNo")
+    private String plateNo;
+
+    @JsonProperty("plateNoType")
+    private String plateNoType;
+
+    @JsonProperty("vinCode")
+    private String vinCode;
+
+
+    public ChengTaiQueryCarInfoRequest(String comCode,String plateNo,String vinCode) {
+        this.comCode = comCode;
+        this.plateNo = plateNo;
+        this.plateNoType = "02";
+        this.vinCode = vinCode;
+    }
+
+
+}

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

@@ -0,0 +1,109 @@
+package com.jzg.quotation.chengtai.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+@NoArgsConstructor
+public class ChengTaiQueryCarInfoResponse implements Serializable {
+
+    @JsonProperty("carModelList")
+    private List<CarModelListDTO> carModelList;
+
+    @NoArgsConstructor
+    @Data
+    public static class CarModelListDTO {
+        @JsonProperty("fullCarData")
+        private FullCarDataDTO fullCarData;
+        @JsonProperty("platformCarBean")
+        private PlatformCarBeanDTO platformCarBean;
+
+        @NoArgsConstructor
+        @Data
+        public static class FullCarDataDTO {
+            @JsonProperty("modelCode")
+            private String modelCode;
+            @JsonProperty("vehicleCode")
+            private String vehicleCode;
+            @JsonProperty("modelName")
+            private String modelName;
+            @JsonProperty("factory")
+            private String factory;
+            @JsonProperty("brand")
+            private String brand;
+            @JsonProperty("brandCode")
+            private String brandCode;
+            @JsonProperty("series")
+            private String series;
+            @JsonProperty("seriesCode")
+            private String seriesCode;
+            @JsonProperty("seriesType")
+            private String seriesType;
+            @JsonProperty("seriesName")
+            private String seriesName;
+            @JsonProperty("carKind")
+            private String carKind;
+            @JsonProperty("insCarClass")
+            private String insCarClass;
+            @JsonProperty("insCarClassName")
+            private String insCarClassName;
+            @JsonProperty("shortHandCode")
+            private String shortHandCode;
+            @JsonProperty("carYear")
+            private String carYear;
+            @JsonProperty("purchasePrice")
+            private Double purchasePrice;
+            @JsonProperty("purchasePriceTax")
+            private Double purchasePriceTax;
+            @JsonProperty("transmissionType")
+            private String transmissionType;
+            @JsonProperty("qualityMax")
+            private Double qualityMax;
+            @JsonProperty("qualityMin")
+            private Double qualityMin;
+            @JsonProperty("approvedPassengersCapacity")
+            private Double approvedPassengersCapacity;
+            @JsonProperty("displacement")
+            private Double displacement;
+            @JsonProperty("power")
+            private Double power;
+            @JsonProperty("unladenMass")
+            private Double unladenMass;
+            @JsonProperty("energyTypes")
+            private String energyTypes;
+            @JsonProperty("licenseNo")
+            private String licenseNo;
+            @JsonProperty("frameNo")
+            private String frameNo;
+            @JsonProperty("engineNo")
+            private String engineNo;
+            @JsonProperty("factoryCode")
+            private String factoryCode;
+            @JsonProperty("hfCode")
+            private String hfCode;
+            @JsonProperty("hfName")
+            private String hfName;
+            @JsonProperty("powerType")
+            private String powerType;
+            @JsonProperty("vehicleModel")
+            private String vehicleModel;
+            @JsonProperty("vehicleName")
+            private String vehicleName;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatformCarBeanDTO {
+            @JsonProperty("modelCodeHX")
+            private String modelCodeHX;
+            @JsonProperty("carName")
+            private String carName;
+            @JsonProperty("noticeType")
+            private String noticeType;
+        }
+    }
+}

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

@@ -5,6 +5,7 @@ import com.jzg.commons.constants.quote.enums.base.ExpenseRequestUrl;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.commons.entity.quote.vo.identify.SliderCaptchaVo;
+import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.chengtai.api.entity.constants.enums.RiskCodeEnum;
 import com.jzg.quotation.chengtai.crawler.component.ChengTaiCrawlerCacheComponent;
@@ -75,12 +76,20 @@ public class ChengTaiCrawlerQuoteProcessServiceImpl implements ChengTaiCrawlerQu
         ChengTaiLoginRequest chengTaiLoginRequest = new ChengTaiLoginRequest(username, encrypt1, s);
         ChengTaiLoginResponse login = chengTaiRequestCrawlerComponent.login(chengTaiLoginRequest);
         System.out.println(login.getBody());
+        Integer code = login.getCode();
+        if (code==200) {
+            chengTaiCrawlerCacheComponent.cacheChengTaiLoginToken(login.getBody());
+        }else {
+            throw new SystemException(login.getMessage());
+        }
     }
 
     @Override
     public HttpHeaders getTokenHeaders(String username, String password) {
         HttpHeaders httpHeaders = new HttpHeaders();
-        httpHeaders.set("token", "eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NTkyMTQyNTgsImV4cCI6MTc1OTIyNTA1OCwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV2pQNjJaQk5ZLTl4eFNMT3pONExzY1Y5UzI0VXliS3E0ZzU3VGdQdi1vaWlGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJsdGhJakpuQjhqSFl5ajM0VXJwTFpKSFZWenRhMzNBY0VkaHVSdFFqMW5ONmpnZW5hSVl0NVdQZXpXMVFOVjBoWDl1TzdhMTdLVjg1bkpYd1F4aEJ0eFV3MDFoNk5KNy1TWGpHX2ttYkhSdm1KX29DSHZpT1RRV3hrcllPbWpORkF4eGtHQmNvSGR4X1hkdDdueDl2bFhLaW5zNDBoQzNGdFpieGh0UWtoRjlPeDFYWjBpcXRxZjF6TVdKSnlLTEFBaTRzSEJfMVpFX01ZMHVYNGwwR2MzSGh1R0Fkc21vTi1iLTdlY1kxcldpbFl2QXhqQWlGZFVkdmRvTXdWeFRrRTZ3aFBnY0dvY0FZU2NXbUZHUXBLTVlmWlNSM25kLWFGR2hEaW51djlWaldKX29DSHZpT1RRV3hrcllPbWpORkFJeXotX3VwV1NnNkFlNHl6YVhpdTNBIn0.ObZ6BWMDtbsDgEaVFmSVUbhti_HTPAoGngPQ07xll8R6jeu-l2c_ktFgkMpfiruTeHZ-ELmAjtk5siOlXVqyTA");
+        String chengTaiLoginToken = chengTaiCrawlerCacheComponent.getChengTaiLoginToken();
+//        httpHeaders.set("token",chengTaiLoginToken);
+        httpHeaders.set("token","eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM1OTg3MjYsImV4cCI6MTc2MzYwOTUyNiwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MENVa1ZZMmZ5a1NVd3Z5NWFRR0tZWUZmQ3d1NFNCV1ZSdDFvVE1lSUFFSm0tLUw1T1paVk1hTVFGMmM3eF9vZzVjY2M0V2RFdXU3dHYwcHZWNzBJampTb2xUcWdNQXc4NGtvVDBDX094TjNLaW5zNDBoQzNGdFpieGh0UWtoRjlPeDFYWjBpcXRxZjF6TVdKSnlLTEFBb0swZHZ2cXJZQlJnZDFuUzFCWFA3c01qRnNNSU85QjlDREVKY0hZek5WdDM5SlhDUFVhWEw1bThwRmJXV3BxN0dzeHJHTlYtc2E4Tk9PYzEwS3UtUTJDeGxvb1JTMjhVdkRiMEpTZ29fZlBmU05tOE5PZFhIVjdUX0pvclplX3lSZ2w4WlAzVnVhUUdCYi1HcG00M1lBIn0.HMC5waV806VGBGBVeB8JhSrwEv7KJpjESXUiMjzfr6OlatFvRBF-QwSdwDX0nel5dg8KtUtTt7RRnUnIUudlMA");
         return httpHeaders;
     }
 

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

@@ -1,5 +1,6 @@
 package com.jzg.quotation.chengtai.crawler.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
@@ -39,10 +40,13 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
 
     private final ChengTaiCrawlerCacheComponent chengTaiCrawlerCacheComponent;
 
+    private final static String USER_NAME="0105B122";
+    private final static String PASS_WORD="Tqct2025..";
+
     @Override
     public void login(LoginBase loginBase) {
         try {
-            chengTaiCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getUsername());
+            chengTaiCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getPassword());
         } catch (Exception ignored) {
             throw new SystemException("登录失败");
         }
@@ -50,6 +54,8 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
 
     @Override
     public QuoteResultsVo quote(QuoteVo quoteVo) throws Exception {
+
+//        chengTaiCrawlerQuoteProcessService.login(USER_NAME, PASS_WORD);
         // 步骤一 获取token
         AttributionInformationVo attributionInformationVo = quoteVo.getOrder().getAttributionInformationVo();
         ChengTaiCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
@@ -58,10 +64,18 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         // 步骤二 构建归属信息
         ChengTaiSaleInfoBo saleInfoBo = chengTaiCrawlerQuoteProcessService.buildClientIdentify(parameters, httpHeaders);
         // 步骤三 车型查询
-        ChengTaiFindCarModelResponse.DataDTO carModel = chengTaiRequestCrawlerComponent.findCarModel(quoteVo.getCarInfoVo(), httpHeaders);
+        ChengTaiQueryCarInfoResponse.CarModelListDTO carModelList = chengTaiRequestCrawlerComponent.queryCarInfo(quoteVo.getCarInfoVo(),parameters, httpHeaders);
+        ChengTaiQueryCarInfoResponse.CarModelListDTO.FullCarDataDTO fullCarData = carModelList.getFullCarData();
+        String modelCode = fullCarData.getModelCode();
+
+        ChengTaiFindCarModelResponse.DataDTO carModel1 = getCarModel(fullCarData);
+
+
+        ChengTaiFindCarModelResponse.DataDTO carModel = chengTaiRequestCrawlerComponent.findCarModel(quoteVo.getCarInfoVo(), modelCode, httpHeaders);
+
         ChengTaiGetCIModelCodeResponse ciModelCode = chengTaiRequestCrawlerComponent.getCIModelCode(carModel.getModelcode(), httpHeaders);
         // 步骤四 新车购置价
-        CarDepreciationCalculator.DepreciationResult depreciationResult = chengTaiCrawlerQuoteProcessService.generateClaimableValue(quoteVo.getCarInfoVo(), carModel.getPurchasePrice());
+        CarDepreciationCalculator.DepreciationResult depreciationResult = chengTaiCrawlerQuoteProcessService.generateClaimableValue(quoteVo.getCarInfoVo(), fullCarData.getPurchasePrice().toString());
         // 步骤五 客户识别
         // 投保人
         CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
@@ -86,6 +100,85 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         return ChengTaiCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo.getOrder().getOrdersNo(), premiumca);
     }
 
+    /**
+     *
+     * "modelcode": "RAD1040SHD",
+     *                 "modelcname": "斯柯达SVW71613RS轿车",
+     *                 "vehicleclass": "轿车类",
+     *                 "vehicleType": "其他",
+     *                 "factory": "上海大众汽车有限公司",
+     *                 "factoryid": "MK0650",
+     *                 "carbrand": "上汽大众斯柯达",
+     *                 "brandid": "SKA1",
+     *                 "familyname": "昕锐",
+     *                 "familycode": "SKA1AA",
+     *                 "purchaseprice": "73703",
+     *                 "analogymodelprice": "0",
+     *                 "purchasepricenottax": "67900",
+     *                 "analogymodelpricenottax": "0",
+     *                 "carstyle": "合资车",
+     *                 "syxclassid": "KA01",
+     *                 "syxclassname": "六座以下客车",
+     *                 "jqxclassid": "KA01",
+     *                 "cimodelclass": "六座以下客车",
+     *                 "shorthandcode": "SKD-SVW71613RS",
+     *                 "exhaustscale": "1598.0",
+     *                 "seatcount": "5",
+     *                 "caryear": "201509",
+     *                 "transmissionttype": "手动档",
+     *                 "remark": "手动档 前行版 国Ⅴ",
+     *                 "vehiclequalitymin": "1120",
+     *                 "validind": "1",
+     *                 "power": "81",
+     *                 "vehiclemodel": "SVW71613RS",
+     *                 "powertype": "汽油",
+     *                 "hfnamenew": "正常",
+     *                 "hfcodenew": "0",
+     *                 "fullweightmax": "1120",
+     *                 "fullweightmin": "1120",
+     *                 "updateVersion": "20210518163000"
+     */
+    private ChengTaiFindCarModelResponse.DataDTO getCarModel(ChengTaiQueryCarInfoResponse.CarModelListDTO.FullCarDataDTO fullCarData) {
+        ChengTaiFindCarModelResponse.DataDTO dataDTO = new ChengTaiFindCarModelResponse.DataDTO();
+        dataDTO.setModelcode(fullCarData.getModelCode());
+        dataDTO.setModelcname(fullCarData.getModelName());
+        dataDTO.setVehicleclass(fullCarData.getCarKind());
+        dataDTO.setVehicleType("其他");
+        dataDTO.setFactory(fullCarData.getFactory());
+        dataDTO.setFactoryid(fullCarData.getFactoryCode());
+        dataDTO.setCarbrand(fullCarData.getBrand());
+        dataDTO.setBrandid(fullCarData.getBrandCode());
+        dataDTO.setFamilyname(fullCarData.getSeries());
+        dataDTO.setFamilycode(fullCarData.getSeriesCode());
+        dataDTO.setPurchaseprice(fullCarData.getPurchasePrice().toString().replace(".0",""));
+        dataDTO.setAnalogymodelprice("0");
+        dataDTO.setPurchasepricenottax(fullCarData.getPurchasePriceTax().toString().replace(".0",""));
+        dataDTO.setAnalogymodelpricenottax("0");
+        dataDTO.setCarstyle(fullCarData.getSeriesName());
+        dataDTO.setSyxclassid(fullCarData.getInsCarClass());
+        dataDTO.setSyxclassname(fullCarData.getInsCarClassName());
+        dataDTO.setJqxclassid(fullCarData.getInsCarClass());
+        dataDTO.setCimodelclass(fullCarData.getInsCarClassName());
+        dataDTO.setShorthandcode(fullCarData.getShortHandCode());
+        dataDTO.setExhaustscale(fullCarData.getDisplacement().toString());
+        dataDTO.setSeatcount(fullCarData.getApprovedPassengersCapacity().toString().replace(".0",""));
+        dataDTO.setCaryear(fullCarData.getCarYear());
+        dataDTO.setTransmissionttype(fullCarData.getTransmissionType());
+        dataDTO.setRemark(fullCarData.getVehicleName());
+        dataDTO.setVehiclequalitymin(fullCarData.getUnladenMass().toString().replace(".0",""));
+        dataDTO.setValidind("1");
+        dataDTO.setPower(fullCarData.getPower().toString().replace(".0",""));
+        dataDTO.setVehiclemodel(fullCarData.getVehicleModel());
+        dataDTO.setPowertype(fullCarData.getPowerType());
+        dataDTO.setHfnamenew(fullCarData.getHfName());
+        dataDTO.setHfcodenew(fullCarData.getHfCode());
+        dataDTO.setFullweightmax(fullCarData.getQualityMax().toString().replace(".0",""));
+        dataDTO.setFullweightmin(fullCarData.getQualityMin().toString().replace(".0",""));
+        dataDTO.setUpdateVersion("");
+
+        return dataDTO;
+    }
+
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws Exception {
         HttpHeaders httpHeaders = chengTaiCrawlerQuoteProcessService.getTokenHeaders(underwritingVo.getOrder().getAttributionInformationVo().getUsername(), underwritingVo.getOrder().getAttributionInformationVo().getPassword());

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

@@ -2,6 +2,7 @@ package com.jzg.quotation.commons.component;
 
 
 import com.alibaba.fastjson2.JSON;
+import com.alibaba.nacos.api.remote.response.Response;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.config.WebClientConfig;
 import com.jzg.quotation.commons.utils.RequestObjectConversion;
@@ -200,6 +201,15 @@ public class RequestComponent {
                 .block();
     }
 
+    public <Response> ResponseEntity<Response> chengTaiGet(String url, Object initDataRequest,ParameterizedTypeReference<Response> bodyTypeReference, HttpHeaders headers) {
+        return webClient.get()
+                .uri(url)
+                .headers(setHeaders(headers))
+                .retrieve()
+                .toEntity(bodyTypeReference)
+                .block();
+    }
+
     /**
      * @param url               请求地址
      * @param param             get 拼接对象
@@ -326,6 +336,17 @@ public class RequestComponent {
                 .block();
     }
 
+    public String basePostString(String url, Object body, HttpHeaders headers) {
+        String requestBody = JSON.toJSONString(body);
+        return webClient.post()
+                .uri(url)
+                .body(BodyInserters.fromValue(requestBody))
+                .headers(setHeaders(headers))
+                .retrieve()
+                .bodyToMono(String.class).doOnNext(responseBody -> System.out.println("响应内容: " + responseBody)) // 打印响应
+                .block();
+    }
+
 
     /**
      * @param url           请求地址

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/client/OrgClient.java

@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestHeader;
 
-@FeignClient(name="jzg-org",url = "http://192.168.0.253:8084/")
+@FeignClient(name="jzg-org",url = "http://localhost:8084/")
 public interface OrgClient {
 
     @PostMapping("/ptlAgreementDispatch/getAgreementDispatch")