helixiao 9 месяцев назад
Родитель
Сommit
5ae1d75a49

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

@@ -69,9 +69,18 @@ public class ChengTaiRequestCrawlerComponent {
      */
     public <Response> Response requestPost(ChengTaiAPI requestUrl, Object body, ParameterizedTypeReference<ChengTaiBaseResponse<Response>> responseClass, HttpHeaders headers) {
         ChengTaiBaseResponse<Response> response = requestBasePost(requestUrl, body, responseClass, headers).getBody();
+        if (response.getCode() == -1) {
+            throw new SystemException(response.getMessage());
+        }
         return response.getBody();
     }
 
+    public <Response> Response formData(ChengTaiAPI requestUrl, Object body, ParameterizedTypeReference<ChengTaiBaseResponse<Response>> responseClass, HttpHeaders headers) {
+        String url = chengTaiCrawlerProperties.getBaseUrl() + requestUrl.uri();
+        ResponseEntity<ChengTaiBaseResponse<Response>> response = requestComponent.formData(url, body, responseClass, headers);
+        return response.getBody().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();
@@ -99,6 +108,7 @@ public class ChengTaiRequestCrawlerComponent {
 
     }
 
+
     /**
      * 验证验证码
      *
@@ -190,9 +200,9 @@ public class ChengTaiRequestCrawlerComponent {
      * @param httpHeaders 请求头
      * @return 车辆信息
      */
-    public ChengTaiFindCarModelResponse.DataDTO findCarModel(CarInfoVo carInfoVo,String modelCode, HttpHeaders httpHeaders) {
+    public ChengTaiFindCarModelResponse.DataDTO findCarModel(CarInfoVo carInfoVo, HttpHeaders httpHeaders) {
         ChengTaiFindCarModelRequest chengTaiFindCarModelRequest = new ChengTaiFindCarModelRequest(carInfoVo.getBrandName());
-        ChengTaiFindCarModelResponse chengTaiFindCarModelResponse = requestPost(ChengTaiAPI.FIND_CAR_MODEL, chengTaiFindCarModelRequest, new ParameterizedTypeReference<>() {
+        ChengTaiFindCarModelResponse chengTaiFindCarModelResponse = formData(ChengTaiAPI.FIND_CAR_MODEL, chengTaiFindCarModelRequest, new ParameterizedTypeReference<>() {
         }, httpHeaders);
         List<ChengTaiFindCarModelResponse.DataDTO> carModel = Optional.ofNullable(chengTaiFindCarModelResponse)
                 .map(ChengTaiFindCarModelResponse::getData)
@@ -208,8 +218,8 @@ public class ChengTaiRequestCrawlerComponent {
      * @return 车辆信息
      */
     public ChengTaiGetCIModelCodeResponse getCIModelCode(String carName, HttpHeaders httpHeaders) {
-        return requestComponent.get(ChengTaiAPI.GET_CI_MODEL_CODE.getRequestUrl(chengTaiCrawlerProperties.getBaseUrl()) + carName, Map.of(), null, new ParameterizedTypeReference<>() {
-        }, httpHeaders);
+        return requestComponent.get(ChengTaiAPI.GET_CI_MODEL_CODE.getRequestUrl(chengTaiCrawlerProperties.getBaseUrl()) + carName, Map.of(), null, new ParameterizedTypeReference<ChengTaiBaseResponse<ChengTaiGetCIModelCodeResponse>>() {
+        }, httpHeaders).getBody();
     }
 
     /**

+ 7 - 3
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/entity/bo/ChengTaiSaleInfoBo.java

@@ -45,7 +45,7 @@ public class ChengTaiSaleInfoBo implements Serializable {
      */
     private ChengTaiPremiumcaRequest.SaleInfoDTO buildSaleInfoDTO(ChengTaiFindAttributionOrgByUserResponse attributionOrgByUser, ChengTaiFindSaleManVoByDeptCodeResponse saleManVoByDeptCode, ChengTaiFindCoreConferInfoByHandleCodeResponse coreConferInfoByHandleCode) {
         ChengTaiPremiumcaRequest.SaleInfoDTO saleInfoDTO = new ChengTaiPremiumcaRequest.SaleInfoDTO();
-        saleInfoDTO.setBusinessMode("");
+        saleInfoDTO.setBusinessMode(coreConferInfoByHandleCode.getIntermediaryKind());
         saleInfoDTO.setBusinessSource(coreConferInfoByHandleCode.getSource());
         saleInfoDTO.setComCode(attributionOrgByUser.getDeptCode());
         saleInfoDTO.setComName(attributionOrgByUser.getDeptName());
@@ -61,6 +61,10 @@ public class ChengTaiSaleInfoBo implements Serializable {
         saleInfoDTO.setCooperateSiteName("虚拟合作网点");
         saleInfoDTO.setUserCode(saleManVoByDeptCode.getUserCode());
         saleInfoDTO.setUserName(saleManVoByDeptCode.getUsername());
+        saleInfoDTO.setAgentCode(coreConferInfoByHandleCode.getIntermediaryCode());
+        saleInfoDTO.setAgentName(coreConferInfoByHandleCode.getIntermediaryName());
+        saleInfoDTO.setRiskBusinessType("1");
+        saleInfoDTO.setRiskBusinessTypeName("个人业务");
         return saleInfoDTO;
     }
 
@@ -83,9 +87,9 @@ public class ChengTaiSaleInfoBo implements Serializable {
         acciSaleInfoDTO.setAgentName(coreConferInfoByHandleCode.getIntermediaryName());
         acciSaleInfoDTO.setSolutionCode(coreConferInfoByHandleCode.getSolutionCode());
         acciSaleInfoDTO.setPermitNo(coreConferInfoByHandleCode.getRegisterCode());
-        acciSaleInfoDTO.setBusinessMode("");
+        acciSaleInfoDTO.setBusinessMode(coreConferInfoByHandleCode.getIntermediaryKind());
         acciSaleInfoDTO.setBusinessSource(coreConferInfoByHandleCode.getSource());
-        acciSaleInfoDTO.setChannelType(coreConferInfoByHandleCode.getCompanyCode());
+        acciSaleInfoDTO.setChannelType(coreConferInfoByHandleCode.getChannelDetailCode());
         acciSaleInfoDTO.setChannelTypeDetail(coreConferInfoByHandleCode.getChannelTip());
         acciSaleInfoDTO.setCooperateSiteCode("0000000000");
         acciSaleInfoDTO.setCooperateSiteName("虚拟合作网点");

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

@@ -54,11 +54,11 @@ public class ChengTaiFindCarModelRequest implements Serializable {
     @JsonProperty("pageSize")
     private Integer pageSize;
 
-    public ChengTaiFindCarModelRequest(String modelCode) {
+    public ChengTaiFindCarModelRequest(String modelcname) {
         this.shorthandcode = "";
         this.purchasepriceStart = "";
         this.purchasepriceEnd = "";
-        this.modelcname = modelCode;
+        this.modelcname = modelcname;
         this.carbrand = "";
         this.modelcode = "";
         this.familyname = "";

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

@@ -14,7 +14,10 @@ import lombok.NoArgsConstructor;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
+import java.util.Optional;
 import java.util.stream.Collectors;
 
 /**
@@ -76,10 +79,11 @@ public class ChengTaiPremiumcaRequest implements Serializable {
                                     ChengTaiClientIdentifyResponse policyHolder, ChengTaiClientIdentifyResponse insuredPerson,
                                     ChengTaiSaleInfoBo saleInfoBo,
                                     ChengTaiGetCIModelCodeResponse ciModelCode,
-                                    CarDepreciationCalculator.DepreciationResult depreciationResult) {
+                                    CarDepreciationCalculator.DepreciationResult depreciationResult,
+                                    String name) {
         this.combo = new ComboDTO("1");
         // 主要信息
-        this.businessMain = new BusinessMainDTO(saleInfoBo.getSaleInfo(), "");
+        this.businessMain = new BusinessMainDTO(saleInfoBo.getSaleInfo(), "",name);
         this.flag = new FlagDTO(false, false);
         // 归属信息
         this.saleInfo = saleInfoBo.getSaleInfo();
@@ -97,6 +101,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         this.ciContract = new CiContractDTO(quoteVo.getCiRiskInfoVo(), policyHolder);
         // 商业险
 //        this.biContract = new BiContractDTO(quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo());
+        this.submitReqBody = new SubmitReqBodyDTO();
     }
 
     @AllArgsConstructor
@@ -220,9 +225,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         private String paymentmark;
         // end submit
 
-        public BusinessMainDTO(SaleInfoDTO saleInfoDTO, String planCode) {
-            this.operatorCode = saleInfoDTO.getUserCode();
-            this.operatorName = saleInfoDTO.getUserName();
+        public BusinessMainDTO(SaleInfoDTO saleInfoDTO, String planCode,String name) {
+            this.operatorCode = name;
+            this.operatorName = "太原天勤";
             this.operateDate = TimeProcessing.nowDate();
             this.issueDate = TimeProcessing.nowDateTime();
             this.inputDate = this.operateDate;
@@ -290,6 +295,10 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         private String userCode;
         @JsonProperty("userName")
         private String userName;
+        @JsonProperty("riskBusinessType")
+        private String riskBusinessType;
+        @JsonProperty("riskBusinessTypeName")
+        private String riskBusinessTypeName;
 
         // start submit 添加的参数
         @JsonProperty("id")
@@ -458,7 +467,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
             // end 参数
 
             public PolicyCarDTO(CarInfoVo carInfoVo, CarDepreciationCalculator.DepreciationResult depreciationResult, ChengTaiFindCarModelResponse.DataDTO carModel, ChengTaiGetCIModelCodeResponse ciModelCode) {
-
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
                 this.vhlInfoType = "1";
                 this.plateNo = carInfoVo.getLicenseNo();
                 this.vin = carInfoVo.getVinNo();
@@ -475,24 +484,24 @@ public class ChengTaiPremiumcaRequest implements Serializable {
                 this.carKindName = carInfoVo.getCarKindName();
                 this.useNatureCode = carInfoVo.getVehicleUseCode();
                 this.useNatureName = carInfoVo.getVehicleUseName();
-                this.attachNature = carInfoVo.getProperty();
+                this.attachNature = carInfoVo.getPropertyCode();
                 this.attachNatureName = carInfoVo.getPropertyName();
                 this.purchasePrice = Integer.valueOf(carModel.getPurchasepricenottax());
                 this.orignPurchasePrice = Integer.valueOf(carModel.getPurchasepricenottax());
                 this.actualValue = depreciationResult.getActualValue().toString();
                 this.consultValue = depreciationResult.getActualValue().toString();
                 this.plateType = carInfoVo.getLicenseColorCode();
-                this.plateTypeName = carInfoVo.getLicenseColorName();
+                this.plateTypeName = Optional.ofNullable(carInfoVo.getLicenseColorName()).orElse("小型汽车号牌");
                 this.vehicleType = carInfoVo.getCarTypeCode();
-                this.vehicleTypeName = carInfoVo.getCarTypeName();
+                this.vehicleTypeName = Optional.ofNullable(carInfoVo.getCarTypeName()).orElse("轿车");
                 this.energyTypes = carInfoVo.getEnergyTypeCode();
-                this.carCheckStatus = "";
-                this.carCheckerName = "";
-                this.carCheckTime = "";
+                this.carCheckStatus = "2";
+                this.carCheckerName = "李锴";
+                this.carCheckTime = format.format(new Date());
                 this.approvedPassengersCapacity = Integer.valueOf(carInfoVo.getSeatCount());
-//                this.approvedLoad = Integer.valueOf("");
+                this.approvedLoad = 0;
                 this.power = carModel.getPower();
-                this.displacement = Integer.valueOf(carModel.getExhaustscale());
+                this.displacement = Integer.valueOf(carModel.getExhaustscale().replace(".0",""));
                 this.exhaustScaleUnit = "cc";
                 this.loanVehicleFlag = "0";
                 this.ecdemicVehicleFlag = "0";
@@ -610,6 +619,17 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         @JsonProperty("comCode")
         private String comCode;
 
+        @JsonProperty("relationWithCar")
+        private String relationWithCar;
+
+        @JsonProperty("relationWithInsured")
+        private String relationWithInsured;
+
+        @JsonProperty("sameType")
+        private String sameType;
+
+
+
         // start submit 添加的参数
         @JsonProperty("id")
         private String id;
@@ -625,14 +645,14 @@ public class ChengTaiPremiumcaRequest implements Serializable {
             this.customerId = policyHolder.getCustomerId();
             this.name = policyHolder.getName();
             this.identifyTypeCode = policyHolder.getIdentifyTypeCode();
-            this.identifyTypeName = policyHolder.getIdentifyTypeName();
+            this.identifyTypeName = Optional.ofNullable(policyHolder.getIdentifyTypeName()).orElse("");
             this.identifyNumber = policyHolder.getIdentifyNumber();
             this.province = policyHolder.getProvince();
             this.city = policyHolder.getCity();
             this.district = policyHolder.getDistrict();
-            this.provinceName = policyHolder.getProvinceName();
-            this.cityName = policyHolder.getCityName();
-            this.districtName = policyHolder.getDistrictName();
+            this.provinceName = Optional.ofNullable(policyHolder.getProvinceName()).orElse("");
+            this.cityName = Optional.ofNullable(policyHolder.getCityName()).orElse("");
+            this.districtName = Optional.ofNullable(policyHolder.getDistrictName()).orElse("");
             this.addr = policyHolder.getAddr();
             this.completeAddress = policyHolder.getCompleteAddress();
             this.mobile = policyHolder.getMobile();
@@ -651,7 +671,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
             this.microBusinessesInd = policyHolder.getMicroBusinessesInd();
             this.signedbyOrig = "0";
             this.comCode = policyHolder.getComCode();
-
+            this.relationWithCar="1";
+            this.relationWithInsured="7";
+            this.sameType="1";
         }
     }
 
@@ -684,6 +706,9 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         @JsonProperty("longTerm")
         private String longTerm;
 
+        @JsonProperty("sameType")
+        private String sameType;
+
         // start submit 添加的参数
         @JsonProperty("id")
         private String id;
@@ -697,7 +722,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
             this.role = "3";
             this.name = ownersInfo.getName();
             this.identifyTypeCode = ownersInfo.getIdentifyType();
-            this.identifyTypeName = ownersInfo.getIdentifyTypeName();
+            this.identifyTypeName = Optional.ofNullable(ownersInfo.getIdentifyTypeName()).orElse("居民身份证");
             this.identifyNumber = ownersInfo.getIdentifyNumber();
             this.sex = ownersInfo.getGender();
             this.age = ownersInfo.getAge();
@@ -705,6 +730,7 @@ public class ChengTaiPremiumcaRequest implements Serializable {
             this.identifyValidDate = ownersInfo.getIdentifyValidDate();
             this.identifyValidEndDate = ownersInfo.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.sameType = "1";
         }
     }
 
@@ -1075,7 +1101,6 @@ public class ChengTaiPremiumcaRequest implements Serializable {
         }
     }
 
-    @NoArgsConstructor
     @Data
     public static class SubmitReqBodyDTO {
         @JsonProperty("businessType")
@@ -1110,6 +1135,13 @@ public class ChengTaiPremiumcaRequest implements Serializable {
 
         @JsonProperty("smscheckFlag")
         private String smscheckFlag;
+
+        public SubmitReqBodyDTO(){
+            this.businessType= "PROPOSAL";
+            this.acciRelatedFlag= "0";
+            this.mandatoryReviewFlag= false;
+            this.reinsuranceFlag= "0";
+        }
     }
 
     @NoArgsConstructor

+ 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.eyJpYXQiOjE3NjM2ODUwNTEsImV4cCI6MTc2MzY5NTg1MSwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MkhFa2xxRXhxVVZsZnc5RGZEbXlCM1FjYUNUZnllTmNoT01GZ1pKNi1NZHVzSDEwTlIyS09rQ2xNdFlDVTgwTGRPcFpmTVFUVlBkeDE5MHBZbHpFMTlWbjYwSWZiaC1wVUoyWmlucU8yUzVhaW5zNDBoQzNGdFpieGh0UWtoRjlPeDFYWjBpcXRxZjF6TVdKSnlLTEFBb0swZHZ2cXJZQlJnZDFuUzFCWFA3c01qRnNNSU85QjlDREVKY0hZek5WdDM5SlhDUFVhWEw1bThwRmJXV3BxN0dzeHJHTlYtc2E4Tk9PYzEwS3UtUTJDeGxvb1JTMjhVdkRiMEpTZ29fZk1zZlJlMWFwWG5XdjB2YUdyTzVHR2hSdmZtYUtNbHl6VmZjR0FIS050LU5nIn0.irb7BRiVDdaPdu94z4NmrOpe_jcASR6V7dlSABQ4CwIQrFPKyJLUUnF7zNvpRUjWezYvuRIBF-59lJ_aH7pITw");
+        httpHeaders.set("token","eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NjM5Njg1MjEsImV4cCI6MTc2Mzk3OTMyMSwicGF5bG9hZCI6IldkeHJsN3BjSjBYLWtObU9ZTGpxV3N2MVVXcGgwN2x4R01XUVcybGJldXJMalhKQWlua1kxTTNnVklGSkRsNkRGRFdiUXRmcFhNUTlNQjJYbEZoamJtdlBqLUxnLUUzMHA2UU9PNXdrWEFtUUNsLXAxMHVLN0dMMHFVSDA3MTJscl81NmJWeVhsdkptWnhIMG1WNEh4QXA2TmhpVVA3enJNbUpsUjdETEU5MjFsMXdKX2lCLS1zbzRmN1JtMURxTjJZcGhGODluRzd2OFViLXMweTBkYTNuWGtkbDdoU3B2LWM0eGxaU2NfR004Y1JJX2dIajdSMFMyakJnZmlnSFdiZEE1bXhUcUdsSGFhMHRNeFJkODk2aW5zNDBoQzNGdFpieGh0UWtoRjlNclUxT1pmLVV4d0Iydzhpc1Z5NGdUZnZpNFJPQ3F3LU0xQmJGZ1hUVlNwY01qRnNNSU85QjlDREVKY0hZek5WdDM5SlhDUFVhWEw1bThwRmJXV3BxN0dzeHJHTlYtc2E4Tk9PYzEwS3UtUTJDeGxvb1JTMjhVdkRiMEpTZ29fZk1RcmF6OEVBUmlaT096aFgxZEl6dzZSdmZtYUtNbHl6VmZjR0FIS050LU5nIn0.t7ul6qKBTRHDgVuyof4zMr3nu0VzPkhukkoNIbBZX-6svpWGFPf8pSyHmiyph2fFyTLLLN4vItLhE6w_Ed9cUQ");
         return httpHeaders;
     }
 

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

@@ -65,18 +65,18 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         // 步骤二 构建归属信息
         ChengTaiSaleInfoBo saleInfoBo = chengTaiCrawlerQuoteProcessService.buildClientIdentify(parameters, httpHeaders);
         // 步骤三 车型查询
-        ChengTaiQueryCarInfoResponse.CarModelListDTO carModelList = chengTaiRequestCrawlerComponent.queryCarInfo(quoteVo.getCarInfoVo(),parameters, httpHeaders);
-        ChengTaiQueryCarInfoResponse.CarModelListDTO.FullCarDataDTO fullCarData = carModelList.getFullCarData();
-        String modelCode = fullCarData.getModelCode();
+//        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 carModel1 = getCarModel(fullCarData);
 
 
-        ChengTaiFindCarModelResponse.DataDTO carModel = chengTaiRequestCrawlerComponent.findCarModel(quoteVo.getCarInfoVo(), modelCode, httpHeaders);
+        ChengTaiFindCarModelResponse.DataDTO carModel = chengTaiRequestCrawlerComponent.findCarModel(quoteVo.getCarInfoVo(), httpHeaders);
 
-        ChengTaiGetCIModelCodeResponse ciModelCode = chengTaiRequestCrawlerComponent.getCIModelCode(modelCode, httpHeaders);
+        ChengTaiGetCIModelCodeResponse ciModelCode = chengTaiRequestCrawlerComponent.getCIModelCode(carModel.getModelcode(), httpHeaders);
         // 步骤四 新车购置价
-        CarDepreciationCalculator.DepreciationResult depreciationResult = chengTaiCrawlerQuoteProcessService.generateClaimableValue(quoteVo.getCarInfoVo(), fullCarData.getPurchasePrice().toString());
+        CarDepreciationCalculator.DepreciationResult depreciationResult = chengTaiCrawlerQuoteProcessService.generateClaimableValue(quoteVo.getCarInfoVo(), carModel.getPurchasePrice());
         // 步骤五 客户识别
         // 投保人
         CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
@@ -88,7 +88,7 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
             insuredPerson = chengTaiRequestCrawlerComponent.clientIdentify(insuredPersonInfo, "2", saleInfoBo.getSaleInfo().getComCode(), httpHeaders);
         }
         // 步骤五 报价
-        ChengTaiPremiumcaRequest request = new ChengTaiPremiumcaRequest(quoteVo, carModel1, policyHolder, insuredPerson, saleInfoBo, ciModelCode, depreciationResult);
+        ChengTaiPremiumcaRequest request = new ChengTaiPremiumcaRequest(quoteVo, carModel, policyHolder, insuredPerson, saleInfoBo, ciModelCode, depreciationResult,USER_NAME);
         Object json = JSONObject.toJSON(request);
         System.out.println(json);
         ChengTaiPremiumcaResponse premiumca = chengTaiRequestCrawlerComponent.premiumca(request, httpHeaders);

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

@@ -467,6 +467,21 @@ public class RequestComponent {
         return formData(url, multiValueMap, responseClass, headers);
     }
 
+
+    public <Response> ResponseEntity<Response> formData(String url, Object body, ParameterizedTypeReference<Response> bodyTypeReference, HttpHeaders headers) {
+        WebClient webClient = selectWebClient(url);
+        MultiValueMap<String, Object> multiValueMap = RequestObjectConversion.convertMultiValueMap(body);
+        return webClient.post()
+                .uri(url)
+                .headers(RequestComponent.setHeaders(headers))
+                .contentType(MediaType.APPLICATION_FORM_URLENCODED)
+                .body(BodyInserters.fromMultipartData(multiValueMap))
+                .retrieve()
+                .toEntity(bodyTypeReference).doOnNext(responseBody -> System.out.println("响应内容: " + responseBody.getBody()))
+                .block();
+
+    }
+
     /**
      * 下载文件处理
      *