Procházet zdrojové kódy

Merge remote-tracking branch 'origin/test' into test

haoyu před 2 roky
rodič
revize
936b146dc9
28 změnil soubory, kde provedl 285 přidání a 66 odebrání
  1. 4 5
      src/main/java/com/ydtech/modules/ins/model/yc/YcBuildData.java
  2. 1 0
      src/main/java/com/ydtech/modules/order/components/ConfigureParametersComponents.java
  3. 33 22
      src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java
  4. 6 0
      src/main/java/com/ydtech/modules/order/constants/OrderCacheConstant.java
  5. 1 1
      src/main/java/com/ydtech/modules/order/controller/IdentifyController.java
  6. 3 0
      src/main/java/com/ydtech/modules/order/dao/InsAreaCompanyMapper.java
  7. 14 5
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/BoHaiBaseRequest.java
  8. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/ElectronicPolicyRequest.java
  9. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/GenerateOrderNoRequest.java
  10. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/ImageUploadRequest.java
  11. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/PaymentRequest.java
  12. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/QuotationRequest.java
  13. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/StatusDocumentsRequest.java
  14. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/UnderwritingRequest.java
  15. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleConfirmationReqeust.java
  16. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleTypeQueryRequest.java
  17. 4 0
      src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java
  18. 57 5
      src/main/java/com/ydtech/modules/order/service/impl/IdentifyServiceImpl.java
  19. 5 0
      src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java
  20. 12 1
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  21. 41 0
      src/main/java/com/ydtech/utils/ObjectUtil.java
  22. 18 6
      src/main/java/com/ydtech/utils/baidu/AuthService.java
  23. 19 5
      src/main/java/com/ydtech/utils/baidu/Idcard.java
  24. 20 2
      src/main/java/com/ydtech/utils/baidu/MultiObjectDetect.java
  25. 9 2
      src/main/resources/application-pre.yml
  26. 9 2
      src/main/resources/application-prod.yml
  27. 9 1
      src/main/resources/application-test.yml
  28. 11 0
      src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

+ 4 - 5
src/main/java/com/ydtech/modules/ins/model/yc/YcBuildData.java

@@ -17,6 +17,7 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 /**
@@ -214,7 +215,7 @@ public class YcBuildData {
         }
 
         //出险信息
-        quoteRespVo.setAccidentInfoStr(String.format("%s%s", ciSB.toString(), biSB.toString()));
+        quoteRespVo.setAccidentInfoStr(String.format("%s%s", ciSB, biSB));
 
 
         //欠税信息
@@ -234,11 +235,9 @@ public class YcBuildData {
         if (null != rd.getTfiWarnList()) {
             //排空
             List<TfiWarnListResponse.TfiWarnData> tfiWarnData =
-                    rd.getTfiWarnList().getTfiWarnData().stream().filter(item -> null != item).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).collect(Collectors.toList());
+                    rd.getTfiWarnList().getTfiWarnData().stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).collect(Collectors.toList());
             List<String> warnMessageList = new ArrayList<>();
-            tfiWarnData.stream().forEach(a -> {
-                warnMessageList.add(a.getWarnMessage());
-            });
+            tfiWarnData.forEach(a -> warnMessageList.add(a.getWarnMessage()));
             quoteRespVo.setWarnMessageList(warnMessageList);
         }
 

+ 1 - 0
src/main/java/com/ydtech/modules/order/components/ConfigureParametersComponents.java

@@ -10,6 +10,7 @@ import com.ydtech.modules.protocol.utils.AssertionUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ReflectionUtils;
+import org.springframework.util.StringUtils;
 
 import java.lang.reflect.Field;
 import java.util.LinkedHashMap;

+ 33 - 22
src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java

@@ -7,6 +7,7 @@ import com.ydtech.config.properties.BohaiApiConfigurationProperties;
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.order.entity.api.bohai.BoHaiEncrypted;
+import com.ydtech.modules.order.entity.api.bohai.constants.RequestType;
 import com.ydtech.modules.order.entity.api.bohai.constants.ResponseCode;
 import com.ydtech.modules.order.entity.api.bohai.request.*;
 import com.ydtech.modules.order.entity.api.bohai.response.*;
@@ -47,12 +48,15 @@ public class BoHaiRequestApiComponent {
      * @param <S>    Response 响应体
      * @return <S>
      */
-    private <Q extends BoHaiBaseRequest, S extends BoHaiBaseResponse> S post(Q q, String url, Class<S> tClass, String sysSourceCode) throws Exception {
+    private <Q extends BoHaiBaseRequest, S extends BoHaiBaseResponse> S post(Q q, String url, Class<S> tClass, String sysSourceCode,
+                                                                             RequestType requestType) throws Exception {
+        q.setBaseParamRequestType(requestType.getCode());
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.setContentType(MediaType.APPLICATION_JSON);
 
         String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
-        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> URl: {} \n---------> 请求参数:{}", url, busReqString);
+        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
+                requestType.getDesc(), url, busReqString);
         BoHaiEncrypted boHaiEncrypted = new BoHaiEncrypted(busReqString, properties, sysSourceCode);
         String json = JSON.toJSONString(boHaiEncrypted, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
         // 获取请求头signature 和加密后的内容
@@ -61,21 +65,28 @@ public class BoHaiRequestApiComponent {
         String signature = stringStringMap.get("signature");
         String content = stringStringMap.get("content");
         httpHeaders.set("signature", signature);
-        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> 加密后的参数:{} \n\t---------> 请求头内容signature:{}", content,
-                signature);
+        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> {} \n\t---------> 加密后的参数:{} \n\t---------> " +
+                "请求头内容signature:{}", requestType.getDesc(), content, signature);
         // 请求
         HttpEntity<String> httpEntity = new HttpEntity<>(content, httpHeaders);
         ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
         String body = response.getBody();
-        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> 解密前的参数:{}", body);
+        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> {} \n\t---------> 解密前的参数:{}", requestType.getDesc(), body);
 
         // 解密响应
         BoHaiEncrypted encrypted = JSON.parseObject(body).toJavaObject(BoHaiEncrypted.class);
         String info = SignatureUtils.decryptByPrivateKey(encrypted.getBizContent(), properties.getSelfPrivateKey());
-        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> 解密后的参数:{}", info);
+        InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> {} \n\t---------> 解密后的参数:{}", requestType.getDesc(), info);
         return JSON.parseObject(info).toJavaObject(tClass);
     }
 
+    public <Q extends BoHaiBaseRequest, S extends BoHaiBaseResponse> S verificationResponse(Q q, String url, Class<S> tClass,
+                                                                                            String sysSourceCode,
+                                                                                            RequestType requestType) throws Exception {
+        S response = post(q, url, tClass, sysSourceCode, requestType);
+        verificationResponseCode(response.getResponseCode(), response.getResponseMsg());
+        return response;
+    }
 
     /**
      * 生成订单号请求
@@ -84,7 +95,7 @@ public class BoHaiRequestApiComponent {
      * @return 返回订单号响应
      */
     public GenerateOrderNoResponse generateOrderNo(GenerateOrderNoRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), GenerateOrderNoResponse.class,  sysSourceCode);
+        return verificationResponse(request, properties.getUrl(), GenerateOrderNoResponse.class, sysSourceCode, RequestType.Z00002);
     }
 
     /**
@@ -94,7 +105,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public VehicleTypeQueryResponse vehicleTypeQuery(VehicleTypeQueryRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), VehicleTypeQueryResponse.class,  sysSourceCode);
+        return verificationResponse(request, properties.getUrl(), VehicleTypeQueryResponse.class, sysSourceCode, RequestType.Z00004);
     }
 
     /**
@@ -104,9 +115,10 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public VehicleConfirmationResponse vehicleConfirmation(VehicleConfirmationReqeust request, String sysSourceCode) throws Exception {
-        VehicleConfirmationResponse response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode);
+        VehicleConfirmationResponse response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode,
+                RequestType.Z00005);
         if (ResponseCode.R_Z00002.getCode().equals(response.getResponseCode())) {
-            response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode);
+            response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode, RequestType.Z00005);
         }
         if (ResponseCode.R_Z00001.getCode().equals(response.getResponseCode())) {
             return response;
@@ -121,7 +133,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public ImageUploadResponse imageUpload(ImageUploadRequest imageUploadRequest, String sysSourceCode) throws Exception {
-        return post(imageUploadRequest, properties.getUrl(), ImageUploadResponse.class, sysSourceCode);
+        return verificationResponse(imageUploadRequest, properties.getUrl(), ImageUploadResponse.class, sysSourceCode, RequestType.Z00014);
     }
 
 
@@ -132,7 +144,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public NonAutomotiveProductsResponse products(NonAutomotiveProductsRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), NonAutomotiveProductsResponse.class, sysSourceCode);
+        return verificationResponse(request, properties.getUrl(), NonAutomotiveProductsResponse.class, sysSourceCode, RequestType.Z00018);
     }
 
     /**
@@ -142,7 +154,8 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public NonAutomotiveProductsDetailsResponse productsDetails(NonAutomotiveProductsDetailsRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), NonAutomotiveProductsDetailsResponse.class, sysSourceCode);
+        return verificationResponse(request, properties.getUrl(), NonAutomotiveProductsDetailsResponse.class, sysSourceCode,
+                RequestType.Z00019);
     }
 
 
@@ -153,7 +166,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public QuotationResponse quotation(QuotationRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), QuotationResponse.class, sysSourceCode);
+        return post(request, properties.getUrl(), QuotationResponse.class, sysSourceCode, RequestType.Z00006);
     }
 
     /**
@@ -163,7 +176,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public UnderwritingResponse underwriting(UnderwritingRequest underwritingRequest, String sysSourceCode) throws Exception {
-        return post(underwritingRequest, properties.getUrl(), UnderwritingResponse.class, sysSourceCode);
+        return post(underwritingRequest, properties.getUrl(), UnderwritingResponse.class, sysSourceCode, RequestType.Z00007);
     }
 
     /**
@@ -173,7 +186,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public PaymentResponse payment(PaymentRequest paymentRequest, String sysSourceCode) throws Exception {
-        return post(paymentRequest, properties.getUrl(), PaymentResponse.class, sysSourceCode);
+        return post(paymentRequest, properties.getUrl(), PaymentResponse.class, sysSourceCode, RequestType.Z00008);
     }
 
     /**
@@ -183,9 +196,8 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public ElectronicPolicyResponse electronicPolicy(ElectronicPolicyRequest electronicPolicyRequest, String sysSourceCode) throws Exception {
-        ElectronicPolicyResponse response =  post(electronicPolicyRequest, properties.getUrl(), ElectronicPolicyResponse.class, sysSourceCode);
-        verificationResponseCode(response.getResponseCode(), response.getResponseMsg());
-        return response;
+        return verificationResponse(electronicPolicyRequest, properties.getUrl(), ElectronicPolicyResponse.class, sysSourceCode,
+                RequestType.Z00020);
     }
 
     /**
@@ -195,9 +207,8 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public StatusDocumentsResponse statusDocuments(StatusDocumentsRequest statusDocumentsRequest, String sysSourceCode) throws Exception {
-        StatusDocumentsResponse response = post(statusDocumentsRequest, properties.getUrl(), StatusDocumentsResponse.class, sysSourceCode);
-        verificationResponseCode(response.getResponseCode(), response.getResponseMsg());
-        return response;
+        return verificationResponse(statusDocumentsRequest, properties.getUrl(), StatusDocumentsResponse.class, sysSourceCode,
+                RequestType.Z00021);
     }
 
     /**

+ 6 - 0
src/main/java/com/ydtech/modules/order/constants/OrderCacheConstant.java

@@ -67,6 +67,12 @@ public class OrderCacheConstant {
      */
     public static final String GR_SPECIAL_AGREEMENT_KEY = "gr:specialAgreement:";
 
+
+    /**
+     * 图片识别 key
+     */
+    public static final String IMAGE_IDENTIFY_KEY = "image:identify:";
+
     /**
      * 国任特别约定 存储时间
      */

+ 1 - 1
src/main/java/com/ydtech/modules/order/controller/IdentifyController.java

@@ -32,7 +32,7 @@ public class IdentifyController {
     }
 
     @PostMapping("/drivingPermit")
-    @ApiOperation(value = "行驶证正反面识别")
+    @ApiOperation(value = "行驶证正反面识别")  
     public HttpResult<Map<String, Object>> drivingPermit(MultipartFile image1, MultipartFile image2) {
         return identifyService.drivingPermit(image1, image2);
     }

+ 3 - 0
src/main/java/com/ydtech/modules/order/dao/InsAreaCompanyMapper.java

@@ -41,6 +41,9 @@ public interface InsAreaCompanyMapper extends BaseMapper<InsAreaCompany> {
     InsAreaCompany queryLatestStatus(@Param("orderNo") String orderNo);
 
 
+    List<InsAreaCompany> getorDerIds();
+
+
 }
 
 

+ 14 - 5
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/BoHaiBaseRequest.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.order.entity.config.BoHaiConfigureParameters;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.ObjectUtils;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
@@ -19,19 +20,27 @@ public class BoHaiBaseRequest implements Serializable {
     @JsonProperty("baseParam")
     private BaseParamDTO baseParam;
 
-    public void setBaseParam(BoHaiConfigureParameters parameters, String requestType) {
-        baseParam = new BaseParamDTO();
+    public void setBaseParam(BoHaiConfigureParameters parameters) {
+        if (ObjectUtils.isEmpty(this.baseParam)) {
+            baseParam = new BaseParamDTO();
+        }
         baseParam.requestNo = UUID.randomUUID().toString().replace("-", "");
         baseParam.requestTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"));
-        baseParam.requestType = requestType;
         baseParam.ip = "118.81.124.183";
         baseParam.insurerBranchCode = parameters.getInsurerBranchCode();
         baseParam.franchiserInstitutionCode = parameters.getFranchiserInstitutionCode();
         baseParam.franchiserChannel = new BaseParamDTO.FranchiserChannelDTO(parameters);
     }
 
-    public void setBaseParam(BoHaiConfigureParameters parameters, String requestType, String orderNo) {
-        setBaseParam(parameters, requestType);
+    public void setBaseParamRequestType(String requestType) {
+        if (ObjectUtils.isEmpty(this.baseParam)) {
+            baseParam = new BaseParamDTO();
+        }
+        this.baseParam.requestType = requestType;
+    }
+
+    public void setBaseParam(BoHaiConfigureParameters parameters, String orderNo) {
+        setBaseParam(parameters);
         baseParam.orderNo = orderNo;
     }
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/ElectronicPolicyRequest.java

@@ -28,7 +28,7 @@ public class ElectronicPolicyRequest extends BoHaiBaseRequest {
     private String policyType;
 
     public ElectronicPolicyRequest(BoHaiConfigureParameters parameters, String id, String jqpolicyno, String sypolicyno) {
-        this.setBaseParam(parameters, RequestType.Z00020.getCode(), id);
+        this.setBaseParam(parameters, id);
         this.policyNo = StringUtils.isNotEmpty(jqpolicyno) ? jqpolicyno : sypolicyno;
         if (StringUtils.isEmpty(jqpolicyno)) {
             this.policyType = "0";

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/GenerateOrderNoRequest.java

@@ -24,7 +24,7 @@ public class GenerateOrderNoRequest extends BoHaiBaseRequest {
     private static final long serialVersionUID = 8713399532011104295L;
 
     public GenerateOrderNoRequest(BoHaiConfigureParameters parameters) {
-        this.setBaseParam(parameters, RequestType.Z00002.getCode());
+        this.setBaseParam(parameters);
     }
 
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/ImageUploadRequest.java

@@ -34,7 +34,7 @@ public class ImageUploadRequest extends BoHaiBaseRequest {
     private String busUniqueId;
 
     public ImageUploadRequest(BoHaiConfigureParameters parameters, String id, String insOrderNo, List<InsTaskImagesBase64> insTaskImagesBase64s) {
-        this.setBaseParam(parameters, RequestType.Z00014.getCode(), id);
+        this.setBaseParam(parameters, id);
         this.setBusUniqueId(insOrderNo);
         this.fileInfos = FileInfosDTO.toFileInfosDTOList(insTaskImagesBase64s);
     }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/PaymentRequest.java

@@ -28,7 +28,7 @@ public class PaymentRequest extends BoHaiBaseRequest{
 
 
     public PaymentRequest(BoHaiConfigureParameters parameters, String orderNo, String insOrderNo) {
-        this.setBaseParam(parameters, RequestType.Z00008.getCode(), orderNo);
+        this.setBaseParam(parameters, orderNo);
         this.busUniqueId = insOrderNo;
         this.payWay = "82";
     }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/QuotationRequest.java

@@ -58,7 +58,7 @@ public class QuotationRequest extends BoHaiBaseRequest {
                             String orderNO,
                             CarInfoVo carInfo,
                             List<BoHaiQuoteAccidentVo> accidentVo) {
-        this.setBaseParam(parameters, RequestType.Z00006.getCode(), orderNO);
+        this.setBaseParam(parameters, orderNO);
         this.argueSolution = "1";
         for (RiskInfoVo riskInfoVo : riskList) {
             if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/StatusDocumentsRequest.java

@@ -24,7 +24,7 @@ public class StatusDocumentsRequest extends BoHaiBaseRequest {
     private String applicationNo;
 
     public StatusDocumentsRequest(BoHaiConfigureParameters parameters, String id, String applicationNo) {
-        this.setBaseParam(parameters, RequestType.Z00021.getCode(), id);
+        this.setBaseParam(parameters, id);
         this.applicationNo = applicationNo;
     }
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/UnderwritingRequest.java

@@ -31,7 +31,7 @@ public class UnderwritingRequest extends BoHaiBaseRequest {
     private TrafficPolicyDTO trafficPolicy;
 
     public UnderwritingRequest(BoHaiConfigureParameters parameters, String orderNo) {
-        this.setBaseParam(parameters, RequestType.Z00007.getCode(), orderNo);
+        this.setBaseParam(parameters, orderNo);
     }
 
     @NoArgsConstructor

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleConfirmationReqeust.java

@@ -59,7 +59,7 @@ public class VehicleConfirmationReqeust extends BoHaiBaseRequest {
             effectDate = quoteInfoVo.getRiskList().get(0).getStartDate();
         }
 
-        this.setBaseParam(parameters, RequestType.Z00005.getCode(), orderNo);
+        this.setBaseParam(parameters, orderNo);
         // 车辆信息
         CarInfoVo carInfo = quoteInfoVo.getCarInfo();
         this.vehicle = new VehicleDTO(carInfo, vehicleModelsDTO, effectDate);

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleTypeQueryRequest.java

@@ -51,7 +51,7 @@ public class VehicleTypeQueryRequest extends BoHaiBaseRequest {
     private String newVehicleFlag;
 
     public VehicleTypeQueryRequest(BoHaiConfigureParameters parameters, String vehicleBrandModelKey, String orderNo) {
-        this.setBaseParam(parameters, RequestType.Z00004.getCode(), orderNo);
+        this.setBaseParam(parameters, orderNo);
         this.vehicleBrandModelKey = vehicleBrandModelKey;
     }
 

+ 4 - 0
src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java

@@ -58,4 +58,8 @@ public interface InsAreaCompanyService extends IService<InsAreaCompany> {
      * @param orderNo 主订单号
      */
     InsAreaCompany queryLatestStatus(String orderNo);
+
+    List<InsAreaCompany> getorDerIds();
+
+
 }

+ 57 - 5
src/main/java/com/ydtech/modules/order/service/impl/IdentifyServiceImpl.java

@@ -8,17 +8,26 @@ import com.ydtech.modules.order.entity.BusinessLicense;
 import com.ydtech.modules.order.service.IdentifyService;
 import com.ydtech.modules.protocol.utils.AssertionUtils;
 import com.ydtech.utils.ImageCompressionUtils;
+import com.ydtech.utils.ObjectUtil;
+import com.ydtech.utils.StringUtils;
 import com.ydtech.utils.baidu.BusinessLicenseRecognition;
 import com.ydtech.utils.baidu.Idcard;
 import com.ydtech.utils.baidu.MultiObjectDetect;
+import org.springframework.beans.BeanUtils;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import java.io.IOException;
 import java.util.Base64;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
+import static com.ydtech.modules.order.constants.OrderCacheConstant.IMAGE_IDENTIFY_KEY;
 
 /**
  * @author wenks
@@ -29,16 +38,39 @@ import java.util.Map;
 @Service
 public class IdentifyServiceImpl implements IdentifyService {
 
+
+    @Resource
+    private RedisTemplate<String, Object> redisTemplate;
+
     @Override
     public HttpResult<Map<String, Object>> idCard(MultipartFile image1, MultipartFile image2) {
         Map<String, Object> map = new HashMap<>();
         CustomerInfoVO customerInfoVO = new CustomerInfoVO();
 
         String s1 = byteToBase64(image1);
-        Idcard.getIdCardFront(s1, customerInfoVO);
+
+        if (StringUtils.isNotBlank(s1) && !ObjectUtil.isAllFieldNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s1))) {
+            //走缓存
+            BeanUtils.copyProperties(Objects.requireNonNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s1)), customerInfoVO);
+        } else {
+            //识别身份证正面
+            Idcard.getIdCardFront(s1, customerInfoVO);
+            AssertionUtils.isEmpty(customerInfoVO, "身份证识别失败");
+            //设置缓存
+            redisTemplate.opsForValue().set(IMAGE_IDENTIFY_KEY + s1, customerInfoVO, 1, TimeUnit.DAYS);
+        }
 
         String s2 = byteToBase64(image2);
-        Idcard.getIdCardBack(s2, customerInfoVO);
+        if (StringUtils.isNotBlank(s2) && !ObjectUtil.isAllFieldNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s2))) {
+            //走缓存
+            BeanUtils.copyProperties(Objects.requireNonNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s2)),customerInfoVO);
+        }else {
+            //识别身份证背面
+            Idcard.getIdCardBack(s2, customerInfoVO);
+            AssertionUtils.isEmpty(customerInfoVO, "身份证识别失败");
+            //设置缓存
+            redisTemplate.opsForValue().set(IMAGE_IDENTIFY_KEY + s2, customerInfoVO, 1, TimeUnit.DAYS);
+        }
 
         AssertionUtils.isEmpty(customerInfoVO, "身份证识别失败");
         map.put("customerInfo", customerInfoVO);
@@ -51,12 +83,30 @@ public class IdentifyServiceImpl implements IdentifyService {
         CardUserInfo cardUserInfo = new CardUserInfo();
 
         String s1 = byteToBase64(image1);
-        MultiObjectDetect.drivingPermitFront(s1, cardUserInfo);
+        if (StringUtils.isNotBlank(s1) && !ObjectUtil.isAllFieldNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s1))) {
+            //走缓存
+            BeanUtils.copyProperties(Objects.requireNonNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s1)),cardUserInfo);
+        } else {
+            //行驶证正面识别
+            MultiObjectDetect.drivingPermitFront(s1, cardUserInfo);
+            AssertionUtils.isEmpty(cardUserInfo, "行驶证正面识别失败");
+            //设置缓存
+            redisTemplate.opsForValue().set(IMAGE_IDENTIFY_KEY + s1, cardUserInfo, 1, TimeUnit.DAYS);
+        }
 
         String s2 = byteToBase64(image2);
-        MultiObjectDetect.drivingPermitBack(s2, cardUserInfo);
+        if (StringUtils.isNotBlank(s2) && !ObjectUtil.isAllFieldNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s2))) {
+            //走缓存
+            BeanUtils.copyProperties(Objects.requireNonNull(redisTemplate.opsForValue().get(IMAGE_IDENTIFY_KEY + s2)),cardUserInfo);
+        }else {
+            //行驶证反面识别
+            MultiObjectDetect.drivingPermitBack(s2, cardUserInfo);
+            AssertionUtils.isEmpty(cardUserInfo, "行驶证正面识别失败");
+            //设置缓存
+            redisTemplate.opsForValue().set(IMAGE_IDENTIFY_KEY + s2, cardUserInfo, 1, TimeUnit.DAYS);
+        }
 
-        AssertionUtils.isEmpty(cardUserInfo, "身份证识别失败");
+        AssertionUtils.isEmpty(cardUserInfo, "行驶证正面识别失败");
         map.put("carInfo", cardUserInfo);
         return HttpResult.ok("success", map);
     }
@@ -85,4 +135,6 @@ public class IdentifyServiceImpl implements IdentifyService {
     }
 
 
+
+
 }

+ 5 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -81,6 +81,11 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         return baseMapper.queryLatestStatus(orderNo);
     }
 
+    @Override
+    public List<InsAreaCompany> getorDerIds() {
+        return  baseMapper.getorDerIds();
+    }
+
 }
 
 

+ 12 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -2,10 +2,12 @@ package com.ydtech.modules.order.service.impl;
 
 import cn.dev33.satoken.session.SaSession;
 import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.collection.CollUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.components.OrderComponents;
@@ -321,7 +323,6 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
     @Override
     public BasePageResult<InsOrders> queryPageOrder(OrderQueryVo orderQueryVo) {
-
         // 领导标志
         boolean isTeamLeader = false;
         //是否出单员标志
@@ -387,6 +388,16 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             }
         }
 
+        //查出报价状态为 3
+        List<InsAreaCompany>   insAreaCompanies = insAreaCompanyService.getorDerIds();
+//      新的费用订单表
+        if(insAreaCompanies.size()>0){
+            List<String> collect = insAreaCompanies.stream().map(insAreaCompany -> insAreaCompany.getOrderno()).collect(Collectors.toList());
+            if (!collect.isEmpty()) {
+                wrapper.in(InsOrders::getOrderno, collect);
+            }
+        }
+
         Page<InsOrders> insOrdersPage = page(page, wrapper);
 
         return new BasePageResult<>(orderQueryVo.getPageNum(), page.getSize(), insOrdersPage.getTotal(), page.getPages(),

+ 41 - 0
src/main/java/com/ydtech/utils/ObjectUtil.java

@@ -0,0 +1,41 @@
+package com.ydtech.utils;
+import java.lang.reflect.Field;
+/**
+ * @author jianlong
+ * @date 2024-03-19 09:26
+ */
+import java.util.*;
+
+
+public class ObjectUtil {
+    /**
+     * 判断该对象是否所有属性为空
+     * 返回ture表示所有属性为null,返回false表示不是所有属性都是null
+     */
+    public static boolean isAllFieldNull(Object object) {
+        boolean flag = true;
+
+        if(object == null) return flag;
+        Class clazz = object.getClass();
+        Field[] fields = clazz.getDeclaredFields();
+
+        for (Field field : fields) {
+            //设置属性是可以访问的(私有的也可以)
+            field.setAccessible(true);
+            Object value = null;
+            try {
+                value = field.get(object);
+                // 只要有1个属性不为空,那么就不是所有的属性值都为空
+                if (value != null) {
+                    flag = false;
+                    break;
+                }
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            }
+        }
+
+        return flag;
+    }
+}
+

+ 18 - 6
src/main/java/com/ydtech/utils/baidu/AuthService.java

@@ -11,7 +11,11 @@ import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
 
+import javax.annotation.PostConstruct;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
@@ -28,11 +32,19 @@ import java.util.Map;
  * @Date 2021/6/25
  **/
 @Slf4j
+@Component
 public class AuthService {
 
 
-    private AuthService() {
-        throw new IllegalStateException("Utility class");
+    @Autowired
+    private Environment environment;
+
+    @Autowired
+    private static Environment staticEnvironment;
+
+    @PostConstruct
+    public void init() {
+        staticEnvironment = environment;
     }
 
     /**
@@ -49,9 +61,9 @@ public class AuthService {
 //        String clientId = "MN5kwB9Qvi77eTKexMG69HH1";
 //        // 官网获取的 Secret Key 更新为你注册的
 //        String clientSecret = "LIZb0viMF5833zNHhhok3Kl1wqF9qWue";
+        String clientId = staticEnvironment.getProperty("clientId");
+        String clientSecret = staticEnvironment.getProperty("clientSecret");
 
-        String clientId = "xG9M8tSjNvYPwSTNavM0ELlD";
-        String clientSecret = "riYIRG67akE5FGVwnHE3dGBly5zmdS6t";
         return getAuth(clientId, clientSecret);
     }
 
@@ -66,7 +78,7 @@ public class AuthService {
      */
     public static String getAuth(String ak, String sk) {
         // 获取token地址
-        String authHost = "https://aip.baidubce.com/oauth/2.0/token?";
+        String authHost = staticEnvironment.getProperty("authHost");
         String getAccessTokenUrl = authHost
                 // 1. grant_type为固定参数
                 + "grant_type=client_credentials"
@@ -144,4 +156,4 @@ public class AuthService {
         }
     }
 
-}
+}

+ 19 - 5
src/main/java/com/ydtech/utils/baidu/Idcard.java

@@ -7,7 +7,11 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.CustomerInfoVO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
 
+import javax.annotation.PostConstruct;
 import java.net.URLEncoder;
 import java.util.HashMap;
 import java.util.Map;
@@ -16,12 +20,22 @@ import java.util.Map;
  * 身份证识别
  */
 @Slf4j
+@Component
 public class Idcard {
 
-    private Idcard() {
-        throw new IllegalStateException("Idcard class");
+
+    @Autowired
+    private Environment environment;
+
+    @Autowired
+    private static Environment staticEnvironment;
+
+    @PostConstruct
+    public void init() {
+        staticEnvironment = environment;
     }
 
+
     /**
      * 重要提示代码中所需工具类
      * FileUtil,Base64Util,HttpUtil,GsonUtils请从
@@ -37,7 +51,7 @@ public class Idcard {
         String accessToken = AuthService.getAuth();
         Map<String, Object> ma = new HashMap<>();
         // 请求url
-        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/idcard";
+        String url = staticEnvironment.getProperty("idcard");
         try {
             String imgParam = URLEncoder.encode(imgs, "UTF-8");
             String param = "id_card_side=" + "front" + "&image=" + imgParam + "&detect_photo=true";
@@ -68,7 +82,7 @@ public class Idcard {
         //// 从redis中获取信息,redis保存时间是20天。
         String accessToken = AuthService.getAuth();
         // 请求url
-        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/idcard";
+        String url = staticEnvironment.getProperty("idcard");
         try {
             String imgParam = URLEncoder.encode(image, "UTF-8");
             String param = "id_card_side=" + idCardSide + "&image=" + imgParam + "&detect_photo=true";
@@ -122,4 +136,4 @@ public class Idcard {
     }
 
 
-}
+}

+ 20 - 2
src/main/java/com/ydtech/utils/baidu/MultiObjectDetect.java

@@ -6,7 +6,11 @@ import com.alibaba.fastjson.JSONObject;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.CardUserInfo;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
 
+import javax.annotation.PostConstruct;
 import java.net.URLEncoder;
 import java.util.HashMap;
 import java.util.Map;
@@ -17,14 +21,28 @@ import java.util.Map;
  * @Author
  * @Date 2021/6/25
  **/
+@Component
 public class MultiObjectDetect {
 
 
+    @Autowired
+    private Environment environment;
+
+    @Autowired
+    private static Environment staticEnvironment;
+
+    @PostConstruct
+    public void init() {
+        staticEnvironment = environment;
+    }
+
+
+
     public static HttpResult multiObjectDetect(String imgData) {
         Map<String, Object> ma = new HashMap<>();
 
         // 请求url
-        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license";
+        String url = staticEnvironment.getProperty("vehicle");
         try {
             // 本地文件路径
             imgData = imgData.substring(imgData.indexOf(",") + 1);
@@ -75,7 +93,7 @@ public class MultiObjectDetect {
 
     public static JSONObject request(String images, String vehicleLicenseSide) {
         // 请求url
-        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license";
+        String url = staticEnvironment.getProperty("vehicle");
         try {
 
             images = images.substring(images.indexOf(",") + 1);

+ 9 - 2
src/main/resources/application-pre.yml

@@ -11,6 +11,14 @@ ZMIMGUrl: https://www.echinacoal.com/singlePlatform/others/
 ZMSMSUrl: https://www.echinacoal.com/singlePlatform/prpall/
 ZMToken: THIRDSCOuloft2020052818346904zmYBSXQYTQ
 ZMUrl: https://www.echinacoal.com/singlePlatform/
+
+#百度图片识别API
+clientId: xG9M8tSjNvYPwSTNavM0ELlD
+clientSecret: riYIRG67akE5FGVwnHE3dGBly5zmdS6t
+authHost: https://aip.baidubce.com/oauth/2.0/token?
+vehicle: https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license
+idcard: https://aip.baidubce.com/rest/2.0/ocr/v1/idcard
+
 aly:
   cbit:
     url_pre: http://223.70.186.115:80/CBIT/API/insCBIT
@@ -277,8 +285,7 @@ bohai:
     selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGw4XAPHi+K+/F1yb4pP3MTSOurAWsV+o2bzeVLaI+L4AYeXWhMSZ/L5yEX1OvpZKkBRD6KeIzDFqlP+wZ3qgt4n8MoaeA4//Zj4TSXbyXVPtFAtpeTidd7oWBJWcydvhtcWXrhBRh9wErYZ6+hCwh10JBWmSbTcDm0qY8PyqusQIDAQAB
     selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIbDhcA8eL4r78XXJvik/cxNI66sBaxX6jZvN5Utoj4vgBh5daExJn8vnIRfU6+lkqQFEPop4jMMWqU/7BneqC3ifwyhp4Dj/9mPhNJdvJdU+0UC2l5OJ13uhYElZzJ2+G1xZeuEFGH3ASthnr6ELCHXQkFaZJtNwObSpjw/Kq6xAgMBAAECgYB2odAwNgukfVEJvCjWYYf6PT3YGh60ZIANg0JO1GkqjO4anXFrgLT+6Y7DCJfG296G/N7BGfXCMnHpXqgc7eDlmSy2JVfKzvptgKJBLktP7Yfajg3oY9S8parSK+iyHT6qYqQv6wBmQ3Q9smOp/TM2ndBMDXu9MjoTkNJhrfMDsQJBANbWHciQhazb3Y2DY42hW/zBf7rmmJFrw7aOrEjzw5E+SnGs/vcr3LUWBbSRTYHcoJ+V/kudfwRMlz0SLkfMAvMCQQCglcjNRx35Zw6vNKHE4vTN/ny2gukjvtkzXpPeTUfblrXjK3w3x9aWBZ/MUiphVe5NB8CAtlfYZMo4UG+WMEjLAkA4yHsyydArMinK/5FOm/meQt6p3c0xkpQ2KlurJJLqTtaKWTlCx1scmeeEJGuiCViDFbgS8FvkHQJUZ/vHikq1AkAHbUX/MHXTbg/AzKdaqsB1snpkGoPb0lzLQmmGU36qSjsZSY6SKdzjzVjJo1cwbz/5Mg2WJljDuk2b8yRmBs+nAkEAzoEZmM031u/0KBpukSbqef8JgJOZ0Do9KDbf2P6YuBal6drUeNYVhImKBxQAbjETp9m5TxxW/dkKmHCnc3zqsA==
     boHaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIC3wgJd+7Wue63Qjdh3/uscQSKec2m9gaeCq007kjEiSFES5Tfx75VPSxRj6qk6XN4umHOsHY+W9jkv+Cj4+z3XpPozsRdoj21oxPx8fPJzpVeaUHrEkZtj9Yvo/KhByBK5sRjKmlENXVF3wXVfAg48JZR2XUyUcBdZhR9aHhoQIDAQAB
-    sysSourceCode: 00000080
-
+    insurerCode: 'BPIC'
 
 knife4j:
   enable: false

+ 9 - 2
src/main/resources/application-prod.yml

@@ -11,6 +11,14 @@ ZMIMGUrl: https://www.echinacoal.com/singlePlatform/others/
 ZMSMSUrl: https://www.echinacoal.com/singlePlatform/prpall/
 ZMToken: THIRDSCOuloft2020052818346904zmYBSXQYTQ
 ZMUrl: https://www.echinacoal.com/singlePlatform/
+
+#百度图片识别API
+clientId: xG9M8tSjNvYPwSTNavM0ELlD
+clientSecret: riYIRG67akE5FGVwnHE3dGBly5zmdS6t
+authHost: https://aip.baidubce.com/oauth/2.0/token?
+vehicle: https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license
+idcard: https://aip.baidubce.com/rest/2.0/ocr/v1/idcard
+
 aly:
   cbit:
     url_pre: http://223.70.186.115:80/CBIT/API/insCBIT
@@ -276,8 +284,7 @@ bohai:
     selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGw4XAPHi+K+/F1yb4pP3MTSOurAWsV+o2bzeVLaI+L4AYeXWhMSZ/L5yEX1OvpZKkBRD6KeIzDFqlP+wZ3qgt4n8MoaeA4//Zj4TSXbyXVPtFAtpeTidd7oWBJWcydvhtcWXrhBRh9wErYZ6+hCwh10JBWmSbTcDm0qY8PyqusQIDAQAB
     selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIbDhcA8eL4r78XXJvik/cxNI66sBaxX6jZvN5Utoj4vgBh5daExJn8vnIRfU6+lkqQFEPop4jMMWqU/7BneqC3ifwyhp4Dj/9mPhNJdvJdU+0UC2l5OJ13uhYElZzJ2+G1xZeuEFGH3ASthnr6ELCHXQkFaZJtNwObSpjw/Kq6xAgMBAAECgYB2odAwNgukfVEJvCjWYYf6PT3YGh60ZIANg0JO1GkqjO4anXFrgLT+6Y7DCJfG296G/N7BGfXCMnHpXqgc7eDlmSy2JVfKzvptgKJBLktP7Yfajg3oY9S8parSK+iyHT6qYqQv6wBmQ3Q9smOp/TM2ndBMDXu9MjoTkNJhrfMDsQJBANbWHciQhazb3Y2DY42hW/zBf7rmmJFrw7aOrEjzw5E+SnGs/vcr3LUWBbSRTYHcoJ+V/kudfwRMlz0SLkfMAvMCQQCglcjNRx35Zw6vNKHE4vTN/ny2gukjvtkzXpPeTUfblrXjK3w3x9aWBZ/MUiphVe5NB8CAtlfYZMo4UG+WMEjLAkA4yHsyydArMinK/5FOm/meQt6p3c0xkpQ2KlurJJLqTtaKWTlCx1scmeeEJGuiCViDFbgS8FvkHQJUZ/vHikq1AkAHbUX/MHXTbg/AzKdaqsB1snpkGoPb0lzLQmmGU36qSjsZSY6SKdzjzVjJo1cwbz/5Mg2WJljDuk2b8yRmBs+nAkEAzoEZmM031u/0KBpukSbqef8JgJOZ0Do9KDbf2P6YuBal6drUeNYVhImKBxQAbjETp9m5TxxW/dkKmHCnc3zqsA==
     boHaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIC3wgJd+7Wue63Qjdh3/uscQSKec2m9gaeCq007kjEiSFES5Tfx75VPSxRj6qk6XN4umHOsHY+W9jkv+Cj4+z3XpPozsRdoj21oxPx8fPJzpVeaUHrEkZtj9Yvo/KhByBK5sRjKmlENXVF3wXVfAg48JZR2XUyUcBdZhR9aHhoQIDAQAB
-    sysSourceCode: 00000080
-
+    insurerCode: 'BPIC'
 
 knife4j:
   enable: false

+ 9 - 1
src/main/resources/application-test.yml

@@ -13,6 +13,14 @@ ZMSMSUrl: https://test.echinacoal.com/singlePlatform/prpall/
 ZMToken: THIRDSCOuloft2020052818346904zmYBSX
 #中煤接口测试地址
 ZMUrl: https://test.echinacoal.com/singlePlatform/
+
+#百度图片识别API
+clientId: xG9M8tSjNvYPwSTNavM0ELlD
+clientSecret: riYIRG67akE5FGVwnHE3dGBly5zmdS6t
+authHost: https://aip.baidubce.com/oauth/2.0/token?
+vehicle: https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license
+idcard: https://aip.baidubce.com/rest/2.0/ocr/v1/idcard
+
 aly:
   cbit:
     #================ 阿里云部署对接保信服务器==============#
@@ -361,7 +369,7 @@ bohai:
     selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGw4XAPHi+K+/F1yb4pP3MTSOurAWsV+o2bzeVLaI+L4AYeXWhMSZ/L5yEX1OvpZKkBRD6KeIzDFqlP+wZ3qgt4n8MoaeA4//Zj4TSXbyXVPtFAtpeTidd7oWBJWcydvhtcWXrhBRh9wErYZ6+hCwh10JBWmSbTcDm0qY8PyqusQIDAQAB
     selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIbDhcA8eL4r78XXJvik/cxNI66sBaxX6jZvN5Utoj4vgBh5daExJn8vnIRfU6+lkqQFEPop4jMMWqU/7BneqC3ifwyhp4Dj/9mPhNJdvJdU+0UC2l5OJ13uhYElZzJ2+G1xZeuEFGH3ASthnr6ELCHXQkFaZJtNwObSpjw/Kq6xAgMBAAECgYB2odAwNgukfVEJvCjWYYf6PT3YGh60ZIANg0JO1GkqjO4anXFrgLT+6Y7DCJfG296G/N7BGfXCMnHpXqgc7eDlmSy2JVfKzvptgKJBLktP7Yfajg3oY9S8parSK+iyHT6qYqQv6wBmQ3Q9smOp/TM2ndBMDXu9MjoTkNJhrfMDsQJBANbWHciQhazb3Y2DY42hW/zBf7rmmJFrw7aOrEjzw5E+SnGs/vcr3LUWBbSRTYHcoJ+V/kudfwRMlz0SLkfMAvMCQQCglcjNRx35Zw6vNKHE4vTN/ny2gukjvtkzXpPeTUfblrXjK3w3x9aWBZ/MUiphVe5NB8CAtlfYZMo4UG+WMEjLAkA4yHsyydArMinK/5FOm/meQt6p3c0xkpQ2KlurJJLqTtaKWTlCx1scmeeEJGuiCViDFbgS8FvkHQJUZ/vHikq1AkAHbUX/MHXTbg/AzKdaqsB1snpkGoPb0lzLQmmGU36qSjsZSY6SKdzjzVjJo1cwbz/5Mg2WJljDuk2b8yRmBs+nAkEAzoEZmM031u/0KBpukSbqef8JgJOZ0Do9KDbf2P6YuBal6drUeNYVhImKBxQAbjETp9m5TxxW/dkKmHCnc3zqsA==
     boHaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIC3wgJd+7Wue63Qjdh3/uscQSKec2m9gaeCq007kjEiSFES5Tfx75VPSxRj6qk6XN4umHOsHY+W9jkv+Cj4+z3XpPozsRdoj21oxPx8fPJzpVeaUHrEkZtj9Yvo/KhByBK5sRjKmlENXVF3wXVfAg48JZR2XUyUcBdZhR9aHhoQIDAQAB
-    sysSourceCode: 00000080
+    insurerCode: 'BPIC'
 
 xxl:
   job:

+ 11 - 0
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -97,6 +97,17 @@
         ORDER BY orderstatus DESC
         LIMIT 1
     </select>
+    <select id="getorDerIds"    resultType="com.ydtech.modules.order.entity.InsAreaCompany">
+        SELECT
+            a.id  as  "id" ,
+            a.orderno as  "orderno"
+        FROM
+            ins_area_company a
+                LEFT JOIN ins_fee_order_new b ON  a.id =b.ins_order_no
+        WHERE
+            a.orderstatus = '3'
+            and  b.id is not  null
+    </select>
 
 
 </mapper>