Răsfoiți Sursa

开发渤海爬虫影像上传接口

jinshihui 11 luni în urmă
părinte
comite
de09458347
28 a modificat fișierele cu 1001 adăugiri și 208 ștergeri
  1. 1 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/AttributionInformationVo.java
  2. 6 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/InsuranceUploadImageVo.java
  3. 7 3
      commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java
  4. 258 37
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/component/BoHaiCrawlerRequestComponent.java
  5. 8 13
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/constant/enums/RequestUrl.java
  6. 21 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/BoHaiCrawlerConfigureParameters.java
  7. 76 5
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerBaseRequest.java
  8. 20 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadRequest.java
  9. 38 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadRequestDto.java
  10. 20 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadSubmitEncryptionRequest.java
  11. 210 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerImageUploadSubmitRequest.java
  12. 3 3
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerPaymentRequest.java
  13. 1 1
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerQuotationRequest.java
  14. 0 20
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiGenerateOrderNoRequest.java
  15. 0 23
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/UnderwritingRequest.java
  16. 45 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerImageUploadResponse.java
  17. 73 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/response/BoHaiCrawlerImageUploadSubmitResponse.java
  18. 6 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerQuoteProcessServiceImpl.java
  19. 18 7
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java
  20. 31 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/BatchNumberGenerator.java
  21. 0 41
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DESJava.java
  22. 35 23
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DESUtil.java
  23. 92 20
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  24. 1 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/DaJiaCrawlerRequestComponent.java
  25. 25 4
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  26. 2 4
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java
  27. 3 4
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/image/ImageParamHandlerDecorator.java
  28. 1 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsTaskImagesServiceImpl.java

+ 1 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/AttributionInformationVo.java

@@ -30,6 +30,7 @@ public class AttributionInformationVo implements Serializable {
      * 密码
      */
     private String password;
+
     /**
      * 配置信息
      */

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

@@ -8,6 +8,7 @@ import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.io.Serial;
 import java.io.Serializable;
@@ -36,6 +37,11 @@ public class InsuranceUploadImageVo implements Serializable {
      */
     private List<InsuranceImageVo> imageVoList;
 
+     /**
+     * 上传的影像文件
+     */
+    //private MultipartFile[] file;
+
     /**
      * 车辆信息
      */

+ 7 - 3
commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java

@@ -36,6 +36,7 @@ public class InsuranceImageVo {
      * 保司影像名称
      */
     private String insuranceImageType;
+
     /**
      * 影像base64 影像类型
      */
@@ -47,6 +48,12 @@ public class InsuranceImageVo {
 
         @Serial
         private static final long serialVersionUID = -8193683303365881496L;
+
+        /**
+         *批次号
+         */
+        private String batchNum;
+
         /**
          * 影像唯一id
          */
@@ -64,12 +71,9 @@ public class InsuranceImageVo {
          */
         private String imageSize;
 
-
         /**
          * 影像大小
          */
         private byte[] imageByte;
-
-
     }
 }

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

@@ -1,20 +1,26 @@
 package com.jzg.quotation.bohai.crawler.component;
 
+import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson2.JSON;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.exception.SystemException;
 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.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.properties.BoHaiCrawlerProperties;
+import com.jzg.quotation.bohai.crawler.util.BatchNumberGenerator;
 import com.jzg.quotation.bohai.crawler.util.DESEncryption;
 import com.jzg.quotation.bohai.crawler.util.DESUtil;
 import com.jzg.quotation.commons.component.RequestComponent;
@@ -23,14 +29,16 @@ import com.jzg.quotation.commons.standard.CrawlerRequestUrlStandard;
 import com.jzg.quotation.commons.utils.RequestObjectConversion;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.core.io.ByteArrayResource;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
+import org.springframework.web.multipart.MultipartFile;
 
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
 
 /**
  * @description: 渤海财险爬虫请求组件
@@ -42,6 +50,8 @@ import java.util.UUID;
 @RequiredArgsConstructor
 public class BoHaiCrawlerRequestComponent {
 
+    private static final String TOKEN = "114050281-e867bc9aab4951bdc2803f54c81892e8";
+
     // 循环次数
     public static final int CIRCULATE_NUMBER = 3;
 
@@ -63,7 +73,8 @@ public class BoHaiCrawlerRequestComponent {
         BoHaiCrawlerCaptchaResponse captcha = captcha(CIRCULATE_NUMBER);
         // 登录存入缓存当中
         BoHaiCrawlerAuthenticateRequest request = new BoHaiCrawlerAuthenticateRequest(captcha, username, password);
-        BoHaiCrawlerBaseRequest crawlerBaseRequest = new BoHaiCrawlerBaseRequest(request);
+        //BoHaiCrawlerBaseRequest crawlerBaseRequest = new BoHaiCrawlerBaseRequest(request);
+        BoHaiCrawlerBaseRequest crawlerBaseRequest = null;
         return requestComponent.objectPost(RequestUrl.AUTHENTICATE.getRequestUrl(""), crawlerBaseRequest, BoHaiCrawlerBaseResponse.class);
     }
 
@@ -170,31 +181,13 @@ public class BoHaiCrawlerRequestComponent {
      */
     public <BoHaiResponse> BoHaiResponse request(CrawlerRequestUrlStandard crawlerRequestUrlStandard, Object request, Class<BoHaiResponse> responseClass, HttpHeaders headers) {
         try {
-            //String jsonString = JSON.toJSONString(request);
-            ObjectMapper objectMapper = new ObjectMapper();
-            String jsonString = objectMapper.writeValueAsString(request);
-            log.info("请求参数:{}", jsonString);
-            DESUtil des = new DESUtil("c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==");
-            // 参数加密
-            String encrypt = des.des_encrypt(jsonString);
-            log.info("请求参数加密:{}", encrypt);
-            //生成md5值
-            String md5Value = DESUtil.md5(encrypt + "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==");
-            log.info("请求参数md5的值:{}", md5Value);
-
-            BoHaiCrawlerVehicleConfirmationReqeust2 boHaiCrawlerVehicleConfirmationReqeust2 = new BoHaiCrawlerVehicleConfirmationReqeust2();
-            boHaiCrawlerVehicleConfirmationReqeust2.setEncryptionData(encrypt);
-            boHaiCrawlerVehicleConfirmationReqeust2.setMd5(md5Value);
-
-            //真正的请求
-            ResponseEntity<String> responseEntity = requestComponent.objectPost2(RequestUrl.VEHICLECONFIRMATION.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()), boHaiCrawlerVehicleConfirmationReqeust2, String.class, headers);
+            ResponseEntity<String> responseEntity = requestComponent.objectPost2(crawlerRequestUrlStandard.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()), request, String.class, headers);
 
             String responseString = responseEntity.getBody();
             log.info("请求返回参数:{}", responseString);
-
             AssertionUtils.isEmpty(responseString, "请求异常请重试");
             // 参数解密
-            String decrypt = des.des_decrypt(responseString);
+            String decrypt = DESUtil.des_decrypt(responseString);
             log.info("请求返回参数解密:{}", decrypt);
             return JSON.parseObject(decrypt, responseClass);
         } catch (Exception e) {
@@ -214,19 +207,67 @@ public class BoHaiCrawlerRequestComponent {
      * @return BoHaiResponse
      */
     public <BoHaiResponse> BoHaiResponse request1(CrawlerRequestUrlStandard crawlerRequestUrlStandard, Object request, Class<BoHaiResponse> responseClass, HttpHeaders headers) {
-        // 参数
-        //BoHaiCrawlerBaseRequest1 crawlerBaseRequest = new BoHaiCrawlerBaseRequest1(request);
-        //ResponseEntity<BoHaiCrawlerBaseResponse> responseEntity = requestComponent.objectPost("", crawlerBaseRequest, BoHaiCrawlerBaseResponse.class, headers);
-        ResponseEntity<BoHaiCrawlerBaseResponse1> responseEntity = requestComponent.objectPost(RequestUrl.CAR.getRequestUrl(boHaiCrawlerProperties.getBaseUrl()), request, BoHaiCrawlerBaseResponse1.class, headers);
-        BoHaiCrawlerBaseResponse1 boHaiCrawlerBaseResponse = responseEntity.getBody();
-        log.info("boHaiCrawlerBaseResponse参数的值:{}", JSON.toJSONString(boHaiCrawlerBaseResponse));
-
-        AssertionUtils.isEmpty(boHaiCrawlerBaseResponse, "请求异常请重试");
-        if (!boHaiCrawlerBaseResponse.getCode().equals(Integer.valueOf(0))) {
-            throw new SystemException(boHaiCrawlerBaseResponse.getMsg());
+
+        ResponseEntity<BoHaiResponse> responseEntity = requestComponent.objectPost(crawlerRequestUrlStandard.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()), request, responseClass, headers);
+
+        AssertionUtils.isEmpty(responseEntity, "请求异常请重试");
+        BoHaiResponse body = responseEntity.getBody();
+        return JSON.parseObject(JSON.toJSONString(body), responseClass);
+    }
+
+    /**
+     * 请求(请求参数没有加密)
+     *
+     * @param url
+     * @param request
+     * @param responseClass
+     * @param headers
+     * @return BoHaiResponse
+     */
+    public <BoHaiResponse> BoHaiResponse requestForUpload(String url, Object request, Class<BoHaiResponse> responseClass, HttpHeaders headers) {
+        try {
+            ResponseEntity<String> responseEntity = requestComponent.objectPostForUpload(url, request, String.class, headers);
+            String result = responseEntity.getBody();
+
+            AssertionUtils.isEmpty(result, "请求异常请重试");
+            //参数解密
+            String decrypt = DESUtil.des_decrypt(result);
+            log.info("解密的值:{}", decrypt);
+            return (BoHaiResponse) parseImageUploadResponse(decrypt);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 解析JSON字符串为BoHaiCrawlerImageUploadResponse
+     *
+     * @param jsonString JSON字符串
+     * @return BoHaiCrawlerImageUploadResponse
+     */
+    public static BoHaiCrawlerImageUploadResponse parseImageUploadResponse(String jsonString) {
+        try {
+            JSONObject jsonObject = com.alibaba.fastjson.JSON.parseObject(jsonString);
+            // 创建响应对象
+            BoHaiCrawlerImageUploadResponse response = new BoHaiCrawlerImageUploadResponse();
+            Map<String, BoHaiCrawlerImageUploadResponse.ImageInfo> dataMap = new HashMap<>();
+            // 遍历所有键值对
+            for (String fileName : jsonObject.keySet()) {
+                JSONObject imageJson = jsonObject.getJSONObject(fileName);
+                if (imageJson != null) {
+                    BoHaiCrawlerImageUploadResponse.ImageInfo imageInfo = new BoHaiCrawlerImageUploadResponse.ImageInfo();
+                    imageInfo.setPageUrl(imageJson.getString("PAGE_URL"));
+                    imageInfo.setThumUrl(imageJson.getString("THUM_URL"));
+                    dataMap.put(fileName, imageInfo);
+                }
+            }
+            response.setData(dataMap);
+            return  response;
+        } catch (Exception e) {
+            log.error("解析图片上传响应失败: {}", e.getMessage(), e);
+            throw new RuntimeException("JSON解析失败", e);
         }
-        CarModelDataDTO data = boHaiCrawlerBaseResponse.getData();
-        return JSON.parseObject(JSON.toJSONString(data), responseClass);
     }
 
     /**
@@ -242,7 +283,6 @@ public class BoHaiCrawlerRequestComponent {
         //BoHaiCrawlerBaseResponse response = requestComponent.get(RequestUrl.COMPANIES.getRequestUrl(boHaiCrawlerProperties.getBaseUrl()), multiValueMap, "", BoHaiCrawlerBaseResponse.class, headers);
         BoHaiCrawlerBaseResponse response = requestComponent.get("", multiValueMap, "", BoHaiCrawlerBaseResponse.class, headers);
         BoHaiCrawlerCompaniesResponse daJiaCrawlerCompaniesResponse = DESEncryption.decryptStrToObject(response.getResult(), BoHaiCrawlerCompaniesResponse.class);
-
         return daJiaCrawlerCompaniesResponse.getList()
                 .stream()
                 .filter(x -> cDptCde.equals(x.getCDptCde()))
@@ -320,11 +360,192 @@ public class BoHaiCrawlerRequestComponent {
     /**
      * 核保
      *
-     * @param boHaiCrawlerUnderwritingRequest2 核保请求实体
+     * @param boHaiCrawlerUnderwritingRequest2
      * @param headers
      * @return BoHaiCrawlerUnderwritingResponse
      */
     public BoHaiCrawlerUnderwritingResponse underwriting(BoHaiCrawlerUnderwritingRequest2 boHaiCrawlerUnderwritingRequest2, HttpHeaders headers) throws Exception {
         return request(RequestUrl.UNDERWRITING, boHaiCrawlerUnderwritingRequest2, BoHaiCrawlerUnderwritingResponse.class, headers);
     }
+
+
+    /**
+     * 上传影像件
+     *
+     * @param imageUploadRequest
+     * @return BoHaiCrawlerImageUploadSubmitResponse
+     */
+    public BoHaiCrawlerImageUploadSubmitResponse uploadImage(BoHaiCrawlerImageUploadRequestDto boHaiCrawlerImageUploadRequest, HttpHeaders headers) throws Exception {
+        //1、调用第一个接口:上传图片
+        List<String> imageNameList = new LinkedList<>();
+        List<InsuranceImageVo> imageVoList = boHaiCrawlerImageUploadRequest.getImageVoList();
+        //生成批次号
+        String batchNumber = BatchNumberGenerator.generateBatchNumber();
+        for (InsuranceImageVo insuranceImageVo : imageVoList) {
+            if (Objects.nonNull(insuranceImageVo)) {
+                List<InsuranceImageVo.ImageDTO> imageBase64List = insuranceImageVo.getImageBase64List();
+                for (InsuranceImageVo.ImageDTO imageDTO : imageBase64List) {
+                    imageDTO.setBatchNum(batchNumber);
+                    BoHaiCrawlerImageUploadResponse boHaiCrawlerImageUploadResponse = uploadImage(imageDTO, headers);
+                    Map<String, BoHaiCrawlerImageUploadResponse.ImageInfo> data = boHaiCrawlerImageUploadResponse.getData();
+                    data.keySet().forEach(key -> imageNameList.add(key));
+                }
+            }
+        }
+        log.info("调用渤海保司第一个上传接口成功");
+
+        //2、调用第二个接口:上传图片提交
+        BoHaiCrawlerImageUploadSubmitRequest boHaiCrawlerImageUploadSubmitRequest = buildImageUploadSubmitRequest(
+                boHaiCrawlerImageUploadRequest, imageNameList, batchNumber);
+        //String jsonString = JSON.toJSONString(request);
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonString = objectMapper.writeValueAsString(boHaiCrawlerImageUploadSubmitRequest);
+        log.info("请求参数:{}", jsonString);
+        // 参数加密
+        String encrypt = DESUtil.des_encrypt(jsonString);
+        log.info("请求参数加密:{}", encrypt);
+        //生成md5值
+        String md5Value = DESUtil.md5(encrypt + "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==");
+        log.info("请求参数md5的值:{}", md5Value);
+
+        BoHaiCrawlerImageUploadSubmitEncryptionRequest boHaiCrawlerImageUploadSubmitEncryptionRequest = new BoHaiCrawlerImageUploadSubmitEncryptionRequest();
+        boHaiCrawlerImageUploadSubmitEncryptionRequest.setEncryptionData(encrypt);
+        boHaiCrawlerImageUploadSubmitEncryptionRequest.setMd5(md5Value);
+
+        BoHaiCrawlerImageUploadSubmitResponse boHaiCrawlerImageUploadSubmitResponse = request(RequestUrl.UPLOAD_SUBMIT, boHaiCrawlerImageUploadSubmitEncryptionRequest, BoHaiCrawlerImageUploadSubmitResponse.class, headers);
+        String returnCode = boHaiCrawlerImageUploadSubmitResponse.getHead().getReturnCode();
+        if (!"0".equals(returnCode)) {
+            log.error("上传影像提交失败,返回码:{},返回消息:{}", returnCode, boHaiCrawlerImageUploadSubmitResponse.getHead().getReturnMessage());
+            throw new SystemException("上传影像提交失败,返回码:" + returnCode + ",返回消息:" + boHaiCrawlerImageUploadSubmitResponse.getHead().getReturnMessage());
+        }else{
+            log.info("上传影像成功");
+        }
+        return boHaiCrawlerImageUploadSubmitResponse;
+    }
+
+    /**
+     * 构建图片上传提交请求对象
+     *
+     * @param boHaiCrawlerImageUploadRequest  请求DTO
+     * @param files       文件数组
+     * @param batchNumber 批次号
+     * @return BoHaiCrawlerImageUploadSubmitRequest
+     */
+    private BoHaiCrawlerImageUploadSubmitRequest buildImageUploadSubmitRequest(
+            BoHaiCrawlerImageUploadRequestDto boHaiCrawlerImageUploadRequest, List<String> imageNameList, String batchNumber) {
+
+        BoHaiCrawlerImageUploadSubmitRequest submitRequest = new BoHaiCrawlerImageUploadSubmitRequest();
+        // 设置请求头信息
+        BoHaiCrawlerImageUploadSubmitRequest.Head head = new BoHaiCrawlerImageUploadSubmitRequest.Head();
+        head.setToken(TOKEN);
+        head.setTransType("Req");
+        head.setTransCode("UploadImage");
+        submitRequest.setHead(head);
+
+        // 设置用户和机构信息
+        submitRequest.setUserCode("114050281");
+        submitRequest.setUserName("郝壮明");
+        submitRequest.setOrgCode("14070201");
+        submitRequest.setOrgName("山西分公司介休支公司业务一部");
+
+        // 设置业务代码
+        submitRequest.setCode("ECM10002");
+        submitRequest.setRoleCode("cxcb");
+        // 设置批次号
+        submitRequest.setBatchNum(batchNumber);
+
+        // 构建批次列表
+        List<BoHaiCrawlerImageUploadSubmitRequest.BatchInfo> bathList = new ArrayList<>();
+        BoHaiCrawlerImageUploadSubmitRequest.BatchInfo batchInfo = new BoHaiCrawlerImageUploadSubmitRequest.BatchInfo();
+        //分类代码(重要)
+        batchInfo.setAppCode("CXCB_TB");
+        batchInfo.setAppName("车险投保资料");
+        batchInfo.setBusiNo(boHaiCrawlerImageUploadRequest.getOrderNo());
+
+        // 构建页面列表
+        List<BoHaiCrawlerImageUploadSubmitRequest.PageInfo> pagelist = new ArrayList<>();
+        BoHaiCrawlerImageUploadSubmitRequest.PageInfo pageInfo = new BoHaiCrawlerImageUploadSubmitRequest.PageInfo();
+        pageInfo.setId("CXCB_TB001");
+
+        // 构建子分类列表
+        List<BoHaiCrawlerImageUploadSubmitRequest.ChildInfo> children = new ArrayList<>();
+        BoHaiCrawlerImageUploadSubmitRequest.ChildInfo childInfo = new BoHaiCrawlerImageUploadSubmitRequest.ChildInfo();
+        childInfo.setId("CXCB_TB001001");
+
+        // 构建页面详情列表
+        List<BoHaiCrawlerImageUploadSubmitRequest.PageDetail> pages = new ArrayList<>();
+        for (String imageName : imageNameList) {
+            BoHaiCrawlerImageUploadSubmitRequest.PageDetail pageDetail = new BoHaiCrawlerImageUploadSubmitRequest.PageDetail();
+            pageDetail.setFileName(imageName);
+            pages.add(pageDetail);
+        }
+        childInfo.setPages(pages);
+        children.add(childInfo);
+        pageInfo.setChildren(children);
+        pagelist.add(pageInfo);
+        batchInfo.setPagelist(pagelist);
+
+        batchInfo.setComCode("14070201");
+        batchInfo.setComName("山西分公司介休支公司业务一部");
+        batchInfo.setUserCode("114050281");
+        batchInfo.setUserName("郝壮明");
+
+        bathList.add(batchInfo);
+        submitRequest.setBathList(bathList);
+
+        submitRequest.setRoleCodeJS("cxcb_image_cd");
+        return submitRequest;
+    }
+
+    /**
+     * 上传影像文件 第一个接口
+     *
+     * @param imageDTO
+     * @param headers
+     * @return BoHaiCrawlerImageUploadResponse
+     */
+    public BoHaiCrawlerImageUploadResponse uploadImage(InsuranceImageVo.ImageDTO imageDTO, HttpHeaders headers) {
+        try {
+            if (imageDTO.getImageBase64Str() == null || imageDTO.getImageBase64Str().equals("")) {
+                log.error("base64字符串不能为空");
+                throw new SystemException("base64字符串不能为空");
+            }
+            if (imageDTO.getImageByte() == null || imageDTO.getImageByte().length == 0) {
+                log.error("字节数组不能为空");
+                throw new SystemException("字节数组不能为空");
+            }
+
+            //验证base64和字节数组是否匹配
+            byte[] base64DecodedBytes = Base64.getDecoder().decode(imageDTO.getImageBase64Str());
+            if (!Arrays.equals(base64DecodedBytes, imageDTO.getImageByte())) {
+                log.warn("base64字符串与字节数组不匹配");
+            }
+
+            // 构建完整请求URL - batchNum作为查询参数
+            String fullUrl = RequestUrl.UPLOAD_IMAGE.getRequestUrl(boHaiCrawlerProperties.getBaseUrl2()) + "?batchNum=" + imageDTO.getBatchNum();
+            log.info("影像上传接口一地址:{}", fullUrl);
+            //创建请求体
+            MultiValueMap<String, Object> requestBody = new LinkedMultiValueMap<>();
+            ByteArrayResource resource = new ByteArrayResource(imageDTO.getImageByte()) {
+                @Override
+                public String getFilename() {
+                    return imageDTO.getImageName();
+                }
+            };
+            requestBody.add("file[]", resource);
+            BoHaiCrawlerImageUploadResponse boHaiCrawlerImageUploadResponse = requestForUpload(fullUrl, requestBody, BoHaiCrawlerImageUploadResponse.class, headers);
+            log.info("boHaiCrawlerImageUploadResponse对象的值:{}",JSON.toJSONString(boHaiCrawlerImageUploadResponse));
+            Map<String, BoHaiCrawlerImageUploadResponse.ImageInfo> data = boHaiCrawlerImageUploadResponse.getData();
+            if (CollectionUtils.isEmpty(data)) {
+                log.error("上传影像失败,返回数据为空");
+                throw new SystemException("上传影像失败,返回数据为空");
+            }
+            return boHaiCrawlerImageUploadResponse;
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new SystemException("上传影像异常: " + e.getMessage());
+        }
+    }
+
+
 }

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

@@ -25,16 +25,12 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     // 报价
     CAR("/app-carmodelinfo/netins/jyPreCarModelFill/queryJYPreCarModelFill", "车型查询"),
     VEHICLECONFIRMATION("/motor/pspcs/Channel/channelTask/channelTaskMain.do","车辆确认"),
+    SAVE("/api_vhl_prod/api/save", "保存订单"),
     PRICE("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "计算保费"),
     UNDERWRITING("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "核保"),
-
-    SAVE("/api_vhl_prod/api/save", "保存订单"),
-    INIT_DATA("/api_vhl_prod/imp/web/page/init_data", "初始化数据"),
-    //上传影像
-    UPLOAD_SIGNS("/motor/pspcs/Channel/uploadFile", "上传影像"),
-    UPLOAD("/api_vhl_prod/imp/web/file/upload", "上传"),
-    // 提交核保
-    GENERATE("/api_vhl_prod/api/generate", "生成订单(核保)"),
+    //上传影像(有两个接口)
+    UPLOAD_IMAGE("/motor/pspcs/Channel/uploadFile", "上传影像"),
+    UPLOAD_SUBMIT("/motor/pspcs/Channel/channelTask/channelTaskMain.do", "上传影像提交"),
     // 支付二维码
     QRCODE("/api_vhl_prod/api/qrcode", "支付二维码"),
     // 下载保单
@@ -47,14 +43,13 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
 
     private final String description;
 
-    @Override
-    public String getRequestDescription() {
-        return description;
-    }
-
     @Override
     public String uri() {
         return uri;
     }
 
+    @Override
+    public String getRequestDescription() {
+        return description;
+    }
 }

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

@@ -15,6 +15,7 @@ public class BoHaiCrawlerConfigureParameters implements ConfigureParameters {
 
     @Serial
     private static final long serialVersionUID = -4576395685599605562L;
+
     /**
      * 产品组合
      */
@@ -32,4 +33,24 @@ public class BoHaiCrawlerConfigureParameters implements ConfigureParameters {
      */
     private String channelPackages;
 
+    /**
+     * 用户编码
+     */
+    private String userCode;
+
+    /**
+     * 用户名
+     */
+    private String userName;
+
+    /**
+     * 机构编码
+     */
+    private String orgCode;
+
+    /**
+     * 机构名称
+     */
+    private String orgName;
+
 }

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

@@ -1,19 +1,26 @@
 package com.jzg.quotation.bohai.crawler.entity.request;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.bohai.api.entity.BoHaiConfigureParameters;
+import com.jzg.quotation.bohai.api.entity.request.BoHaiBaseRequest;
+import com.jzg.quotation.bohai.crawler.entity.BoHaiCrawlerConfigureParameters;
 import com.jzg.quotation.bohai.crawler.util.DESEncryption;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.ObjectUtils;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.UUID;
 
 /**
- * @description: 渤海财险 爬虫 基础请求体(数据加密)
+ * @description: 渤海财险 爬虫基础请求体
  * @author:
  * @date:
  **/
-@AllArgsConstructor
 @NoArgsConstructor
 @Data
 public class BoHaiCrawlerBaseRequest implements Serializable {
@@ -21,9 +28,73 @@ public class BoHaiCrawlerBaseRequest implements Serializable {
     @Serial
     private static final long serialVersionUID = 2304961708114602898L;
 
-    private String data;
+    @JsonProperty("baseParam")
+    private BoHaiCrawlerBaseRequest.BaseParamDTO baseParam;
 
-    public BoHaiCrawlerBaseRequest(Object data) {
-        this.data = DESEncryption.encryptObjectToStr(data);
+    public void setBaseParam(BoHaiCrawlerConfigureParameters parameters) {
+        if (ObjectUtils.isEmpty(this.baseParam)) {
+            baseParam = new BoHaiCrawlerBaseRequest.BaseParamDTO();
+        }
+        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();
     }
+
+    public void setBaseParamRequestType(String requestType) {
+        if (ObjectUtils.isEmpty(this.baseParam)) {
+            baseParam = new BoHaiCrawlerBaseRequest.BaseParamDTO();
+        }
+        this.baseParam.requestType = requestType;
+    }
+
+    public void setBaseParam(BoHaiCrawlerConfigureParameters parameters, String orderNo) {
+        setBaseParam(parameters);
+        baseParam.orderNo = orderNo;
+    }
+
+
+    @NoArgsConstructor
+    @Data
+    public static class BaseParamDTO implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = 1597512790005631746L;
+        /**
+         * 订单号
+         */
+        @JsonProperty("orderNo")
+        private String orderNo;
+
+        /**
+         * 请求流水号
+         */
+        @JsonProperty("requestNo")
+        private String requestNo;
+
+        /**
+         * 请求时间
+         */
+        @JsonProperty("requestTime")
+        private String requestTime;
+
+        /**
+         * 请求类型
+         */
+        @JsonProperty("requestType")
+        private String requestType;
+
+        /**
+         * 机构编码
+         */
+        @JsonProperty("comCode")
+        private String orgCode;
+
+        /**
+         * 机构名称
+         */
+        @JsonProperty("comName")
+        private String orgName;
+    }
+
 }

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

@@ -0,0 +1,20 @@
+package com.jzg.quotation.bohai.crawler.entity.request;
+
+import lombok.Data;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 渤海财险爬虫图片上传请求
+ */
+@Data
+public class BoHaiCrawlerImageUploadRequest {
+    /**
+     * 批次号
+     */
+    private String batchNum;
+
+    /**
+     * 上传的影像文件
+     */
+    //private MultipartFile file;
+}

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

@@ -0,0 +1,38 @@
+package com.jzg.quotation.bohai.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
+import com.jzg.quotation.bohai.api.entity.BoHaiConfigureParameters;
+import com.jzg.quotation.bohai.api.entity.request.BoHaiBaseRequest;
+import com.jzg.quotation.bohai.api.entity.request.ImageUploadRequest;
+import com.jzg.quotation.bohai.crawler.entity.BoHaiCrawlerConfigureParameters;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * 渤海财险爬虫图片上传请求
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class BoHaiCrawlerImageUploadRequestDto extends BoHaiCrawlerBaseRequest {
+
+    /**
+     * 订单号
+     */
+    private String orderNo;
+
+    /**
+     * 影像文件
+     */
+    private List<InsuranceImageVo> imageVoList;
+
+    public BoHaiCrawlerImageUploadRequestDto(BoHaiCrawlerConfigureParameters parameters, String orderNo, List<InsuranceImageVo> imageVoList) {
+        this.setBaseParam(parameters, orderNo);
+        this.imageVoList = imageVoList;
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.jzg.quotation.bohai.crawler.entity.request;
+
+import lombok.Data;
+
+/**
+ * 渤海保险图片上传提交加密请求实体
+ */
+@Data
+public class BoHaiCrawlerImageUploadSubmitEncryptionRequest {
+
+    /**
+     * 加密数据
+     */
+    private String encryptionData;
+
+    /**
+     * MD5值
+     */
+    private String md5;
+}

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

@@ -0,0 +1,210 @@
+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;
+import java.util.List;
+
+/**
+ * @description: 渤海财险爬虫图片上传提交请求
+ * @author:
+ * @date:
+ **/
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class BoHaiCrawlerImageUploadSubmitRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -7410523311993599010L;
+
+    /**
+     * 请求头信息
+     */
+    @JsonProperty("head")
+    private Head head;
+
+    /**
+     * 用户代码
+     */
+    @JsonProperty("userCode")
+    private String userCode;
+
+    /**
+     * 用户名称
+     */
+    @JsonProperty("userName")
+    private String userName;
+
+    /**
+     * 机构代码
+     */
+    @JsonProperty("orgCode")
+    private String orgCode;
+
+    /**
+     * 机构名称
+     */
+    @JsonProperty("orgName")
+    private String orgName;
+
+    /**
+     * 业务代码/系统代码
+     */
+    @JsonProperty("code")
+    private String code;
+
+    /**
+     * 角色代码:车险承保
+     */
+    @JsonProperty("roleCode")
+    private String roleCode;
+
+    /**
+     * 批次号/批量上传编号
+     */
+    @JsonProperty("batchNum")
+    private String batchNum;
+
+    /**
+     * 批次列表
+     */
+    @JsonProperty("bathList")
+    private List<BatchInfo> bathList;
+
+    /**
+     * 角色代码JS
+     */
+    @JsonProperty("roleCodeJS")
+    private String roleCodeJS;
+
+    /**
+     * 请求头信息
+     */
+    @Data
+    public static class Head {
+        /**
+         * 令牌
+         */
+        @JsonProperty("token")
+        private String token;
+
+        /**
+         * 交易类型
+         */
+        @JsonProperty("transType")
+        private String transType;
+
+        /**
+         * 交易代码
+         */
+        @JsonProperty("transCode")
+        private String transCode;
+    }
+
+    /**
+     * 批次信息
+     */
+    @Data
+    public static class BatchInfo {
+        /**
+         * 分类代码 车险承保-投保
+         */
+        @JsonProperty("appCode")
+        private String appCode;
+
+        /**
+         * 应用名称
+         */
+        @JsonProperty("appName")
+        private String appName;
+
+        /**
+         * 订单号
+         */
+        @JsonProperty("busiNo")
+        private String busiNo;
+
+        /**
+         * 页面/文件列表
+         */
+        @JsonProperty("pagelist")
+        private List<PageInfo> pagelist;
+
+        /**
+         * 公司代码
+         */
+        @JsonProperty("comCode")
+        private String comCode;
+
+        /**
+         * 公司名称
+         */
+        @JsonProperty("comName")
+        private String comName;
+
+        /**
+         * 用户代码
+         */
+        @JsonProperty("userCode")
+        private String userCode;
+
+        /**
+         * 用户名称
+         */
+        @JsonProperty("userName")
+        private String userName;
+    }
+
+    /**
+     * 页面信息
+     */
+    @Data
+    public static class PageInfo {
+        /**
+         * 一级分类ID:车险投保
+         */
+        @JsonProperty("id")
+        private String id;
+
+        /**
+         * 子分类列表
+         */
+        @JsonProperty("children")
+        private List<ChildInfo> children;
+    }
+
+    /**
+     * 子分类信息
+     */
+    @Data
+    public static class ChildInfo {
+        /**
+         * 二级分类ID:具体证件类型
+         */
+        @JsonProperty("id")
+        private String id;
+
+        /**
+         * 页面/图片列表
+         */
+        @JsonProperty("pages")
+        private List<PageDetail> pages;
+    }
+
+    /**
+     * 页面详情
+     */
+    @Data
+    public static class PageDetail {
+        /**
+         * 文件名称
+         */
+        @JsonProperty("fileName")
+        private String fileName;
+    }
+}

+ 3 - 3
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/PaymentRequest.java → tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/entity/request/BoHaiCrawlerPaymentRequest.java

@@ -10,14 +10,14 @@ import java.util.Map;
  * @date:
  **/
 @Data
-public class PaymentRequest extends BoHaiCrawlerBaseRequest {
+public class BoHaiCrawlerPaymentRequest extends BoHaiCrawlerBaseRequest {
 
     private Object configInfo;
     private String orderNo;
     private String busUniqueId;
 
-    public PaymentRequest(Object configInfo, String orderNo, String busUniqueId) {
-        super(Map.of("configInfo", configInfo, "orderNo", orderNo, "busUniqueId", busUniqueId));
+    public BoHaiCrawlerPaymentRequest(Object configInfo, String orderNo, String busUniqueId) {
+        //super(Map.of("configInfo", configInfo, "orderNo", orderNo, "busUniqueId", busUniqueId));
         this.configInfo = configInfo;
         this.orderNo = orderNo;
         this.busUniqueId = busUniqueId;

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

@@ -25,7 +25,7 @@ public class BoHaiCrawlerQuotationRequest extends BoHaiCrawlerBaseRequest {
 
     public BoHaiCrawlerQuotationRequest(BoHaiCrawlerConfigureParameters parameters, QuoteVo quoteVo,
                                         String currentValue, String orderNO, List<AccidentalDrivingVo> accidentVo, String discount) {
-        super(buildRequestData(parameters, quoteVo, currentValue, orderNO, accidentVo, discount));
+        //super(buildRequestData(parameters, quoteVo, currentValue, orderNO, accidentVo, discount));
         this.parameters = parameters;
         this.quoteVo = quoteVo;
         this.currentValue = currentValue;

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

@@ -1,20 +0,0 @@
-package com.jzg.quotation.bohai.crawler.entity.request;
-
-import com.jzg.quotation.bohai.crawler.entity.BoHaiCrawlerConfigureParameters;
-import lombok.Data;
-
-/**
- * @description: 渤海财险爬虫生成订单号请求
- * @author:
- * @date:
- **/
-@Data
-public class BoHaiGenerateOrderNoRequest extends BoHaiCrawlerBaseRequest {
-
-    private BoHaiCrawlerConfigureParameters parameters;
-
-    public BoHaiGenerateOrderNoRequest(BoHaiCrawlerConfigureParameters parameters) {
-        super(parameters);
-        this.parameters = parameters;
-    }
-}

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

@@ -1,23 +0,0 @@
-package com.jzg.quotation.bohai.crawler.entity.request;
-
-import lombok.Data;
-
-import java.util.Map;
-
-/**
- * @description: 渤海财险爬虫核保请求
- * @author:
- * @date:
- **/
-@Data
-public class UnderwritingRequest extends BoHaiCrawlerBaseRequest {
-
-    private Object configInfo;
-    private String orderNo;
-
-    public UnderwritingRequest(Object configInfo, String orderNo) {
-        super(Map.of("configInfo", configInfo, "orderNo", orderNo));
-        this.configInfo = configInfo;
-        this.orderNo = orderNo;
-    }
-}

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

@@ -0,0 +1,45 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.util.Map;
+
+/**
+ * @description: 渤海财险爬虫图片上传响应
+ * @author:
+ * @date:
+ **/
+@Data
+public class BoHaiCrawlerImageUploadResponse{
+
+    @Serial
+    private static final long serialVersionUID = -7410523311993599009L;
+
+    /**
+     * 图片数据集合,键为文件名,值为图片URL信息
+     */
+    @JsonProperty("data")
+    private Map<String, ImageInfo> data;
+
+    /**
+     * 图片信息内部类
+     */
+    @Data
+    public static class ImageInfo {
+
+        /**
+         * 原图URL
+         */
+        @JsonProperty("PAGE_URL")
+        private String pageUrl;
+
+        /**
+         * 缩略图URL
+         */
+        @JsonProperty("THUM_URL")
+        private String thumUrl;
+    }
+}

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

@@ -0,0 +1,73 @@
+package com.jzg.quotation.bohai.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * @description: 渤海财险爬虫图片上传提交响应
+ * @author:
+ * @date:
+ **/
+@Data
+public class BoHaiCrawlerImageUploadSubmitResponse {
+
+    @Serial
+    private static final long serialVersionUID = -7410523311993599011L;
+
+    /**
+     * 请求头信息
+     */
+    @JsonProperty("head")
+    private Head head;
+
+    /**
+     * 图片系统扫描XML数据
+     */
+    @JsonProperty("imageSystemScannerXml")
+    private String imageSystemScannerXml;
+
+    /**
+     * 请求头信息
+     */
+    @Data
+    public static class Head {
+        /**
+         * 返回代码
+         */
+        @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;
+    }
+}

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

@@ -69,6 +69,12 @@ public class BoHaiCrawlerQuoteProcessServiceImpl implements BoHaiCrawlerQuotePro
         throw new SystemException("登录失败");
     }
 
+    /**
+     * 获取请求头
+     * @param username 用户名
+     * @param password 密码
+     * @return HttpHeaders
+     */
     @Override
     public HttpHeaders getHeaders(String username, String password) {
         /*String authorization = boHaiCrawlerCacheComponent.getAuthorization(username);

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

@@ -8,6 +8,8 @@ import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.bohai.api.constant.enums.ResponseCode;
+import com.jzg.quotation.bohai.api.entity.BoHaiConfigureParameters;
+import com.jzg.quotation.bohai.api.entity.request.ImageUploadRequest;
 import com.jzg.quotation.bohai.api.entity.vo.PersonAreaVo;
 import com.jzg.quotation.bohai.crawler.component.BoHaiCrawlerCacheComponent;
 import com.jzg.quotation.bohai.crawler.component.BoHaiBuildingAttributionInformation;
@@ -95,7 +97,7 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
         // 2.1 车辆查询
         BoHaiCrawlerCarResponse boHaiCrawlerCarResponse = null;
         try {
-            BoHaiCrawlerCarRequest boHaiCrawlerCarRequest = new BoHaiCrawlerCarRequest(quoteVo.getCarInfoVo(), parameters.getLoginCompany(), parameters.getCDptCde(), userCode);
+            BoHaiCrawlerCarRequest boHaiCrawlerCarRequest = new BoHaiCrawlerCarRequest(quoteVo.getCarInfoVo(), parameters.getOrgName(), parameters.getCDptCde(), userCode);
             boHaiCrawlerCarResponse = boHaiCrawlerRequestComponent.car(boHaiCrawlerCarRequest, headers);
             log.info("boHaiCrawlerCarResponse参数的值:{}", JSON.toJSONString(boHaiCrawlerCarResponse));
         } catch (Exception e) {
@@ -655,13 +657,22 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
      */
     @Override
     public void uploadImage(InsuranceUploadImageVo insuranceUploadImageVo) {
-        /*AttributionInformationVo attributionInformationVo = insuranceUploadImageVo.getOrder().getAttributionInformationVo();
-        BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(insuranceUploadImageVo.getOrder().getOrdersNo());
-        HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
+        try {
+            //获取归属信息
+            AttributionInformationVo attributionInformationVo = insuranceUploadImageVo.getOrder().getAttributionInformationVo();
+            BoHaiCrawlerOrder boHaiCrawlerOrder = boHaiCrawlerOrderService.getById(insuranceUploadImageVo.getOrder().getOrdersNo());
+            HttpHeaders headers = boHaiCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
 
-        ImageUploadRequest imageUploadRequest = new ImageUploadRequest(attributionInformationVo.getConfigInfo(),
-                boHaiCrawlerOrder.getOrderNo(), boHaiCrawlerOrder.getBusUniqueId(), insuranceUploadImageVo.getImageVoList());
-        boHaiCrawlerRequestComponent.imageUpload(imageUploadRequest, headers);*/
+            BoHaiCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(BoHaiCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
+
+            // 上传影像文件请求参数
+            BoHaiCrawlerImageUploadRequestDto boHaiCrawlerImageUploadRequest = new BoHaiCrawlerImageUploadRequestDto(parameters, boHaiCrawlerOrder.getOrderNo(), insuranceUploadImageVo.getImageVoList());
+            BoHaiCrawlerImageUploadSubmitResponse boHaiCrawlerImageUploadSubmitResponse = boHaiCrawlerRequestComponent.uploadImage(boHaiCrawlerImageUploadRequest, headers);
+            log.info("boHaiCrawlerImageUploadSubmitResponse对象的值:{}",JSON.toJSONString(boHaiCrawlerImageUploadSubmitResponse));
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
 

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

@@ -0,0 +1,31 @@
+package com.jzg.quotation.bohai.crawler.util;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.UUID;
+
+/**
+ * @description: 批次号生成工具类
+ * @author:
+ * @date:
+ **/
+@Slf4j
+public final class BatchNumberGenerator {
+
+    private BatchNumberGenerator() {
+        throw new IllegalStateException("Utility class");
+    }
+
+    /**
+     * 生成32位批次号
+     * 使用UUID去除横线后的32位字符作为批次号
+     *
+     * @return 32位批次号字符串
+     */
+    public static String generateBatchNumber() {
+        String uuid = UUID.randomUUID().toString();
+        String batchNumber = uuid.replace("-", "");
+        log.info("生成的批次号: {}", batchNumber);
+        return batchNumber;
+    }
+}

Fișier diff suprimat deoarece este prea mare
+ 0 - 41
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DESJava.java


+ 35 - 23
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/util/DESUtil.java

@@ -10,33 +10,22 @@ import java.util.Base64;
 
 public class DESUtil {
 
-    private static SecretKeySpec secretKey;
-
-    private static Cipher cipher;
-
-    /**
-     * DES工具类
-     *
-     * @param key DES密钥,必须为8字节
-     * @throws Exception
-     */
-    public DESUtil(String key) throws Exception {
-        // 密钥处理:取UTF-8编码的前8字节(DES密钥必须为8字节)
-        byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);
-        byte[] desKeyBytes = Arrays.copyOf(keyBytes, 8); // 截取或填充至8字节
-        this.secretKey = new SecretKeySpec(desKeyBytes, "DES");
-        this.cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); // 明确指定ECB模式和PKCS5填充
-    }
+    private static final  String KEY  = "c2lub3NvZnQuY2hhbm5lbC55ZHBpYw==";
 
     /**
      * DES加密
      *
-     * @param plaintext
-     * @return String
+     * @param plaintext 明文
+     * @param key DES密钥,必须为8字节
+     * @return String 加密后的Base64字符串
      * @throws Exception
      */
-    public String des_encrypt(String plaintext) throws Exception {
+    public static String des_encrypt(String plaintext) throws Exception {
+        // 初始化密钥
+        SecretKeySpec secretKey = initSecretKey(KEY);
+        Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
         cipher.init(Cipher.ENCRYPT_MODE, secretKey);
+
         byte[] plaintextBytes = plaintext.getBytes(StandardCharsets.UTF_8);
         byte[] encryptedBytes = cipher.doFinal(plaintextBytes); // 自动处理PKCS5填充
         return Base64.getEncoder().encodeToString(encryptedBytes);
@@ -45,17 +34,35 @@ public class DESUtil {
     /**
      * DES解密
      *
-     * @param ciphertext
-     * @return String
+     * @param ciphertext 密文(Base64编码)
+     * @param key DES密钥,必须为8字节
+     * @return String 解密后的明文
      * @throws Exception
      */
-    public String des_decrypt(String ciphertext) throws Exception {
+    public static String des_decrypt(String ciphertext) throws Exception {
+        // 初始化密钥
+        SecretKeySpec secretKey = initSecretKey(KEY);
+        Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
         cipher.init(Cipher.DECRYPT_MODE, secretKey);
+
         byte[] encryptedBytes = Base64.getDecoder().decode(ciphertext);
         byte[] decryptedBytes = cipher.doFinal(encryptedBytes); // 自动去除填充
         return new String(decryptedBytes, StandardCharsets.UTF_8);
     }
 
+    /**
+     * 初始化DES密钥
+     *
+     * @param key 原始密钥字符串
+     * @return SecretKeySpec DES密钥规范
+     */
+    private static SecretKeySpec initSecretKey(String key) {
+        // 密钥处理:取UTF-8编码的前8字节(DES密钥必须为8字节)
+        byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);
+        byte[] desKeyBytes = Arrays.copyOf(keyBytes, 8); // 截取或填充至8字节
+        return new SecretKeySpec(desKeyBytes, "DES");
+    }
+
     /**
      * MD5加密方法(返回32位小写)
      *
@@ -89,5 +96,10 @@ public class DESUtil {
         return sb.toString();
     }
 
+    public static void main(String[] args) throws Exception {
+        String s = DESUtil.des_decrypt("hpT1hHJmQMqZi2gE3OZwCelswibuZrbcdFm+DcEcqToth7F+7IWKh2uW6gL0Tq59ciT2qY7ZRtSQqpNuUyusjK7Zz2myUnkbQ+yiWT2tinnedlPy7KdJLvpogHElwU3MZulvesmCpvF07de7fc+MPWQ2NnNhjQFw" +
+                "+N64VTSURHM6ZS1PoOgzpPIj8iMvDZ7eKimcgGnctnxLcYDpbDZD0z96gikeaUYPw7dKASxNynVE58zqO//MVx8zrddHyEWlZQ277JeOGAuOSlD2q9SdxcCtw4t9i/C/NSp7ktjXPUQqEQB+mekRmPrGb7ikUv7stCezRmJCi+6WFdFdI0ZTS9oCEq76AuFjlnfX9izrpn8gLuaoVbVhByrEpxIrCJUSpAK7jKtbHj2a95Vv97hIqU90x72ocRzazEuliJ3GIa6YORJewtZAZLqaxq9Qmr0QDOUa5O2LxW/ZJhmviHjNIpLMWHnSpoJ7bv8+J482pEQWqhmlhFDJ4CsBfQAEV0d5WJ9e3A8qyqYkxDc/7dAjyhEtHz5N7JAFFj8d4bogrnp743RONLbcW5jpxZUkYZHU3F3iQ7lDx3H/plynLVdy8x421QiCLBH+94YmEurpBq3YHkeEDnmYWo7HiadINLkBgnRFKYGhoDUdeEtYpjvgA//38NL6b1C00lzKsd1Vsg5lNhXsilUMBTfSpiOnmMMBqnQURvvi0tg=");
+        System.out.println(s);
+    }
 
 }

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

@@ -280,16 +280,11 @@ public class RequestComponent {
         body = Optional.ofNullable(body).orElse("");
         log.info("URL的值:{},body的值:{}", url, body);
 
-        String cookie = "HTTPOnly; Cookie=!nWlhN+KeEYSeye21yv2qnldjEk8Kb9NrbshGomNlDw5h9g3lSal2Gb9pNc81nEf0UOCqFH0E/WkCBk4=; JSESSIONID=0002PPgTB0CRmLqKNT7J4yf05S8:2QC5VNQ9QS:1RBTVLUT0B";
-        String sessionId = "114050281_Z29iq6s0yGo8CATOUi5povI1759975733997";
-
         WebClient webClient = selectNoSSLWebClient();
         try {
             return webClient.post()
                     .uri(url)
-                    //.headers(setHeaders(headers))
-                    .header(HttpHeaders.COOKIE, cookie)
-                    .header("sessionId",sessionId)
+                    .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")
@@ -308,7 +303,7 @@ public class RequestComponent {
 
 
     /**
-     * 构造post请求,返回的content-type:text/json;charset=UTF-8
+     * 发送post请求,返回的content-type:text/json;charset=UTF-8
      * @param url           请求地址
      * @param body          请求体
      * @param responseClass 响应类
@@ -317,35 +312,84 @@ public class RequestComponent {
      * @return <Response> ResponseEntity<Response> 响应
      */
     public <Response> ResponseEntity<Response> post2(String url, String body, Class<Response> responseClass, HttpHeaders headers) {
-        if (log.isDebugEnabled()) {
-            log.debug("request body is {}", body);
-        }
         body = Optional.ofNullable(body).orElse("");
         log.info("URL的值:{},body的值:{}", url, body);
+        WebClient webClient = selectNoSSLWebClient2();
+        try {
+            return 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(responseClass)
+                    //.bodyToMono(responseClass)
+                    .block();
+        } catch (WebClientResponseException e) {
+            e.printStackTrace();
+            throw e;
+        }
+    }
 
-        String cookie = "HTTPOnly; Cookie=!QQTSyR8LpiJG/eK1yv2qnldjEk8Kbwu3AIcbv31HNoHNu5/pS7SOukeG9Z3IeGCMORS2A9xnhOEFARM=; JSESSIONID=0001b7SkOaMza4bFCP9m-IejH6h:2QC5VNQ9QS";
-        String sessionId = "114050281_3GOmZdrKG822tsNw417i5X11760068264750";
+    /**
+     * 构造post请求,content-type:multipart/form-data;(应用场景:上传影像件)
+     * @param url
+     * @param body
+     * @param responseClass
+     * @param headers
+     * @param <Response>    响应实体
+     * @return <Response> ResponseEntity<Response> 响应
+     */
+    public <Response> ResponseEntity<Response> post3(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        body = Optional.ofNullable(body).orElse("");
+        log.info("URL的值:{},body的值:{}", url, body);
+        WebClient webClient = selectNoSSLWebClient2();
+        try {
+            return webClient.post()
+                    .uri(url)
+                    .headers(setHeaders(headers))
+                    .header(HttpHeaders.CONTENT_TYPE,"multipart/form-data")
+                    .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(responseClass)
+                    .block();
+        } catch (WebClientResponseException e) {
+            e.printStackTrace();
+            throw e;
+        }
+    }
 
+    /**
+     * 构造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> post(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        body = Optional.ofNullable(body).orElse("");
+        log.info("URL的值:{},body的值:{}", url, body);
         WebClient webClient = selectNoSSLWebClient2();
         try {
             return webClient.post()
                     .uri(url)
-                    //.headers(setHeaders(headers))
-                    .header(HttpHeaders.COOKIE, cookie)
-                    .header("sessionId",sessionId)
+                    .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(responseClass)
-                    //.bodyToMono(responseClass)
                     .block();
         } catch (WebClientResponseException e) {
             e.printStackTrace();
-            // 如果服务端返回非2xx状态码
-            System.err.println("状态码: " + e.getRawStatusCode());
-            System.err.println("响应体: " + e.getResponseBodyAsString());
             throw e;
         }
     }
@@ -418,6 +462,7 @@ public class RequestComponent {
 
 
     /**
+     * 构造post请求
      * @param url           请求地址
      * @param body          请求体
      * @param responseClass 响应类
@@ -430,6 +475,19 @@ public class RequestComponent {
         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 post3(url, body, responseClass, headers);
+    }
+
     /**
      * 请求体为 String 类型 POST请求返回响应返回类
      *
@@ -658,7 +716,21 @@ 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 响应
+     */
+    public <Response> ResponseEntity<Response> objectPostForUpload(String url, Object body, Class<Response> responseClass, HttpHeaders headers) {
+        return post3(url, body, responseClass, headers);
     }
 
 

+ 1 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/component/DaJiaCrawlerRequestComponent.java

@@ -189,6 +189,7 @@ public class DaJiaCrawlerRequestComponent {
         // 参数加密
         DaJiaCrawlerBaseRequest crawlerBaseRequest = new DaJiaCrawlerBaseRequest(request);
         ResponseEntity<DaJiaCrawlerBaseResponse> responseEntity = requestComponent.objectPost(crawlerRequestUrlStandard.getRequestUrl(daJiaCrawlerProperties.getBaseUrl()), crawlerBaseRequest, DaJiaCrawlerBaseResponse.class, headers);
+
         DaJiaCrawlerBaseResponse daJiaCrawlerBaseResponse = responseEntity.getBody();
         AssertionUtils.isEmpty(daJiaCrawlerBaseResponse, "请求异常请重试");
         if (!"200".equals(daJiaCrawlerBaseResponse.getCode())) {

+ 25 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -25,6 +25,7 @@ import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.TokenExpireException;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.MinioUtils;
+import com.jzg.quotation.bohai.crawler.service.impl.BoHaiCrawlerRequestImpl;
 import com.jzg.quotation.commons.client.OrgClient;
 import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.commons.constants.quote.enums.base.QuoteRuleCategory;
@@ -263,7 +264,12 @@ public class UnifyOrderManager {
                 .equals(InsOrderStatusEnum.WAIT_AUDIT) ? HttpResult.ok(quoteResultsVo) : HttpResult.error(quoteResultsVo);
     }
 
-
+    /**
+     * 统一核保
+     * @param underwritingVo
+     * @return HttpResult
+     * @throws Exception
+     */
     @OrderOperationLog(
             module = "车险订单",
             subModule = "订单详情",
@@ -397,6 +403,11 @@ public class UnifyOrderManager {
     }
 
 
+    /**
+     * 影像上传
+     * @param insuranceUploadImageVo
+     * @return HttpResult
+     */
     @Operation(summary = "影像上传")
     @PostMapping("/imagesUpload")
     public HttpResult imagesUpload(@RequestBody InsuranceUploadImageVo insuranceUploadImageVo) {
@@ -415,15 +426,25 @@ public class UnifyOrderManager {
 
         List<InsOrdersCarUserInfo> insOrdersCarUserInfos = insOrdersCarUserInfoService.getByOrderId(insuranceUploadImageVo.getOrder().getOrdersNo());
         insuranceUploadImageVo.setInsOrdersCarUserInfoList(insOrdersCarUserInfos);
+        //设置协议ID (这个需要)
         insuranceUploadImageVo.getOrder().setAgreementId(byCompanyId.getData().get(0).getId());
         insuranceUploadImageVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
         insuranceUploadImageVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
+
         insuranceUploadImageVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
-        QuotationBaseService quoteService = companyFactory.getImageUploadService(insuranceUploadImageVo, baseController);
 
-        quoteService.uploadImage(insuranceUploadImageVo);
+        // 获取影像上传服务并直接调用第三方接口上传影像文件
+        QuotationBaseService quoteService = companyFactory.getImageUploadService(insuranceUploadImageVo, baseController);
 
-        return HttpResult.ok();
+        try {
+            // 直接调用影像上传方法,上传影像文件到第三方接口
+            quoteService.uploadImage(insuranceUploadImageVo);
+            log.info("影像上传成功,订单号:{}", insuranceUploadImageVo.getOrder().getOrdersNo());
+            return HttpResult.ok("影像上传成功");
+        } catch (Exception e) {
+            log.error("影像上传失败,订单号:{},错误信息:{}", insuranceUploadImageVo.getOrder().getOrdersNo(), e.getMessage(), e);
+            return HttpResult.error("影像上传失败:" + e.getMessage());
+        }
     }
 
 

+ 2 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -205,14 +205,12 @@ public class CompanyFactory {
         attributionInformationVo.setPassword(agreementAttribution.getData().getPassword());
         insuranceUploadImageVo.getOrder().setAttributionInformationVo(attributionInformationVo);
 
-        InsOrdersVo insOrdersVo = insOrdersService.selectById(Long.parseLong(insuranceUploadImageVo.getOrder()
-                .getOrdersNo()));
+        InsOrdersVo insOrdersVo = insOrdersService.selectById(Long.parseLong(insuranceUploadImageVo.getOrder().getOrdersNo()));
         insuranceUploadImageVo.setCarInfo(insOrdersVo.getCarInfoVo());
         QuotationBaseService service = getQuotationBase(insuranceUploadImageVo.getOrder()
                 .getApiType(), insuranceUploadImageVo.getOrder().getInsuranceCompanyCode());
         ImageParamHandlerDecorator imageParamHandlerDecorator = new ImageParamHandlerDecorator(service, minioClient, bucketName, insTaskImagesService, quoteImageRuleMappingService);
-        service = ImageProxyFactory.createProxy(service,
-                imageParamHandlerDecorator);
+        service = ImageProxyFactory.createProxy(service, imageParamHandlerDecorator);
         return service;
     }
 

+ 3 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/image/ImageParamHandlerDecorator.java

@@ -54,13 +54,12 @@ public class ImageParamHandlerDecorator {
             uploadImageVo.setImageVoList(new ArrayList<>());
         }
 
-        InsTaskImagesVo insTaskImagesVo = insTaskImagesService.selectByQuoteNo(uploadImageVo.getOrder().getQuoteNo());
+        /*InsTaskImagesVo insTaskImagesVo = insTaskImagesService.selectByQuoteNo(uploadImageVo.getOrder().getQuoteNo());
         List<ImagesVo> images = insTaskImagesVo.getImages();
         Map<String, List<ImagesVo>> groupImages = images.stream()
                 .collect(Collectors.groupingBy(ImagesVo::getImageType));
 
-        Map<String, QuoteImageRuleMapping> quoteImageRuleMappingMap = quoteImageRuleMappingService.getQuoteImageRuleMapping(uploadImageVo.getOrder()
-                .fetchCompanyCode());
+        Map<String, QuoteImageRuleMapping> quoteImageRuleMappingMap = quoteImageRuleMappingService.getQuoteImageRuleMapping(uploadImageVo.getOrder().fetchCompanyCode());
 
         groupImages.forEach((imageType, ImageList) -> {
             InsuranceImageVo vo = new InsuranceImageVo();
@@ -82,7 +81,7 @@ public class ImageParamHandlerDecorator {
             }).collect(Collectors.toList());
             vo.setImageBase64List(imageDTOList);
             uploadImageVo.getImageVoList().add(vo);
-        });
+        });*/
 
 
 //        uploadImageVo.getImageVoList().forEach(imageVo->{

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

@@ -50,6 +50,7 @@ public class  InsTaskImagesServiceImpl extends ServiceImpl<InsTaskImagesMapper,
            }
            return taskImagesVo;
        }catch (Exception e){
+           e.printStackTrace();
            throw new SystemException("查询失败");
        }
     }

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff