Browse Source

Merge remote-tracking branch 'origin/master'

785834757 9 tháng trước cách đây
mục cha
commit
b58f742d71
15 tập tin đã thay đổi với 442 bổ sung38 xóa
  1. 6 0
      commons/pom.xml
  2. 4 0
      commons/src/main/java/com/jzg/commons/entity/dto/AgreementContactAddParam.java
  3. 4 0
      commons/src/main/java/com/jzg/commons/entity/dto/AgreementContactEditParam.java
  4. 5 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java
  5. 316 0
      commons/src/main/java/com/jzg/commons/util/http/HttpUtil.java
  6. 14 1
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/component/ChengTaiRequestApiComponent.java
  7. 26 20
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java
  8. 1 1
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UploadFileRequest.java
  9. 46 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/InsurePremiumResponse.java
  10. 0 2
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/properties/ChengTaiApiProperties.java
  11. 0 1
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/repository/ChengTaiApiOrderRepository.java
  12. 3 2
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java
  13. 1 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  14. 1 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  15. 15 9
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsTaskImagesServiceImpl.java

+ 6 - 0
commons/pom.xml

@@ -114,6 +114,12 @@
             <groupId>io.netty</groupId>
             <artifactId>netty-codec-http</artifactId>
         </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.26</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 4 - 0
commons/src/main/java/com/jzg/commons/entity/dto/AgreementContactAddParam.java

@@ -58,6 +58,10 @@ public class AgreementContactAddParam {
     @NotNull(message = "请选择保险公司")
     private String companyId;
 
+    @Schema(description = "合作-保险公司id")
+    @NotNull(message = "请选择合作保险公司")
+    private String partnerCompanyId;
+
     @Schema(description = "协议类型 1-平台协议-平台结算 2-私有协议-自行结算 3-网销协议-自行结算")
     @NotNull(message = "请选择协议类型")
     private Integer agreementType;

+ 4 - 0
commons/src/main/java/com/jzg/commons/entity/dto/AgreementContactEditParam.java

@@ -56,6 +56,10 @@ public class AgreementContactEditParam {
     @NotNull(message = "请选择保险公司")
     private String companyId;
 
+    @Schema(description = "合作-保险公司id")
+    @NotNull(message = "请选择合作保险公司")
+    private String partnerCompanyId;
+
     @Schema(description = "协议类型 1-平台协议-平台结算 2-私有协议-自行结算 3-网销协议-自行结算")
     @NotNull(message = "请选择协议类型")
     private Integer agreementType;

+ 5 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/image/InsuranceImageVo.java

@@ -20,6 +20,11 @@ import java.util.List;
 @Accessors(chain = true)
 public class InsuranceImageVo {
 
+    /**
+     * 影像唯一id
+     */
+    private String imageId;
+
     /**
      * 影像类型
      */

+ 316 - 0
commons/src/main/java/com/jzg/commons/util/http/HttpUtil.java

@@ -0,0 +1,316 @@
+package com.jzg.commons.util.http;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.multipart.FilePart;
+import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
+import org.apache.commons.httpclient.methods.multipart.Part;
+import org.apache.commons.httpclient.methods.multipart.StringPart;
+import org.slf4j.Logger;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Map;
+
+/**
+ * @ClassName HttpUtil
+ * @Description: TODO
+ * @Author
+ * @Date 2021/5/25
+ **/
+public class HttpUtil {
+
+    /**
+     * 发起https请求并获取结果
+     *
+     * @param requestUrl    请求地址
+     * @param requestMethod 请求方式(GET、POST)
+     * @param outputStr     提交的数据
+     * @return JSONObject(通过JSONObject.get ( key)的方式获取json对象的属性值)
+     */
+    public static JSONObject HttpRequest(String request, String RequestMethod, String output) {
+        @SuppressWarnings("unused")
+        JSONObject jsonObject = null;
+        StringBuffer buffer = new StringBuffer();
+        try {
+            //建立连接
+            URL url = new URL(request);
+            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+            connection.setDoOutput(true);
+            connection.setDoInput(true);
+            connection.setUseCaches(false);
+            //  connection.setRequestMethod(RequestMethod);
+            //设置请求内容编码格式
+            connection.setRequestProperty("content-type", "application/json;charset=UTF-8");
+            connection.setRequestProperty("Accept", "application/json;charset=UTF-8");
+
+            if (output != null) {
+                OutputStream out = connection.getOutputStream();
+                out.write(output.getBytes("UTF-8"));
+                out.close();
+            }
+            //流处理
+            InputStream input = connection.getInputStream();
+            //  InputStreamReader inputReader = new InputStreamReader(input,"UTF-8");
+            BufferedReader reader = new BufferedReader(new InputStreamReader(input, "GBK"));
+
+            String line;
+            while ((line = reader.readLine()) != null) {
+                buffer.append(line);
+            }
+
+            //关闭连接、释放资源
+            reader.close();
+            input.close();
+            connection.disconnect();
+        } catch (Exception e) {
+        }
+        return jsonObject;
+    }
+
+
+
+    /**
+     *   带header和json作为body的post
+     * @param url
+     * @param bodyStr   body传的json
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    public static String sendPost(String url,String bodyStr){
+        System.err.println("请求[post、json、body]参数:"+bodyStr);
+        HttpRequest request = HttpRequest.post(url)
+                .header("Content-Type", "application/json")//以json的方式传递
+//     .header("authorization","Bearer abcdefghijklmnopqrstuvwxyz")
+                .body(bodyStr);
+
+        HttpResponse response = request.execute();
+        String respStr = response.body();
+        System.err.println("返回[post、json、body]参数:"+ respStr);
+
+        return respStr;
+    }
+    /**
+     *   带header和json作为body的post
+     * @param url
+     * @param bodyStr   body传的json
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    public static String sendPost(String url,String bodyStr,Logger log,String apiName){
+        log.debug(apiName+"\n请求参数:"+bodyStr);
+        HttpRequest request = HttpRequest.post(url)
+                .header("Content-Type", "application/json")//以json的方式传递
+//     .header("authorization","Bearer abcdefghijklmnopqrstuvwxyz")
+                .body(bodyStr);
+
+        HttpResponse response = request.execute();
+        String respStr = response.body();
+        log.debug(apiName+"\n返回参数:"+respStr);
+
+        return respStr;
+    }
+
+
+    /**
+     *   带header和json作为body的post
+     * @param url
+     * @param bodyStr   body传的json
+     * @param params   form传的参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    public static String sendPost(String url,String bodyStr,Map params){
+        HttpRequest request = HttpRequest.post(url)
+                .header("Content-Type", "application/json")//以json的方式传递
+//     .header("authorization","Bearer abcdefghijklmnopqrstuvwxyz")
+                .body(bodyStr);
+        request.form(params);
+
+        HttpResponse response = request.execute();
+        String respStr = response.body();
+
+        return respStr;
+    }
+
+
+    /**
+     *   post  from
+     * @param url
+     * @param formMap   附件需要传的类型FilePart
+     *
+     * @author: lig
+     * @date: 2023-08-21
+     */
+    public static String sendPostFrom(String url,Map<String, Object> formMap,Logger log,String apiName){
+        System.err.println("请求[post、json、body]参数:"+ JSONUtil.toJsonStr(formMap));
+        log.info(apiName + ",请求[post、json、body]参数:"+ JSONUtil.toJsonStr(formMap));
+        HttpRequest request = HttpRequest.post(url);
+                request.header("Content-Type", "multipart/form-data; ");
+
+//        // 添加文件参数
+//        FilePart file1 = new FilePart("file1", new File("path/to/file1.jpg"));
+        request.form(formMap);
+
+
+        HttpResponse response = request.execute();
+        // 处理服务器响应
+        if (response.isOk()) {
+            String respStr = response.body();
+            log.info(apiName + "返回[post、json、body]参数:"+ respStr);
+            return respStr;
+        }
+        return null;
+
+
+
+    }
+    /**
+     *   post  from
+     * @param url
+     * @param formMap   附件需要传的类型FilePart
+     *
+     * @author: lig
+     * @date: 2023-08-21
+     */
+    public static String sendPostFrom(String url,Map<String, Object> formMap){
+        System.err.println("请求[post、json、body]参数:"+ JSONUtil.toJsonStr(formMap));
+//        log.info(apiName + ",请求[post、json、body]参数:"+ JSONUtil.toJsonStr(formMap));
+        HttpRequest request = HttpRequest.post(url);
+                request.header("Content-Type", "multipart/form-data; ");
+
+//        // 添加文件参数
+//        FilePart file1 = new FilePart("file1", new File("path/to/file1.jpg"));
+        request.form(formMap);
+
+
+        HttpResponse response = request.execute();
+        // 处理服务器响应
+        if (response.isOk()) {
+            String respStr = response.body();
+//            log.info(apiName + "返回[post、json、body]参数:"+ respStr);
+            return respStr;
+        }
+        return null;
+
+
+
+    }
+    /**
+     *   post  from
+     * @param url
+     * @param formMap   附件需要传的类型FilePart
+     *
+     * @author: lig
+     * @date: 2023-08-21
+     */
+    public static String sendPostFromFile(Part[] parts,String url){
+        HttpClient httpClient = new HttpClient();
+        PostMethod postMethod = new PostMethod(url);
+        postMethod.getParams().setContentCharset("UTF-8");
+//        postMethod.setParameter();
+
+        String response = "";
+
+        try {
+//            Part[] parts = new Part[]{ new FilePart("file111", file) };
+            postMethod.setRequestEntity(new MultipartRequestEntity(parts, postMethod.getParams()));
+            int statusCode = httpClient.executeMethod(postMethod);
+            if (statusCode == HttpStatus.SC_OK) {
+                response = postMethod.getResponseBodyAsString();
+                System.out.println("Upload successful. Response: " + response);
+                return response;
+//                return response;
+            } else {
+                System.out.println("Upload failed. Status code: " + statusCode);
+            }
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        } catch (HttpException e) {
+            throw new RuntimeException(e);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+
+        return response;
+
+
+
+
+    }
+
+//    public static void main(String[] args) {
+//        String url = "https://devyun.guorenpcic.com/api/grecar/photo/upload";
+//        Map<String, Object> formMap = new HashMap<>();
+//        formMap.put("businessNo","2322");
+//        formMap.put("operatorCode","32323");
+//        formMap.put("comCode","22323");
+//        formMap.put("fileGroup","DZ");
+//
+//        try {
+//            FilePart file1 = new FilePart("file1", new File("D:/Desktop/123.png"));
+//            formMap.put("file",file1);
+//        } catch (FileNotFoundException e) {
+//            throw new RuntimeException(e);
+//        }
+//
+//        sendPostFrom(url,formMap);
+//    }
+
+
+    public static void main(String[] args) {
+        HttpClient httpClient = new HttpClient();
+        String url = "https://devyun.guorenpcic.com/api/grecar/photo/upload";
+        PostMethod postMethod = new PostMethod(url);
+        postMethod.getParams().setContentCharset("UTF-8");
+
+//        postMethod.getParams().setParameter("businessNo", "T233075000507000205");
+//        postMethod.getParams().setParameter("operatorCode", "S3000032");
+//        postMethod.getParams().setParameter("comCode", "307500A3");
+//        postMethod.getParams().setParameter("fileGroup", "DZ");
+        ;
+
+
+//        File file = new File("D:/upload/image/2023/09/12/f27b4fe4e1fd4f2bfa57b5a560dc792d.jpg");
+        File file = new File("D:/upload/image/2023/09/25/87b4db2aa2e209b77923238e88088c2d.png");
+
+        try {
+
+//            Part[] parts = { new FilePart("file", file) };
+
+
+            Part[] parts = { new FilePart("file", file)
+                    ,new StringPart("businessNo","T233075000507000225")
+//                    ,new StringPart("businessNo","T233075000507000205")
+                    ,new StringPart("operatorCode","S3000032")
+                    ,new StringPart("comCode","307500A3")
+                    ,new StringPart("fileGroup","DZ")
+            };
+            postMethod.setRequestEntity(new MultipartRequestEntity(parts, postMethod.getParams()));
+//            postMethod.setRequestEntity(new MultipartRequestEntity(parts, postMethod.getParams()));
+            int statusCode = httpClient.executeMethod(postMethod);
+
+            if (statusCode == HttpStatus.SC_OK) {
+                String response = postMethod.getResponseBodyAsString();
+                System.out.println("Upload successful. Response: " + response);
+            } else {
+                System.out.println("Upload failed. Status code: " + statusCode);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            postMethod.releaseConnection();
+        }
+    }
+
+}

+ 14 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/component/ChengTaiRequestApiComponent.java

@@ -302,7 +302,8 @@ public class ChengTaiRequestApiComponent {
      * @return
      */
     public UploadFileResponse submitImage(UploadFileRequest uploadFileRequest, HttpHeaders httpHeaders, String partnerCode,String url) {
-        UploadFileResponse response = requestRequestUrl(RequestUrl.Z00005,
+
+        UploadFileResponse response = requestNoEncryptRequestUrl(RequestUrl.Z00005,
                 uploadFileRequest,
                 UploadFileResponse.class,
                 httpHeaders,
@@ -313,6 +314,18 @@ public class ChengTaiRequestApiComponent {
         return res;
     }
 
+    public <T extends BaseRequest, B extends BaseResponse> B requestNoEncryptRequestUrl(RequestUrl requestUrl, T requestBody, Class<B> responseType, HttpHeaders httpHeaders, String partnerCode,String url) {
+        return requestNoEncryptUrl(requestUrl.getRequestUrl(url), requestBody, responseType, httpHeaders);
+    }
+
+    private <B extends BaseResponse, T extends BaseRequest> B requestNoEncryptUrl(String requestUrl, T requestBody, Class<B> responseType, HttpHeaders httpHeaders) {
+        ResponseEntity<B> response = requestComponent.objectPost(requestUrl, requestBody, responseType, httpHeaders);
+        return response.getBody();
+
+
+    }
+
+
     /**
      * 投保保存
      * @param submitVerifyRequest

+ 26 - 20
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java

@@ -176,9 +176,11 @@ public class InsurePremiumRequest extends BaseRequest {
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
 
         public InsuredDTO(CustomerInfoVo insuredHolder) {
-            if (insuredHolder.getPersonType().equals(1)) {
+//            if (insuredHolder.getPersonType().equals(1)) {
                 this.type = "1";
                 this.identifyTypeCode = "01";
                 this.identifyNumber = insuredHolder.getIdentifyNumber();
@@ -186,15 +188,15 @@ public class InsurePremiumRequest extends BaseRequest {
                 this.birthday = IDCardUtils.GetBirthday(insuredHolder.getIdentifyNumber());
                 this.relationWithInsured = "0";
                 this.relationWithCar = "1";
-            } else {
-                this.type = "2";
-                this.identifyTypeCode = "4";
-                this.identifyNumber = insuredHolder.getIdentifyNumber();
-                this.organizationCode = insuredHolder.getIdentifyNumber();
-                this.tel = insuredHolder.getTelephone();
-//                this.linkerName = insuredHolder.getContact();
-                this.unitTypeCode = "900"; // 单位性质 900:其他
-            }
+//            } else {
+//                this.type = "2";
+//                this.identifyTypeCode = "4";
+//                this.identifyNumber = insuredHolder.getIdentifyNumber();
+//                this.organizationCode = insuredHolder.getIdentifyNumber();
+//                this.tel = insuredHolder.getTelephone();
+////                this.linkerName = insuredHolder.getContact();
+//                this.unitTypeCode = "900"; // 单位性质 900:其他
+//            }
             this.name = insuredHolder.getName();
             this.province = insuredHolder.getProvinceCode();
             this.city = insuredHolder.getCityCode();
@@ -204,6 +206,7 @@ public class InsurePremiumRequest extends BaseRequest {
             this.identifyValidDate = insuredHolder.getIdentifyValidDate();
             this.identifyValidEndDate = insuredHolder.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 
@@ -250,24 +253,26 @@ public class InsurePremiumRequest extends BaseRequest {
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
 
 
         public ApplicantDTO(CustomerInfoVo policyHolder){
-            if(policyHolder.getPersonType().equals(1)){
+//            if(policyHolder.getPersonType().equals(1)){
                 this.type = "1";
                 this.identifyTypeCode = "01";
                 this.identifyNumber = policyHolder.getIdentifyNumber();
                 this.sex = policyHolder.getGender();
                 this.birthday = IDCardUtils.GetBirthday(policyHolder.getIdentifyNumber());
-            }else{
-                this.type = "2";
-                this.identifyTypeCode = "4";
-                this.identifyNumber = policyHolder.getIdentifyNumber();
-                this.organizationCode = policyHolder.getIdentifyNumber();
-                this.tel = policyHolder.getTelephone();
-//                this.linkerName = policyHolder.getContact();
-                this.unitTypeCode = "900"; // 单位性质 900:其他
-            }
+//            }else{
+//                this.type = "2";
+//                this.identifyTypeCode = "4";
+//                this.identifyNumber = policyHolder.getIdentifyNumber();
+//                this.organizationCode = policyHolder.getIdentifyNumber();
+//                this.tel = policyHolder.getTelephone();
+////                this.linkerName = policyHolder.getContact();
+//                this.unitTypeCode = "900"; // 单位性质 900:其他
+//            }
             this.name = policyHolder.getName();
             this.province = policyHolder.getProvinceCode();
             this.city = policyHolder.getCityCode();
@@ -277,6 +282,7 @@ public class InsurePremiumRequest extends BaseRequest {
             this.identifyValidDate = policyHolder.getIdentifyValidDate();
             this.identifyValidEndDate = policyHolder.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 

+ 1 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/UploadFileRequest.java

@@ -50,7 +50,7 @@ public class UploadFileRequest extends BaseRequest{
     public UploadFileRequest(InsuranceImageVo insuranceImageVo, String orderNo, String ppartnerCode){
         super(ppartnerCode);
         this.orderId = orderNo;
-        String imageType = insuranceImageVo.getImageType();
+        String imageType = insuranceImageVo.getImageCode();
 
         InsuranceImageEnum insuranceImageEnum = Enum.valueOf(InsuranceImageEnum.class, imageType);
 

+ 46 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/response/InsurePremiumResponse.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @NoArgsConstructor
@@ -22,6 +23,51 @@ public class InsurePremiumResponse extends BaseResponse {
     @JsonProperty("ciContract")
     private CiContractDTO ciContract;
 
+    @JsonProperty("yztScore")
+    private YztScore yztScore;
+
+    @NoArgsConstructor
+    @Data
+    public static class YztScore {
+
+        /**
+         * 评分百分段
+         */
+        @JsonProperty("centile")
+        private Integer centile;
+
+        /**
+         * 商业险纯损失
+         */
+        @JsonProperty("commercialPureLost")
+        private BigDecimal commercialPureLost;
+
+        /**
+         * 预估标的终极赔付率
+         */
+        @JsonProperty("finalLossrationRate")
+        private BigDecimal finalLossrationRate;
+
+        /**
+         * 交强险纯损失
+         */
+        @JsonProperty("forcePureLost")
+        private BigDecimal forcePureLost;
+
+        /**
+         * 标的纯损失
+         */
+        @JsonProperty("targetPureLost")
+        private BigDecimal targetPureLost;
+
+        /**
+         * 升分主要因子
+         */
+        @JsonProperty("increaseFactor")
+        private String increaseFactor;
+    }
+
+
     @NoArgsConstructor
     @Data
     public static class BiContractDTO {

+ 0 - 2
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/properties/ChengTaiApiProperties.java

@@ -12,8 +12,6 @@ public class ChengTaiApiProperties {
 
     //诚泰接入方code
     private String partnerCode;
-    //诚泰请求API地址
-    private String baseUrl;
     //诚泰RSA公钥
     private String ctPublicKey;
     //我司RSA公钥

+ 0 - 1
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/repository/ChengTaiApiOrderRepository.java

@@ -6,6 +6,5 @@ import org.springframework.data.mongodb.repository.Query;
 
 public interface ChengTaiApiOrderRepository extends MongoRepository<ChengTaiApiOrder, String> {
 
-    @Query("{'ordersNo' : ?0}")
     ChengTaiApiOrder getById(String id);
 }

+ 3 - 2
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java

@@ -12,6 +12,7 @@ import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
+import com.jzg.commons.util.http.HttpUtil;
 import com.jzg.commons.util.http.HttpUtils;
 import com.jzg.quotation.chengtai.api.build.ChengTaiAPIQuoteResultsVoBuild;
 import com.jzg.quotation.chengtai.api.component.ChengTaiRequestApiComponent;
@@ -73,7 +74,7 @@ public class ChengTaiApiRequestImpl implements ChengTaiApiRequest {
         OrderBase order = quoteVo.getOrder();
         AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
         // 配置信息
-        String url = getApiUrl(order.getInsuranceCompanyId());
+        String url = getApiUrl(order.getInsuranceCompanyCode());
         ChengTaiApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(ChengTaiApiConfigureParameters.class,
                 attributionInformationVo.getConfigInfo());
         HttpHeaders httpHeaders = chengTaiRequestApiComponent.getHttpHeaders(parameters,url);
@@ -196,7 +197,7 @@ public class ChengTaiApiRequestImpl implements ChengTaiApiRequest {
         bodyMap.put("jqImage", StringUtils.toString(jqImageStr, ""));
         bodyMap.put("syImage", StringUtils.toString(syImageStr, ""));
         String sendBody = JSON.toJSONString(bodyMap);
-        String ocrStr = HttpUtils.sendPost("http://39.98.41.104:8088/getres", sendBody);
+        String ocrStr = HttpUtil.sendPost("http://39.98.41.104:8088/getres", sendBody);
         CheckCodeResp resp = JSON.parseObject(ocrStr).toJavaObject(CheckCodeResp.class);
 
         if(Objects.nonNull(ciContract)){

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

@@ -50,7 +50,7 @@ public class RequestComponent {
 
     private final WebClientConfig webClientConfig;
 
-    private final List<String> DOMAIN_LIST = List.of("b2b.champion-ic.com");
+    private final List<String> DOMAIN_LIST = List.of("b2b.champion-ic.com", "hsale.champion-ic.com");
 
     /**
      * 根据URL选择合适的WebClient(支持SSL)

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

@@ -1028,7 +1028,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         List<InsOrders> insOrders = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
                 .select(InsOrders::getCompanyId)
                 .groupBy(InsOrders::getCompanyId));
-        List<String> companyIds = insOrders.stream().map(InsOrders::getCompanyId).filter(Objects::nonNull).collect(Collectors.toList());
+        List<String> companyIds = insOrders.stream().filter(v -> !Objects.isNull(v) && StringUtils.isNotEmpty(v.getCompanyId())).map(InsOrders::getCompanyId).collect(Collectors.toList());
         String joined = String.join(",", companyIds);
         HttpResult<List<EsmInsCompany>> companyByIds = platformClient.getCompanyByIds(joined,baseController.getToken());
         return companyByIds.getData();

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

@@ -5,12 +5,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.InsTaskImagesAdd;
 import com.jzg.commons.entity.po.InsTaskImages;
+import com.jzg.commons.entity.quote.vo.aggregated.InsuranceUploadImageVo;
 import com.jzg.commons.entity.vo.ImagesVo;
 import com.jzg.commons.entity.vo.InsTaskImagesVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.MinioUtils;
 import com.jzg.commons.util.idgen.IdGenerate;
-import com.jzg.commons.entity.quote.vo.aggregated.InsuranceUploadImageVo;
 import com.jzg.quotation.summary.mapper.InsTaskImagesMapper;
 import com.jzg.quotation.summary.service.InsTaskImagesService;
 import org.springframework.stereotype.Service;
@@ -62,14 +62,20 @@ public class  InsTaskImagesServiceImpl extends ServiceImpl<InsTaskImagesMapper,
         int delete = baseMapper.delete(new LambdaUpdateWrapper<InsTaskImages>()
                 .eq(InsTaskImages::getQuoteNo, quoteNo));
         insuranceUploadImageVo.getImageVoList().forEach(imageVo -> {
-            imageVo.getImageBase64List().forEach(base64 ->{
-                InsTaskImages insTaskImages = new InsTaskImages();
-                insTaskImages.setId(IdGenerate.nextId());
-                insTaskImages.setQuoteNo(quoteNo);
-                insTaskImages.setImageType(imageVo.getImageCode());
-                insTaskImages.setImageId(base64.getImageId());
-                images.add(insTaskImages);
-            });
+//            imageVo.getImageBase64List().forEach(base64 ->{
+//                InsTaskImages insTaskImages = new InsTaskImages();
+//                insTaskImages.setId(IdGenerate.nextId());
+//                insTaskImages.setQuoteNo(quoteNo);
+//                insTaskImages.setImageType(imageVo.getImageCode());
+//                insTaskImages.setImageId(base64.getImageId());
+//                images.add(insTaskImages);
+//            });
+            InsTaskImages insTaskImages = new InsTaskImages();
+            insTaskImages.setId(IdGenerate.nextId());
+            insTaskImages.setQuoteNo(quoteNo);
+            insTaskImages.setImageType(imageVo.getImageType());
+            insTaskImages.setImageId(imageVo.getImageId());
+            images.add(insTaskImages);
         });
         return !baseMapper.insert(images).isEmpty();
     }