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

Merge branch 'jin_dev'

# Conflicts:
#	tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/component/BoHaiCrawlerRequestComponent.java
#	tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
#	tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
#	tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/quote/QuoteDispatchDecorator.java
jinshihui 5 месяцев назад
Родитель
Сommit
dd89767389
39 измененных файлов с 4078 добавлено и 881 удалено
  1. 0 1
      commons/src/main/java/com/jzg/commons/core/base/StateResult.java
  2. 0 5
      commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlAgreementAttribution.java
  3. 0 5
      commons/src/main/java/com/jzg/commons/entity/po/EsmInsCompany.java
  4. 18 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java
  5. 35 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/CustomerInfoVo.java
  6. 21 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/KindInfoVo.java
  7. 2 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/VehicleAndVesselTaxVo.java
  8. 4 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java
  9. 5 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/constant/enums/ResponseCode.java
  10. 35 30
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/build/BoHaiCrawlerQuoteResultsVoBuild.java
  11. 5 5
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/BoHaiCrawlerConfigureParameters.java
  12. 3 2
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/po/BoHaiCrawlerOrder.java
  13. 15 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerBaseRequest.java
  14. 21 115
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerCarRequest.java
  15. 0 6
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadRequestDto.java
  16. 26 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadSubmitRequest.java
  17. 47 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerPaymentCertiNoQueryRequest.java
  18. 408 26
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerQuotationRequest2.java
  19. 297 53
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerUnderwritingRequest2.java
  20. 39 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerCarApiResponse.java
  21. 5 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerCarResponse.java
  22. 1088 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerQuotationResponse2.java
  23. 8 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerVehicleConfirmationResponse2.java
  24. 8 3
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/BoHaiCrawlerOrderService.java
  25. 37 19
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerOrderServiceImpl.java
  26. 97 3
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerQuoteProcessServiceImpl.java
  27. 883 358
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java
  28. 1 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/BatchNumberGenerator.java
  29. 43 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DateTimeUtils.java
  30. 24 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/OrderNoGenerator.java
  31. 318 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/PythonExecutor.java
  32. 135 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py
  33. 373 208
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  34. 33 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/config/MongoConfig.java
  35. 0 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/SummaryQuotationApplication.java
  36. 3 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java
  37. 37 30
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/quote/QuoteDispatchDecorator.java
  38. 3 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/OrderState.java
  39. 1 3
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/listener/OrderStateListener.java

+ 0 - 1
commons/src/main/java/com/jzg/commons/core/base/StateResult.java

@@ -1,5 +1,4 @@
 package com.jzg.commons.core.base;
-
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 

+ 0 - 5
commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlAgreementAttribution.java

@@ -1,6 +1,4 @@
 package com.jzg.commons.entity.agreement.po;
-
-
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -14,13 +12,10 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
-
-
 /**
  * @author quchen
  * @date 2025/2/18 11:09
  */
-
 @Data
 @Schema(description = "保险公司归属信息账号")
 @NoArgsConstructor

+ 0 - 5
commons/src/main/java/com/jzg/commons/entity/po/EsmInsCompany.java

@@ -1,16 +1,11 @@
 package com.jzg.commons.entity.po;
-
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jzg.commons.core.base.BaseModel;
 import lombok.Data;
-
 import java.util.List;
-
-
 @TableName(value = "esm_ins_company")
 @Data
 public class EsmInsCompany extends BaseModel {

+ 18 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java

@@ -113,6 +113,9 @@ public class CarInfoVo implements Serializable {
     @Schema(description = "车辆用途代码")
     private String vehicleUseCode;
 
+    /**
+     * 车辆用途名称
+     */
     @Schema(description = "车辆用途名称")
     private String vehicleUseName;
 
@@ -129,8 +132,12 @@ public class CarInfoVo implements Serializable {
      */
     private String origModelCde;
 
+    /**
+     * 车辆类型名称
+     */
     @Schema(description = "车辆类型名称")
     private String carTypeName;
+
     /**
      * @see CarKindCode
      * 车辆种类代码
@@ -138,6 +145,9 @@ public class CarInfoVo implements Serializable {
     @Schema(description = "车辆种类代码")
     private String carKindCode;
 
+    /**
+     * 车辆种类名称
+     */
     @Schema(description = "车辆种类名称")
     private String carKindName;
     /**
@@ -201,10 +211,12 @@ public class CarInfoVo implements Serializable {
      */
     @Schema(description = "发证日期")
     private String issueDate;
+
     /**
      * 过户车(如果存在交强险商业险分开的情况是转为交强险过户)
      */
     private boolean transfer;
+
     /**
      * 商业险过户
      */
@@ -225,6 +237,7 @@ public class CarInfoVo implements Serializable {
      */
     @Schema(description = "所属性质")
     private String property;
+
     /**
      * 新能源标志 true 新能源
      */
@@ -247,6 +260,11 @@ public class CarInfoVo implements Serializable {
      */
     private String isAccurate;
 
+    /**
+    * 过户标志
+     */
+    private String chgOwnerFlag;
+
     /**
      * 获取 吨位数/核定载质量
      *
@@ -319,6 +337,5 @@ public class CarInfoVo implements Serializable {
         this.issueDate = carInfo.getIssueDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         this.transfer = carInfo.getTransfer() == 1;
         this.biTransfer = carInfo.getTransferBi() == 1;
-
     }
 }

+ 35 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/CustomerInfoVo.java

@@ -27,6 +27,9 @@ public class CustomerInfoVo implements Serializable {
     @Serial
     private static final long serialVersionUID = -6294245892491122989L;
 
+    /**
+     * 人员类型 1 个人 2 法人
+     */
     @Schema(description = "人员类型 1 个人 2 法人")
     private String personType;
 
@@ -35,36 +38,43 @@ public class CustomerInfoVo implements Serializable {
      */
     @Schema(description = "姓名")
     private String name;
+
     /**
      * 身份证号
      */
     @Schema(description = "身份证号")
     private String identifyNumber;
+
     /**
      * 生日
      */
     @Schema(description = "生日")
     private String birthday;
+
     /**
      * 年龄
      */
     @Schema(description = "年龄")
     private Integer age;
+
     /**
      * 性别
      */
     @Schema(description = "性别")
     private String gender;
+
     /**
      * 身份证有效起期
      */
     @Schema(description = "身份证有效起期")
     private String identifyValidDate;
+
     /**
      * 身份证有效止期
      */
     @Schema(description = "身份证有效止期")
     private String identifyValidEndDate;
+
     /**
      * 证件类型代码
      */
@@ -82,46 +92,68 @@ public class CustomerInfoVo implements Serializable {
      */
     @Schema(description = "组织机构代码")
     private String organizationCode;
+
     /**
      * 地址
      */
     @Schema(description = "地址")
     private String addr;
+
+    /**
+    * 邮政编码
+     */
+    @Schema(description = "邮政编码")
+    private String postCode;
+
+    /**
+     * 邮寄地址
+     */
+    @Schema(description = "邮寄地址")
+    private String postAddress;
+
+
     /**
      * 省 区划编码
      */
     @Schema(description = "省 区划编码")
     private String provinceCode;
+
     /**
      * 省
      */
     @Schema(description = "省")
     private String province;
+
     /**
      * 市 区划编码
      */
     @Schema(description = "市 区划编码")
     private String cityCode;
+
     /**
      * 市
      */
     @Schema(description = "市")
     private String city;
+
     /**
      * 县 区划编码
      */
     @Schema(description = "县 区划编码")
     private String countyCode;
+
     /**
      * 县
      */
     @Schema(description = "县")
     private String county;
+
     /**
      * 邮箱
      */
     @Schema(description = "邮箱")
     private String email;
+
     /**
      * 手机号
      */
@@ -139,16 +171,19 @@ public class CustomerInfoVo implements Serializable {
      */
     @Schema(description = "客户类型")
     private String property;
+
     /**
      * 法人
      */
     @Schema(description = "法人")
     private String legalPerson;
+
     /**
      * 法人身份证号
      */
     @Schema(description = "法人身份证")
     private String leaderIdentifyNumber;
+
     /**
      * 法人身份证止期
      */

+ 21 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/KindInfoVo.java

@@ -33,47 +33,68 @@ public class KindInfoVo implements Serializable {
      */
     @Schema(description = "险种名称")
     private String kindName;
+
     /**
      * 平台险种编码
      */
     @Schema(description = "平台险种编码")
     private String platformKindCode;
+
     /**
      * 平台险种名称
      */
     @Schema(description = "平台险种名称")
     private String platformKindName;
+
+    /**
+     * 保险起期
+     */
+    private String startDate;
+
+    /**
+     * 保险止期
+     */
+    private String endDate;
+
     /**
      * 保额
      */
     @Schema(description = "保额")
     private String amount;
+
     /**
      * 每座保额
      */
     @Schema(description = "每座保额")
     private String unitAmount;
+
     /**
      * 座位数
      */
     @Schema(description = "座位数")
     private String quantity;
+
     /**
      * 保费
      */
     @Schema(description = "保费")
     private String premium;
+
     /**
      * 附加绝对免赔率
      */
     @Schema(description = "附加绝对免赔率")
     private String deductibleRate;
+
     /**
      * 服务次数
      */
     @Schema(description = "服务次数")
     private String serviceTimes;
 
+    public KindInfoVo(String number, String number1, String number2, String number3, String number4, String number5, String number6, String number7, String number8, String number9,String number10) {
+    }
+
     public KindInfoVo(String number, String number1, String number2, String number3, String number4, String number5, String number6, String number7, String number8, String number9) {
     }
 }

+ 2 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/VehicleAndVesselTaxVo.java

@@ -74,11 +74,13 @@ public class VehicleAndVesselTaxVo implements Serializable {
      */
     @Schema(description = "纳税人证件号码 正常缴税时必传")
     private String identifyNumber;
+
     /**
      * 车船税标志 1-正常交税; 2-免税; 3-减税; 4-完税
      */
     @Schema(description = "车船税标志 1-正常交税; 2-免税; 3-减税; 4-完税")
     private String taxRelifFlag;
+
     /**
      * 组织机构代码
      */

+ 4 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java

@@ -29,14 +29,17 @@ public class InsuranceImageVo {
      * 影像类型
      */
     private String imageCode;
+
     /**
      * 影像类型名称
      */
     private String imageType;
+
     /**
      * 保司影像类型
      */
     private String insuranceImageCode;
+
     /**
      * 保司影像名称
      */
@@ -80,7 +83,7 @@ public class InsuranceImageVo {
 
 
         /**
-         * 影像大小
+         * 影像字节数组
          */
         private byte[] imageByte;
 

+ 5 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/constant/enums/ResponseCode.java

@@ -14,7 +14,11 @@ public enum ResponseCode {
 
     R_Z00001("Z00001", "处理成功"),
     R_Z00002("Z00002", "再次调用此接口确认"),
-    R_Z00004("Z00004", "处理失败");
+    R_Z00004("Z00004", "处理失败"),
+
+    Quotation_Failed("-1", "报价失败"),
+
+    Quotation_Success("0", "报价成功");
 
     private final String code;
 

+ 35 - 30
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/build/BoHaiCrawlerQuoteResultsVoBuild.java

@@ -7,6 +7,7 @@ import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.commons.entity.quote.vo.aggregated.QuoteResultsVo;
 import com.jzg.quotation.bohai.api.entity.response.QuotationResponse;
 import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse;
+import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse2;
 
 import java.util.List;
 import java.util.Map;
@@ -20,21 +21,25 @@ import java.util.stream.Collectors;
  **/
 public class BoHaiCrawlerQuoteResultsVoBuild {
 
-    public static QuoteResultsVo buildQuoteResultsVo(String ordersNo, QuoteVo quoteVo, BoHaiCrawlerQuotationResponse boHaiCrawlerQuotationResponse) {
+    /**
+     * 构建报价结果
+     * @param ordersNo
+     * @param quoteVo
+     * @param boHaiCrawlerQuotationResponse
+     * @return QuoteResultsVo
+     */
+    public static QuoteResultsVo buildQuoteResultsVo(String ordersNo, QuoteVo quoteVo, BoHaiCrawlerQuotationResponse2 boHaiCrawlerQuotationResponse) {
         QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
         quoteResultsVo.setOrdersNo(ordersNo);
 
         // 设置交强险信息
-        if (boHaiCrawlerQuotationResponse.getData().getTrafficPolicy() != null) {
+        if (boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(0)!=null) {
             quoteResultsVo.setCiRiskInfoVo(buildCiRiskInfoVo(boHaiCrawlerQuotationResponse));
         }
 
         // 设置商业险信息
-        if (boHaiCrawlerQuotationResponse.getData().getBusinessPolicy() != null) {
+        if (boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(1)!=null) {
             quoteResultsVo.setBiRiskInfoVo(buildBiRiskInfoVo(boHaiCrawlerQuotationResponse));
-            // 商业险险种信息
-            List<KindInfoVo> kindInfoVo = buildKindInfoVo(quoteVo.getKindInfoVo(), boHaiCrawlerQuotationResponse.getData().getBusinessPolicy().getCoverages());
-            quoteResultsVo.setKindInfoVo(kindInfoVo);
         }
 
         // 交强保费 车船税 商业保费
@@ -49,25 +54,23 @@ public class BoHaiCrawlerQuoteResultsVoBuild {
      * @param quotationResponse
      * @return RiskInfoVo
      */
-    public static RiskInfoVo buildCiRiskInfoVo(BoHaiCrawlerQuotationResponse quotationResponse) {
-        BoHaiCrawlerQuotationResponse.DataDTO.TrafficPolicyDTO trafficPolicy = quotationResponse.getData().getTrafficPolicy();
+    public static RiskInfoVo buildCiRiskInfoVo(BoHaiCrawlerQuotationResponse2 quotationResponse) {
         RiskInfoVo riskInfoVo = new RiskInfoVo();
-        riskInfoVo.setStartDate(trafficPolicy.getStartDate());
-        riskInfoVo.setEndDate(trafficPolicy.getEndDate());
+        riskInfoVo.setStartDate("");
+        riskInfoVo.setEndDate("");
         return riskInfoVo;
     }
 
     /**
      * 处理商业险数据
      * @param quotationResponse
-     * @return
+     * @return RiskInfoVo
      */
-    public static RiskInfoVo buildBiRiskInfoVo(BoHaiCrawlerQuotationResponse quotationResponse) {
+    public static RiskInfoVo buildBiRiskInfoVo(BoHaiCrawlerQuotationResponse2 quotationResponse) {
         // 获取商业险数据
-        BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO businessPolicy = quotationResponse.getData().getBusinessPolicy();
         RiskInfoVo riskInfoVo = new RiskInfoVo();
-        riskInfoVo.setStartDate(businessPolicy.getStartDate());
-        riskInfoVo.setEndDate(businessPolicy.getEndDate());
+        riskInfoVo.setStartDate("");
+        riskInfoVo.setEndDate("");
         return riskInfoVo;
     }
 
@@ -75,10 +78,10 @@ public class BoHaiCrawlerQuoteResultsVoBuild {
      * 处理商业险信息
      * @param kindInfoVo
      * @param coverageListDTOS
-     * @return
+     * @return List<KindInfoVo>
      */
     private static List<KindInfoVo> buildKindInfoVo(List<KindInfoVo> kindInfoVo, List<BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO.CoveragesDTO> coverageListDTOS) {
-        Map<String, BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO.CoveragesDTO> collect = coverageListDTOS.stream()
+        /*Map<String, BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO.CoveragesDTO> collect = coverageListDTOS.stream()
                 .collect(Collectors.toMap(BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO.CoveragesDTO::getCoverageCode, x -> x));
         kindInfoVo.forEach(kind -> {
             BoHaiCrawlerQuotationResponse.DataDTO.BusinessPolicyDTO.CoveragesDTO coverageListDTO = collect.get(kind.getKindCode());
@@ -86,31 +89,33 @@ public class BoHaiCrawlerQuoteResultsVoBuild {
                 kind.setAmount(String.valueOf(coverageListDTO.getSumInsurd()));//设置保额
                 kind.setPremium(String.valueOf(coverageListDTO.getPremium()));//设置保费
             }
-        });
+        });*/
+
         return kindInfoVo;
     }
 
     /**
-     * 设置商业险,交强险保费
+     * 构建保费
+     *
      * @param quoteResultsVo
      * @param quotationResponse
      */
-    private static void buildPremium(QuoteResultsVo quoteResultsVo, BoHaiCrawlerQuotationResponse quotationResponse) {
-        // 设置商业险保费
-        if (Objects.nonNull(quotationResponse.getData().getBusinessPolicy())){
-            quoteResultsVo.getCosts().setBiPremium(String.valueOf(quotationResponse.getData().getBusinessPolicy().getPremium()));
-        }
+    private static void buildPremium(QuoteResultsVo quoteResultsVo, BoHaiCrawlerQuotationResponse2 quotationResponse) {
         // 设置交强险保费
-        if (Objects.nonNull(quotationResponse.getData().getTrafficPolicy())) {
-            quoteResultsVo.getCosts().setCiPremium(String.valueOf(quotationResponse.getData().getTrafficPolicy().getPremium()));
+        if (Objects.nonNull(quotationResponse.getBusinessData().getFeeControlInfoList().get(0))) {
+            quoteResultsVo.getCosts().setCiPremium(quotationResponse.getBusinessData().getFeeControlInfoList().get(0).getSumPremium());
+        }
+        // 设置商业险保费
+        if (Objects.nonNull(quotationResponse.getBusinessData().getFeeControlInfoList().get(1))) {
+            quoteResultsVo.getCosts().setBiPremium(quotationResponse.getBusinessData().getFeeControlInfoList().get(1).getSumPremium());
         }
         // 设置车船税
-        quoteResultsVo.getCosts().setVvTax(String.valueOf(quotationResponse.getData().getTrafficPolicy().getVehicleTax().getTotalAmount()));
+        quoteResultsVo.getCosts().setVvTax(quotationResponse.getBusinessData().getRiskList().get(0).getCarShipTaxInfo().getSumPayTax());
         // 设置非车险(驾意险)保费
-        BoHaiCrawlerQuotationResponse.DataDTO.UnAutoPremiumDTO unAutoPremium = quotationResponse.getData().getUnAutoPremium();
+        /*BoHaiCrawlerQuotationResponse.DataDTO.UnAutoPremiumDTO unAutoPremium = quotationResponse.getData().getUnAutoPremium();
         if (unAutoPremium != null) {
             quoteResultsVo.getCosts().setNiPremium(unAutoPremium.getPremium());
-        }
+        }*/
     }
 
     /**
@@ -118,7 +123,7 @@ public class BoHaiCrawlerQuoteResultsVoBuild {
      * @param boHaiQuoteResponse
      * @return QuoteResultsVo
      */
-    public static QuoteResultsVo buildQuoteFailResultsVo(BoHaiCrawlerQuotationResponse boHaiQuoteResponse) {
+    public static QuoteResultsVo buildQuoteFailResultsVo(BoHaiCrawlerQuotationResponse2 boHaiQuoteResponse) {
         QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
         // 交易流水号
         quoteResultsVo.setCompanyOrderNo("");

+ 5 - 5
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/BoHaiCrawlerConfigureParameters.java

@@ -34,14 +34,14 @@ public class BoHaiCrawlerConfigureParameters implements ConfigureParameters {
     private String channelPackages;
 
     /**
-     * 用户编
+     * 用户编
      */
     private String userCode;
 
     /**
-     * 用户名
+     * 业务员
      */
-    private String userName;
+    private String salesMan;
 
     /**
      * 机构编码
@@ -49,8 +49,8 @@ public class BoHaiCrawlerConfigureParameters implements ConfigureParameters {
     private String orgCode;
 
     /**
-     * 机构名称
+     * 归属部门
      */
-    private String orgName;
+    private String department;
 
 }

+ 3 - 2
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/po/BoHaiCrawlerOrder.java

@@ -8,6 +8,7 @@ import org.springframework.data.annotation.Id;
 import org.springframework.data.mongodb.core.mapping.Document;
 
 import java.time.LocalDateTime;
+import java.time.ZonedDateTime;
 
 /**
  * @description: 渤海财险爬虫订单实体
@@ -100,12 +101,12 @@ public class BoHaiCrawlerOrder {
      * 创建时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime createTime;
+    private LocalDateTime  createTime;
 
     /**
      * 更新时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime updateTime;
+    private LocalDateTime   updateTime;
 
 }

+ 15 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerBaseRequest.java

@@ -38,7 +38,9 @@ public class BoHaiCrawlerBaseRequest implements Serializable {
         baseParam.requestNo = UUID.randomUUID().toString().replace("-", "");
         baseParam.requestTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"));
         baseParam.orgCode = parameters.getOrgCode();
-        baseParam.orgName = parameters.getOrgName();
+        baseParam.orgName = parameters.getDepartment();
+        baseParam.userCode = parameters.getUserCode();
+        baseParam.userName = parameters.getSalesMan();
     }
 
     public void setBaseParamRequestType(String requestType) {
@@ -95,6 +97,18 @@ public class BoHaiCrawlerBaseRequest implements Serializable {
          */
         @JsonProperty("comName")
         private String orgName;
+
+        /**
+         * 操作人工号
+         */
+        @JsonProperty("userCode")
+        private String userCode;
+
+        /**
+         *操作人姓名
+         */
+        @JsonProperty("userName")
+        private String userName;
     }
 
 }

+ 21 - 115
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerCarRequest.java

@@ -1,7 +1,9 @@
 package com.jzg.quotation.bohai.crawler.entity.request;
 
+import com.alibaba.fastjson2.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
@@ -12,6 +14,7 @@ import java.io.Serializable;
  * @author system
  * @date 2025/09/28
  */
+@Data
 public class BoHaiCrawlerCarRequest implements Serializable {
 
     @Serial
@@ -21,16 +24,16 @@ public class BoHaiCrawlerCarRequest implements Serializable {
      * 请求头信息
      */
     @JsonProperty("head")
+    @JSONField(ordinal = 1)
     private Head head;
 
     /**
      * 请求数据
      */
     @JsonProperty("data")
+    @JSONField(ordinal = 2)
     private Data data;
 
-    public BoHaiCrawlerCarRequest() {
-    }
 
     /**
      * 构造函数
@@ -55,200 +58,103 @@ public class BoHaiCrawlerCarRequest implements Serializable {
         this.data.setPlateNoType(carInfoVo != null && carInfoVo.getLicenseKindCode() != null ? carInfoVo.getLicenseKindCode() : "02");
         this.data.setPlateNoColor("01");
         this.data.setVehicleModels(carInfoVo != null ? carInfoVo.getBrandName() : "");
-        this.data.setOperatorCode(userCode != null ? userCode : "");
-    }
-
-    public Head getHead() {
-        return head;
-    }
-
-    public void setHead(Head head) {
-        this.head = head;
-    }
-
-    public Data getData() {
-        return data;
+        this.data.setOperatorCode("114050281");
     }
 
-    public void setData(Data data) {
-        this.data = data;
-    }
 
     /**
      * 请求头信息
      */
+    @lombok.Data
     public static class Head {
         /**
          * 渠道代码
          */
         @JsonProperty("channelCode")
+        @JSONField(ordinal = 1)
         private String channelCode;
 
         /**
          * 公司代码
          */
         @JsonProperty("comCode")
+        @JSONField(ordinal = 2)
         private String comCode;
 
         /**
          * 交易日期
          */
         @JsonProperty("transDate")
+        @JSONField(ordinal = 3)
         private String transDate;
-
-        public String getChannelCode() {
-            return channelCode;
-        }
-
-        public void setChannelCode(String channelCode) {
-            this.channelCode = channelCode;
-        }
-
-        public String getComCode() {
-            return comCode;
-        }
-
-        public void setComCode(String comCode) {
-            this.comCode = comCode;
-        }
-
-        public String getTransDate() {
-            return transDate;
-        }
-
-        public void setTransDate(String transDate) {
-            this.transDate = transDate;
-        }
     }
 
     /**
      * 请求数据
      */
+    @lombok.Data
     public static class Data {
         /**
          * 公司代码
          */
         @JsonProperty("comCode")
+        @JSONField(ordinal = 1)
         private String comCode;
 
         /**
          * 资源类型代码
          */
         @JsonProperty("resourceTypeCode")
+        @JSONField(ordinal = 2)
         private String resourceTypeCode;
 
         /**
          * 车架号
          */
         @JsonProperty("vin")
+        @JSONField(ordinal = 3)
         private String vin;
 
         /**
          * 车牌号
          */
         @JsonProperty("plateNumber")
+        @JSONField(ordinal = 4)
         private String plateNumber;
 
         /**
          * 新车标志 0-否 1-是
          */
         @JsonProperty("newCarFlag")
+        @JSONField(ordinal = 5)
         private String newCarFlag;
 
         /**
          * 号牌种类
          */
         @JsonProperty("plateNoType")
+        @JSONField(ordinal = 6)
         private String plateNoType;
 
         /**
-         * 号牌颜色
+         * 号牌颜色(01:蓝色)
          */
         @JsonProperty("plateNoColor")
+        @JSONField(ordinal = 7)
         private String plateNoColor;
 
         /**
          * 车辆型号
          */
         @JsonProperty("vehicleModels")
+        @JSONField(ordinal = 8)
         private String vehicleModels;
 
         /**
          * 操作员代码
          */
         @JsonProperty("operatorCode")
+        @JSONField(ordinal = 9)
         private String operatorCode;
-
-        public String getComCode() {
-            return comCode;
-        }
-
-        public void setComCode(String comCode) {
-            this.comCode = comCode;
-        }
-
-        public String getResourceTypeCode() {
-            return resourceTypeCode;
-        }
-
-        public void setResourceTypeCode(String resourceTypeCode) {
-            this.resourceTypeCode = resourceTypeCode;
-        }
-
-        public String getVin() {
-            return vin;
-        }
-
-        public void setVin(String vin) {
-            this.vin = vin;
-        }
-
-        public String getPlateNumber() {
-            return plateNumber;
-        }
-
-        public void setPlateNumber(String plateNumber) {
-            this.plateNumber = plateNumber;
-        }
-
-        public String getNewCarFlag() {
-            return newCarFlag;
-        }
-
-        public void setNewCarFlag(String newCarFlag) {
-            this.newCarFlag = newCarFlag;
-        }
-
-        public String getPlateNoType() {
-            return plateNoType;
-        }
-
-        public void setPlateNoType(String plateNoType) {
-            this.plateNoType = plateNoType;
-        }
-
-        public String getPlateNoColor() {
-            return plateNoColor;
-        }
-
-        public void setPlateNoColor(String plateNoColor) {
-            this.plateNoColor = plateNoColor;
-        }
-
-        public String getVehicleModels() {
-            return vehicleModels;
-        }
-
-        public void setVehicleModels(String vehicleModels) {
-            this.vehicleModels = vehicleModels;
-        }
-
-        public String getOperatorCode() {
-            return operatorCode;
-        }
-
-        public void setOperatorCode(String operatorCode) {
-            this.operatorCode = operatorCode;
-        }
     }
 }

+ 0 - 6
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadRequestDto.java

@@ -20,12 +20,6 @@ import java.util.List;
 @AllArgsConstructor
 @NoArgsConstructor
 public class BoHaiCrawlerImageUploadRequestDto extends BoHaiCrawlerBaseRequest {
-
-    /**
-     * 订单号
-     */
-    private String orderNo;
-
     /**
      * 影像文件
      */

+ 26 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadSubmitRequest.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.bohai.crawler.entity.request;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -31,54 +32,63 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
     /**
      * 用户代码
      */
+    @JSONField(ordinal = 1)
     @JsonProperty("userCode")
     private String userCode;
 
     /**
      * 用户名称
      */
+    @JSONField(ordinal = 2)
     @JsonProperty("userName")
     private String userName;
 
     /**
      * 机构代码
      */
+    @JSONField(ordinal = 3)
     @JsonProperty("orgCode")
     private String orgCode;
 
     /**
      * 机构名称
      */
+    @JSONField(ordinal = 4)
     @JsonProperty("orgName")
     private String orgName;
 
     /**
      * 业务代码/系统代码
      */
+    @JSONField(ordinal = 5)
     @JsonProperty("code")
     private String code;
 
     /**
      * 角色代码:车险承保
      */
+    @JSONField(ordinal = 6)
     @JsonProperty("roleCode")
     private String roleCode;
 
     /**
      * 批次号/批量上传编号
      */
+    @JSONField(ordinal = 7)
     @JsonProperty("batchNum")
     private String batchNum;
 
     /**
      * 批次列表
      */
+    @JSONField(ordinal = 8)
     @JsonProperty("bathList")
     private List<BatchInfo> bathList;
 
     /**
      * 角色代码JS
      */
+    @JSONField(ordinal = 9)
     @JsonProperty("roleCodeJS")
     private String roleCodeJS;
 
@@ -91,18 +101,21 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
          * 令牌
          */
         @JsonProperty("token")
+        @JSONField(ordinal = 1)
         private String token;
 
         /**
          * 交易类型
          */
         @JsonProperty("transType")
+        @JSONField(ordinal = 2)
         private String transType;
 
         /**
          * 交易代码
          */
         @JsonProperty("transCode")
+        @JSONField(ordinal = 3)
         private String transCode;
     }
 
@@ -114,48 +127,56 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
         /**
          * 分类代码 车险承保-投保
          */
+        @JSONField(ordinal = 1)
         @JsonProperty("appCode")
         private String appCode;
 
         /**
          * 应用名称
          */
+        @JSONField(ordinal = 2)
         @JsonProperty("appName")
         private String appName;
 
         /**
          * 订单号
          */
+        @JSONField(ordinal = 3)
         @JsonProperty("busiNo")
         private String busiNo;
 
         /**
          * 页面/文件列表
          */
+        @JSONField(ordinal = 4)
         @JsonProperty("pagelist")
         private List<PageInfo> pagelist;
 
         /**
          * 公司代码
          */
+        @JSONField(ordinal = 5)
         @JsonProperty("comCode")
         private String comCode;
 
         /**
          * 公司名称
          */
+        @JSONField(ordinal = 6)
         @JsonProperty("comName")
         private String comName;
 
         /**
          * 用户代码
          */
+        @JSONField(ordinal = 7)
         @JsonProperty("userCode")
         private String userCode;
 
         /**
          * 用户名称
          */
+        @JSONField(ordinal = 8)
         @JsonProperty("userName")
         private String userName;
     }
@@ -168,12 +189,14 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
         /**
          * 一级分类ID:车险投保
          */
+        @JSONField(ordinal = 1)
         @JsonProperty("id")
         private String id;
 
         /**
          * 子分类列表
          */
+        @JSONField(ordinal = 2)
         @JsonProperty("children")
         private List<ChildInfo> children;
     }
@@ -186,12 +209,14 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
         /**
          * 二级分类ID:具体证件类型
          */
+        @JSONField(ordinal = 1)
         @JsonProperty("id")
         private String id;
 
         /**
          * 页面/图片列表
          */
+        @JSONField(ordinal = 2)
         @JsonProperty("pages")
         private List<PageDetail> pages;
     }
@@ -204,6 +229,7 @@ public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
         /**
          * 文件名称
          */
+        @JSONField(ordinal = 1)
         @JsonProperty("fileName")
         private String fileName;
     }

+ 47 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerPaymentCertiNoQueryRequest.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.bohai.crawler.entity.request;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -20,258 +21,301 @@ public class BoHaiCrawlerPaymentCertiNoQueryRequest implements Serializable {
     /**
      * 请求头信息
      */
+    @JSONField(ordinal = 1)
     @JsonProperty("head")
     private Head head;
 
     /**
      * 凭证类型:T=临时凭证,P=正式凭证
      */
+    @JSONField(ordinal = 2)
     @JsonProperty("certiType")
     private String certiType;
 
     /**
      * 登录机构
      */
+    @JSONField(ordinal = 3)
     @JsonProperty("loginCom")
     private String loginCom;
 
     /**
      * 每页行数
      */
+    @JSONField(ordinal = 4)
     @JsonProperty("rows")
     private Integer rows;
 
     /**
      * 页码
      */
+    @JSONField(ordinal = 5)
     @JsonProperty("pageNo")
     private Integer pageNo;
 
     /**
      * 业务类型:O=订单,P=保单,Q=报价单
      */
+    @JSONField(ordinal = 6)
     @JsonProperty("businessType")
     private String businessType;
 
     /**
      * 用户代码
      */
+    @JSONField(ordinal = 7)
     @JsonProperty("userCode")
     private String userCode;
 
     /**
      * 车牌号
      */
+    @JSONField(ordinal = 8)
     @JsonProperty("licenseNo")
     private String licenseNo;
 
     /**
      * 车牌号比较符号
      */
+    @JSONField(ordinal = 9)
     @JsonProperty("licenseNoSign")
     private String licenseNoSign;
 
     /**
      * VIN码
      */
+    @JSONField(ordinal = 10)
     @JsonProperty("vinNo")
     private String vinNo;
 
     /**
      * VIN码比较符号
      */
+    @JSONField(ordinal = 11)
     @JsonProperty("vinNoSign")
     private String vinNoSign;
 
     /**
      * 车架号
      */
+    @JSONField(ordinal = 12)
     @JsonProperty("frameNo")
     private String frameNo;
 
     /**
      * 车架号比较符号
      */
+    @JSONField(ordinal = 13)
     @JsonProperty("frameNoSign")
     private String frameNoSign;
 
     /**
      * 发动机号
      */
+    @JSONField(ordinal = 14)
     @JsonProperty("engineNo")
     private String engineNo;
 
     /**
      * 发动机号比较符号
      */
+    @JSONField(ordinal = 15)
     @JsonProperty("engineNoSign")
     private String engineNoSign;
 
     /**
      * 订单号
      */
+    @JSONField(ordinal = 16)
     @JsonProperty("orderNo")
     private String orderNo;
 
     /**
      * 订单号比较符号
      */
+    @JSONField(ordinal = 17)
     @JsonProperty("orderNoFlag")
     private String orderNoFlag;
 
     /**
      * 投保单号
      */
+    @JSONField(ordinal = 18)
     @JsonProperty("proposalNo")
     private String proposalNo;
 
     /**
      * 投保单号比较符号
      */
+    @JSONField(ordinal = 19)
     @JsonProperty("proposalNoFlag")
     private String proposalNoFlag;
 
     /**
      * 报价单号
      */
+    @JSONField(ordinal = 20)
     @JsonProperty("quotationNo")
     private String quotationNo;
 
     /**
      * 报价单号比较符号
      */
+    @JSONField(ordinal = 21)
     @JsonProperty("quotationNoFlag")
     private String quotationNoFlag;
 
     /**
      * 保单号
      */
+    @JSONField(ordinal = 22)
     @JsonProperty("policyNo")
     private String policyNo;
 
     /**
      * 保单号比较符号
      */
+    @JSONField(ordinal = 23)
     @JsonProperty("policyNoFlag")
     private String policyNoFlag;
 
     /**
      * 批单号
      */
+    @JSONField(ordinal = 24)
     @JsonProperty("endorseNo")
     private String endorseNo;
 
     /**
      * 批单号比较符号
      */
+    @JSONField(ordinal = 25)
     @JsonProperty("endorseNoFlag")
     private String endorseNoFlag;
 
     /**
      * 被保险人姓名
      */
+    @JSONField(ordinal = 26)
     @JsonProperty("insuredName")
     private String insuredName;
 
     /**
      * 被保险人姓名比较符号
      */
+    @JSONField(ordinal = 27)
     @JsonProperty("insuredNameSign")
     private String insuredNameSign;
 
     /**
      * 投保人姓名
      */
+    @JSONField(ordinal = 28)
     @JsonProperty("appliName")
     private String appliName;
 
     /**
      * 投保人姓名比较符号
      */
+    @JSONField(ordinal = 29)
     @JsonProperty("appliNameSign")
     private String appliNameSign;
 
     /**
      * 投保人身份证号
      */
+    @JSONField(ordinal = 30)
     @JsonProperty("appliIdentifyNumber")
     private String appliIdentifyNumber;
 
     /**
      * 投保人身份证号比较符号
      */
+    @JSONField(ordinal = 31)
     @JsonProperty("appliIdentifyNumberFlag")
     private String appliIdentifyNumberFlag;
 
     /**
      * 被保险人身份证号
      */
+    @JSONField(ordinal = 32)
     @JsonProperty("insuredIdentifyNumber")
     private String insuredIdentifyNumber;
 
     /**
      * 被保险人身份证号比较符号
      */
+    @JSONField(ordinal = 33)
     @JsonProperty("insuredIdentifyNumberFlag")
     private String insuredIdentifyNumberFlag;
 
     /**
      * 保险起期开始
      */
+    @JSONField(ordinal = 34)
     @JsonProperty("startDateBegin")
     private String startDateBegin;
 
     /**
      * 保险起期结束
      */
+    @JSONField(ordinal = 35)
     @JsonProperty("startDateEnd")
     private String startDateEnd;
 
     /**
      * 保险止期开始
      */
+    @JSONField(ordinal = 36)
     @JsonProperty("endDateBegin")
     private String endDateBegin;
 
     /**
      * 保险止期结束
      */
+    @JSONField(ordinal = 37)
     @JsonProperty("endDateEnd")
     private String endDateEnd;
 
     /**
      * 操作日期开始(最近一个月)
      */
+    @JSONField(ordinal = 38)
     @JsonProperty("operateDateBegin")
     private String operateDateBegin;
 
     /**
      * 操作日期结束(今天)
      */
+    @JSONField(ordinal = 39)
     @JsonProperty("operateDateEnd")
     private String operateDateEnd;
 
     /**
      * 核保日期开始
      */
+    @JSONField(ordinal = 40)
     @JsonProperty("underWriteDateStart")
     private String underWriteDateStart;
 
     /**
      * 核保日期结束
      */
+    @JSONField(ordinal = 41)
     @JsonProperty("underWriteDateEnd")
     private String underWriteDateEnd;
 
     /**
      * 资源类型代码:001=车险,002=非车险,004=支付凭证
      */
+    @JSONField(ordinal = 42)
     @JsonProperty("resourceTypeCode")
     private String resourceTypeCode;
 
     /**
      * 是否签发用户代码
      */
+    @JSONField(ordinal = 43)
     @JsonProperty("isIssueUserCode")
     private String isIssueUserCode;
 
@@ -285,18 +329,21 @@ public class BoHaiCrawlerPaymentCertiNoQueryRequest implements Serializable {
         /**
          * 访问令牌
          */
+        @JSONField(ordinal = 1)
         @JsonProperty("token")
         private String token;
 
         /**
          * 交易类型
          */
+        @JSONField(ordinal = 2)
         @JsonProperty("transType")
         private String transType;
 
         /**
          * 交易代码
          */
+        @JSONField(ordinal = 3)
         @JsonProperty("transCode")
         private String transCode;
     }

Разница между файлами не показана из-за своего большого размера
+ 408 - 26
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerQuotationRequest2.java


Разница между файлами не показана из-за своего большого размера
+ 297 - 53
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerUnderwritingRequest2.java


+ 39 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerCarApiResponse.java

@@ -0,0 +1,39 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 渤海财险车辆查询响应实体类
+ */
+@Data
+public class BoHaiCrawlerCarApiResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 响应码
+     */
+    @JsonProperty("code")
+    private Integer code;
+
+    /**
+     * 响应消息
+     */
+    @JsonProperty("msg")
+    private String msg;
+
+    /**
+     * 响应时间戳
+     */
+    @JsonProperty("time")
+    private Long time;
+
+    /**
+     * 响应数据
+     */
+    @JsonProperty("data")
+    private BoHaiCrawlerCarResponse data;
+}

+ 5 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerCarResponse.java

@@ -602,7 +602,7 @@ public class BoHaiCrawlerCarResponse implements Serializable {
         private String resourceTypeCode;
 
         /**
-         * 车牌颜色
+         * 车牌颜色(01:蓝牌)
          */
         @JsonProperty("plateNoColor")
         private String plateNoColor;
@@ -647,6 +647,10 @@ public class BoHaiCrawlerCarResponse implements Serializable {
         private String carBrand;
         private String carYear;
         private String carSeriesCode;
+
+        /**
+         * 整备质量(kg)
+         */
         private String completeKerbMass;
         private String riskType;
         private String factoryCode;

+ 1088 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerQuotationResponse2.java

@@ -0,0 +1,1088 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 渤海财险爬虫报价响应实体类
+ *
+ * @author
+ * @since
+ */
+@Data
+@NoArgsConstructor
+public class BoHaiCrawlerQuotationResponse2 implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    @JSONField(name = "businessData", ordinal = 1, serialzeFeatures = SerializerFeature.WriteMapNullValue)
+    private BusinessData businessData;
+
+    @JSONField(name = "head", ordinal = 2)
+    private Head head;
+
+
+    /**
+     * 响应头
+     */
+    @Data
+    @NoArgsConstructor
+    public static class Head implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "returnCode", ordinal = 1)
+        private String returnCode;
+
+        @JSONField(name = "returnMessage", ordinal = 2)
+        private String returnMessage;
+
+        @JSONField(name = "sessionId", ordinal = 3)
+        private String sessionId;
+
+        @JSONField(name = "token", ordinal = 4)
+        private String token;
+
+        @JSONField(name = "transCode", ordinal = 5)
+        private String transCode;
+
+        @JSONField(name = "transType", ordinal = 6)
+        private String transType;
+    }
+
+    /**
+     * 业务数据
+     */
+    @Data
+    @NoArgsConstructor
+    public static class BusinessData implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "businessMainInfo", ordinal = 1)
+        private BusinessMainInfo businessMainInfo;
+
+        @JSONField(name = "carInfo", ordinal = 2)
+        private CarInfo carInfo;
+
+        @JSONField(name = "errorMessageBI", ordinal = 3)
+        private String errorMessageBI;
+
+        @JSONField(name = "errorMessageCI", ordinal = 4)
+        private String errorMessageCI;
+
+        @JSONField(name = "errorMessageDI", ordinal = 5)
+        private String errorMessageDI;
+
+        @JSONField(name = "feeControlInfoList", ordinal = 6)
+        private List<FeeControlInfo> feeControlInfoList;
+
+        @JSONField(name = "payPlanVoList", ordinal = 7)
+        private List<PayPlanVo> payPlanVoList;
+
+        @JSONField(name = "riskList", ordinal = 8)
+        private List<RiskInfo> riskList;
+    }
+
+    /**
+     * 业务主要信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class BusinessMainInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "TAprermium", ordinal = 1)
+        private String tAprermium;
+
+        @JSONField(name = "bussUnitCode", ordinal = 2)
+        private String bussUnitCode;
+
+        @JSONField(name = "bussUnitCodeCI", ordinal = 3)
+        private String bussUnitCodeCI;
+
+        @JSONField(name = "chdId", ordinal = 4)
+        private String chdId;
+
+        @JSONField(name = "commissionFlag", ordinal = 5)
+        private String commissionFlag;
+
+        @JSONField(name = "driModelScoreReqNo", ordinal = 6)
+        private String driModelScoreReqNo;
+
+        @JSONField(name = "entireFloatDiscount", ordinal = 7)
+        private String entireFloatDiscount;
+
+        @JSONField(name = "entireInitialDiscount", ordinal = 8)
+        private String entireInitialDiscount;
+
+        @JSONField(name = "entireRecommenDiscount", ordinal = 9)
+        private String entireRecommenDiscount;
+
+        @JSONField(name = "expectDiscount", ordinal = 10)
+        private String expectDiscount;
+
+        @JSONField(name = "feeType", ordinal = 11)
+        private String feeType;
+
+        @JSONField(name = "fixPriceNo", ordinal = 12)
+        private String fixPriceNo;
+
+        @JSONField(name = "fixPriceRuleId", ordinal = 13)
+        private String fixPriceRuleId;
+
+        @JSONField(name = "fixPriceStatus", ordinal = 14)
+        private String fixPriceStatus;
+
+        @JSONField(name = "followID", ordinal = 15)
+        private String followID;
+
+        @JSONField(name = "highRiskAssessId", ordinal = 16)
+        private String highRiskAssessId;
+
+        @JSONField(name = "isAffiliTransaction", ordinal = 17)
+        private String isAffiliTransaction;
+
+        @JSONField(name = "lastYearAdjustValue", ordinal = 18)
+        private String lastYearAdjustValue;
+
+        @JSONField(name = "noTaxAmount", ordinal = 19)
+        private String noTaxAmount;
+
+        @JSONField(name = "pcIds", ordinal = 20)
+        private String pcIds;
+
+        @JSONField(name = "praID", ordinal = 21)
+        private String praID;
+
+        @JSONField(name = "priceMode", ordinal = 22)
+        private String priceMode;
+
+        @JSONField(name = "quotationTime", ordinal = 23)
+        private String quotationTime;
+
+        @JSONField(name = "reCustomerType", ordinal = 24)
+        private String reCustomerType;
+
+        @JSONField(name = "reStatus", ordinal = 25)
+        private String reStatus;
+
+        @JSONField(name = "reTaskUserCode", ordinal = 26)
+        private String reTaskUserCode;
+
+        @JSONField(name = "reTaskUserName", ordinal = 27)
+        private String reTaskUserName;
+
+        @JSONField(name = "reneClientType", ordinal = 28)
+        private String reneClientType;
+
+        @JSONField(name = "sumDiscount", ordinal = 29)
+        private String sumDiscount;
+
+        @JSONField(name = "sumPremium", ordinal = 30)
+        private String sumPremium;
+
+        @JSONField(name = "taxAmount", ordinal = 31)
+        private String taxAmount;
+
+        @JSONField(name = "tbMode", ordinal = 32)
+        private String tbMode;
+
+        @JSONField(name = "thirdRecordCode", ordinal = 33)
+        private String thirdRecordCode;
+
+        @JSONField(name = "tipsMsg", ordinal = 34)
+        private String tipsMsg;
+    }
+
+    /**
+     * 车辆信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class CarInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "itemCarInfo", ordinal = 1)
+        private ItemCarInfo itemCarInfo;
+    }
+
+    /**
+     * 车辆详细信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class ItemCarInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "chargingInfoList", ordinal = 1)
+        private List<Object> chargingInfoList;
+
+        @JSONField(name = "checkSCCode", ordinal = 2)
+        private String checkSCCode;
+
+        @JSONField(name = "countryNature", ordinal = 3)
+        private String countryNature;
+
+        @JSONField(name = "damagedFactorGrade", ordinal = 4)
+        private String damagedFactorGrade;
+
+        @JSONField(name = "deviceList", ordinal = 5)
+        private List<Object> deviceList;
+
+        @JSONField(name = "exhaustScale", ordinal = 6)
+        private String exhaustScale;
+
+        @JSONField(name = "lastBusinessChannel", ordinal = 7)
+        private String lastBusinessChannel;
+
+        @JSONField(name = "madeFactory", ordinal = 8)
+        private String madeFactory;
+
+        @JSONField(name = "motorTypeCode", ordinal = 9)
+        private String motorTypeCode;
+
+        @JSONField(name = "newVehicleFlag", ordinal = 10)
+        private String newVehicleFlag;
+
+        @JSONField(name = "noClaimAdjustReasonBI", ordinal = 11)
+        private String noClaimAdjustReasonBI;
+
+        @JSONField(name = "noClaimAdjustReasonCI", ordinal = 12)
+        private String noClaimAdjustReasonCI;
+
+        @JSONField(name = "noticeType", ordinal = 13)
+        private String noticeType;
+
+        @JSONField(name = "proportion", ordinal = 14)
+        private String proportion;
+
+        @JSONField(name = "renewalTime", ordinal = 15)
+        private String renewalTime;
+
+        @JSONField(name = "vehicleBrand", ordinal = 16)
+        private String vehicleBrand;
+    }
+
+    /**
+     * 费用控制信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class FeeControlInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "allRiskLevel", ordinal = 1)
+        private String allRiskLevel;
+
+        @JSONField(name = "amountA10", ordinal = 2)
+        private String amountA10;
+
+        @JSONField(name = "amountA11", ordinal = 3)
+        private String amountA11;
+
+        @JSONField(name = "amountA12", ordinal = 4)
+        private String amountA12;
+
+        @JSONField(name = "amountA13", ordinal = 5)
+        private String amountA13;
+
+        @JSONField(name = "amountA14", ordinal = 6)
+        private String amountA14;
+
+        @JSONField(name = "amountA15", ordinal = 7)
+        private String amountA15;
+
+        @JSONField(name = "amountA4", ordinal = 8)
+        private String amountA4;
+
+        @JSONField(name = "amountA5", ordinal = 9)
+        private String amountA5;
+
+        @JSONField(name = "amountA7", ordinal = 10)
+        private String amountA7;
+
+        @JSONField(name = "amountA8", ordinal = 11)
+        private String amountA8;
+
+        @JSONField(name = "basicAmount", ordinal = 12)
+        private String basicAmount;
+
+        @JSONField(name = "basicDisrate", ordinal = 13)
+        private String basicDisrate;
+
+        @JSONField(name = "basicDisrateOrigin", ordinal = 14)
+        private String basicDisrateOrigin;
+
+        @JSONField(name = "comCodeFlg", ordinal = 15)
+        private String comCodeFlg;
+
+        @JSONField(name = "currency", ordinal = 16)
+        private String currency;
+
+        @JSONField(name = "dimensionCode", ordinal = 17)
+        private String dimensionCode;
+
+        @JSONField(name = "disFee", ordinal = 18)
+        private String disFee;
+
+        @JSONField(name = "disRate", ordinal = 19)
+        private String disRate;
+
+        @JSONField(name = "disRate1", ordinal = 20)
+        private String disRate1;
+
+        @JSONField(name = "disRate2", ordinal = 21)
+        private String disRate2;
+
+        @JSONField(name = "disRateOrigin", ordinal = 22)
+        private String disRateOrigin;
+
+        @JSONField(name = "effRateOrigin", ordinal = 23)
+        private String effRateOrigin;
+
+        @JSONField(name = "efftAmount", ordinal = 24)
+        private String efftAmount;
+
+        @JSONField(name = "efftAmount1", ordinal = 25)
+        private String efftAmount1;
+
+        @JSONField(name = "efftRate", ordinal = 26)
+        private String efftRate;
+
+        @JSONField(name = "efftRate1", ordinal = 27)
+        private String efftRate1;
+
+        @JSONField(name = "flag", ordinal = 28)
+        private String flag;
+
+        @JSONField(name = "ilogNo", ordinal = 29)
+        private String ilogNo;
+
+        @JSONField(name = "inSpaceAmount", ordinal = 30)
+        private String inSpaceAmount;
+
+        @JSONField(name = "inSpaceRate", ordinal = 31)
+        private String inSpaceRate;
+
+        @JSONField(name = "inSpaceRateOrigin", ordinal = 32)
+        private String inSpaceRateOrigin;
+
+        @JSONField(name = "incAmount1", ordinal = 33)
+        private String incAmount1;
+
+        @JSONField(name = "incAount", ordinal = 34)
+        private String incAount;
+
+        @JSONField(name = "incRate", ordinal = 35)
+        private String incRate;
+
+        @JSONField(name = "incRate1", ordinal = 36)
+        private String incRate1;
+
+        @JSONField(name = "incRateOrigin", ordinal = 37)
+        private String incRateOrigin;
+
+        @JSONField(name = "managementAmount", ordinal = 38)
+        private String managementAmount;
+
+        @JSONField(name = "managementDisrate", ordinal = 39)
+        private String managementDisrate;
+
+        @JSONField(name = "managementDisrateOrigin", ordinal = 40)
+        private String managementDisrateOrigin;
+
+        @JSONField(name = "noTaxAmount", ordinal = 41)
+        private String noTaxAmount;
+
+        @JSONField(name = "otherAmount", ordinal = 42)
+        private String otherAmount;
+
+        @JSONField(name = "otherRate", ordinal = 43)
+        private String otherRate;
+
+        @JSONField(name = "otherRateOrigin", ordinal = 44)
+        private String otherRateOrigin;
+
+        @JSONField(name = "outSpaceAmount", ordinal = 45)
+        private String outSpaceAmount;
+
+        @JSONField(name = "outSpaceRate", ordinal = 46)
+        private String outSpaceRate;
+
+        @JSONField(name = "outSpaceRateOrigin", ordinal = 47)
+        private String outSpaceRateOrigin;
+
+        @JSONField(name = "rateA10", ordinal = 48)
+        private String rateA10;
+
+        @JSONField(name = "rateA11", ordinal = 49)
+        private String rateA11;
+
+        @JSONField(name = "rateA12", ordinal = 50)
+        private String rateA12;
+
+        @JSONField(name = "rateA13", ordinal = 51)
+        private String rateA13;
+
+        @JSONField(name = "rateA14", ordinal = 52)
+        private String rateA14;
+
+        @JSONField(name = "rateA15", ordinal = 53)
+        private String rateA15;
+
+        @JSONField(name = "rateA4", ordinal = 54)
+        private String rateA4;
+
+        @JSONField(name = "rateA5", ordinal = 55)
+        private String rateA5;
+
+        @JSONField(name = "rateA7", ordinal = 56)
+        private String rateA7;
+
+        @JSONField(name = "rateA8", ordinal = 57)
+        private String rateA8;
+
+        @JSONField(name = "regulatoryTaxAmount", ordinal = 58)
+        private String regulatoryTaxAmount;
+
+        @JSONField(name = "regulatoryTaxDisrate", ordinal = 59)
+        private String regulatoryTaxDisrate;
+
+        @JSONField(name = "regulatoryTaxDisrateOrigin", ordinal = 60)
+        private String regulatoryTaxDisrateOrigin;
+
+        @JSONField(name = "remark", ordinal = 61)
+        private String remark;
+
+        @JSONField(name = "riskCode", ordinal = 62)
+        private String riskCode;
+
+        @JSONField(name = "saleAmount", ordinal = 63)
+        private String saleAmount;
+
+        @JSONField(name = "saleBaseAmount", ordinal = 64)
+        private String saleBaseAmount;
+
+        @JSONField(name = "saleBaseDisrate", ordinal = 65)
+        private String saleBaseDisrate;
+
+        @JSONField(name = "saleBaseDisrateOrigin", ordinal = 66)
+        private String saleBaseDisrateOrigin;
+
+        @JSONField(name = "saleDisrate", ordinal = 67)
+        private String saleDisrate;
+
+        @JSONField(name = "saleDisrateOrigin", ordinal = 68)
+        private String saleDisrateOrigin;
+
+        @JSONField(name = "salesBusinessPerAmount", ordinal = 69)
+        private String salesBusinessPerAmount;
+
+        @JSONField(name = "salesBusinessPerRate", ordinal = 70)
+        private String salesBusinessPerRate;
+
+        @JSONField(name = "salesManCostAmount", ordinal = 71)
+        private String salesManCostAmount;
+
+        @JSONField(name = "salesManCostRate", ordinal = 72)
+        private String salesManCostRate;
+
+        @JSONField(name = "salesManagementFeeAmount", ordinal = 73)
+        private String salesManagementFeeAmount;
+
+        @JSONField(name = "salesManagementFeeRate", ordinal = 74)
+        private String salesManagementFeeRate;
+
+        @JSONField(name = "salesStatus", ordinal = 75)
+        private String salesStatus;
+
+        @JSONField(name = "spaceAmount", ordinal = 76)
+        private String spaceAmount;
+
+        @JSONField(name = "spaceAmount1", ordinal = 77)
+        private String spaceAmount1;
+
+        @JSONField(name = "spaceRate", ordinal = 78)
+        private String spaceRate;
+
+        @JSONField(name = "spaceRate1", ordinal = 79)
+        private String spaceRate1;
+
+        @JSONField(name = "spaceRateOrigin", ordinal = 80)
+        private String spaceRateOrigin;
+
+        @JSONField(name = "sumPremium", ordinal = 81)
+        private String sumPremium;
+
+        @JSONField(name = "taxRate", ordinal = 82)
+        private String taxRate;
+
+        @JSONField(name = "totalFeeAmount", ordinal = 83)
+        private String totalFeeAmount;
+
+        @JSONField(name = "totalFeeDisrate", ordinal = 84)
+        private String totalFeeDisrate;
+
+        @JSONField(name = "totalFeeDisrateOrigin", ordinal = 85)
+        private String totalFeeDisrateOrigin;
+
+        @JSONField(name = "zsState", ordinal = 86)
+        private String zsState;
+    }
+
+    /**
+     * 支付计划
+     */
+    @Data
+    @NoArgsConstructor
+    public static class PayPlanVo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "currency", ordinal = 1)
+        private String currency;
+
+        @JSONField(name = "noTaxAmount", ordinal = 2)
+        private String noTaxAmount;
+
+        @JSONField(name = "payEndDate", ordinal = 3)
+        private String payEndDate;
+
+        @JSONField(name = "payStartDate", ordinal = 4)
+        private String payStartDate;
+
+        @JSONField(name = "planFee", ordinal = 5)
+        private String planFee;
+
+        @JSONField(name = "riskCode", ordinal = 6)
+        private String riskCode;
+
+        @JSONField(name = "taxRateAmount", ordinal = 7)
+        private String taxRateAmount;
+    }
+
+    /**
+     * 风险信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class RiskInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "carShipTaxInfo", ordinal = 1)
+        private CarShipTaxInfo carShipTaxInfo;
+
+        @JSONField(name = "commission", ordinal = 2)
+        private Commission commission;
+
+        @JSONField(name = "itemKindDetailList", ordinal = 3)
+        private List<Object> itemKindDetailList;
+
+        @JSONField(name = "itemKindList", ordinal = 4)
+        private List<ItemKind> itemKindList;
+
+        @JSONField(name = "platFormMessage", ordinal = 5)
+        private Map<String, Object> platFormMessage;
+
+        @JSONField(name = "riskMainInfo", ordinal = 6)
+        private RiskMainInfo riskMainInfo;
+    }
+
+    /**
+     * 车船税信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class CarShipTaxInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "areacode", ordinal = 1)
+        private String areacode;
+
+        @JSONField(name = "baseTaxation", ordinal = 2)
+        private String baseTaxation;
+
+        @JSONField(name = "calPaybalanceFeeFlag", ordinal = 3)
+        private String calPaybalanceFeeFlag;
+
+        @JSONField(name = "calcTaxFlag", ordinal = 4)
+        private String calcTaxFlag;
+
+        @JSONField(name = "calculateFlag", ordinal = 5)
+        private String calculateFlag;
+
+        @JSONField(name = "calculateMode", ordinal = 6)
+        private String calculateMode;
+
+        @JSONField(name = "calfeeFlag", ordinal = 7)
+        private String calfeeFlag;
+
+        @JSONField(name = "callateFeeFlag", ordinal = 8)
+        private String callateFeeFlag;
+
+        @JSONField(name = "carKindCode", ordinal = 9)
+        private String carKindCode;
+
+        @JSONField(name = "carOwnerCertiCode", ordinal = 10)
+        private String carOwnerCertiCode;
+
+        @JSONField(name = "carOwnerCertiType", ordinal = 11)
+        private String carOwnerCertiType;
+
+        @JSONField(name = "certificateDate", ordinal = 12)
+        private String certificateDate;
+
+        @JSONField(name = "completeKerbmass", ordinal = 13)
+        private String completeKerbmass;
+
+        @JSONField(name = "documentNumber", ordinal = 14)
+        private String documentNumber;
+
+        @JSONField(name = "exemptionReason", ordinal = 15)
+        private String exemptionReason;
+
+        @JSONField(name = "extendChar1", ordinal = 16)
+        private String extendChar1;
+
+        @JSONField(name = "extendChar2", ordinal = 17)
+        private String extendChar2;
+
+        @JSONField(name = "extendDate1", ordinal = 18)
+        private String extendDate1;
+
+        @JSONField(name = "extendDate2", ordinal = 19)
+        private String extendDate2;
+
+        @JSONField(name = "extendNum1", ordinal = 20)
+        private String extendNum1;
+
+        @JSONField(name = "extendNum2", ordinal = 21)
+        private String extendNum2;
+
+        @JSONField(name = "finalFlag", ordinal = 22)
+        private String finalFlag;
+
+        @JSONField(name = "freeRate", ordinal = 23)
+        private String freeRate;
+
+        @JSONField(name = "freeRateText", ordinal = 24)
+        private String freeRateText;
+
+        @JSONField(name = "fuelType", ordinal = 25)
+        private String fuelType;
+
+        @JSONField(name = "hisPolicyEndDate", ordinal = 26)
+        private String hisPolicyEndDate;
+
+        @JSONField(name = "identifyNumber", ordinal = 27)
+        private String identifyNumber;
+
+        @JSONField(name = "lateFee", ordinal = 28)
+        private String lateFee;
+
+        @JSONField(name = "lateFeeEndDate", ordinal = 29)
+        private String lateFeeEndDate;
+
+        @JSONField(name = "lateFeeStartDate", ordinal = 30)
+        private String lateFeeStartDate;
+
+        @JSONField(name = "leviedDate", ordinal = 31)
+        private String leviedDate;
+
+        @JSONField(name = "licenseno", ordinal = 32)
+        private String licenseno;
+
+        @JSONField(name = "licensetype", ordinal = 33)
+        private String licensetype;
+
+        @JSONField(name = "paidFreeCertificate", ordinal = 34)
+        private String paidFreeCertificate;
+
+        @JSONField(name = "payEndDate", ordinal = 35)
+        private String payEndDate;
+
+        @JSONField(name = "payLastYear", ordinal = 36)
+        private String payLastYear;
+
+        @JSONField(name = "payLastYearEnd", ordinal = 37)
+        private String payLastYearEnd;
+
+        @JSONField(name = "payStartDate", ordinal = 38)
+        private String payStartDate;
+
+        @JSONField(name = "payTaxTimes", ordinal = 39)
+        private String payTaxTimes;
+
+        @JSONField(name = "previousPay", ordinal = 40)
+        private String previousPay;
+
+        @JSONField(name = "relifReason", ordinal = 41)
+        private String relifReason;
+
+        @JSONField(name = "riskCode", ordinal = 42)
+        private String riskCode;
+
+        @JSONField(name = "sumPayTax", ordinal = 43)
+        private String sumPayTax;
+
+        @JSONField(name = "taxActual", ordinal = 44)
+        private String taxActual;
+
+        @JSONField(name = "taxAmendDeclare", ordinal = 45)
+        private String taxAmendDeclare;
+
+        @JSONField(name = "taxAmountFlag", ordinal = 46)
+        private String taxAmountFlag;
+
+        @JSONField(name = "taxComCode", ordinal = 47)
+        private String taxComCode;
+
+        @JSONField(name = "taxComName", ordinal = 48)
+        private String taxComName;
+
+        @JSONField(name = "taxDocumentDate", ordinal = 49)
+        private String taxDocumentDate;
+
+        @JSONField(name = "taxDue", ordinal = 50)
+        private String taxDue;
+
+        @JSONField(name = "taxFlag", ordinal = 51)
+        private String taxFlag;
+
+        @JSONField(name = "taxItemCode", ordinal = 52)
+        private String taxItemCode;
+
+        @JSONField(name = "taxItemDetailCode", ordinal = 53)
+        private String taxItemDetailCode;
+
+        @JSONField(name = "taxItemDetailName", ordinal = 54)
+        private String taxItemDetailName;
+
+        @JSONField(name = "taxItemName", ordinal = 55)
+        private String taxItemName;
+
+        @JSONField(name = "taxPaidAreaCode", ordinal = 56)
+        private String taxPaidAreaCode;
+
+        @JSONField(name = "taxPayerCode", ordinal = 57)
+        private String taxPayerCode;
+
+        @JSONField(name = "taxPayerIdentifier", ordinal = 58)
+        private String taxPayerIdentifier;
+
+        @JSONField(name = "taxPayerName", ordinal = 59)
+        private String taxPayerName;
+
+        @JSONField(name = "taxPrintNo", ordinal = 60)
+        private String taxPrintNo;
+
+        @JSONField(name = "taxRelief", ordinal = 61)
+        private String taxRelief;
+
+        @JSONField(name = "taxRelifFlag", ordinal = 62)
+        private String taxRelifFlag;
+
+        @JSONField(name = "taxUnit", ordinal = 63)
+        private String taxUnit;
+
+        @JSONField(name = "taxUnitText", ordinal = 64)
+        private String taxUnitText;
+
+        @JSONField(name = "transactionNo", ordinal = 65)
+        private String transactionNo;
+
+        @JSONField(name = "vehicleStyle", ordinal = 66)
+        private String vehicleStyle;
+    }
+
+    /**
+     * 佣金信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class Commission implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "comCodeFlg", ordinal = 1)
+        private String comCodeFlg;
+
+        @JSONField(name = "currency", ordinal = 2)
+        private String currency;
+
+        @JSONField(name = "dimensionCode", ordinal = 3)
+        private String dimensionCode;
+
+        @JSONField(name = "disAmount", ordinal = 4)
+        private String disAmount;
+
+        @JSONField(name = "disFee", ordinal = 5)
+        private String disFee;
+
+        @JSONField(name = "disRate", ordinal = 6)
+        private String disRate;
+
+        @JSONField(name = "efftAmount", ordinal = 7)
+        private String efftAmount;
+
+        @JSONField(name = "efftRate", ordinal = 8)
+        private String efftRate;
+
+        @JSONField(name = "flag", ordinal = 9)
+        private String flag;
+
+        @JSONField(name = "generateDate", ordinal = 10)
+        private String generateDate;
+
+        @JSONField(name = "inSpaceAmount", ordinal = 11)
+        private String inSpaceAmount;
+
+        @JSONField(name = "inSpaceRate", ordinal = 12)
+        private String inSpaceRate;
+
+        @JSONField(name = "incAount", ordinal = 13)
+        private String incAount;
+
+        @JSONField(name = "incRate", ordinal = 14)
+        private String incRate;
+
+        @JSONField(name = "otherAmount", ordinal = 15)
+        private String otherAmount;
+
+        @JSONField(name = "otherRate", ordinal = 16)
+        private String otherRate;
+
+        @JSONField(name = "outSpaceAmount", ordinal = 17)
+        private String outSpaceAmount;
+
+        @JSONField(name = "outSpaceRate", ordinal = 18)
+        private String outSpaceRate;
+
+        @JSONField(name = "remark", ordinal = 19)
+        private String remark;
+
+        @JSONField(name = "riskCode", ordinal = 20)
+        private String riskCode;
+
+        @JSONField(name = "selfRate", ordinal = 21)
+        private String selfRate;
+
+        @JSONField(name = "spaceAmount", ordinal = 22)
+        private String spaceAmount;
+
+        @JSONField(name = "spaceRate", ordinal = 23)
+        private String spaceRate;
+
+        @JSONField(name = "sumPremium", ordinal = 24)
+        private String sumPremium;
+    }
+
+    /**
+     * 险种信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class ItemKind implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "adjustRate", ordinal = 1)
+        private String adjustRate;
+
+        @JSONField(name = "amount", ordinal = 2)
+        private String amount;
+
+        @JSONField(name = "basePremium", ordinal = 3)
+        private String basePremium;
+
+        @JSONField(name = "baseRiskPremium", ordinal = 4)
+        private String baseRiskPremium;
+
+        @JSONField(name = "benchMarkPremium", ordinal = 5)
+        private String benchMarkPremium;
+
+        @JSONField(name = "deductibleRatio", ordinal = 6)
+        private String deductibleRatio;
+
+        @JSONField(name = "discount", ordinal = 7)
+        private String discount;
+
+        @JSONField(name = "itemKindNo", ordinal = 8)
+        private String itemKindNo;
+
+        @JSONField(name = "kindCode", ordinal = 9)
+        private String kindCode;
+
+        @JSONField(name = "kindName", ordinal = 10)
+        private String kindName;
+
+        @JSONField(name = "noTaxAmount", ordinal = 11)
+        private String noTaxAmount;
+
+        @JSONField(name = "premium", ordinal = 12)
+        private String premium;
+
+        @JSONField(name = "proposedPremium", ordinal = 13)
+        private String proposedPremium;
+
+        @JSONField(name = "rate", ordinal = 14)
+        private String rate;
+
+        @JSONField(name = "riskCode", ordinal = 15)
+        private String riskCode;
+
+        @JSONField(name = "shortRate", ordinal = 16)
+        private String shortRate;
+
+        @JSONField(name = "taxAmount", ordinal = 17)
+        private String taxAmount;
+    }
+
+    /**
+     * 风险主要信息
+     */
+    @Data
+    @NoArgsConstructor
+    public static class RiskMainInfo implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        @JSONField(name = "adjustCoefficient", ordinal = 1)
+        private String adjustCoefficient;
+
+        @JSONField(name = "adjustDiscount", ordinal = 2)
+        private String adjustDiscount;
+
+        @JSONField(name = "calculateType", ordinal = 3)
+        private String calculateType;
+
+        @JSONField(name = "channelCoefficient", ordinal = 4)
+        private String channelCoefficient;
+
+        @JSONField(name = "channelCoefficientVariation", ordinal = 5)
+        private String channelCoefficientVariation;
+
+        @JSONField(name = "ciBiInputDate", ordinal = 6)
+        private String ciBiInputDate;
+
+        @JSONField(name = "ciBiOperateDate", ordinal = 7)
+        private String ciBiOperateDate;
+
+        @JSONField(name = "ciBiSignDate", ordinal = 8)
+        private String ciBiSignDate;
+
+        @JSONField(name = "coefficientFlucValue", ordinal = 9)
+        private String coefficientFlucValue;
+
+        @JSONField(name = "contractNo", ordinal = 10)
+        private String contractNo;
+
+        @JSONField(name = "discount", ordinal = 11)
+        private String discount;
+
+        @JSONField(name = "expectLossRate", ordinal = 12)
+        private String expectLossRate;
+
+        @JSONField(name = "fixPriceStatus", ordinal = 13)
+        private String fixPriceStatus;
+
+        @JSONField(name = "lastYearAdjustValue", ordinal = 14)
+        private String lastYearAdjustValue;
+
+        @JSONField(name = "ncdCoefficient", ordinal = 15)
+        private String ncdCoefficient;
+
+        @JSONField(name = "noTaxAmount", ordinal = 16)
+        private String noTaxAmount;
+
+        @JSONField(name = "pictureVerificationBaseCode", ordinal = 17)
+        private String pictureVerificationBaseCode;
+
+        @JSONField(name = "priceId", ordinal = 18)
+        private String priceId;
+
+        @JSONField(name = "pricingAdjustValue", ordinal = 19)
+        private String pricingAdjustValue;
+
+        @JSONField(name = "querySequenceNo", ordinal = 20)
+        private String querySequenceNo;
+
+        @JSONField(name = "reCusAdjustValue", ordinal = 21)
+        private String reCusAdjustValue;
+
+        @JSONField(name = "reCustomerType", ordinal = 22)
+        private String reCustomerType;
+
+        @JSONField(name = "reInsuranceFlag", ordinal = 23)
+        private String reInsuranceFlag;
+
+        @JSONField(name = "riskCode", ordinal = 24)
+        private String riskCode;
+
+        @JSONField(name = "ruleDescription", ordinal = 25)
+        private String ruleDescription;
+
+        @JSONField(name = "successFlag", ordinal = 26)
+        private String successFlag;
+
+        @JSONField(name = "suggestedPricingAdjustValue", ordinal = 27)
+        private String suggestedPricingAdjustValue;
+
+        @JSONField(name = "sumAmount", ordinal = 28)
+        private String sumAmount;
+
+        @JSONField(name = "sumDiscount", ordinal = 29)
+        private String sumDiscount;
+
+        @JSONField(name = "sumPremium", ordinal = 30)
+        private String sumPremium;
+
+        @JSONField(name = "sumSubPrem", ordinal = 31)
+        private String sumSubPrem;
+
+        @JSONField(name = "taxAmount", ordinal = 32)
+        private String taxAmount;
+
+        @JSONField(name = "totalRiskPremium", ordinal = 33)
+        private String totalRiskPremium;
+
+        @JSONField(name = "tradeID", ordinal = 34)
+        private String tradeID;
+
+        @JSONField(name = "trafficViolationCoefficient", ordinal = 35)
+        private String trafficViolationCoefficient;
+
+        @JSONField(name = "underwritingCoefficient", ordinal = 36)
+        private String underwritingCoefficient;
+
+        @JSONField(name = "underwritingCoefficientVariation", ordinal = 37)
+        private String underwritingCoefficientVariation;
+    }
+}

+ 8 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerVehicleConfirmationResponse2.java

@@ -9,8 +9,12 @@ import java.util.List;
 @Data
 public class BoHaiCrawlerVehicleConfirmationResponse2 {
 
+    /**
+     * 车型信息对象
+     */
     private Object carModelVo;
 
+
     private List<Object> carQueryBackBJList;
 
     private CiInsuredemandVo ciInsuredemandVo;
@@ -261,6 +265,10 @@ public class BoHaiCrawlerVehicleConfirmationResponse2 {
         private String manufactureCompanyCode;
         private String marketDate;
         private String modeCode;
+
+        /**
+        * 车型代码
+         */
         private String modelCode;
         private String modelDesc;
         private String modelEnergyType;

+ 8 - 3
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/BoHaiCrawlerOrderService.java

@@ -1,8 +1,7 @@
 package com.jzg.quotation.bohai.crawler.service;
-
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.bohai.crawler.entity.po.BoHaiCrawlerOrder;
-import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse;
+import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse2;
 
 /**
  * @description: 渤海财险爬虫订单服务
@@ -11,7 +10,13 @@ import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResp
  **/
 public interface BoHaiCrawlerOrderService {
 
-    void save(QuoteVo quoteVo, BoHaiCrawlerQuotationResponse boHaiCrawlerQuotationResponse, boolean success);
+    /**
+     *
+     * @param quoteVo
+     * @param boHaiCrawlerQuotationResponse
+     * @param success
+     */
+    void save(QuoteVo quoteVo, BoHaiCrawlerQuotationResponse2 boHaiCrawlerQuotationResponse, boolean success);
 
     BoHaiCrawlerOrder getById(String ordersNo);
 

+ 37 - 19
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerOrderServiceImpl.java

@@ -1,14 +1,19 @@
 package com.jzg.quotation.bohai.crawler.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.bohai.crawler.entity.po.BoHaiCrawlerOrder;
 import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse;
+import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerQuotationResponse2;
 import com.jzg.quotation.bohai.crawler.repository.BoHaiCrawlerOrderRepository;
 import com.jzg.quotation.bohai.crawler.service.BoHaiCrawlerOrderService;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
 
 /**
  * @description: 渤海财险爬虫订单服务实现
@@ -17,35 +22,48 @@ import java.time.LocalDateTime;
  **/
 @Service
 @RequiredArgsConstructor
+@Slf4j
 public class BoHaiCrawlerOrderServiceImpl implements BoHaiCrawlerOrderService {
 
     private final BoHaiCrawlerOrderRepository boHaiCrawlerOrderRepository;
 
     @Override
-    public void save(QuoteVo quoteVo, BoHaiCrawlerQuotationResponse boHaiCrawlerQuotationResponse, boolean success) {
+    public void save(QuoteVo quoteVo, BoHaiCrawlerQuotationResponse2 boHaiCrawlerQuotationResponse, boolean success) {
         BoHaiCrawlerOrder order = new BoHaiCrawlerOrder();
         order.setOrdersNo(quoteVo.getOrder().getOrdersNo());
-        order.setOrderNo(boHaiCrawlerQuotationResponse.getData().getBusUniqueId());
-        order.setBusUniqueId(boHaiCrawlerQuotationResponse.getData().getBusUniqueId());
+        order.setOrderNo("");
+        order.setBusUniqueId("");
         order.setQuoteSuccess(success);
+        // 报价失败
+        if(!success){
+            // 交强险
+            order.setCiApplyNo("");
+            order.setCiPremium("");
+            // 商业险
+            order.setSyApplyNo("");
+            order.setBiPremium("");
 
-        if (boHaiCrawlerQuotationResponse.getData().getTrafficPolicy() != null) {
-            order.setCiApplyNo(boHaiCrawlerQuotationResponse.getData().getTrafficPolicy().getApplicationNo());
-            order.setCiPremium(boHaiCrawlerQuotationResponse.getData().getTrafficPolicy().getPremium());
-        }
-
-        if (boHaiCrawlerQuotationResponse.getData().getBusinessPolicy() != null) {
-            order.setSyApplyNo(boHaiCrawlerQuotationResponse.getData().getBusinessPolicy().getApplicationNo());
-            order.setBiPremium(boHaiCrawlerQuotationResponse.getData().getBusinessPolicy().getPremium());
-        }
-
-        order.setTotalPremium(boHaiCrawlerQuotationResponse.getData().getPremium());
-        order.setCreateTime(LocalDateTime.now());
-        order.setUpdateTime(LocalDateTime.now());
-
-        if (!success) {
-            order.setErrorMsg(boHaiCrawlerQuotationResponse.getResponseMsg());
+            order.setTotalPremium("");
+            order.setCreateTime(LocalDateTime.now());
+            order.setUpdateTime(LocalDateTime.now());
+            order.setErrorMsg(boHaiCrawlerQuotationResponse.getHead().getReturnMessage());
+        }else{
+            // 交强险
+            if (boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(0) != null) {
+                order.setCiApplyNo("");
+                order.setCiPremium(boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(0).getSumPremium());
+            }
+            // 商业险
+            if (boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(1) != null) {
+                order.setSyApplyNo("");
+                order.setBiPremium(boHaiCrawlerQuotationResponse.getBusinessData().getFeeControlInfoList().get(1).getSumPremium());
+            }
+            order.setTotalPremium(boHaiCrawlerQuotationResponse.getBusinessData().getBusinessMainInfo().getSumPremium());
+            order.setCreateTime(LocalDateTime.now());
+            order.setUpdateTime(LocalDateTime.now());
+            order.setErrorMsg(boHaiCrawlerQuotationResponse.getHead().getReturnMessage());
         }
+        log.info("order对象的值:{}", JSON.toJSONString(order));
         boHaiCrawlerOrderRepository.save(order);
     }
 

+ 97 - 3
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerQuoteProcessServiceImpl.java

@@ -9,11 +9,16 @@ import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerBaseResponse;
 import com.jzg.quotation.bohai.crawler.entity.response.BoHaiCrawlerCheckTokenResponse;
 import com.jzg.quotation.bohai.crawler.service.BoHaiCrawlerQuoteProcessService;
 import com.jzg.quotation.bohai.crawler.util.DESEncryption;
+import com.jzg.quotation.bohai.crawler.util.PythonExecutor;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.redisson.api.RBucket;
+import org.redisson.api.RedissonClient;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
+import java.time.Duration;
 import java.util.Optional;
 
 /**
@@ -21,14 +26,42 @@ import java.util.Optional;
  * @author:
  * @date:
  **/
+@Slf4j
 @Service
 @RequiredArgsConstructor
 public class BoHaiCrawlerQuoteProcessServiceImpl implements BoHaiCrawlerQuoteProcessService {
 
+    /**
+     * Redis中sessionId的缓存key
+     */
+    private static final String BOHAI_SESSION_ID_KEY = "bohai:crawler:sessionId";
+
+    /**
+     * sessionId缓存过期时间(秒)- 设置为2分钟
+     */
+    private static final long SESSION_ID_EXPIRE_SECONDS = 2 * 60;
+
+    /**
+     * Python脚本路径
+     */
+    private static final String PYTHON_SCRIPT_PATH = "e:/project/jzg/tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py";
+
+    /**
+     * Python解释器路径
+     */
+    private static final String PYTHON_EXECUTABLE_PATH = "E:\\project\\memorize_backend\\venv\\Scripts\\python.exe";
+
+    /**
+     * Python脚本执行超时时间(秒)
+     */
+    private static final int PYTHON_EXECUTION_TIMEOUT = 120;
+
     private final BoHaiCrawlerCacheComponent boHaiCrawlerCacheComponent;
 
     private final BoHaiCrawlerRequestComponent boHaiCrawlerRequestComponent;
 
+    private final RedissonClient redissonClient;
+
     // 登陆次数
     public static final int LOGINS_NUMBER = 3;
 
@@ -90,7 +123,10 @@ public class BoHaiCrawlerQuoteProcessServiceImpl implements BoHaiCrawlerQuotePro
         return headers;*/
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.set("Cookie", "HTTPOnly; skin-color=skin-db; Cookie=!uEW94o2278iwLg21yv2qnldjEk8Kb5RsZkOl0FDX8+Mqxb0EGroyfXXQVmrGlnxevDyUYDwsWh2B5iY=; JSESSIONID=0001TTPD95X9DLJB1il0R_O_NhM:3T0NUMVN3E");
-        httpHeaders.set("sessionId","114050281_ys1Joy8Fnl-SL4D515lH1uJ1761182282670");
+
+        // 从Redis获取sessionId
+        String sessionId = getOrRefreshSessionId();
+        httpHeaders.set("sessionId", sessionId);
         return httpHeaders;
     }
 
@@ -107,7 +143,65 @@ public class BoHaiCrawlerQuoteProcessServiceImpl implements BoHaiCrawlerQuotePro
         String tokenId = boHaiCrawlerRequestComponent.createToken(userCode, httpHeaders);
         BoHaiCrawlerCheckTokenRequest boHaiCrawlerCheckTokenRequest = new BoHaiCrawlerCheckTokenRequest(tokenId, userCode);
         // 校验token
-        BoHaiCrawlerCheckTokenResponse daJiaCrawlerCheckTokenResponse = boHaiCrawlerRequestComponent.checkToken(boHaiCrawlerCheckTokenRequest, httpHeaders);
-        return  daJiaCrawlerCheckTokenResponse.getIdToken();
+        BoHaiCrawlerCheckTokenResponse boHaiCrawlerCheckTokenResponse = boHaiCrawlerRequestComponent.checkToken(boHaiCrawlerCheckTokenRequest, httpHeaders);
+        return  boHaiCrawlerCheckTokenResponse.getIdToken();
+    }
+
+    /**
+     * 获取或刷新sessionId
+     * 优先从Redis缓存获取,如果缓存不存在则调用Python脚本获取并缓存
+     *
+     * @return sessionId字符串
+     */
+    private String getOrRefreshSessionId() {
+        // 从Redis获取sessionId
+        RBucket<String> bucket = redissonClient.getBucket(BOHAI_SESSION_ID_KEY);
+        String sessionId = bucket.get();
+
+        // 如果Redis中存在sessionId,直接返回
+        if (StringUtils.hasLength(sessionId)) {
+            log.info("从Redis缓存获取sessionId: {}", sessionId);
+            return sessionId;
+        }
+
+        // Redis中不存在,调用Python脚本获取sessionId
+        log.info("Redis缓存中sessionId不存在,开始调用Python脚本获取");
+        sessionId = PythonExecutor.executeAndGetSessionId(
+                PYTHON_SCRIPT_PATH,
+                PYTHON_EXECUTABLE_PATH,
+                PYTHON_EXECUTION_TIMEOUT
+        );
+
+        // 校验获取结果
+        if (!StringUtils.hasLength(sessionId)) {
+            log.error("调用Python脚本获取sessionId失败");
+            throw new SystemException("获取sessionId失败");
+        }
+
+        // 将sessionId存入Redis并设置过期时间
+        bucket.set(sessionId, Duration.ofSeconds(SESSION_ID_EXPIRE_SECONDS));
+        log.info("sessionId已存入Redis缓存,过期时间: {}秒", SESSION_ID_EXPIRE_SECONDS);
+        return sessionId;
+    }
+
+
+    /**
+     * 获取sessionId
+     * 调用Python脚本获取sessionId
+     *
+     * @return sessionId字符串
+     */
+    private String getSessionId() {
+        String sessionId = PythonExecutor.executeAndGetSessionId(
+                PYTHON_SCRIPT_PATH,
+                PYTHON_EXECUTABLE_PATH,
+                PYTHON_EXECUTION_TIMEOUT
+        );
+        // 校验获取结果
+        if (!StringUtils.hasLength(sessionId)) {
+            log.error("调用Python脚本获取sessionId失败");
+            throw new SystemException("获取sessionId失败");
+        }
+        return sessionId;
     }
 }

Разница между файлами не показана из-за своего большого размера
+ 883 - 358
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java


+ 1 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/BatchNumberGenerator.java

@@ -20,7 +20,7 @@ public final class BatchNumberGenerator {
      * 生成32位批次号
      * 使用UUID去除横线后的32位字符作为批次号
      *
-     * @return 32位批次号字符串
+     * @return String 32位批次号字符串
      */
     public static String generateBatchNumber() {
         String uuid = UUID.randomUUID().toString();

+ 43 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DateTimeUtils.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.bohai.crawler.util;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+
+public class DateTimeUtils {
+
+    private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+    private static final DateTimeFormatter DATE_FORMATTER1 = DateTimeFormatter.ofPattern("yyyyMM");
+
+    /**
+     * 获取当前日期
+     *
+     * @return 当前日期字符串,格式:yyyy-MM-dd
+     */
+    public static String getCurrentDate() {
+        return LocalDate.now().format(DATE_FORMATTER);
+    }
+
+    public static String getCurrentTime() {
+        return Instant.now()
+                .truncatedTo(ChronoUnit.MILLIS)
+                .toString();
+    }
+
+    /**
+     * 获取当前日期
+     *
+     * @return 当前日期字符串,格式:yyyyMM
+     */
+    public static String getCurrentDate1() {
+        return LocalDate.now().format(DATE_FORMATTER1);
+    }
+
+
+    public static void main(String[] args) {
+        //System.out.println(getCurrentTime());
+        System.out.println(getCurrentDate1());
+    }
+}

+ 24 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/OrderNoGenerator.java

@@ -0,0 +1,24 @@
+package com.jzg.quotation.bohai.crawler.util;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.concurrent.ThreadLocalRandom;
+
+public class OrderNoGenerator {
+
+    private static final String PREFIX = "O14070330";
+    private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyyMM");
+
+    /**
+     * 生成订单号
+     * @return String
+     */
+    public static String generate() {
+        String yearMonth = LocalDateTime.now().format(FORMATTER);
+        String randomSuffix = String.format("%04d", ThreadLocalRandom.current().nextInt(0, 10000));
+        return PREFIX + yearMonth + randomSuffix;
+    }
+
+    public static void main(String[] args) {
+        System.out.println(generate());
+    }
+}

+ 318 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/PythonExecutor.java

@@ -0,0 +1,318 @@
+package com.jzg.quotation.bohai.crawler.util;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Python脚本执行工具类
+ * 用于调用Python脚本并解析返回结果中的sessionId
+ *
+ * @author jzg
+ */
+public class PythonExecutor {
+
+    private static final Logger log = LoggerFactory.getLogger(PythonExecutor.class);
+
+    /**
+     * 默认Python解释器路径(可根据实际环境配置)
+     */
+    private static final String DEFAULT_PYTHON_PATH = "python";
+
+    /**
+     * 默认脚本执行超时时间(秒)
+     */
+    private static final int DEFAULT_TIMEOUT_SECONDS = 60;
+
+    /**
+     * 执行Python脚本并获取sessionId
+     *
+     * @param scriptPath Python脚本的绝对路径
+     * @return sessionId字符串,执行失败返回null
+     */
+    public static String executeAndGetSessionId(String scriptPath) {
+        return executeAndGetSessionId(scriptPath, DEFAULT_PYTHON_PATH, DEFAULT_TIMEOUT_SECONDS);
+    }
+
+    /**
+     * 执行Python脚本并获取sessionId
+     *
+     * @param scriptPath   Python脚本的绝对路径
+     * @param pythonPath   Python解释器路径
+     * @param timeoutSeconds 超时时间(秒)
+     * @return sessionId字符串,执行失败返回null
+     */
+    public static String executeAndGetSessionId(String scriptPath, String pythonPath, int timeoutSeconds) {
+        String output = executePythonScript(scriptPath, pythonPath, timeoutSeconds);
+        if (output == null || output.isEmpty()) {
+            log.error("Python脚本执行结果为空");
+            return null;
+        }
+        return parseSessionId(output);
+    }
+
+    /**
+     * 执行Python脚本并获取token
+     *
+     * @param scriptPath   Python脚本的绝对路径
+     * @param pythonPath   Python解释器路径
+     * @param timeoutSeconds 超时时间(秒)
+     * @return token字符串,执行失败返回null
+     */
+    public static String executeAndGetToken(String scriptPath, String pythonPath, int timeoutSeconds) {
+        String output = executePythonScript(scriptPath, pythonPath, timeoutSeconds);
+        if (output == null || output.isEmpty()) {
+            log.error("Python脚本执行结果为空");
+            return null;
+        }
+        return parseToken(output);
+    }
+
+    /**
+     * 执行Python脚本并返回完整输出
+     *
+     * @param scriptPath     Python脚本的绝对路径
+     * @param pythonPath     Python解释器路径
+     * @param timeoutSeconds 超时时间(秒)
+     * @return 脚本的完整输出内容,执行失败返回null
+     */
+    public static String executePythonScript(String scriptPath, String pythonPath, int timeoutSeconds) {
+        // 参数校验
+        if (scriptPath == null || scriptPath.trim().isEmpty()) {
+            log.error("Python脚本路径不能为空");
+            return null;
+        }
+
+        File scriptFile = new File(scriptPath);
+        if (!scriptFile.exists()) {
+            log.error("Python脚本文件不存在: {}", scriptPath);
+            return null;
+        }
+
+        if (pythonPath == null || pythonPath.trim().isEmpty()) {
+            pythonPath = DEFAULT_PYTHON_PATH;
+        }
+
+        log.info("开始执行Python脚本: {}", scriptPath);
+
+        ProcessBuilder processBuilder = new ProcessBuilder(pythonPath, scriptPath);
+        processBuilder.environment().put("PYTHONIOENCODING", "UTF-8");
+        // 将错误流合并到标准输出流
+        processBuilder.redirectErrorStream(true);
+
+        StringBuilder output = new StringBuilder();
+        Process process = null;
+
+        try {
+            process = processBuilder.start();
+            // 读取输出流
+            try (BufferedReader reader = new BufferedReader(
+                    new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8))) {
+                String line;
+                while ((line = reader.readLine()) != null) {
+                    output.append(line).append("\n");
+                    log.debug("Python输出: {}", line);
+                }
+            }
+            // 等待进程完成
+            boolean finished = process.waitFor(timeoutSeconds, TimeUnit.SECONDS);
+            if (!finished) {
+                log.error("Python脚本执行超时,已强制终止");
+                process.destroyForcibly();
+                return null;
+            }
+            int exitCode = process.exitValue();
+            if (exitCode != 0) {
+                log.error("Python脚本执行失败,退出码: {}", exitCode);
+                return null;
+            }
+            log.info("Python脚本执行完成");
+            return output.toString();
+        } catch (Exception e) {
+            log.error("执行Python脚本时发生异常", e);
+            return null;
+        } finally {
+            if (process != null) {
+                process.destroy();
+            }
+        }
+    }
+
+    /**
+     * 从Python脚本输出中解析sessionId
+     * 输出格式示例:
+     * 核心登录数据:localStorage.setItem("cherry.cherry.user",'{"sessionId": "xxx", ...}')
+     *
+     * @param output Python脚本的输出内容
+     * @return sessionId字符串,解析失败返回null
+     */
+    public static String parseSessionId(String output) {
+        if (output == null || output.isEmpty()) {
+            log.error("输出内容为空,无法解析sessionId");
+            return null;
+        }
+
+        try {
+            // 查找包含sessionId的JSON字符串
+            // 格式:localStorage.setItem("cherry.cherry.user",'JSON内容')
+            int startIndex = output.indexOf("localStorage.setItem");
+            if (startIndex == -1) {
+                log.error("未找到localStorage.setItem,无法解析sessionId");
+                return null;
+            }
+
+            // 找到第一个单引号的位置(JSON内容开始)
+            int jsonStart = output.indexOf("'", startIndex);
+            if (jsonStart == -1) {
+                log.error("未找到JSON内容起始位置");
+                return null;
+            }
+
+            // 找到对应的结束单引号
+            int jsonEnd = output.lastIndexOf("'");
+            if (jsonEnd == -1 || jsonEnd <= jsonStart) {
+                log.error("未找到JSON内容结束位置");
+                return null;
+            }
+
+            // 提取JSON字符串
+            String jsonStr = output.substring(jsonStart + 1, jsonEnd);
+            // 解析JSON并获取sessionId
+            JSONObject jsonObject = JSON.parseObject(jsonStr);
+            String sessionId = jsonObject.getString("sessionId");
+
+            if (sessionId == null || sessionId.isEmpty()) {
+                log.error("JSON中未找到sessionId字段");
+                return null;
+            }
+            return sessionId;
+        } catch (Exception e) {
+            log.error("解析sessionId时发生异常", e);
+            return null;
+        }
+    }
+
+
+    /**
+     * 从Python脚本输出中解析token
+     * 输出格式示例:
+     * 核心登录数据:localStorage.setItem("cherry.cherry.user",'{"token": "xxx", ...}')
+     *
+     * @param output Python脚本的输出内容
+     * @return token字符串,解析失败返回null
+     */
+    public static String parseToken(String output) {
+        if (output == null || output.isEmpty()) {
+            log.error("输出内容为空,无法解析token");
+            return null;
+        }
+
+        try {
+            // 查找包含token的JSON字符串
+            // 格式:localStorage.setItem("cherry.cherry.user",'JSON内容')
+            int startIndex = output.indexOf("localStorage.setItem");
+            if (startIndex == -1) {
+                log.error("未找到localStorage.setItem,无法解析token");
+                return null;
+            }
+
+            // 找到第一个单引号的位置(JSON内容开始)
+            int jsonStart = output.indexOf("'", startIndex);
+            if (jsonStart == -1) {
+                log.error("未找到JSON内容起始位置");
+                return null;
+            }
+
+            // 找到对应的结束单引号
+            int jsonEnd = output.lastIndexOf("'");
+            if (jsonEnd == -1 || jsonEnd <= jsonStart) {
+                log.error("未找到JSON内容结束位置");
+                return null;
+            }
+
+            // 提取JSON字符串
+            String jsonStr = output.substring(jsonStart + 1, jsonEnd);
+            // 解析JSON并获取sessionId
+            JSONObject jsonObject = JSON.parseObject(jsonStr);
+            String token = jsonObject.getString("token");
+            if (token == null || token.isEmpty()) {
+                log.error("JSON中未找到token字段");
+                return null;
+            }
+            return token;
+        } catch (Exception e) {
+            log.error("解析token时发生异常", e);
+            return null;
+        }
+    }
+
+    /**
+     * 从Python脚本输出中解析完整的登录数据JSON对象
+     *
+     * @param output Python脚本的输出内容
+     * @return 登录数据JSON对象,解析失败返回null
+     */
+    public static JSONObject parseFullLoginData(String output) {
+        if (output == null || output.isEmpty()) {
+            log.error("输出内容为空,无法解析登录数据");
+            return null;
+        }
+
+        try {
+            int startIndex = output.indexOf("localStorage.setItem");
+            if (startIndex == -1) {
+                log.error("未找到localStorage.setItem");
+                return null;
+            }
+
+            int jsonStart = output.indexOf("'", startIndex);
+            int jsonEnd = output.lastIndexOf("'");
+
+            if (jsonStart == -1 || jsonEnd == -1 || jsonEnd <= jsonStart) {
+                log.error("JSON内容位置解析失败");
+                return null;
+            }
+
+            String jsonStr = output.substring(jsonStart + 1, jsonEnd);
+            return JSON.parseObject(jsonStr);
+
+        } catch (Exception e) {
+            log.error("解析登录数据时发生异常", e);
+            return null;
+        }
+    }
+
+    public static void main(String[] args) {
+        /*String scriptPath = "e:/project/jzg/tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py";
+        String sessionId = PythonExecutor.executeAndGetSessionId(scriptPath);
+        System.out.println("sessionId: " + sessionId);*/
+
+        // 方式2:获取sessionId的值
+        /*String sessionId = PythonExecutor.executeAndGetSessionId(
+                "e:/project/jzg/tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py",
+                "E:\\project\\memorize_backend\\venv\\Scripts\\python.exe",  // Python解释器路径
+                120         // 超时时间(秒)
+        );
+        if (sessionId != null) {
+            System.out.println("获取到的sessionId: " + sessionId);
+        } else {
+            System.out.println("获取sessionId失败");
+        }*/
+        // 获取token的值
+        String token = PythonExecutor.executeAndGetToken(
+                "e:/project/jzg/tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py",
+                "E:\\project\\memorize_backend\\venv\\Scripts\\python.exe", 120);
+        if (token != null) {
+            System.out.println("获取到的token: " + token);
+        } else {
+            System.out.println("获取token失败");
+        }
+    }
+}

+ 135 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/novel.py

@@ -0,0 +1,135 @@
+import json
+import hashlib
+from Crypto.Cipher import DES
+from Crypto.Util.Padding import pad, unpad
+import base64
+import requests
+from loguru import logger
+from datetime import datetime
+def md5_hash(text):
+    """计算字符串的MD5哈希值"""
+    # 创建md5对象
+    md5 = hashlib.md5()
+
+    # 更新哈希对象(需要将字符串编码为bytes)
+    md5.update(text.encode('utf-8'))
+
+    # 获取十六进制哈希值
+    return md5.hexdigest()
+
+class DES_py():
+    def __init__(self, key = "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw=="):
+        self.key = key
+        self.mode = DES.MODE_ECB
+        # 注意:这里直接使用base64字符串作为密钥,而不是解码base64
+        key_utf8 = key.encode('utf-8')[:8]
+        self.cipher = DES.new(key_utf8, DES.MODE_ECB)
+
+    def des_encrypt(self,plaintext):
+
+        padded_data = pad(plaintext.encode('utf-8'), DES.block_size)
+        encrypted_data = self.cipher.encrypt(padded_data)
+        return base64.b64encode(encrypted_data).decode('utf-8')
+
+    def des_decrypt(self,ciphertext):
+        encrypted_data = base64.b64decode(ciphertext)
+        decrypted_data = self.cipher.decrypt(encrypted_data)
+        unpadded_data = unpad(decrypted_data, DES.block_size)
+        return unpadded_data.decode('utf-8')
+
+class BHBX_login():
+    def __init__(self,username,pwd,openId):
+        self.username =  username
+        self.pwd = pwd
+        self.des = DES_py()
+        self.openId = openId
+        self.requests = requests.Session()
+        self.requests.headers.update({
+            "Accept": "application/json, text/plain, */*",
+            "Accept-Language": "zh-CN,zh;q=0.9",
+            "Cache-Control": "no-cache",
+            "Connection": "keep-alive",
+            "Content-Type": "application/json;charset=UTF-8",
+            "Origin": "https://biz.bpic.com.cn",
+            "Pragma": "no-cache",
+            "Referer": "https://biz.bpic.com.cn/motor/pspcc/app/",
+            "Sec-Fetch-Dest": "empty",
+            "Sec-Fetch-Mode": "cors",
+            "Sec-Fetch-Site": "same-origin",
+            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0",
+            "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"",
+            "sec-ch-ua-mobile": "?0",
+            "sec-ch-ua-platform": "\"Windows\"",
+            "sessionId": ""
+        })
+    def login(self):
+        url = "https://biz.bpic.com.cn/motor/pspcs/Channel/channelTask/channelTaskMain.do"
+        data = {
+            "head": {
+                "transCode": "Login",
+                "transType": "Req",
+                "token": ""
+            },
+            "openId": self.openId,
+            "userCode": self.username,
+            "pwd": self.pwd,
+            "verification": "",
+            "loginSystemCode": "",
+            "isTelemarketing": "0",
+            "forceLoginFlag": "1", # 1
+            "clientIP": ""
+        }
+        encryptionData =  self.des.des_encrypt(json.dumps(data,ensure_ascii=False))
+        md5_ =  md5_hash(encryptionData + self.des.key)
+        en_data = {
+            "encryptionData": encryptionData,
+            "md5": md5_
+        }
+        res = self.requests.post(url,json=en_data)
+        logger.info("登录返回值 ==> " + res.text)
+        try:
+            res_txt = self.des.des_decrypt(res.text)
+            logger.info("登录返回值 解密结果 ==> " + res_txt)
+            res_json = json.loads(res_txt)
+            # 获取当前时间
+            formatted_time = str(datetime.now().strftime("%Y-%m-%d"))
+            localstorage = {
+                "ip": "",
+                "openId": self.openId,
+                "timeDifference": 10965,
+                "time": formatted_time,
+                "loginComList": res_json['loginComInfoList'],
+                "userCode": self.username,
+                "token": res_json['head']['token'],
+                "userName": res_json['userName'],
+                "rememberMe": True,
+                "sessionId": res_json['head']['sessionId'],
+                "loginSystem": {}
+            }
+            dddd = """localStorage.setItem("cherry.cherry.user",'localstorage_')"""
+            dddd = dddd.replace("localstorage_",json.dumps(localstorage,ensure_ascii=False))
+            logger.info("核心登录数据:"+dddd)
+        except Exception as e:
+            logger.error("des 解密失败")
+            res_json = {}
+        return res_json
+# 账号:114050281   密码:Bhcx1234  openId  odviKt0g-CP5NVNnZKiHEStPbRoU
+
+usernamelist = [
+    {"username":"114050281","passward":"Bhcx1234","openId":"odviKt0g-CP5NVNnZKiHEStPbRoU"} # odviKt0g-CP5NVNnZKiHEStPbRoU
+]
+username = "114050281"
+password = ""
+openId = ""
+for item in usernamelist:
+    if item['username'] == username:
+        password = item['passward']
+        openId = item['openId']
+        break
+if openId == "":
+    print(f"账号 {username} 暂未配置 账号信息")
+    exit()
+bhbx = BHBX_login(username,password,openId)
+print(bhbx.login())
+
+

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

@@ -1,10 +1,10 @@
 package com.jzg.quotation.commons.component;
 
-
+import com.alibaba.fastjson.parser.Feature;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.alibaba.fastjson2.JSON;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.config.WebClientConfig;
-import com.jzg.quotation.commons.entity.CookiesRequest;
 import com.jzg.quotation.commons.utils.RequestObjectConversion;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -12,6 +12,7 @@ import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.core.io.buffer.DataBuffer;
 import org.springframework.core.io.buffer.DataBufferUtils;
 import org.springframework.http.*;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 import org.springframework.util.MultiValueMap;
 import org.springframework.web.reactive.function.BodyInserters;
@@ -21,14 +22,13 @@ import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
 import java.io.IOException;
+import java.lang.reflect.Type;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
+import java.util.*;
 import java.util.function.Consumer;
 import java.util.regex.Pattern;
 
@@ -44,32 +44,47 @@ import java.util.regex.Pattern;
 public class RequestComponent {
 
     /**
-     * 获取webClient
+     * 过滤JSON字符串中的非法控制字符
+     * 只允许 \r, \n, \t 等标准空白字符
      *
-     * @return webClient
+     * @param jsonStr 原始JSON字符串
+     * @return String 过滤后的JSON字符串
      */
+    private String filterIllegalCharacters(String jsonStr) {
+        if (jsonStr == null) {
+            return null;
+        }
+        // 正则表达式匹配非法控制字符(除了 \r, \n, \t 之外的所有控制字符)
+        // ASCII 0-31 除了 9(\t), 10(\n), 13(\r) 之外的所有控制字符
+        Pattern pattern = Pattern.compile("[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f]");
+        String filtered = pattern.matcher(jsonStr).replaceAll("");
+
+        if (!jsonStr.equals(filtered)) {
+            log.warn("过滤掉了 {} 个非法控制字符", jsonStr.length() - filtered.length());
+            log.debug("过滤前: {}", jsonStr);
+            log.debug("过滤后: {}", filtered);
+        }
+        return filtered;
+    }
+
+
     private final WebClient webClient;
 
     private final WebClientConfig webClientConfig;
 
-    private final List<String> DOMAIN_LIST = List.of("b2b.champion-ic.com", "hsale.champion-ic.com");
-
     /**
-     * 根据URL选择合适的WebClient(支持SSL)
+     * 创建无SSL的WebClient
      *
-     * @param url 请求URL
-     * @return WebClient实例
+     * @return WebClient
      */
-    private WebClient selectWebClient(String url) {
+    private WebClient selectNoSSLWebClient() {
         try {
-            if (url.contains("https://")) {
-                String domain = extractDomain(url);
-                if (webClientConfig != null && DOMAIN_LIST.contains(domain)) {
-                    return webClientConfig.createSecureWebClient(domain);
-                }
+            if (webClientConfig != null) {
+                return webClientConfig.clientBuilder();
             }
         } catch (Exception e) {
-            log.warn("创建安全WebClient失败,使用默认WebClient", e);
+            e.printStackTrace();
+            log.info("创建安全WebClient失败,使用默认WebClient", e);
         }
         return webClient;
     }
@@ -79,10 +94,31 @@ public class RequestComponent {
      *
      * @return WebClient
      */
-    private WebClient selectNoSSLWebClient() {
+    private WebClient selectNoSSLWebClient2() {
         try {
             if (webClientConfig != null) {
-                return webClientConfig.clientBuilder();
+                return webClientConfig.clientBuilder1();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.info("创建安全WebClient失败,使用默认WebClient", e);
+        }
+        return webClient;
+    }
+
+    /**
+     * 根据URL选择合适的WebClient(支持SSL)
+     *
+     * @param url 请求URL
+     * @return WebClient实例
+     */
+    private WebClient selectWebClient(String url) {
+        try {
+            if (url.contains("https://")) {
+                String domain = extractDomain(url);
+                if (webClientConfig != null) {
+                    return webClientConfig.createSecureWebClient(domain);
+                }
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -110,18 +146,23 @@ public class RequestComponent {
     /**
      * 设置请求头
      *
-     * @param headers 请求头
+     * @param headers
      * @return Consumer<HttpHeaders>
      */
     public static Consumer<HttpHeaders> setHeaders(HttpHeaders headers) {
         return httpHeaders -> {
-            httpHeaders.add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36");
             if (headers != null) {
                 httpHeaders.addAll(headers);
             }
         };
     }
 
+    /**
+     * 构建URL
+     * @param baseUrl
+     * @param params
+     * @return String
+     */
     public String buildUrl(String baseUrl, MultiValueMap<String, String> params) {
         StringBuilder sb = new StringBuilder(baseUrl);
         if (!params.isEmpty()) {
@@ -160,7 +201,7 @@ public class RequestComponent {
      * @param responseClass 响应返回类
      * @param <Response>    响应
      * @param headers       请求头
-     * @return 响应
+     * @return <Response> Response
      */
     public <Response> Response get(String url, MultiValueMap<String, String> param, String description, Class<Response> responseClass, HttpHeaders headers) {
         ResponseEntity<Response> responseEntity = baseGet(url, param, responseClass, headers);
@@ -199,6 +240,7 @@ public class RequestComponent {
      */
     public <Response> ResponseEntity<Response> baseGet(String url, MultiValueMap<String, String> param, Class<Response> responseClass, HttpHeaders headers) {
         String requestUrl = buildUrl(url, param);
+        log.info("请求url参数:{}", requestUrl);
         return webClient.get()
                 .uri(requestUrl)
                 .headers(setHeaders(headers))
@@ -219,15 +261,6 @@ 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 拼接对象
@@ -239,7 +272,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)
+                .uri(url, param)
                 .headers(setHeaders(headers))
                 .retrieve()
                 .toEntity(bodyTypeReference)
@@ -250,6 +283,7 @@ public class RequestComponent {
     /**
      * @param url           请求地址
      * @param param         拼接的请求参数
+     * @param description   描述信息
      * @param responseClass 响应返回类
      * @param <Response>    响应实体
      * @return 响应
@@ -259,146 +293,89 @@ public class RequestComponent {
     }
 
     /**
+     * 构造post请求
+     *
      * @param url           请求地址
      * @param body          请求体
      * @param responseClass 响应类
      * @param headers       请求头
      * @param <Response>    响应实体
-     * @return 响应
+     * @return <Response> ResponseEntity<Response> 响应
      */
     public <Response> ResponseEntity<Response> post(String url, String body, Class<Response> responseClass, HttpHeaders headers) {
-        if (log.isDebugEnabled()) {
-            log.debug("request body is {}", body);
-        }
-        System.out.println("request body is {"+body+"}");
         body = Optional.ofNullable(body).orElse("");
-        WebClient webClient = selectWebClient(url);
+        log.info("URL的值:{},body的值:{}", url, body);
+        WebClient webClient = selectNoSSLWebClient();
         try {
-            return webClient.post()
-                    .uri(url)
-                    .headers(setHeaders(headers))
-                    .body(BodyInserters.fromValue(body))
-                    .retrieve()
-                    .toEntity(responseClass)
-                    .block();
-        } catch (WebClientResponseException e) {
-            // 如果服务端返回非2xx状态码
-            System.err.println("状态码: " + e.getRawStatusCode());
-            System.err.println("响应体: " + e.getResponseBodyAsString());
-            throw e;
-        }
-    }
+            // 创建一个不带Accept-Encoding的请求头,避免服务器返回压缩数据
+            HttpHeaders requestHeaders = new HttpHeaders();
+            if (headers != null) {
+                requestHeaders.addAll(headers);
+            }
+            // 移除Accept-Encoding头,让服务器返回未压缩的数据
+            requestHeaders.remove("Accept-Encoding");
 
-    /**
-     * 太平洋请求加cookie
-     * @param url
-     * @param body
-     * @param headers
-     * @param cookiesRequest
-     * @return
-     */
-    public <Response> ResponseEntity<Response> postCookie(String url, String body, Class<Response> responseClass, HttpHeaders headers, CookiesRequest cookiesRequest) {
-        if (log.isDebugEnabled()) {
-            log.debug("request body is {}", body);
-        }
-        System.out.println("request body is {"+body+"}");
-        body = Optional.ofNullable(body).orElse("");
-        WebClient webClient = selectWebClient(url);
-        try {
-            return webClient.post()
+            // 一次性获取响应实体(包含状态码和响应体)
+            ResponseEntity<String> rawResponse = webClient.post()
                     .uri(url)
-                    .headers(setHeaders(headers))
-                    .cookie("route",cookiesRequest.getRoute())
-                    .cookie("JSESSIONID", cookiesRequest.getJsessionId())
+                    .headers(setHeaders(requestHeaders))
                     .body(BodyInserters.fromValue(body))
                     .retrieve()
-                    .toEntity(responseClass)
+                    .toEntity(String.class)
                     .block();
+            if (rawResponse == null) {
+                throw new WebClientResponseException(
+                        500,
+                        "No response received",
+                        HttpHeaders.EMPTY,
+                        "No response received".getBytes(StandardCharsets.UTF_8),
+                        null
+                );
+            }
+            String responseBody = rawResponse.getBody();
+            if (responseBody == null) {
+                responseBody = "";
+            }
+
+            // 处理响应:过滤非法字符并解析JSON
+            String filteredResponse = filterIllegalCharacters(responseBody);
+            Response result;
+            try {
+                // 使用FastJSON手动解析JSON
+                result = JSON.parseObject(filteredResponse, responseClass);
+            } catch (Exception e) {
+                log.error("JSON解析失败,过滤后的响应内容: {}", filteredResponse, e);
+                throw new WebClientResponseException(
+                        500,
+                        "JSON parsing failed after filtering: " + e.getMessage(),
+                        rawResponse.getHeaders(),
+                        filteredResponse.getBytes(StandardCharsets.UTF_8),
+                        null
+                );
+            }
+            // 构建返回的ResponseEntity
+            HttpHeaders responseHeaders = new HttpHeaders();
+            responseHeaders.setContentType(MediaType.APPLICATION_JSON);
+            return ResponseEntity.status(rawResponse.getStatusCode())
+                    .headers(responseHeaders)
+                    .body(result);
         } catch (WebClientResponseException e) {
-            // 如果服务端返回非2xx状态码
-            System.err.println("状态码: " + e.getRawStatusCode());
-            System.err.println("响应体: " + e.getResponseBodyAsString());
+            // 如果是WebClientResponseException,记录详细信息
+            log.error("WebClient请求失败,状态码: {}, 响应头: {}",
+                    e.getStatusCode(), e.getHeaders(), e);
             throw e;
+        } catch (Exception e) {
+            // 处理其他异常
+            log.error("请求失败", e);
+            throw new WebClientResponseException(
+                    500,
+                    "Request failed: " + e.getMessage(),
+                    HttpHeaders.EMPTY,
+                    e.getMessage().getBytes(StandardCharsets.UTF_8),
+                    null
+            );
         }
     }
-//
-//    /**
-//     * 发送post请求,返回的content-type:text/json;charset=UTF-8
-//     *
-//     * @param url           请求地址
-//     * @param body          请求体
-//     * @param responseClass 响应类
-//     * @param headers       请求头
-//     * @param <Response>    响应实体
-//     * @return <Response> ResponseEntity<Response> 响应
-//     */
-//    public <Response> ResponseEntity<Response> post2(String url, String body, Class<Response> responseClass, HttpHeaders headers) {
-//        body = Optional.ofNullable(body).orElse("");
-//        log.info("URL的值:{},body的值:{}", url, body);
-//        WebClient webClient = selectNoSSLWebClient();
-//        try {
-//            // 先获取原始响应字符串
-//            Mono<String> responseMono = webClient.post()
-//                    .uri(url)
-//                    .headers(setHeaders(headers))
-//                    .header(HttpHeaders.ACCEPT, "application/json,text/html,text/json,*/*")
-//                    .header(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9")
-//                    .header(HttpHeaders.CACHE_CONTROL, "no-cache")
-//                    .body(BodyInserters.fromValue(body))
-//                    .retrieve()
-//                    .bodyToMono(String.class);
-//
-//            // 处理响应:过滤非法字符并解析JSON
-//            Mono<Response> resultMono = responseMono.flatMap(rawResponse -> {
-//                // 过滤非法字符
-//                String filteredResponse = filterIllegalCharacters(rawResponse);
-//                try {
-//                    // 使用FastJSON手动解析JSON
-//                    Response result = JSON.parseObject(filteredResponse, responseClass);
-//                    return Mono.just(result);
-//                } catch (Exception e) {
-//                    // 如果JSON解析失败,抛出异常
-//                    return Mono.error(new WebClientResponseException(
-//                            500,
-//                            "JSON parsing failed after filtering: " + e.getMessage(),
-//                            HttpHeaders.EMPTY,
-//                            filteredResponse.getBytes(StandardCharsets.UTF_8),
-//                            null
-//                    ));
-//                }
-//            });
-//            // 等待结果并构建ResponseEntity
-//            Response result = resultMono.block();
-//            HttpHeaders responseHeaders = new HttpHeaders();
-//            responseHeaders.setContentType(MediaType.APPLICATION_JSON);
-//            // 获取原始响应状态码
-//            ResponseEntity<String> rawResponse = webClient.post()
-//                    .uri(url)
-//                    .headers(setHeaders(headers))
-//                    .header(HttpHeaders.ACCEPT, "application/json,text/html,text/json,*/*")
-//                    .header(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9")
-//                    .header(HttpHeaders.CACHE_CONTROL, "no-cache")
-//                    .body(BodyInserters.fromValue(body))
-//                    .retrieve()
-//                    .toEntity(String.class)
-//                    .block();
-//
-//            int statusCode = rawResponse != null ? rawResponse.getStatusCode().value() : 200;
-//            return ResponseEntity.status(statusCode).headers(responseHeaders).body(result);
-//        } catch (WebClientResponseException e) {
-//            e.printStackTrace();
-//            throw e;
-//        } catch (Exception e) {
-//            // 处理其他异常
-//            throw new WebClientResponseException(
-//                    500,
-//                    "Request failed: " + e.getMessage(),
-//                    HttpHeaders.EMPTY,
-//                    e.getMessage().getBytes(StandardCharsets.UTF_8),
-//                    null
-//            );
-//        }
-//    }
 
 
     /**
@@ -423,6 +400,127 @@ public class RequestComponent {
                 .block();
     }
 
+
+    /**
+     * 构造post请求
+     *
+     * @param url
+     * @param body
+     * @param responseClass
+     * @param headers
+     * @param <Response>    响应实体
+     * @return <Response> ResponseEntity<Response>
+     */
+    public <Response> ResponseEntity<Response> post(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        log.info("URL的值:{},body的值:{}", url, body);
+        WebClient webClient = selectNoSSLWebClient2();
+        try {
+            // 创建一个不带Accept-Encoding的请求头,避免服务器返回压缩数据
+            HttpHeaders requestHeaders = new HttpHeaders();
+            if (headers != null) {
+                requestHeaders.addAll(headers);
+            }
+            // 移除Accept-Encoding头,让服务器返回未压缩的数据
+            requestHeaders.remove("Accept-Encoding");
+
+            // 获取响应实体
+            ResponseEntity<String> rawResponse = webClient.post()
+                    .uri(url)
+                    .headers(setHeaders(requestHeaders))
+                    .body(BodyInserters.fromValue(body))
+                    .retrieve()
+                    .toEntity(String.class)
+                    .block();
+            if (rawResponse == null) {
+                throw new WebClientResponseException(500, "No response received", HttpHeaders.EMPTY, "No response received".getBytes(StandardCharsets.UTF_8), null);
+            }
+
+            String responseBody = rawResponse.getBody();
+            if (responseBody == null) {
+                responseBody = "";
+            }
+
+            Response result;
+            // 判断返回的字符串是否为有效的JSON格式
+            if (isValidJson(responseBody)) {
+                result = JSON.parseObject(responseBody, responseClass);
+            }else{
+                result = (Response)responseBody;
+            }
+            // 构建返回的ResponseEntity
+            HttpHeaders responseHeaders = new HttpHeaders();
+            responseHeaders.setContentType(MediaType.APPLICATION_JSON);
+            return ResponseEntity.status(rawResponse.getStatusCode()).headers(responseHeaders).body(result);
+        } catch (WebClientResponseException e) {
+            // 如果是WebClientResponseException,记录详细信息
+            log.error("WebClient请求失败,状态码: {}, 响应头: {}", e.getStatusCode(), e.getHeaders(), e);
+            throw e;
+        } catch (Exception e) {
+            // 处理其他异常
+            log.error("请求失败", e);
+            throw new WebClientResponseException(500, "Request failed: " + e.getMessage(), HttpHeaders.EMPTY, e.getMessage().getBytes(StandardCharsets.UTF_8), null);
+        }
+    }
+
+    /**
+     * 发送post请求,返回的content-type:text/json;charset=UTF-8
+     *
+     * @param url           请求地址
+     * @param body          请求体
+     * @param responseClass 响应类
+     * @param headers       请求头
+     * @param <Response>    响应实体
+     * @return <Response> ResponseEntity<Response> 响应
+     */
+    public <Response> ResponseEntity<Response> post2(String url, String body, Class<Response> responseClass, HttpHeaders headers) {
+        body = Optional.ofNullable(body).orElse("");
+        log.info("URL的值:{},body的值:{}", url, body);
+        WebClient webClient = selectNoSSLWebClient2();
+        try {
+            // 先获取原始响应字符串
+            Mono<String> responseMono = webClient.post()
+                    .uri(url)
+                    .headers(setHeaders(headers))
+                    .header(HttpHeaders.ACCEPT, "application/json,text/html,text/json,*/*")
+                    .header(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9")
+                    .header(HttpHeaders.CACHE_CONTROL, "no-cache")
+                    .body(BodyInserters.fromValue(body))
+                    .retrieve()
+                    .bodyToMono(String.class);
+            // 处理响应:过滤非法字符并解析JSON
+            Mono<Response> resultMono = responseMono.flatMap(rawResponse -> {
+                // 过滤非法字符
+                //String filteredResponse = filterIllegalCharacters(rawResponse);
+                try {
+                    // 使用FastJSON手动解析JSON
+                    Response result = JSON.parseObject(rawResponse, responseClass);
+                    return Mono.just(result);
+                } catch (Exception e) {
+                    // 如果JSON解析失败,抛出异常
+                    return Mono.error(new WebClientResponseException(
+                            500,
+                            "JSON parsing failed: " + e.getMessage(),
+                            HttpHeaders.EMPTY,
+                            rawResponse.getBytes(StandardCharsets.UTF_8),
+                            null
+                    ));
+                }
+            });
+            // 等待结果并构建ResponseEntity
+            Response result = resultMono.block();
+            HttpHeaders responseHeaders = new HttpHeaders();
+            responseHeaders.setContentType(MediaType.APPLICATION_JSON);
+            return ResponseEntity.status(HttpStatus.OK).headers(responseHeaders).body(result);
+        } catch (WebClientResponseException e) {
+            e.printStackTrace();
+            throw e;
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 处理其他异常
+            throw new WebClientResponseException(500, "Request failed: " + e.getMessage(), HttpHeaders.EMPTY, e.getMessage().getBytes(StandardCharsets.UTF_8), null);
+        }
+    }
+
     /**
      * gbk
      *
@@ -470,8 +568,6 @@ public class RequestComponent {
         return bodyIsEmpty(responseEntity, description);
     }
 
-
-
     /**
      * @param url               完整的请求地址
      * @param body              请求体
@@ -482,10 +578,6 @@ public class RequestComponent {
      */
     public <Response> ResponseEntity<Response> basePost(String url, Object body, ParameterizedTypeReference<Response> bodyTypeReference, HttpHeaders headers) {
         String requestBody = JSON.toJSONString(body);
-        if(requestBody.equals("null")){
-            requestBody = "";
-        }
-        log.info("请求json:" + requestBody);
         return webClient.post()
                 .uri(url)
                 .body(BodyInserters.fromValue(requestBody))
@@ -496,32 +588,35 @@ public class RequestComponent {
     }
 
 
-    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();
-    }
-
-
     /**
+     * 构造post请求
+     *
      * @param url           请求地址
      * @param body          请求体
      * @param responseClass 响应类
      * @param headers       请求头
      * @param <Response>    响应实体
-     * @return 响应
+     * @return <Response> ResponseEntity<Response> 响应
      */
     public <Response> ResponseEntity<Response> stringPost(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
         String requestBody = JSON.toJSONString(body);
-        log.info(requestBody);
         return post(url, requestBody, responseClass, headers);
     }
 
+    /**
+     * 构造post请求
+     *
+     * @param url           请求地址
+     * @param body          请求体
+     * @param responseClass 响应类
+     * @param headers       请求头
+     * @param <Response>    响应实体
+     * @return <Response> ResponseEntity<Response> 响应
+     */
+    public <Response> ResponseEntity<Response> stringPost2(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        return post(url, body, responseClass, headers);
+    }
+
     /**
      * 请求体为 String 类型 POST请求返回响应返回类
      *
@@ -627,21 +722,6 @@ 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();
-
-    }
-
     /**
      * 下载文件处理
      *
@@ -765,7 +845,75 @@ public class RequestComponent {
      * @return 响应
      */
     public <Response> ResponseEntity<Response> objectPost(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
-        return stringPost(url, body, responseClass, headers);
+        return stringPost2(url, body, responseClass, headers);
+    }
+
+    /**
+     * 请求体为 object POST请求返回响应返回类(支持文件上传)
+     *
+     * @param url           请求地址
+     * @param body          请求体
+     * @param responseClass 响应返回类
+     * @param headers       请求头
+     * @param <Response>    响应返回
+     * @return <Response> ResponseEntity<Response> 响应
+     */
+    @SuppressWarnings("unchecked")
+    public <Response> ResponseEntity<Response> objectPostForUpload(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        // 如果是MultiValueMap类型,使用 multipart 方式发送(用于文件上传)
+        if (body instanceof MultiValueMap) {
+            MultiValueMap<String, Object> formData = (MultiValueMap<String, Object>) body;
+            WebClient webClient = selectNoSSLWebClient2();
+
+            HttpHeaders requestHeaders = new HttpHeaders();
+            if (headers != null) {
+                requestHeaders.addAll(headers);
+            }
+            requestHeaders.remove("Accept-Encoding");
+
+            log.info("文件上传URL的值:{}", url);
+            ResponseEntity<String> rawResponse = webClient.post()
+                    .uri(url)
+                    .headers(setHeaders(requestHeaders))
+                    .contentType(MediaType.MULTIPART_FORM_DATA)
+                    .body(BodyInserters.fromMultipartData(formData))
+                    .retrieve()
+                    .toEntity(String.class)
+                    .block();
+
+            if (rawResponse == null) {
+                throw new WebClientResponseException(500, "No response received", HttpHeaders.EMPTY, "No response received".getBytes(StandardCharsets.UTF_8), null);
+            }
+
+            String responseBody = rawResponse.getBody();
+            Response result;
+            if (responseBody != null && isValidJson(responseBody)) {
+                result = JSON.parseObject(responseBody, responseClass);
+            } else {
+                result = (Response) responseBody;
+            }
+            HttpHeaders responseHeaders = new HttpHeaders();
+            responseHeaders.setContentType(MediaType.APPLICATION_JSON);
+            return ResponseEntity.status(rawResponse.getStatusCode()).headers(responseHeaders).body(result);
+        }
+        // 非 MultiValueMap 类型,走原来的逻辑
+        return post(url, body, responseClass, headers);
+    }
+
+
+    /**
+     * POST请求
+     *
+     * @param url           请求地址
+     * @param body          请求体
+     * @param responseClass 响应返回类
+     * @param headers       请求头
+     * @param <Response>    响应返回
+     * @return 响应
+     */
+    public <Response> ResponseEntity<Response> objectPost2(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        String requestBody = JSON.toJSONString(body);
+        return post2(url, requestBody, responseClass, headers);
     }
 
     /**
@@ -807,27 +955,44 @@ public class RequestComponent {
     }
 
     /**
-     * 过滤JSON字符串中的非法控制字符
-     * 只允许 \r, \n, \t 等标准空白字符
+     * 判断字符串是否为有效的JSON格式
+     * 支持JSON对象({})和JSON数组([])
      *
-     * @param jsonStr 原始JSON字符串
-     * @return String 过滤后的JSON字符串
+     * @param str 待检测的字符串
+     * @return 如果是有效的JSON格式返回true,否则返回false
      */
-    private String filterIllegalCharacters(String jsonStr) {
-        if (jsonStr == null) {
-            return null;
+    private boolean isValidJson(String str) {
+        // 空字符串或null不是有效JSON
+        if (str == null || str.isEmpty()) {
+            return false;
         }
-        // 正则表达式匹配非法控制字符(除了 \r, \n, \t 之外的所有控制字符)
-        // ASCII 0-31 除了 9(\t), 10(\n), 13(\r) 之外的所有控制字符
-        Pattern pattern = Pattern.compile("[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f]");
-        String filtered = pattern.matcher(jsonStr).replaceAll("");
 
-        if (!jsonStr.equals(filtered)) {
-            log.warn("过滤掉了 {} 个非法控制字符", jsonStr.length() - filtered.length());
-            log.debug("过滤前: {}", jsonStr);
-            log.debug("过滤后: {}", filtered);
+        // 去除首尾空白字符
+        String trimmed = str.trim();
+        if (trimmed.isEmpty()) {
+            return false;
+        }
+
+        // 检查首尾字符是否符合JSON格式
+        char firstChar = trimmed.charAt(0);
+        char lastChar = trimmed.charAt(trimmed.length() - 1);
+
+        // JSON对象以{}包裹,JSON数组以[]包裹
+        boolean isJsonObject = (firstChar == '{' && lastChar == '}');
+        boolean isJsonArray = (firstChar == '[' && lastChar == ']');
+
+        if (!isJsonObject && !isJsonArray) {
+            return false;
+        }
+
+        // 使用FastJSON尝试解析,确保是合法的JSON结构
+        try {
+            JSON.parse(trimmed);
+            return true;
+        } catch (Exception e) {
+            log.debug("JSON格式校验失败: {}", e.getMessage());
+            return false;
         }
-        return filtered;
     }
 
 }

+ 33 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/config/MongoConfig.java

@@ -4,11 +4,18 @@ package com.jzg.quotation.commons.config;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
 import org.springframework.data.mongodb.MongoDatabaseFactory;
 import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
 import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;
 import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
+import org.springframework.data.mongodb.core.convert.MongoCustomConversions;
 import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 /**
  * @description: Mongodb 配置类
@@ -29,7 +36,33 @@ public class MongoConfig {
                 context
         );
         converter.setTypeMapper(typeMapper);
+        converter.setCustomConversions(mongoCustomConversions());
+        converter.afterPropertiesSet();
         return converter;
     }
 
+    @Bean
+    public MongoCustomConversions mongoCustomConversions() {
+        List<Converter<?, ?>> converters = new ArrayList<>();
+        converters.add(new DateToLocalDateTimeConverter());
+        converters.add(new LocalDateTimeToDateConverter());
+        return new MongoCustomConversions(converters);
+    }
+
+    // 读取时:UTC Date → 北京时间 LocalDateTime
+    static class DateToLocalDateTimeConverter implements Converter<Date, LocalDateTime> {
+        @Override
+        public LocalDateTime convert(Date source) {
+            return source.toInstant().atZone(ZoneId.of("Asia/Shanghai")).toLocalDateTime();
+        }
+    }
+
+    // 写入时:北京时间 LocalDateTime → UTC Date
+    static class LocalDateTimeToDateConverter implements Converter<LocalDateTime, Date> {
+        @Override
+        public Date convert(LocalDateTime source) {
+            return Date.from(source.atZone(ZoneId.of("Asia/Shanghai")).toInstant());
+        }
+    }
+
 }

+ 0 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/SummaryQuotationApplication.java

@@ -10,8 +10,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
 import org.springframework.data.mongodb.repository.support.SimpleMongoRepository;
-
-
 @SpringBootApplication(scanBasePackages = {"com.jzg"})
 @MapperScan({"com.jzg.quotation.summary.mapper", "com.jzg.commons.mapper"})
 @EnableFeignClients(basePackages = {"com.jzg.quotation.commons.client","com.jzg.quotation.summary.client"})

+ 3 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -1,6 +1,7 @@
 package com.jzg.quotation.summary.factory;
 
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
@@ -133,7 +134,9 @@ public class CompanyFactory {
         String token = baseController.getToken();
         String systemCode = baseController.getAppSystemCode();
         HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId(), token, systemCode);
+        log.info("agreementAttribution对象的值:{}", JSON.toJSONString(agreementAttribution.getData()));
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
+
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
                 .collect(Collectors.toMap(

+ 37 - 30
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/quote/QuoteDispatchDecorator.java

@@ -52,39 +52,46 @@ public class QuoteDispatchDecorator {
     }
 
     public QuoteResultsVo quote(QuoteVo quoteVo) throws Exception {
-        String agreementId = quoteVo.getOrder().getAgreementId();
-        log.info("agreementId参数的值:{}", agreementId);
+        try {
+            String agreementId = quoteVo.getOrder().getAgreementId();
+            log.info("agreementId参数的值:{}", agreementId);
 
-        String token = baseController.getToken();
-        String systemCode = "";
-        //如果是APP登录的话 则传递SystemCode的头部字段
-        if(baseController.getUserSystemCode().equals("APP")){
-            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
-            systemCode = request.getHeader("system_code");
-        }else{
-            systemCode = baseController.getUserSystemCode();
-        }
-        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(agreementId, token, systemCode);
-        AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
-        PtlAgreementAttribution ptlAgreementAttribution = agreementAttribution.getData();
+            String token = baseController.getToken();
+            String systemCode = "";
+            //如果是APP登录的话 则传递SystemCode的头部字段
+            if(baseController.getUserSystemCode().equals("APP")){
+                HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+                systemCode = request.getHeader("system_code");
+            }else{
+                //设置固定的信息
+                systemCode = "WWW001";
+            }
+            log.info("systemCode参数的值:{}", systemCode);
+            HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(agreementId, token, systemCode);
+            AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
+            PtlAgreementAttribution ptlAgreementAttribution = agreementAttribution.getData();
 
-        // API类型设置
-        quoteVo.getOrder().setApiType(Integer.parseInt(ptlAgreementAttribution.getApiType()));
-        Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
-                .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
-                .collect(Collectors.toMap(
-                        json -> json.getString("field"),    // 获取 key
-                        json -> json.getString("value") == null ? "" : json.getString("value"),
-                        (existing, replacement) -> existing + replacement // 获取 value
-                ));
+            // API类型设置
+            quoteVo.getOrder().setApiType(Integer.parseInt(ptlAgreementAttribution.getApiType()));
+            Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
+                    .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
+                    .collect(Collectors.toMap(
+                            json -> json.getString("field"),    // 获取 key
+                            json -> json.getString("value") == null ? "" : json.getString("value"),
+                            (existing, replacement) -> existing + replacement // 获取 value
+                    ));
 
-        AttributionInformationVo attributionInformationVo = new AttributionInformationVo();
-        attributionInformationVo.setConfigInfo(fieldMap);
-        attributionInformationVo.setUsername(ptlAgreementAttribution.getUsername());
-        attributionInformationVo.setPassword(ptlAgreementAttribution.getPassword());
-        quoteVo.getOrder().setAttributionInformationVo(attributionInformationVo);
+            AttributionInformationVo attributionInformationVo = new AttributionInformationVo();
+            attributionInformationVo.setConfigInfo(fieldMap);
+            attributionInformationVo.setUsername(ptlAgreementAttribution.getUsername());
+            attributionInformationVo.setPassword(ptlAgreementAttribution.getPassword());
+            quoteVo.getOrder().setAttributionInformationVo(attributionInformationVo);
 
-        //协议调度
-        return target.quote(quoteVo);
+            //协议调度
+            return target.quote(quoteVo);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 }

+ 3 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/OrderState.java

@@ -8,7 +8,9 @@ package com.jzg.quotation.summary.state;
 public class OrderState {
 
     public enum OrderStateEnum {
-        // 订单已提交
+        /**
+         * 订单已提交
+         */
         QUOTE_ING(0),
         // 待核保
         WAIT_AUDIT(1),

+ 1 - 3
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/listener/OrderStateListener.java

@@ -16,14 +16,12 @@ import org.springframework.statemachine.support.DefaultStateMachineContext;
 import org.springframework.stereotype.Component;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
-
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * @author quchen
  * @date 2025/2/26 10:57
  */
-
 @Component
 @Slf4j
 public class OrderStateListener {
@@ -182,7 +180,7 @@ public class OrderStateListener {
 
 
     public StateResult statusChange(InsOrderStatusEnum insOrderStatusEnum, String currentStatus) {
-        log.info("设置的订单状态:{},当前的订单状态:{}", insOrderStatusEnum,currentStatus);
+        log.info("设置的订单状态{},当前的订单状态:{}", insOrderStatusEnum,currentStatus);
         StateResult stateResult = new StateResult();
         switch(insOrderStatusEnum){
             //报价失败

Некоторые файлы не были показаны из-за большого количества измененных файлов