jinshihui 11 meses atrás
pai
commit
2330293394
21 arquivos alterados com 1448 adições e 83 exclusões
  1. 7 0
      commons/src/main/java/com/jzg/commons/core/base/StateResult.java
  2. 15 1
      commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersPdfUrl.java
  3. 4 1
      commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersPolicy.java
  4. 6 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/DownloadPolicyResultVo.java
  5. 4 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/OrderStatusResultVo.java
  6. 1 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/OrderStatusVo.java
  7. 7 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/service/impl/BoHaiApiRequestImpl.java
  8. 43 19
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/component/BoHaiCrawlerRequestComponent.java
  9. 6 6
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/constant/enums/RequestUrl.java
  10. 53 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/po/BoHaiCrawlerOrder.java
  11. 51 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerDownloadRequest.java
  12. 1 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerEncryptionRequest.java
  13. 347 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerQueryOrderStatusRequest.java
  14. 72 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerDownloadResponse.java
  15. 576 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerQueryOrderStatusResponse.java
  16. 2 2
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerQuoteProcessServiceImpl.java
  17. 185 24
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java
  18. 31 21
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  19. 12 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  20. 5 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/OrderState.java
  21. 20 5
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/listener/OrderStateListener.java

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

@@ -5,9 +5,16 @@ import lombok.Data;
 
 
 @Data
 @Data
 public class StateResult {
 public class StateResult {
+
+    /**
+     * 结果
+     */
     @Schema(description = "结果")
     @Schema(description = "结果")
     private boolean result;
     private boolean result;
 
 
+    /**
+     * 当前状态
+     */
     @Schema(description = "当前状态")
     @Schema(description = "当前状态")
     private Integer currentState;
     private Integer currentState;
 }
 }

+ 15 - 1
commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersPdfUrl.java

@@ -4,21 +4,32 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
-
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 
 
+/**
+ * 订单保单路径表
+ */
 @Data
 @Data
 @Schema(description = "保单存储")
 @Schema(description = "保单存储")
 public class InsOrdersPdfUrl {
 public class InsOrdersPdfUrl {
 
 
+    /**
+     * 订单号
+     */
     @Schema(description = "订单号")
     @Schema(description = "订单号")
     @TableId
     @TableId
     private String orderNo;
     private String orderNo;
 
 
+    /**
+     * 险种信息
+     */
     @Schema(description = "险种信息")
     @Schema(description = "险种信息")
     private String riskCode;
     private String riskCode;
 
 
+    /**
+     * 交强保单号
+     */
     @Schema(description = "交强保单号")
     @Schema(description = "交强保单号")
     private String jqNo;
     private String jqNo;
 
 
@@ -28,6 +39,9 @@ public class InsOrdersPdfUrl {
     @Schema(description = "驾意保单号")
     @Schema(description = "驾意保单号")
     private String jyNo;
     private String jyNo;
 
 
+    /**
+     * 交强保单路径
+     */
     @Schema(description = "交强保单路径")
     @Schema(description = "交强保单路径")
     private String jqUrl;
     private String jqUrl;
 
 

+ 4 - 1
commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersPolicy.java

@@ -1,13 +1,16 @@
 package com.jzg.commons.entity.orders.po;
 package com.jzg.commons.entity.orders.po;
 
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.jzg.commons.core.base.BaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 import org.springframework.data.annotation.Id;
 import org.springframework.data.annotation.Id;
 
 
+import java.io.Serializable;
+
 @Data
 @Data
 @Schema(description = "保险订单保单信息")
 @Schema(description = "保险订单保单信息")
-public class InsOrdersPolicy {
+public class InsOrdersPolicy extends BaseModel {
 
 
     @TableId
     @TableId
     @Schema(description = "订单号")
     @Schema(description = "订单号")

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/DownloadPolicyResultVo.java

@@ -16,9 +16,15 @@ public class DownloadPolicyResultVo {
     @Schema(description = "交强险保单地址")
     @Schema(description = "交强险保单地址")
     private String jqUrl;
     private String jqUrl;
 
 
+    /**
+     * 商业险保单地址
+     */
     @Schema(description = "商业险保单地址")
     @Schema(description = "商业险保单地址")
     private String syUrl;
     private String syUrl;
 
 
+    /**
+     * 驾意险保单地址
+     */
     @Schema(description = "驾意险保单地址")
     @Schema(description = "驾意险保单地址")
     private String jyUrl;
     private String jyUrl;
 }
 }

+ 4 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/OrderStatusResultVo.java

@@ -15,10 +15,13 @@ public class OrderStatusResultVo {
     private InsOrderStatusEnum orderStatus;
     private InsOrderStatusEnum orderStatus;
 
 
     /**
     /**
-     * 支付连接
+     * 支付链接
      */
      */
     private String paymentLink;
     private String paymentLink;
 
 
+    /**
+     * 错误信息
+     */
     private String errorMsg;
     private String errorMsg;
 
 
     /**
     /**

+ 1 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/OrderStatusVo.java

@@ -22,7 +22,7 @@ public class OrderStatusVo {
     private InsOrders insOrders;
     private InsOrders insOrders;
 
 
     /**
     /**
-     * 订单号信息
+     * 保险订单保单信息
      */
      */
     private InsOrdersPolicy insOrdersPolicy;
     private InsOrdersPolicy insOrdersPolicy;
 }
 }

+ 7 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/service/impl/BoHaiApiRequestImpl.java

@@ -390,6 +390,13 @@ public class BoHaiApiRequestImpl implements BoHaiApiRequest {
         return orderStatusResultVo;
         return orderStatusResultVo;
     }
     }
 
 
+    /**
+     * 单证查询
+     * @param orderStatusVo
+     * @param url
+     * @return 单证列表
+     * @throws Exception
+     */
     private List<StatusDocumentsResponse.DataDTO.DocumentListDTO> getDocumentListDTO(OrderStatusVo orderStatusVo,String url) throws Exception {
     private List<StatusDocumentsResponse.DataDTO.DocumentListDTO> getDocumentListDTO(OrderStatusVo orderStatusVo,String url) throws Exception {
         // 账号信息
         // 账号信息
         BoHaiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(BoHaiConfigureParameters.class, orderStatusVo.getOrder().getAttributionInformationVo().getConfigInfo());
         BoHaiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(BoHaiConfigureParameters.class, orderStatusVo.getOrder().getAttributionInformationVo().getConfigInfo());

+ 43 - 19
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/component/BoHaiCrawlerRequestComponent.java

@@ -2,23 +2,13 @@ package com.jzg.quotation.bohai.crawler.component;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSON;
-import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.zxing.NotFoundException;
 import com.google.zxing.NotFoundException;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.AssertionUtils;
-import com.jzg.quotation.bohai.api.constant.enums.RequestType;
-import com.jzg.quotation.bohai.api.constant.enums.ResponseCode;
-import com.jzg.quotation.bohai.api.entity.request.BoHaiBaseRequest;
-import com.jzg.quotation.bohai.api.entity.request.ImageUploadRequest;
-import com.jzg.quotation.bohai.api.entity.request.UnderwritingRequest;
-import com.jzg.quotation.bohai.api.entity.response.BoHaiBaseResponse;
-import com.jzg.quotation.bohai.api.entity.response.ImageUploadResponse;
-import com.jzg.quotation.bohai.api.entity.response.UnderwritingResponse;
 import com.jzg.quotation.bohai.crawler.constant.enums.RequestUrl;
 import com.jzg.quotation.bohai.crawler.constant.enums.RequestUrl;
 import com.jzg.quotation.bohai.crawler.entity.request.*;
 import com.jzg.quotation.bohai.crawler.entity.request.*;
-import com.jzg.quotation.bohai.crawler.entity.request.quote.CarModelDataDTO;
 import com.jzg.quotation.bohai.crawler.entity.response.*;
 import com.jzg.quotation.bohai.crawler.entity.response.*;
 import com.jzg.quotation.bohai.crawler.properties.BoHaiCrawlerProperties;
 import com.jzg.quotation.bohai.crawler.properties.BoHaiCrawlerProperties;
 import com.jzg.quotation.bohai.crawler.util.*;
 import com.jzg.quotation.bohai.crawler.util.*;
@@ -36,7 +26,6 @@ import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.MultiValueMap;
-import org.springframework.web.multipart.MultipartFile;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.util.*;
 import java.util.*;
@@ -195,14 +184,14 @@ public class BoHaiCrawlerRequestComponent {
                     //生成md5值
                     //生成md5值
                     String md5Value = DESUtil.md5(encrypt + "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==");
                     String md5Value = DESUtil.md5(encrypt + "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==");
                     log.info("请求参数md5的值:{}", md5Value);
                     log.info("请求参数md5的值:{}", md5Value);
-                    BoHaiCrawlerPaymentEncryptionRequest boHaiCrawlerPaymentEncryptionRequest = new BoHaiCrawlerPaymentEncryptionRequest();
-                    boHaiCrawlerPaymentEncryptionRequest.setEncryptionData(encrypt);
-                    boHaiCrawlerPaymentEncryptionRequest.setMd5(md5Value);
+                    BoHaiCrawlerEncryptionRequest boHaiCrawlerEncryptionRequest = new BoHaiCrawlerEncryptionRequest();
+                    boHaiCrawlerEncryptionRequest.setEncryptionData(encrypt);
+                    boHaiCrawlerEncryptionRequest.setMd5(md5Value);
 
 
                     CrawlerRequestUrlStandard standard = (CrawlerRequestUrlStandard) urlOrStandard;
                     CrawlerRequestUrlStandard standard = (CrawlerRequestUrlStandard) urlOrStandard;
                     ResponseEntity<String> encryptedResponse = requestComponent.objectPost2(
                     ResponseEntity<String> encryptedResponse = requestComponent.objectPost2(
                             standard.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()),
                             standard.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()),
-                            boHaiCrawlerPaymentEncryptionRequest,
+                            boHaiCrawlerEncryptionRequest,
                             String.class,
                             String.class,
                             headers
                             headers
                     );
                     );
@@ -597,7 +586,7 @@ public class BoHaiCrawlerRequestComponent {
                 throw new SystemException("支付凭证号查询失败,返回数据为空");
                 throw new SystemException("支付凭证号查询失败,返回数据为空");
             }*/
             }*/
             //2、调用支付通知单号生成接口
             //2、调用支付通知单号生成接口
-            BoHaiCrawlerPaymentNoticeNoGenerationRequest boHaiCrawlerPaymentNoticeNoGenerationRequest = buildPaymentNoticeNoGenerationRequest();
+            BoHaiCrawlerPaymentNoticeNoGenerationRequest boHaiCrawlerPaymentNoticeNoGenerationRequest = buildPaymentNoticeNoGenerationRequest(boHaiCrawlerPaymentCertiNoQueryResponse);
             BoHaiCrawlerPaymentNoticeNoGenerationResponse boHaiCrawlerPaymentNoticeNoGenerationResponse = executeRequest(RequestType.ENCRYPTED, RequestUrl.PAYMENTNOTICENO_GENERATION, boHaiCrawlerPaymentNoticeNoGenerationRequest, BoHaiCrawlerPaymentNoticeNoGenerationResponse.class, headers);
             BoHaiCrawlerPaymentNoticeNoGenerationResponse boHaiCrawlerPaymentNoticeNoGenerationResponse = executeRequest(RequestType.ENCRYPTED, RequestUrl.PAYMENTNOTICENO_GENERATION, boHaiCrawlerPaymentNoticeNoGenerationRequest, BoHaiCrawlerPaymentNoticeNoGenerationResponse.class, headers);
             log.info("支付通知单号生成响应对象的值:{}", JSON.toJSONString(boHaiCrawlerPaymentNoticeNoGenerationResponse));
             log.info("支付通知单号生成响应对象的值:{}", JSON.toJSONString(boHaiCrawlerPaymentNoticeNoGenerationResponse));
             if(!"0".equals(boHaiCrawlerPaymentNoticeNoGenerationResponse.getHead().getReturnCode())){
             if(!"0".equals(boHaiCrawlerPaymentNoticeNoGenerationResponse.getHead().getReturnCode())){
@@ -641,12 +630,29 @@ public class BoHaiCrawlerRequestComponent {
         }
         }
     }
     }
 
 
+    /**
+     * 查询订单状态
+     *
+     * @param boHaiCrawlerQueryOrderStatusRequest
+     * @param headers 请求头
+     * @return BoHaiCrawlerQueryOrderStatusResponse
+     */
+    public BoHaiCrawlerQueryOrderStatusResponse queryOrderStatus(BoHaiCrawlerQueryOrderStatusRequest boHaiCrawlerQueryOrderStatusRequest, HttpHeaders headers) {
+        BoHaiCrawlerQueryOrderStatusResponse boHaiCrawlerQueryOrderStatusResponse = executeRequest(RequestType.ENCRYPTED, RequestUrl.QUERY_ORDER_STATUS, boHaiCrawlerQueryOrderStatusRequest, BoHaiCrawlerQueryOrderStatusResponse.class, headers);
+        if(!boHaiCrawlerQueryOrderStatusResponse.getHead().getReturnCode().equals("0")){
+            throw new SystemException("调用查询订单接口返回失败,错误信息:" + boHaiCrawlerQueryOrderStatusResponse.getHead().getReturnMessage());
+        }else{
+            return boHaiCrawlerQueryOrderStatusResponse;
+        }
+    }
+
     /**
     /**
      * 构建支付通知单号生成请求对象
      * 构建支付通知单号生成请求对象
      *
      *
+     * @param boHaiCrawlerPaymentCertiNoQueryResponse 支付凭证号查询响应对象
      * @return BoHaiCrawlerPaymentNoticeNoGenerationRequest
      * @return BoHaiCrawlerPaymentNoticeNoGenerationRequest
      */
      */
-    private BoHaiCrawlerPaymentNoticeNoGenerationRequest buildPaymentNoticeNoGenerationRequest() {
+    private BoHaiCrawlerPaymentNoticeNoGenerationRequest buildPaymentNoticeNoGenerationRequest(BoHaiCrawlerPaymentCertiNoQueryResponse boHaiCrawlerPaymentCertiNoQueryResponse) {
         BoHaiCrawlerPaymentNoticeNoGenerationRequest boHaiCrawlerPaymentNoticeNoGenerationRequest = new BoHaiCrawlerPaymentNoticeNoGenerationRequest();
         BoHaiCrawlerPaymentNoticeNoGenerationRequest boHaiCrawlerPaymentNoticeNoGenerationRequest = new BoHaiCrawlerPaymentNoticeNoGenerationRequest();
 
 
         // 设置请求头信息
         // 设置请求头信息
@@ -674,16 +680,34 @@ public class BoHaiCrawlerRequestComponent {
 
 
         // 交强险凭证
         // 交强险凭证
         BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO jqPlan = new BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO();
         BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO jqPlan = new BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO();
-        jqPlan.setCertiNo("5140703302025040234");
+        /*jqPlan.setCertiId(boHaiCrawlerPaymentCertiNoQueryResponse.getBusinessInfoList().get(0).getCertiId());
+        jqPlan.setCertiNo(boHaiCrawlerPaymentCertiNoQueryResponse.getBusinessInfoList().get(0).getCertiNo());*/
+
         jqPlan.setCertiId("T14072510000004050");
         jqPlan.setCertiId("T14072510000004050");
+        jqPlan.setCertiNo("5140703302025040234");
         poaPlanList.add(jqPlan);
         poaPlanList.add(jqPlan);
 
 
         // 商业险凭证
         // 商业险凭证
         BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO syPlan = new BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO();
         BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO syPlan = new BoHaiCrawlerPaymentNoticeNoGenerationRequest.PoaPlanDTO();
-        syPlan.setCertiNo("5140703802025010909");
+        /*syPlan.setCertiId(boHaiCrawlerPaymentCertiNoQueryResponse.getBusinessInfoList().get(1).getCertiId());
+        syPlan.setCertiNo(boHaiCrawlerPaymentCertiNoQueryResponse.getBusinessInfoList().get(1).getCertiNo());*/
+
         syPlan.setCertiId("T14072510000004051");
         syPlan.setCertiId("T14072510000004051");
+        syPlan.setCertiNo("5140703802025010909");
         poaPlanList.add(syPlan);
         poaPlanList.add(syPlan);
         boHaiCrawlerPaymentNoticeNoGenerationRequest.setPoaPlanList(poaPlanList);
         boHaiCrawlerPaymentNoticeNoGenerationRequest.setPoaPlanList(poaPlanList);
         return boHaiCrawlerPaymentNoticeNoGenerationRequest;
         return boHaiCrawlerPaymentNoticeNoGenerationRequest;
     }
     }
+
+    /**
+     * 下载保单
+     *
+     * @param request 下载保单实体
+     * @param headers 请求头
+     * @return BoHaiCrawlerDownloadResponse
+     */
+    public BoHaiCrawlerDownloadResponse electronPolicyIODownload(BoHaiCrawlerDownloadRequest request, HttpHeaders headers) {
+        BoHaiCrawlerBaseResponse response = executeRequest(RequestType.ENCRYPTED,RequestUrl.ELECTRON_POLICY_IO_DOWNLOAD.getRequestUrl(boHaiCrawlerProperties.getBaseUrl()), request, BoHaiCrawlerBaseResponse.class, headers);
+        return  DESEncryption.decryptStrToObject(response.getResult(), BoHaiCrawlerDownloadResponse.class);
+    }
 }
 }

+ 6 - 6
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/constant/enums/RequestUrl.java

@@ -6,8 +6,8 @@ import lombok.AllArgsConstructor;
 
 
 /**
 /**
  * @description: 渤海财险请求 url 配置
  * @description: 渤海财险请求 url 配置
- * @author: wenks
- * @date: 2025/2/11 11:43
+ * @author:
+ * @date:
  **/
  **/
 @AllArgsConstructor
 @AllArgsConstructor
 public enum RequestUrl implements CrawlerRequestUrlStandard {
 public enum RequestUrl implements CrawlerRequestUrlStandard {
@@ -21,12 +21,12 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     GET_SALE_INFO("/api_vhl_prod/api/getSaleInfo/", "获取账号信息"),
     GET_SALE_INFO("/api_vhl_prod/api/getSaleInfo/", "获取账号信息"),
     COMPANIES("/api_vhl_prod/api/companies", "承保机构"),
     COMPANIES("/api_vhl_prod/api/companies", "承保机构"),
     CHANNEL_PACKAGES("/api_vhl_prod/api/default/package/list", "渠道套餐"),
     CHANNEL_PACKAGES("/api_vhl_prod/api/default/package/list", "渠道套餐"),
-
     // 报价
     // 报价
     CAR("/app-carmodelinfo/netins/jyPreCarModelFill/queryJYPreCarModelFill", "车型查询"),
     CAR("/app-carmodelinfo/netins/jyPreCarModelFill/queryJYPreCarModelFill", "车型查询"),
     VEHICLECONFIRMATION("/motor/pspcs/Channel/channelTask/channelTaskMain.do","车辆确认"),
     VEHICLECONFIRMATION("/motor/pspcs/Channel/channelTask/channelTaskMain.do","车辆确认"),
     SAVE("/api_vhl_prod/api/save", "保存订单"),
     SAVE("/api_vhl_prod/api/save", "保存订单"),
     PRICE("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "计算保费"),
     PRICE("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "计算保费"),
+    // 核保
     UNDERWRITING("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "核保"),
     UNDERWRITING("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "核保"),
     //上传影像(有两个接口)
     //上传影像(有两个接口)
     UPLOAD_IMAGE("/motor/pspcs/Channel/uploadFile", "上传影像"),
     UPLOAD_IMAGE("/motor/pspcs/Channel/uploadFile", "上传影像"),
@@ -36,9 +36,9 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     PAYMENTNOTICENO_GENERATION("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "支付通知单号生成"),
     PAYMENTNOTICENO_GENERATION("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "支付通知单号生成"),
     QRCODE("/pubsrv/ecpay/payment/order/select/orderNo", "支付二维码"),
     QRCODE("/pubsrv/ecpay/payment/order/select/orderNo", "支付二维码"),
     // 下载保单
     // 下载保单
-    ELECTRON_POLICY_IO_DOWNLOAD("/api_vhl_prod/api/electronPolicyIODownload", "下载保单"),
-    // 状态查询
-    ORDER_LIST_REVISED("/api_vhl_prod/api/orderListRevised", "订单状态查询"),
+    ELECTRON_POLICY_IO_DOWNLOAD("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "下载保单"),
+    // 查询订单状态
+    QUERY_ORDER_STATUS("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "查询订单状态"),
     ;
     ;
 
 
     private final String uri;
     private final String uri;

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

@@ -19,38 +19,90 @@ import java.time.LocalDateTime;
 @AllArgsConstructor
 @AllArgsConstructor
 public class BoHaiCrawlerOrder {
 public class BoHaiCrawlerOrder {
 
 
+    /**
+     * MongoDB主键ID
+     */
     @Id
     @Id
     private String id;
     private String id;
 
 
+    /**
+     * 系统内部订单号
+     */
     private String ordersNo;
     private String ordersNo;
 
 
     /**
     /**
-     * 渤海财险订单号(这个是保司返回的订单号)
+     * 渤海财险订单号(保司返回)
      */
      */
     private String orderNo;
     private String orderNo;
 
 
+    /**
+     * 业务唯一标识
+     */
     private String busUniqueId;
     private String busUniqueId;
 
 
+    /**
+     * 交强险投保单号
+     */
     private String ciApplyNo;
     private String ciApplyNo;
 
 
+    /**
+     * 商业险投保单号
+     */
     private String syApplyNo;
     private String syApplyNo;
 
 
+    /**
+     * 非车投保单号
+     */
+    private String niApplyNumber;
+
+    /**
+     * 交强险保单号
+     */
     private String ciPolicyNo;
     private String ciPolicyNo;
 
 
+    /**
+     * 商业险保单号
+     */
     private String biPolicyNo;
     private String biPolicyNo;
 
 
+    /**
+     * 非车险保单号
+     */
+    private String niPolicyNo;
+
+    /**
+     * 交强险保费
+     */
     private String ciPremium;
     private String ciPremium;
 
 
+    /**
+     * 商业险保费
+     */
     private String biPremium;
     private String biPremium;
 
 
+    /**
+     * 总保费
+     */
     private String totalPremium;
     private String totalPremium;
 
 
+    /**
+     * 报价是否成功
+     */
     private Boolean quoteSuccess;
     private Boolean quoteSuccess;
 
 
+    /**
+     * 错误信息
+     */
     private String errorMsg;
     private String errorMsg;
 
 
+    /**
+     * 创建时间
+     */
     private LocalDateTime createTime;
     private LocalDateTime createTime;
 
 
+    /**
+     * 更新时间
+     */
     private LocalDateTime updateTime;
     private LocalDateTime updateTime;
 
 
 }
 }

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

@@ -0,0 +1,51 @@
+package com.jzg.quotation.bohai.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * 渤海保险爬虫下载请求实体类
+ *
+ * @author claude
+ * @date 2025-10-24
+ */
+@Data
+@Schema(description = "渤海保险爬虫下载请求实体")
+public class BoHaiCrawlerDownloadRequest {
+
+    @Schema(description = "头部信息")
+    @JsonProperty("head")
+    private Head head;
+
+    @Schema(description = "业务号/保单号")
+    @JsonProperty("businessNo")
+    private String businessNo;
+
+    @Schema(description = "文档类型")
+    @JsonProperty("documentType")
+    private String documentType;
+
+    @Schema(description = "是否新影像")
+    @JsonProperty("isNewImage")
+    private String isNewImage;
+
+    /**
+     * 头部信息
+     */
+    @Data
+    @Schema(description = "头部信息")
+    public static class Head {
+        @Schema(description = "交易代码:电子文档地址查询")
+        @JsonProperty("transCode")
+        private String transCode;
+
+        @Schema(description = "交易类型")
+        @JsonProperty("transType")
+        private String transType;
+
+        @Schema(description = "认证令牌")
+        @JsonProperty("token")
+        private String token;
+    }
+}

+ 1 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerPaymentEncryptionRequest.java → tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerEncryptionRequest.java

@@ -6,7 +6,7 @@ import lombok.Data;
  * 渤海保险获取支付链接加密请求实体
  * 渤海保险获取支付链接加密请求实体
  */
  */
 @Data
 @Data
-public class BoHaiCrawlerPaymentEncryptionRequest {
+public class BoHaiCrawlerEncryptionRequest {
 
 
     /**
     /**
      * 加密数据
      * 加密数据

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

@@ -0,0 +1,347 @@
+package com.jzg.quotation.bohai.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @description: 渤海财险 爬虫查询订单状态请求体
+ * @author: system
+ * @date: 2025/10/23
+ **/
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+public class BoHaiCrawlerQueryOrderStatusRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 请求头信息
+     */
+    @JsonProperty("head")
+    private HeadDTO head;
+
+    /**
+     * 是否查询所有报价用户代码
+     */
+    @JsonProperty("isQueryAllQuoteUserCode")
+    private String isQueryAllQuoteUserCode;
+
+    /**
+     * 登录公司代码
+     */
+    @JsonProperty("loginCom")
+    private String loginCom;
+
+    /**
+     * 每页行数
+     */
+    @JsonProperty("rows")
+    private Integer rows;
+
+    /**
+     * 页码
+     */
+    @JsonProperty("pageNo")
+    private Integer pageNo;
+
+    /**
+     * 业务类型
+     */
+    @JsonProperty("businessType")
+    private String businessType;
+
+    /**
+     * 查询状态
+     */
+    @JsonProperty("queryStatus")
+    private String queryStatus;
+
+    /**
+     * 用户代码
+     */
+    @JsonProperty("userCode")
+    private String userCode;
+
+    /**
+     * 车牌号
+     */
+    @JsonProperty("licenseNo")
+    private String licenseNo;
+
+    /**
+     * 车牌号查询标识
+     */
+    @JsonProperty("licenseNoFlag")
+    private String licenseNoFlag;
+
+    /**
+     * 车架号
+     */
+    @JsonProperty("vinNo")
+    private String vinNo;
+
+    /**
+     * 车架号查询标识
+     */
+    @JsonProperty("vinNoFlag")
+    private String vinNoFlag;
+
+    /**
+     * 车架号(备用字段)
+     */
+    @JsonProperty("frameNo")
+    private String frameNo;
+
+    /**
+     * 车架号查询标识(备用字段)
+     */
+    @JsonProperty("frameNoFlag")
+    private String frameNoFlag;
+
+    /**
+     * 发动机号
+     */
+    @JsonProperty("engineNo")
+    private String engineNo;
+
+    /**
+     * 发动机号查询标识
+     */
+    @JsonProperty("engineNoFlag")
+    private String engineNoFlag;
+
+    /**
+     * 订单号
+     */
+    @JsonProperty("orderNo")
+    private String orderNo;
+
+    /**
+     * 订单号查询标识
+     */
+    @JsonProperty("orderNoFlag")
+    private String orderNoFlag;
+
+    /**
+     * 投保单号
+     */
+    @JsonProperty("proposalNo")
+    private String proposalNo;
+
+    /**
+     * 投保单号查询标识
+     */
+    @JsonProperty("proposalNoFlag")
+    private String proposalNoFlag;
+
+    /**
+     * 报价单号
+     */
+    @JsonProperty("quotationNo")
+    private String quotationNo;
+
+    /**
+     * 报价单号查询标识
+     */
+    @JsonProperty("quotationNoFlag")
+    private String quotationNoFlag;
+
+    /**
+     * 保单号
+     */
+    @JsonProperty("policyNo")
+    private String policyNo;
+
+    /**
+     * 保单号查询标识
+     */
+    @JsonProperty("policyNoFlag")
+    private String policyNoFlag;
+
+    /**
+     * 批单号
+     */
+    @JsonProperty("endorseNo")
+    private String endorseNo;
+
+    /**
+     * 批单号查询标识
+     */
+    @JsonProperty("endorseNoFlag")
+    private String endorseNoFlag;
+
+    /**
+     * 被保险人姓名
+     */
+    @JsonProperty("insuredName")
+    private String insuredName;
+
+    /**
+     * 被保险人姓名查询标识
+     */
+    @JsonProperty("insuredNameFlag")
+    private String insuredNameFlag;
+
+    /**
+     * 投保人姓名
+     */
+    @JsonProperty("appliName")
+    private String appliName;
+
+    /**
+     * 投保人姓名查询标识
+     */
+    @JsonProperty("appliNameFlag")
+    private String appliNameFlag;
+
+    /**
+     * 投保人身份证号
+     */
+    @JsonProperty("appliIdentifyNumber")
+    private String appliIdentifyNumber;
+
+    /**
+     * 投保人身份证号查询标识
+     */
+    @JsonProperty("appliIdentifyNumberFlag")
+    private String appliIdentifyNumberFlag;
+
+    /**
+     * 被保险人身份证号
+     */
+    @JsonProperty("insuredIdentifyNumber")
+    private String insuredIdentifyNumber;
+
+    /**
+     * 被保险人身份证号查询标识
+     */
+    @JsonProperty("insuredIdentifyNumberFlag")
+    private String insuredIdentifyNumberFlag;
+
+    /**
+     * 保险起期开始范围
+     */
+    @JsonProperty("startDateBegin")
+    private String startDateBegin;
+
+    /**
+     * 保险起期结束范围
+     */
+    @JsonProperty("startDateEnd")
+    private String startDateEnd;
+
+    /**
+     * 保险止期开始范围
+     */
+    @JsonProperty("endDateBegin")
+    private String endDateBegin;
+
+    /**
+     * 保险止期结束范围
+     */
+    @JsonProperty("endDateEnd")
+    private String endDateEnd;
+
+    /**
+     * 操作日期开始范围
+     */
+    @JsonProperty("operateDateBegin")
+    private String operateDateBegin;
+
+    /**
+     * 操作日期结束范围
+     */
+    @JsonProperty("operateDateEnd")
+    private String operateDateEnd;
+
+    /**
+     * 核保日期开始范围
+     */
+    @JsonProperty("underWriteDateStart")
+    private String underWriteDateStart;
+
+    /**
+     * 核保日期结束范围
+     */
+    @JsonProperty("underWriteDateEnd")
+    private String underWriteDateEnd;
+
+    /**
+     * 业务类别2
+     */
+    @JsonProperty("businessCategories2")
+    private String businessCategories2;
+
+    /**
+     * 业务类别2查询标识
+     */
+    @JsonProperty("businessCategories2Flag")
+    private String businessCategories2Flag;
+
+    /**
+     * 资源类型代码
+     */
+    @JsonProperty("resourceTypeCode")
+    private String resourceTypeCode;
+
+    /**
+     * 是否出单用户代码
+     */
+    @JsonProperty("isIssueUserCode")
+    private String isIssueUserCode;
+
+    /**
+     * 是否出单用户代码查询标识
+     */
+    @JsonProperty("isIssueUserCodeFlag")
+    private String isIssueUserCodeFlag;
+
+    /**
+     * 启用风险数组
+     */
+    @JsonProperty("enableRiskArr")
+    private String enableRiskArr;
+
+    /**
+     * 是否搜索用户代码
+     */
+    @JsonProperty("isSearchUserCode")
+    private String isSearchUserCode;
+
+    /**
+     * 请求头信息内部类
+     */
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Data
+    public static class HeadDTO implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * 访问令牌
+         */
+        @JsonProperty("token")
+        private String token;
+
+        /**
+         * 交易类型
+         */
+        @JsonProperty("transType")
+        private String transType;
+
+        /**
+         * 交易代码
+         */
+        @JsonProperty("transCode")
+        private String transCode;
+    }
+}

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

@@ -0,0 +1,72 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 渤海保险爬虫下载响应实体类
+ *
+ * @author claude
+ * @date 2025-10-24
+ */
+@Data
+@Schema(description = "渤海保险爬虫下载响应实体")
+public class BoHaiCrawlerDownloadResponse {
+
+    @Schema(description = "文档信息列表")
+    @JsonProperty("files")
+    private List<FileItem> files;
+
+    @Schema(description = "头部信息")
+    @JsonProperty("head")
+    private Head head;
+
+    /**
+     * 文档信息项
+     */
+    @Data
+    @Schema(description = "文档信息项")
+    public static class FileItem {
+        @Schema(description = "文档下载地址:电子保单的完整URL,包含Base64加密参数")
+        @JsonProperty("address")
+        private String address;
+
+        @Schema(description = "文件类型:POLICY表示保单文档")
+        @JsonProperty("fileType")
+        private String fileType;
+    }
+
+    /**
+     * 头部信息
+     */
+    @Data
+    @Schema(description = "头部信息")
+    public static class Head {
+        @Schema(description = "返回代码:0表示成功,非0表示失败")
+        @JsonProperty("returnCode")
+        private String returnCode;
+
+        @Schema(description = "返回消息:错误描述信息")
+        @JsonProperty("returnMessage")
+        private String returnMessage;
+
+        @Schema(description = "会话ID:用户的会话标识")
+        @JsonProperty("sessionId")
+        private String sessionId;
+
+        @Schema(description = "认证令牌:空值表示不需要认证")
+        @JsonProperty("token")
+        private String token;
+
+        @Schema(description = "交易代码:EleDocumentAddress表示电子文档地址查询")
+        @JsonProperty("transCode")
+        private String transCode;
+
+        @Schema(description = "交易类型:Res表示响应")
+        @JsonProperty("transType")
+        private String transType;
+    }
+}

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

@@ -0,0 +1,576 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @description: 渤海财险 爬虫查询订单状态响应体
+ * @author: system
+ * @date: 2025/10/23
+ **/
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+public class BoHaiCrawlerQueryOrderStatusResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 业务信息列表
+     */
+    @JsonProperty("businessInfoList")
+    private List<BusinessInfoDTO> businessInfoList;
+
+    /**
+     * 响应头信息
+     */
+    @JsonProperty("head")
+    private HeadDTO head;
+
+    /**
+     * 当前页码
+     */
+    @JsonProperty("pageNo")
+    private String pageNo;
+
+    /**
+     * 总记录数
+     */
+    @JsonProperty("totalRow")
+    private String totalRow;
+
+    /**
+     * 业务信息内部类
+     */
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Data
+    public static class BusinessInfoDTO implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * 入账日期
+         */
+        @JsonProperty("accDate")
+        private String accDate;
+
+        /**
+         * 总保额
+         */
+        @JsonProperty("amount")
+        private String amount;
+
+        /**
+         * 商业险保额
+         */
+        @JsonProperty("amountBI")
+        private String amountBI;
+
+        /**
+         * 交强险保额
+         */
+        @JsonProperty("amountCI")
+        private String amountCI;
+
+        /**
+         * 驾意险保额
+         */
+        @JsonProperty("amountDI")
+        private String amountDI;
+
+        /**
+         * 投保人姓名
+         */
+        @JsonProperty("appliName")
+        private String appliName;
+
+        /**
+         * 是否投保商业险
+         */
+        @JsonProperty("biIsInsure")
+        private String biIsInsure;
+
+        /**
+         * 品牌名称
+         */
+        @JsonProperty("brandName")
+        private String brandName;
+
+        /**
+         * 二级业务分类
+         */
+        @JsonProperty("businessCategories2")
+        private String businessCategories2;
+
+        /**
+         * 业务流水号/订单号
+         */
+        @JsonProperty("businessNo")
+        private String businessNo;
+
+        /**
+         * 订单取消标志
+         */
+        @JsonProperty("cancelFlag")
+        private String cancelFlag;
+
+        /**
+         * 商业险取消标志
+         */
+        @JsonProperty("cancelFlagBI")
+        private String cancelFlagBI;
+
+        /**
+         * 交强险取消标志
+         */
+        @JsonProperty("cancelFlagCI")
+        private String cancelFlagCI;
+
+        /**
+         * 驾意险取消标志
+         */
+        @JsonProperty("cancelFlagDI")
+        private String cancelFlagDI;
+
+        /**
+         * 车主姓名
+         */
+        @JsonProperty("carOwnerName")
+        private String carOwnerName;
+
+        /**
+         * 是否投保交强险
+         */
+        @JsonProperty("ciIsInsure")
+        private String ciIsInsure;
+
+        /**
+         * 机构代码
+         */
+        @JsonProperty("comCode")
+        private String comCode;
+
+        /**
+         * 机构名称
+         */
+        @JsonProperty("comName")
+        private String comName;
+
+        /**
+         * 是否投保驾意险
+         */
+        @JsonProperty("diIsInsure")
+        private String diIsInsure;
+
+        /**
+         * 总保险止期
+         */
+        @JsonProperty("endDate")
+        private String endDate;
+
+        /**
+         * 商业险保险止期
+         */
+        @JsonProperty("endDateBI")
+        private String endDateBI;
+
+        /**
+         * 交强险保险止期
+         */
+        @JsonProperty("endDateCI")
+        private String endDateCI;
+
+        /**
+         * 驾意险保险止期
+         */
+        @JsonProperty("endDateDI")
+        private String endDateDI;
+
+        /**
+         * 批改类型
+         */
+        @JsonProperty("endorType")
+        private String endorType;
+
+        /**
+         * 发动机号
+         */
+        @JsonProperty("engineNo")
+        private String engineNo;
+
+        /**
+         * 车架号
+         */
+        @JsonProperty("frameNo")
+        private String frameNo;
+
+        /**
+         * 处理人1链接
+         */
+        @JsonProperty("handler1Link")
+        private String handler1Link;
+
+        /**
+         * 处理人代码
+         */
+        @JsonProperty("handlerCode")
+        private String handlerCode;
+
+        /**
+         * 处理人姓名
+         */
+        @JsonProperty("handlerName")
+        private String handlerName;
+
+        /**
+         * 被保险人姓名
+         */
+        @JsonProperty("insuredName")
+        private String insuredName;
+
+        /**
+         * 是否新保单影像
+         */
+        @JsonProperty("isNewImage")
+        private String isNewImage;
+
+        /**
+         * 车牌号
+         */
+        @JsonProperty("licenseNo")
+        private String licenseNo;
+
+        /**
+         * 主要车辆种类代码
+         */
+        @JsonProperty("mainCarKindCode")
+        private String mainCarKindCode;
+
+        /**
+         * 新业务标志
+         */
+        @JsonProperty("newRiskFlag")
+        private String newRiskFlag;
+
+        /**
+         * 无车业务数量
+         */
+        @JsonProperty("noCarNums")
+        private String noCarNums;
+
+        /**
+         * 无车业务保单状态
+         */
+        @JsonProperty("noCarPoaStatus")
+        private String noCarPoaStatus;
+
+        /**
+         * 无车业务状态
+         */
+        @JsonProperty("noCarStatus")
+        private String noCarStatus;
+
+        /**
+         * 操作日期
+         */
+        @JsonProperty("operateDate")
+        private String operateDate;
+
+        /**
+         * 操作人代码
+         */
+        @JsonProperty("operatorCode")
+        private String operatorCode;
+
+        /**
+         * 操作人姓名
+         */
+        @JsonProperty("operatorName")
+        private String operatorName;
+
+        /**
+         * 订单号
+         */
+        @JsonProperty("orderNo")
+        private String orderNo;
+
+        /**
+         * 商业险缴费标志(0:未缴费,1:已缴费)
+         */
+        @JsonProperty("payFlagBI")
+        private String payFlagBI;
+
+        /**
+         * 交强险缴费标志(0:未缴费,1:已缴费)
+         */
+        @JsonProperty("payFlagCI")
+        private String payFlagCI;
+
+        /**
+         * 驾意险缴费标志
+         */
+        @JsonProperty("payFlagDI")
+        private String payFlagDI;
+
+        /**
+         * 商业险保单号
+         */
+        @JsonProperty("policyNoBI")
+        private String policyNoBI;
+
+        /**
+         * 交强险保单号
+         */
+        @JsonProperty("policyNoCI")
+        private String policyNoCI;
+
+        /**
+         * 驾意险保单号
+         */
+        @JsonProperty("policyNoDI")
+        private String policyNoDI;
+
+        /**
+         * 总保费
+         */
+        @JsonProperty("premium")
+        private String premium;
+
+        /**
+         * 商业险保费
+         */
+        @JsonProperty("premiumBI")
+        private String premiumBI;
+
+        /**
+         * 交强险保费
+         */
+        @JsonProperty("premiumCI")
+        private String premiumCI;
+
+        /**
+         * 驾意险保费
+         */
+        @JsonProperty("premiumDI")
+        private String premiumDI;
+
+        /**
+         * 商业险是否可打印
+         */
+        @JsonProperty("printFlagBI")
+        private Boolean printFlagBI;
+
+        /**
+         * 交强险是否可打印
+         */
+        @JsonProperty("printFlagCI")
+        private Boolean printFlagCI;
+
+        /**
+         * 驾意险是否可打印
+         */
+        @JsonProperty("printFlagDI")
+        private Boolean printFlagDI;
+
+        /**
+         * 商业险投保单号
+         */
+        @JsonProperty("proposalNoBI")
+        private String proposalNoBI;
+
+        /**
+         * 交强险投保单号
+         */
+        @JsonProperty("proposalNoCI")
+        private String proposalNoCI;
+
+        /**
+         * 驾意险投保单号
+         */
+        @JsonProperty("proposalNoDI")
+        private String proposalNoDI;
+
+        /**
+         * 资源类型代码
+         */
+        @JsonProperty("resourceTypeCode")
+        private String resourceTypeCode;
+
+        /**
+         * 商业险险种代码
+         */
+        @JsonProperty("riskCodeBI")
+        private String riskCodeBI;
+
+        /**
+         * 交强险险种代码
+         */
+        @JsonProperty("riskCodeCI")
+        private String riskCodeCI;
+
+        /**
+         * 驾意险险种代码
+         */
+        @JsonProperty("riskCodeDI")
+        private String riskCodeDI;
+
+        /**
+         * 商业险业务流水号
+         */
+        @JsonProperty("sequenceBiNo")
+        private String sequenceBiNo;
+
+        /**
+         * 交强险业务流水号
+         */
+        @JsonProperty("sequenceCiNo")
+        private String sequenceCiNo;
+
+        /**
+         * 驾意险业务流水号
+         */
+        @JsonProperty("sequenceDiNo")
+        private String sequenceDiNo;
+
+        /**
+         * 总保险起期
+         */
+        @JsonProperty("startDate")
+        private String startDate;
+
+        /**
+         * 商业险保险起期
+         */
+        @JsonProperty("startDateBI")
+        private String startDateBI;
+
+        /**
+         * 交强险保险起期
+         */
+        @JsonProperty("startDateCI")
+        private String startDateCI;
+
+        /**
+         * 驾意险保险起期
+         */
+        @JsonProperty("startDateDI")
+        private String startDateDI;
+
+        /**
+         * 商业险状态结果
+         */
+        @JsonProperty("statusResBI")
+        private Boolean statusResBI;
+
+        /**
+         * 交强险状态结果
+         */
+        @JsonProperty("statusResCI")
+        private Boolean statusResCI;
+
+        /**
+         * 驾意险状态结果
+         */
+        @JsonProperty("statusResDI")
+        private Boolean statusResDI;
+
+        /**
+         * 实际车船税
+         */
+        @JsonProperty("taxActual")
+        private String taxActual;
+
+        /**
+         * 总体承保标志
+         */
+        @JsonProperty("underwriteFlag")
+        private String underwriteFlag;
+
+        /**
+         * 商业险承保标志
+         */
+        @JsonProperty("underwriteFlagBI")
+        private String underwriteFlagBI;
+
+        /**
+         * 交强险承保标志
+         */
+        @JsonProperty("underwriteFlagCI")
+        private String underwriteFlagCI;
+
+        /**
+         * 驾意险承保标志
+         */
+        @JsonProperty("underwriteFlagDI")
+        private String underwriteFlagDI;
+
+        /**
+         * 生效日期
+         */
+        @JsonProperty("validDate")
+        private String validDate;
+
+        /**
+         * 车辆识别码(VIN)
+         */
+        @JsonProperty("vinNo")
+        private String vinNo;
+    }
+
+    /**
+     * 响应头信息内部类
+     */
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Data
+    public static class HeadDTO implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * 返回代码
+         */
+        @JsonProperty("returnCode")
+        private String returnCode;
+
+        /**
+         * 返回消息
+         */
+        @JsonProperty("returnMessage")
+        private String returnMessage;
+
+        /**
+         * 会话ID
+         */
+        @JsonProperty("sessionId")
+        private String sessionId;
+
+        /**
+         * 访问令牌
+         */
+        @JsonProperty("token")
+        private String token;
+
+        /**
+         * 交易代码
+         */
+        @JsonProperty("transCode")
+        private String transCode;
+
+        /**
+         * 交易类型
+         */
+        @JsonProperty("transType")
+        private String transType;
+    }
+}

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

@@ -89,8 +89,8 @@ public class BoHaiCrawlerQuoteProcessServiceImpl implements BoHaiCrawlerQuotePro
         headers.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36");
         headers.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36");
         return headers;*/
         return headers;*/
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
-        httpHeaders.set("Cookie", "HTTPOnly; Cookie=!nWlhN+KeEYSeye21yv2qnldjEk8Kb9NrbshGomNlDw5h9g3lSal2Gb9pNc81nEf0UOCqFH0E/WkCBk4=;");
-        httpHeaders.set("sessionId","114050281_71mz-HPAuESbrk8IEDnnK7m1760145130150");
+        httpHeaders.set("Cookie", "HTTPOnly; skin-color=skin-db; Cookie=!uEW94o2278iwLg21yv2qnldjEk8Kb5RsZkOl0FDX8+Mqxb0EGroyfXXQVmrGlnxevDyUYDwsWh2B5iY=; JSESSIONID=0001TTPD95X9DLJB1il0R_O_NhM:3T0NUMVN3E");
+        httpHeaders.set("sessionId","114050281_ys1Joy8Fnl-SL4D515lH1uJ1761182282670");
         return httpHeaders;
         return httpHeaders;
     }
     }
 
 

+ 185 - 24
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java

@@ -1,6 +1,7 @@
 package com.jzg.quotation.bohai.crawler.service.impl;
 package com.jzg.quotation.bohai.crawler.service.impl;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.google.zxing.NotFoundException;
 import com.google.zxing.NotFoundException;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
@@ -10,8 +11,12 @@ import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.bohai.api.constant.enums.ResponseCode;
 import com.jzg.quotation.bohai.api.constant.enums.ResponseCode;
 import com.jzg.quotation.bohai.api.entity.BoHaiConfigureParameters;
 import com.jzg.quotation.bohai.api.entity.BoHaiConfigureParameters;
+import com.jzg.quotation.bohai.api.entity.request.ElectronicPolicyRequest;
 import com.jzg.quotation.bohai.api.entity.request.ImageUploadRequest;
 import com.jzg.quotation.bohai.api.entity.request.ImageUploadRequest;
 import com.jzg.quotation.bohai.api.entity.request.PaymentRequest;
 import com.jzg.quotation.bohai.api.entity.request.PaymentRequest;
+import com.jzg.quotation.bohai.api.entity.request.StatusDocumentsRequest;
+import com.jzg.quotation.bohai.api.entity.response.ElectronicPolicyResponse;
+import com.jzg.quotation.bohai.api.entity.response.StatusDocumentsResponse;
 import com.jzg.quotation.bohai.api.entity.vo.PersonAreaVo;
 import com.jzg.quotation.bohai.api.entity.vo.PersonAreaVo;
 import com.jzg.quotation.bohai.crawler.component.BoHaiCrawlerCacheComponent;
 import com.jzg.quotation.bohai.crawler.component.BoHaiCrawlerCacheComponent;
 import com.jzg.quotation.bohai.crawler.component.BoHaiBuildingAttributionInformation;
 import com.jzg.quotation.bohai.crawler.component.BoHaiBuildingAttributionInformation;
@@ -33,6 +38,8 @@ import com.jzg.quotation.bohai.crawler.service.BoHaiCrawlerRequest;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpHeaders;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.time.LocalDate;
 import java.time.LocalDate;
@@ -65,7 +72,7 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
 
 
     private final BoHaiCrawlerQuoteProcessService boHaiCrawlerQuoteProcessService;
     private final BoHaiCrawlerQuoteProcessService boHaiCrawlerQuoteProcessService;
 
 
-    private static final String TOKEN = "114050281-9605ec6831302f4d5e37ea64b3c15370";
+    private static final String TOKEN = "114050281-ab12387d7bb7bd319ac3b7d4ddd22090";
 
 
     /**
     /**
      * 登录
      * 登录
@@ -646,9 +653,11 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
     @Override
     @Override
     public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) {
     public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) {
         try {
         try {
+            //获取归属信息
             AttributionInformationVo attributionInformationVo = paymentLinkVo.getOrder().getAttributionInformationVo();
             AttributionInformationVo attributionInformationVo = paymentLinkVo.getOrder().getAttributionInformationVo();
-            BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(paymentLinkVo.getOrder().getOrdersNo());
+            log.info("attributionInformationVo对象的值:{}", JSONObject.toJSONString(attributionInformationVo));
             HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
             HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
+            BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(paymentLinkVo.getOrder().getOrdersNo());
 
 
             log.info("获取支付链接,订单号:{}", boHaiCrawlerOrder.getOrderNo());
             log.info("获取支付链接,订单号:{}", boHaiCrawlerOrder.getOrderNo());
             BoHaiCrawlerPaymentCertiNoQueryRequest boHaiCrawlerPaymentCertiNoQueryRequest = buildPaymentCertiNoQueryRequest(boHaiCrawlerOrder.getOrderNo());
             BoHaiCrawlerPaymentCertiNoQueryRequest boHaiCrawlerPaymentCertiNoQueryRequest = buildPaymentCertiNoQueryRequest(boHaiCrawlerOrder.getOrderNo());
@@ -797,46 +806,129 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
         return request;
         return request;
     }
     }
 
 
+    /**
+     * 下载保单
+     * @param downloadPolicyVo
+     * @return DownloadPolicyResultVo
+     */
     @Override
     @Override
     public DownloadPolicyResultVo downloadPolicy(DownloadPolicyVo downloadPolicyVo) {
     public DownloadPolicyResultVo downloadPolicy(DownloadPolicyVo downloadPolicyVo) {
-        /*AttributionInformationVo attributionInformationVo = downloadPolicyVo.getOrder().getAttributionInformationVo();
-        BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(downloadPolicyVo.getOrder().getOrdersNo());
+        //获取归属信息
+        AttributionInformationVo attributionInformationVo = downloadPolicyVo.getOrder().getAttributionInformationVo();
         HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
+        BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(downloadPolicyVo.getOrder().getOrdersNo());
 
 
-        ElectronicPolicyRequest electronicPolicyRequest = new ElectronicPolicyRequest(attributionInformationVo.getConfigInfo(),
-                boHaiCrawlerOrder.getOrderNo(), boHaiCrawlerOrder.getCiPolicyNo(), boHaiCrawlerOrder.getBiPolicyNo());
-        ElectronicPolicyResponse electronicPolicyResponse = boHaiCrawlerRequestComponent.electronicPolicy(electronicPolicyRequest, headers);
-
+        /*ElectronicPolicyRequest electronicPolicyRequest = new ElectronicPolicyRequest(attributionInformationVo.getConfigInfo(),
+                boHaiCrawlerOrder.getOrderNo(), boHaiCrawlerOrder.getCiPolicyNo(), boHaiCrawlerOrder.getBiPolicyNo());*/
+        BoHaiCrawlerDownloadResponse response = null;
+        BoHaiCrawlerDownloadRequest boHaiCrawlerDownloadRequest = buildDownloadRequest(boHaiCrawlerOrder);
         DownloadPolicyResultVo downloadPolicyResultVo = new DownloadPolicyResultVo();
         DownloadPolicyResultVo downloadPolicyResultVo = new DownloadPolicyResultVo();
-        if (StringUtils.hasLength(electronicPolicyResponse.getData().getTrafficEPolicyUrl())) {
-            downloadPolicyResultVo.setJqUrl(electronicPolicyResponse.getData().getTrafficEPolicyUrl());
+
+        // 下载交强险保单
+        if (StringUtils.hasLength(boHaiCrawlerOrder.getCiPolicyNo())) {
+            //boHaiCrawlerDownloadRequest.setBusinessNo(boHaiCrawlerOrder.getCiPolicyNo());
+            response = boHaiCrawlerRequestComponent.electronPolicyIODownload(boHaiCrawlerDownloadRequest, headers);
+            downloadPolicyResultVo.setJqUrl(response.getFiles().get(0).getAddress());
+        }
+
+        // 下载商业险保单
+        if (StringUtils.hasLength(boHaiCrawlerOrder.getBiPolicyNo())) {
+            boHaiCrawlerDownloadRequest.setBusinessNo(boHaiCrawlerOrder.getBiPolicyNo());
+            response = boHaiCrawlerRequestComponent.electronPolicyIODownload(boHaiCrawlerDownloadRequest, headers);
+            if(!CollectionUtils.isEmpty(response.getFiles())){
+                downloadPolicyResultVo.setSyUrl(response.getFiles().get(0).getAddress());
+            }
         }
         }
-        if (StringUtils.hasLength(electronicPolicyResponse.getData().getBusinessEPolicyUrl())) {
-            downloadPolicyResultVo.setSyUrl(electronicPolicyResponse.getData().getBusinessEPolicyUrl());
+
+        // 下载驾意险保单
+        if (StringUtils.hasLength(boHaiCrawlerOrder.getNiPolicyNo())) {
+            boHaiCrawlerDownloadRequest.setBusinessNo(boHaiCrawlerOrder.getNiPolicyNo());
+            response = boHaiCrawlerRequestComponent.electronPolicyIODownload(boHaiCrawlerDownloadRequest, headers);
+            if(!CollectionUtils.isEmpty(response.getFiles())){
+                downloadPolicyResultVo.setJyUrl(response.getFiles().get(0).getAddress());
+            }
         }
         }
-        return downloadPolicyResultVo;*/
-        return null;
+        return downloadPolicyResultVo;
+    }
+
+    /**
+     * 构建下载请求对象
+     * 按照JSON字段顺序设置请求参数
+     *
+     * @param boHaiCrawlerOrder 渤海保险订单信息
+     * @return BoHaiCrawlerDownloadRequest 下载请求对象
+     */
+    private BoHaiCrawlerDownloadRequest buildDownloadRequest(BoHaiCrawlerOrder boHaiCrawlerOrder) {
+        BoHaiCrawlerDownloadRequest boHaiCrawlerDownloadRequest = new BoHaiCrawlerDownloadRequest();
+        // 按照JSON字段顺序设置请求参数
+        // 1. 设置头部信息
+        BoHaiCrawlerDownloadRequest.Head head = new BoHaiCrawlerDownloadRequest.Head();
+        head.setTransCode("EleDocumentAddress");
+        head.setTransType("Req");
+        head.setToken(TOKEN);
+        boHaiCrawlerDownloadRequest.setHead(head);
+        // 2. 设置业务号(保单号)
+        //boHaiCrawlerDownloadRequest.setBusinessNo(boHaiCrawlerOrder.getOrderNo());
+        // 3. 设置文档类型
+        boHaiCrawlerDownloadRequest.setDocumentType("POLICY");
+        // 4. 设置是否新影像
+        boHaiCrawlerDownloadRequest.setIsNewImage("1");
+        return boHaiCrawlerDownloadRequest;
     }
     }
 
 
     /**
     /**
      * 查询订单状态
      * 查询订单状态
      *
      *
      * @param orderStatusVo
      * @param orderStatusVo
-     * @return
+     * @return OrderStatusResultVo
      */
      */
     @Override
     @Override
     public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
     public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
-        AttributionInformationVo attributionInformationVo = orderStatusVo.getOrder().getAttributionInformationVo();
-        BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(orderStatusVo.getOrder().getOrdersNo());
-        HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
+        try {
+            AttributionInformationVo attributionInformationVo = orderStatusVo.getOrder().getAttributionInformationVo();
+            HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
+            BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(orderStatusVo.getOrder().getOrdersNo());
+
+            BoHaiCrawlerQueryOrderStatusRequest boHaiCrawlerQueryOrderStatusRequest = buildOrderStatusRequest(boHaiCrawlerOrder);
+            BoHaiCrawlerQueryOrderStatusResponse boHaiCrawlerQueryOrderStatusResponse = boHaiCrawlerRequestComponent.queryOrderStatus(boHaiCrawlerQueryOrderStatusRequest, headers);
+            log.info("查询订单状态响应:{}", JSON.toJSONString(boHaiCrawlerQueryOrderStatusResponse));
+            //获取订单状态
+            InsOrderStatusEnum insOrderStatusEnum = determineOrderStatus(boHaiCrawlerQueryOrderStatusResponse);
+            log.info("订单状态:{}", insOrderStatusEnum);
+            OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
+            orderStatusResultVo.setOrderStatus(insOrderStatusEnum);
+            return orderStatusResultVo;
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
 
 
-        /*StatusDocumentsRequest statusDocumentsRequest = new StatusDocumentsRequest(attributionInformationVo.getConfigInfo(),
-                boHaiCrawlerOrder.getOrderNo(), boHaiCrawlerOrder.getCiApplyNo());
-        StatusDocumentsResponse response = boHaiCrawlerRequestComponent.statusDocuments(statusDocumentsRequest, headers);*/
+    /**
+     * 确定订单状态
+     * @param response
+     * @return InsOrderStatusEnum
+     */
+    public InsOrderStatusEnum determineOrderStatus(BoHaiCrawlerQueryOrderStatusResponse response) {
+        // 首先检查是否取消
+        if ("1".equals(response.getBusinessInfoList().get(0).getCancelFlag()) ||
+                "1".equals(response.getBusinessInfoList().get(0).getCancelFlagBI()) ||
+                "1".equals(response.getBusinessInfoList().get(0).getCancelFlagCI())) {
+            return InsOrderStatusEnum.ORDER_CLOSE;
+        }
 
 
-        OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
-        // 处理订单状态逻辑
-        return orderStatusResultVo;
+        // 检查是否已生效
+        if ("3".equals(response.getBusinessInfoList().get(0).getUnderwriteFlagBI()) &&
+                "3".equals(response.getBusinessInfoList().get(0).getUnderwriteFlagCI())) {
+            // 检查是否已缴费
+            if ("0".equals(response.getBusinessInfoList().get(0).getPayFlagBI()) ||
+                    "0".equals(response.getBusinessInfoList().get(0).getPayFlagCI())) {
+                return InsOrderStatusEnum.PAY_PENDING; // 待缴费
+            }
+            return InsOrderStatusEnum.UNDERWRITED; // 已生效
+        }
+        // 其他情况可以根据业务需求进一步细分
+        return InsOrderStatusEnum.QUOTE_ING; // 默认为订单已提交
     }
     }
 
 
     /**
     /**
@@ -1999,5 +2091,74 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
         return head;
         return head;
     }
     }
 
 
+    /**
+     * 构建订单状态查询请求对象
+     *
+     * @param boHaiCrawlerOrder        渤海爬虫订单
+     * @return BoHaiCrawlerQueryOrderStatusRequest
+     */
+    private BoHaiCrawlerQueryOrderStatusRequest buildOrderStatusRequest(BoHaiCrawlerOrder boHaiCrawlerOrder) {
+        BoHaiCrawlerQueryOrderStatusRequest boHaiCrawlerQueryOrderStatusRequest = new BoHaiCrawlerQueryOrderStatusRequest();
+
+        // 设置请求头信息
+        BoHaiCrawlerQueryOrderStatusRequest.HeadDTO head = new BoHaiCrawlerQueryOrderStatusRequest.HeadDTO();
+        head.setToken(TOKEN);
+        head.setTransType("Req");
+        head.setTransCode("CompositeQuery");
+        boHaiCrawlerQueryOrderStatusRequest.setHead(head);
+
+        // 按照JSON字段顺序设置请求参数
+        boHaiCrawlerQueryOrderStatusRequest.setIsQueryAllQuoteUserCode("false");
+        boHaiCrawlerQueryOrderStatusRequest.setLoginCom("14070201");
+        boHaiCrawlerQueryOrderStatusRequest.setRows(10);
+        boHaiCrawlerQueryOrderStatusRequest.setPageNo(1);
+        boHaiCrawlerQueryOrderStatusRequest.setBusinessType("O");
+        boHaiCrawlerQueryOrderStatusRequest.setQueryStatus("");
+        boHaiCrawlerQueryOrderStatusRequest.setUserCode("114050281");
+        boHaiCrawlerQueryOrderStatusRequest.setLicenseNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setLicenseNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setVinNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setVinNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setFrameNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setFrameNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setEngineNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setEngineNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setOrderNo(boHaiCrawlerOrder.getOrderNo());
+        boHaiCrawlerQueryOrderStatusRequest.setOrderNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setProposalNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setProposalNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setQuotationNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setQuotationNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setPolicyNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setPolicyNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setEndorseNo("");
+        boHaiCrawlerQueryOrderStatusRequest.setEndorseNoFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setInsuredName("");
+        boHaiCrawlerQueryOrderStatusRequest.setInsuredNameFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setAppliName("");
+        boHaiCrawlerQueryOrderStatusRequest.setAppliNameFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setAppliIdentifyNumber("");
+        boHaiCrawlerQueryOrderStatusRequest.setAppliIdentifyNumberFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setInsuredIdentifyNumber("");
+        boHaiCrawlerQueryOrderStatusRequest.setInsuredIdentifyNumberFlag("=");
+        boHaiCrawlerQueryOrderStatusRequest.setStartDateBegin("");
+        boHaiCrawlerQueryOrderStatusRequest.setStartDateEnd("");
+        boHaiCrawlerQueryOrderStatusRequest.setEndDateBegin("");
+        boHaiCrawlerQueryOrderStatusRequest.setEndDateEnd("");
+        boHaiCrawlerQueryOrderStatusRequest.setOperateDateBegin(LocalDate.now().minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+        boHaiCrawlerQueryOrderStatusRequest.setOperateDateEnd(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+        boHaiCrawlerQueryOrderStatusRequest.setUnderWriteDateStart("");
+        boHaiCrawlerQueryOrderStatusRequest.setUnderWriteDateEnd("");
+        boHaiCrawlerQueryOrderStatusRequest.setBusinessCategories2("");
+        boHaiCrawlerQueryOrderStatusRequest.setBusinessCategories2Flag("");
+        boHaiCrawlerQueryOrderStatusRequest.setResourceTypeCode("004");
+        boHaiCrawlerQueryOrderStatusRequest.setIsIssueUserCode("");
+        boHaiCrawlerQueryOrderStatusRequest.setIsIssueUserCodeFlag("");
+        boHaiCrawlerQueryOrderStatusRequest.setEnableRiskArr("");
+        boHaiCrawlerQueryOrderStatusRequest.setIsSearchUserCode("0");
+
+        return boHaiCrawlerQueryOrderStatusRequest;
+    }
+
 
 
 }
 }

+ 31 - 21
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -459,35 +459,45 @@ public class UnifyOrderManager {
             module = "车险订单",
             module = "车险订单",
             subModule = "订单详情",
             subModule = "订单详情",
             optType = QuoteNumberConstant.QuoteOptType.OPT_TYPE_9,
             optType = QuoteNumberConstant.QuoteOptType.OPT_TYPE_9,
-            description = "更新订单",
+            description = "获取订单状态",
             orderSpEl = "#orderStatusVo",
             orderSpEl = "#orderStatusVo",
             feedbackSpEl = "#ret.code + ' - ' + #ret.msg+ ' - ' + #ret.data"
             feedbackSpEl = "#ret.code + ' - ' + #ret.msg+ ' - ' + #ret.data"
     )
     )
     @Operation(summary = "获取订单状态")
     @Operation(summary = "获取订单状态")
     @PostMapping("/getOrderStatus")
     @PostMapping("/getOrderStatus")
     public HttpResult getOrderStatus(@RequestBody OrderStatusVo orderStatusVo) throws Exception {
     public HttpResult getOrderStatus(@RequestBody OrderStatusVo orderStatusVo) throws Exception {
-
-        InsOrders insOrders = insOrdersService.getById(orderStatusVo.getOrder().getOrdersNo());
-        AssertionUtils.isFail(Objects.isNull(insOrders), "订单不存在");
-        HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId(), baseController.getToken());
-        orderStatusVo.getOrder().setAgreementId(insOrders.getAgreementId());
-        orderStatusVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
-        orderStatusVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
-        orderStatusVo.getOrder().setCompanyOrderNo(insOrders.getCompanyOrderNo());
-        orderStatusVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
-        orderStatusVo.setInsOrders(insOrders);
-        //获取保司实体
-        QuotationBaseService orderStatusService = companyFactory.getOrderStatusService(orderStatusVo, insOrdersService, baseController);
-
-        InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
-        orderStatusVo.setInsOrdersPolicy(insOrdersPolicy);
-        OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
-
-        // 保存状态查询结果
-        insOrdersService.orderAfterUpdateOrderStatus(orderStatusVo.getOrder().getOrdersNo(), orderStatusResultVo);
-        return HttpResult.ok("状态刷新成功");
+        try {
+            InsOrders insOrders = insOrdersService.getById(orderStatusVo.getOrder().getOrdersNo());
+            AssertionUtils.isFail(Objects.isNull(insOrders), "订单不存在");
+            HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId(), baseController.getToken());
+            orderStatusVo.getOrder().setAgreementId(insOrders.getAgreementId());
+            orderStatusVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
+            orderStatusVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
+            orderStatusVo.getOrder().setCompanyOrderNo(insOrders.getCompanyOrderNo());
+            orderStatusVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
+            orderStatusVo.setInsOrders(insOrders);
+            //获取保司实体
+            QuotationBaseService orderStatusService = companyFactory.getOrderStatusService(orderStatusVo, insOrdersService, baseController);
+
+            InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
+            orderStatusVo.setInsOrdersPolicy(insOrdersPolicy);
+            OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
+
+            // 保存状态查询结果
+            insOrdersService.orderAfterUpdateOrderStatus(orderStatusVo.getOrder().getOrdersNo(), orderStatusResultVo);
+            return HttpResult.ok("状态刷新成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
     }
 
 
+    /**
+     * 下载电子保单
+     * @param downloadPolicyVo
+     * @return HttpResult
+     * @throws IOException
+     */
     @OrderOperationLog(
     @OrderOperationLog(
             module = "车险订单",
             module = "车险订单",
             subModule = "订单详情",
             subModule = "订单详情",

+ 12 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java

@@ -52,6 +52,7 @@ import com.jzg.quotation.summary.service.*;
 import com.jzg.quotation.summary.state.listener.OrderStateListener;
 import com.jzg.quotation.summary.state.listener.OrderStateListener;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.Setter;
 import lombok.Setter;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
@@ -69,6 +70,7 @@ import java.util.stream.Collectors;
 
 
 @RequiredArgsConstructor
 @RequiredArgsConstructor
 @Service
 @Service
+@Slf4j
 public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders> implements InsOrdersService {
 public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders> implements InsOrdersService {
 
 
 
 
@@ -653,6 +655,14 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
 
     }
     }
 
 
+    /**
+     * 发送订单状态变更消息
+     * @param insOrders 订单信息
+     * @param carInfo 订单车辆信息
+     * @param ordersCosts 订单费用信息
+     * @param token 授权token
+     * @param tplCode 模板code
+     */
     @Override
     @Override
     public void orderStatusMessage(InsOrders insOrders, InsOrdersCarInfo carInfo, InsOrdersCosts ordersCosts, String token, MessageCodeEnum tplCode) {
     public void orderStatusMessage(InsOrders insOrders, InsOrdersCarInfo carInfo, InsOrdersCosts ordersCosts, String token, MessageCodeEnum tplCode) {
         // 获取消息模板 并替换内容
         // 获取消息模板 并替换内容
@@ -1026,6 +1036,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         InsOrdersCosts costs = insOrdersCostsService.getById(insOrders.getId());
         InsOrdersCosts costs = insOrdersCostsService.getById(insOrders.getId());
         //设置订单状态
         //设置订单状态
         StateResult stateResult = orderStateListener.statusChange(orderStatusResultVo.getOrderStatus(), insOrders.getOrderStatus());
         StateResult stateResult = orderStateListener.statusChange(orderStatusResultVo.getOrderStatus(), insOrders.getOrderStatus());
+        log.info("当前订单状态:{}", stateResult.getCurrentState());
         insOrders.setOrderStatus(String.valueOf(stateResult.getCurrentState()));
         insOrders.setOrderStatus(String.valueOf(stateResult.getCurrentState()));
 
 
         //更新保单号
         //更新保单号
@@ -1036,6 +1047,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         if (Objects.nonNull(orderStatusResultVo.getSyPolicyno())) {
         if (Objects.nonNull(orderStatusResultVo.getSyPolicyno())) {
             insOrdersPolicy.setSyPolicyNo(orderStatusResultVo.getSyPolicyno());
             insOrdersPolicy.setSyPolicyNo(orderStatusResultVo.getSyPolicyno());
         }
         }
+        insOrdersPolicy.setUpdateTime(LocalDateTime.now());
         insOrdersPolicyService.updateById(insOrdersPolicy);
         insOrdersPolicyService.updateById(insOrdersPolicy);
 
 
         //更新支付连接
         //更新支付连接

+ 5 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/state/OrderState.java

@@ -16,10 +16,15 @@ public class OrderState {
         AUDIT_ING(2),
         AUDIT_ING(2),
         // 人工处理
         // 人工处理
         STAFF_PROCESS(3),
         STAFF_PROCESS(3),
+        //待缴费
         PAY_PENDING(4),
         PAY_PENDING(4),
+        // 已承保
         UNDERWRITED(5),
         UNDERWRITED(5),
+        // 报价失败
         QUOTE_FAIL(6),
         QUOTE_FAIL(6),
+        // 核保失败
         AUDIT_FAIL(7),
         AUDIT_FAIL(7),
+        // 订单关闭
         ORDER_CLOSE(8);
         ORDER_CLOSE(8);
 
 
 
 

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

@@ -1,11 +1,13 @@
 package com.jzg.quotation.summary.state.listener;
 package com.jzg.quotation.summary.state.listener;
 
 
+import com.alibaba.fastjson.JSON;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.core.base.StateResult;
 import com.jzg.commons.core.base.StateResult;
 import com.jzg.commons.entity.po.PtlAgreementCostExternal;
 import com.jzg.commons.entity.po.PtlAgreementCostExternal;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.quotation.summary.state.OrderState;
 import com.jzg.quotation.summary.state.OrderState;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.messaging.Message;
 import org.springframework.messaging.Message;
 import org.springframework.messaging.support.MessageBuilder;
 import org.springframework.messaging.support.MessageBuilder;
 import org.springframework.statemachine.StateMachine;
 import org.springframework.statemachine.StateMachine;
@@ -23,6 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
  */
  */
 
 
 @Component
 @Component
+@Slf4j
 public class OrderStateListener {
 public class OrderStateListener {
 
 
     @Resource
     @Resource
@@ -34,26 +37,30 @@ public class OrderStateListener {
             costStateMachine.stop(); // 停止状态机
             costStateMachine.stop(); // 停止状态机
             Message<OrderState.OrderStateEvent> block = message.block();
             Message<OrderState.OrderStateEvent> block = message.block();
             String orderStatus = (String) block.getHeaders().get("entity");
             String orderStatus = (String) block.getHeaders().get("entity");
+            log.info("orderStatus的值:{}", orderStatus);
             costStateMachine.getStateMachineAccessor().doWithAllRegions(accessor -> {
             costStateMachine.getStateMachineAccessor().doWithAllRegions(accessor -> {
+                OrderState.OrderStateEnum targetState;
                 accessor.resetStateMachineReactively(new DefaultStateMachineContext<>(
                 accessor.resetStateMachineReactively(new DefaultStateMachineContext<>(
                         // 目标状态
                         // 目标状态
-                        OrderState.OrderStateEnum.fromValue(Integer.parseInt(orderStatus)),
+                        targetState = OrderState.OrderStateEnum.fromValue(Integer.parseInt(orderStatus)),
                         null, // 当前事件(可以为 null)
                         null, // 当前事件(可以为 null)
                         null, // 扩展上下文(可以为 null)
                         null, // 扩展上下文(可以为 null)
                         null  // 转换历史(通常为 null)
                         null  // 转换历史(通常为 null)
                 )).block();
                 )).block();
+                log.info("targetState的值:{}", targetState);
             });
             });
+
             Mono<Void> startMono = costStateMachine.startReactively(); //启用状态机
             Mono<Void> startMono = costStateMachine.startReactively(); //启用状态机
-            startMono.block();
+            startMono.block();// 阻塞等待启动完成
 
 
             Flux<StateMachineEventResult<OrderState.OrderStateEnum, OrderState.OrderStateEvent>> stateMachineEventResultFlux = costStateMachine.sendEvent(message);
             Flux<StateMachineEventResult<OrderState.OrderStateEnum, OrderState.OrderStateEvent>> stateMachineEventResultFlux = costStateMachine.sendEvent(message);
             StateMachineEventResult<OrderState.OrderStateEnum, OrderState.OrderStateEvent> eventResult = stateMachineEventResultFlux.blockFirst();
             StateMachineEventResult<OrderState.OrderStateEnum, OrderState.OrderStateEvent> eventResult = stateMachineEventResultFlux.blockFirst();
-
+            log.info("eventResult对象的值:{}", JSON.toJSONString(eventResult));
             if (eventResult != null && eventResult.getResultType() == StateMachineEventResult.ResultType.ACCEPTED) {
             if (eventResult != null && eventResult.getResultType() == StateMachineEventResult.ResultType.ACCEPTED) {
                 result.set(true);
                 result.set(true);
             }
             }
         } catch (Exception e) {
         } catch (Exception e) {
-
+            e.printStackTrace();
         } finally {
         } finally {
             costStateMachine.stopReactively();
             costStateMachine.stopReactively();
             return result.get();
             return result.get();
@@ -91,11 +98,18 @@ public class OrderStateListener {
         }
         }
     }
     }
 
 
+    /**
+     *
+     * @param orderStatus
+     * @param event
+     * @return
+     */
     private StateResult callEvent(String orderStatus, OrderState.OrderStateEvent event) {
     private StateResult callEvent(String orderStatus, OrderState.OrderStateEvent event) {
         StateResult stateResult = new StateResult();
         StateResult stateResult = new StateResult();
         Mono<Message<OrderState.OrderStateEvent>> message = Mono.just(MessageBuilder.withPayload(event).setHeader("entity",orderStatus).build());
         Mono<Message<OrderState.OrderStateEvent>> message = Mono.just(MessageBuilder.withPayload(event).setHeader("entity",orderStatus).build());
         stateResult.setResult(sendEvent(message));
         stateResult.setResult(sendEvent(message));
         stateResult.setCurrentState(costStateMachine.getState().getId().getValue());
         stateResult.setCurrentState(costStateMachine.getState().getId().getValue());
+        log.info("stateResult对象的值:{}", JSON.toJSONString(stateResult));
         return stateResult;
         return stateResult;
     }
     }
 
 
@@ -129,7 +143,7 @@ public class OrderStateListener {
     /**
     /**
      * 核保成功
      * 核保成功
      * @param currentStatus
      * @param currentStatus
-     * @return
+     * @return StateResult
      */
      */
     public StateResult auditSuccess(String currentStatus){
     public StateResult auditSuccess(String currentStatus){
         return callEvent(currentStatus, OrderState.OrderStateEvent.PAY_PENDING_EVENT);
         return callEvent(currentStatus, OrderState.OrderStateEvent.PAY_PENDING_EVENT);
@@ -168,6 +182,7 @@ public class OrderStateListener {
 
 
 
 
     public StateResult statusChange(InsOrderStatusEnum insOrderStatusEnum, String currentStatus) {
     public StateResult statusChange(InsOrderStatusEnum insOrderStatusEnum, String currentStatus) {
+        log.info("设置的订单状态:{},当前的订单状态:{}", insOrderStatusEnum,currentStatus);
         StateResult stateResult = new StateResult();
         StateResult stateResult = new StateResult();
         switch(insOrderStatusEnum){
         switch(insOrderStatusEnum){
             //报价失败
             //报价失败