Qchen 1 год назад
Родитель
Сommit
79fc156b95

+ 10 - 4
src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java

@@ -9,19 +9,25 @@ import org.springframework.stereotype.Component;
 @ConfigurationProperties(prefix = "yangguang.api")
 @ConfigurationProperties(prefix = "yangguang.api")
 public class YangGuangApiConfigurationProperties {
 public class YangGuangApiConfigurationProperties {
     // 测试地址
     // 测试地址
-    private String url;
+    private String urlTest;
+
+    // 生产地址
+    private String urlProd;
 
 
     // 测试key
     // 测试key
     private String testKey;
     private String testKey;
 
 
     // 生产key
     // 生产key
-    private String productKey;
+    private String prodKey;
 
 
     // 支付回调地址
     // 支付回调地址
     private String payCallBack;
     private String payCallBack;
 
 
-    // 影像上传地址
-    private String uploadUrl;
+    // 影像上传地址测试
+    private String uploadUrlTest;
+
+    // 影像上传地址正式
+    private String uploadUrlProd;
 
 
     // 影像上传key
     // 影像上传key
     private String secret;
     private String secret;

+ 4 - 4
src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java

@@ -68,9 +68,9 @@ public class YangGuangRequestApiComponents {
     private <Q extends YangGuangBaseRequest, S extends YangGuangBaseResponse> S post(Q q, Class<S> tClass) throws JsonProcessingException {
     private <Q extends YangGuangBaseRequest, S extends YangGuangBaseResponse> S post(Q q, Class<S> tClass) throws JsonProcessingException {
 
 
         // 发送请求
         // 发送请求
-        String url = yangGuangApiConfigurationProperties.getUrl();
+        String url = yangGuangApiConfigurationProperties.getUrlProd();
         String encryptRequestBody = yangGuangEncryption.encryptRequestBody
         String encryptRequestBody = yangGuangEncryption.encryptRequestBody
-                (q, yangGuangApiConfigurationProperties.getTestKey());
+                (q, yangGuangApiConfigurationProperties.getProdKey());
         //设置请求头类型
         //设置请求头类型
         HttpHeaders headers = new HttpHeaders();
         HttpHeaders headers = new HttpHeaders();
         HttpEntity<String> entity = new HttpEntity<>(encryptRequestBody, headers);
         HttpEntity<String> entity = new HttpEntity<>(encryptRequestBody, headers);
@@ -78,7 +78,7 @@ public class YangGuangRequestApiComponents {
         String body = response.getBody();
         String body = response.getBody();
 
 
         // 处理解密
         // 处理解密
-        String decryptedResponse = yangGuangEncryption.authcodeDecode(body, yangGuangApiConfigurationProperties.getTestKey());
+        String decryptedResponse = yangGuangEncryption.authcodeDecode(body, yangGuangApiConfigurationProperties.getProdKey());
 
 
         InsuranceLog.infoLog(InsuranceEnum.YGBX.getPinyin(), "\n\n---------> 响应参数:{}", decryptedResponse);
         InsuranceLog.infoLog(InsuranceEnum.YGBX.getPinyin(), "\n\n---------> 响应参数:{}", decryptedResponse);
         JSONObject jsonObject = JSON.parseObject(decryptedResponse);
         JSONObject jsonObject = JSON.parseObject(decryptedResponse);
@@ -135,7 +135,7 @@ public class YangGuangRequestApiComponents {
      */
      */
     public String upload(String json) throws Exception {
     public String upload(String json) throws Exception {
         String responesStr = "";
         String responesStr = "";
-        String url = yangGuangApiConfigurationProperties.getUploadUrl();
+        String url = yangGuangApiConfigurationProperties.getUploadUrlProd();
         String secret = yangGuangApiConfigurationProperties.getSecret();
         String secret = yangGuangApiConfigurationProperties.getSecret();
         String referer = yangGuangApiConfigurationProperties.getReferer();
         String referer = yangGuangApiConfigurationProperties.getReferer();
         String encode = EncodeAccessParam.getEncodeParam(String.valueOf(json), 1000L,secret);
         String encode = EncodeAccessParam.getEncodeParam(String.valueOf(json), 1000L,secret);

+ 1 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAccuracyCalculateRequest.java

@@ -221,6 +221,7 @@ public class YangGuangAccuracyCalculateRequest extends YangGuangBaseRequest{
     this.RequestNo = "accuracyCalculate";
     this.RequestNo = "accuracyCalculate";
     this.ComCode = ygConfigureParameters.getComCode();
     this.ComCode = ygConfigureParameters.getComCode();
     this.HandlerCode = ygConfigureParameters.getHandlerCode();
     this.HandlerCode = ygConfigureParameters.getHandlerCode();
+    this.TongxinNo = ygConfigureParameters.getTongxinNo() == null ? "" : ygConfigureParameters.getTongxinNo();
     this.InfotransNo = getInfotransNo();
     this.InfotransNo = getInfotransNo();
     this.Modelinfoid = carmodellist.getModelinfoid();
     this.Modelinfoid = carmodellist.getModelinfoid();
     LocalDateTime startTime = LocalDateTime.parse(startDate, formatter);
     LocalDateTime startTime = LocalDateTime.parse(startDate, formatter);

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetEpolicyPdfUrlRequest.java

@@ -58,7 +58,7 @@ public class YangGuangGetEpolicyPdfUrlRequest extends YangGuangBaseRequest {
         this.ComCode = ygConfigureParameters.getComCode();
         this.ComCode = ygConfigureParameters.getComCode();
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.AgentCode = ygConfigureParameters.getAgentCode();
         this.AgentCode = ygConfigureParameters.getAgentCode();
-        this.ServiceArea = ygConfigureParameters.getServiceArea();
+        this.ServiceArea = ygConfigureParameters.getServiceArea() == null ? "" : ygConfigureParameters.getServiceArea();
         this.HandlerCode = ygConfigureParameters.getHandlerCode();
         this.HandlerCode = ygConfigureParameters.getHandlerCode();
         this.PolicyNo = busNo;
         this.PolicyNo = busNo;
     }
     }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetNonVehicleProductsRequest.java

@@ -100,7 +100,7 @@ public class YangGuangGetNonVehicleProductsRequest extends YangGuangBaseRequest
         this.ComCode = ygConfigureParameters.getComCode();
         this.ComCode = ygConfigureParameters.getComCode();
         this.HandlerCode = ygConfigureParameters.getHandlerCode();
         this.HandlerCode = ygConfigureParameters.getHandlerCode();
         this.AgentCode = ygConfigureParameters.getAgentCode();
         this.AgentCode = ygConfigureParameters.getAgentCode();
-        this.ServiceArea = ygConfigureParameters.getServiceArea();
+        this.ServiceArea = ygConfigureParameters.getServiceArea() == null ? "" : ygConfigureParameters.getServiceArea();
         this.Seatcount = seatcount;
         this.Seatcount = seatcount;
         if (useNatureCode != null) {
         if (useNatureCode != null) {
             this.UseNatureCode = YgUseNatureCodeMapping.getYgUseNatureCode(useNatureCode);
             this.UseNatureCode = YgUseNatureCodeMapping.getYgUseNatureCode(useNatureCode);

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangProposalStatusQueryRequest.java

@@ -88,7 +88,7 @@ public class YangGuangProposalStatusQueryRequest extends YangGuangBaseRequest {
         this.ComCode = yangGuangConfigureParameters.getComCode();
         this.ComCode = yangGuangConfigureParameters.getComCode();
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.AgentCode = yangGuangConfigureParameters.getAgentCode();
         this.AgentCode = yangGuangConfigureParameters.getAgentCode();
-        this.ServiceArea = yangGuangConfigureParameters.getServiceArea();
+        this.ServiceArea = yangGuangConfigureParameters.getServiceArea() == null ? "" : yangGuangConfigureParameters.getServiceArea();
         if (insAreaCompany.getJqapplyno() != null && !"".equals(insAreaCompany.getJqapplyno())) {
         if (insAreaCompany.getJqapplyno() != null && !"".equals(insAreaCompany.getJqapplyno())) {
             this.CiProposalNo = insAreaCompany.getJqapplyno();
             this.CiProposalNo = insAreaCompany.getJqapplyno();
         }
         }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangQueryVehicleModelRequest.java

@@ -105,7 +105,7 @@ public class YangGuangQueryVehicleModelRequest extends YangGuangBaseRequest{
         this.PageNo = "1";
         this.PageNo = "1";
         this.VinNo = carInfo.getFrameNo();
         this.VinNo = carInfo.getFrameNo();
         this.EngineNo = carInfo.getEngineNo();
         this.EngineNo = carInfo.getEngineNo();
-        this.ServiceArea = ygConfigureParameters.getServiceArea();
+        this.ServiceArea = ygConfigureParameters.getServiceArea() == null ? "" : ygConfigureParameters.getServiceArea();
         this.AgentCode = ygConfigureParameters.getAgentCode();
         this.AgentCode = ygConfigureParameters.getAgentCode();
     }
     }
 
 

+ 4 - 0
src/main/java/com/ydtech/modules/order/entity/config/YangGuangConfigureParameters.java

@@ -32,5 +32,9 @@ public class YangGuangConfigureParameters implements ConfigureParameters{
      */
      */
     private String AgentCode;
     private String AgentCode;
 
 
+    /**
+     *  同心会员号
+     * */
+    private String TongxinNo;
 
 
 }
 }

+ 0 - 9
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -738,13 +738,4 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         quoteRespVo.setCompanyId(insAreaCompany.getId());
         quoteRespVo.setCompanyId(insAreaCompany.getId());
         return HttpResult.ok("报价成功", quoteRespVo);
         return HttpResult.ok("报价成功", quoteRespVo);
     }
     }
-
-    private String gainCarInsPolicyNew(String url, String fileName, String subOrderId,boolean flag) {
-        String dir = "carInsPolicyNew/" + subOrderId + "/";
-        return FileUtil.netUrlToFileNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl,flag);
-    }
-    private String gainCarInsPolicy(String url, String fileName, String licensePlate) {
-        String dir = "carInsPolicy/" + licensePlate + "/";
-        return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
-    }
 }
 }

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

@@ -375,8 +375,14 @@ knife4j:
 yangguang:
 yangguang:
   api:
   api:
     testKey: uYPP7AIc3HYsUh8rFn
     testKey: uYPP7AIc3HYsUh8rFn
-    url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    productKey: hhSFrKjVGqFGz6GN
+    prodKey: GVGFDsmWyvydKuCrtP
+    urlTest: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    urlProd: http://wxopenapi.sinosig.com/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    uploadUrlTest: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
+    uploadUrlProd: http://autoimage.sinosig.com/AutoImagePlatform/third/upload
+    payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
+    secret: 6CPxxlHwLLphTR7gVg3hJLsH
+    referer: SXJZG
 
 
 
 
 xxl:
 xxl:

+ 5 - 3
src/main/resources/application-test.yml

@@ -454,10 +454,12 @@ pingan:
 yangguang:
 yangguang:
   api:
   api:
     testKey: uYPP7AIc3HYsUh8rFn
     testKey: uYPP7AIc3HYsUh8rFn
-    url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
-    productKey: hhSFrKjVGqFGz6GN
+    prodKey: GVGFDsmWyvydKuCrtP
+    urlTest: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    urlProd: http://wxopenapi.sinosig.com/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
+    uploadUrlTest: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
+    uploadUrlProd: http://autoimage.sinosig.com/AutoImagePlatform/third/upload
     payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
     payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
-    uploadUrl: http://unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
     secret: 6CPxxlHwLLphTR7gVg3hJLsH
     secret: 6CPxxlHwLLphTR7gVg3hJLsH
     referer: SXJZG
     referer: SXJZG