Parcourir la source

Merge remote-tracking branch 'origin/master'

xuqiang il y a 5 mois
Parent
commit
2e0e34ceaa

+ 2 - 5
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/PlatformClient.java

@@ -17,7 +17,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
-@FeignClient(name = "jzg-platform", url = "${feign.client.jzg-platform.url}")
+@FeignClient(name = "jzg-platform")
 public interface PlatformClient {
 
 
@@ -28,10 +28,7 @@ public interface PlatformClient {
      * @return HttpResult<PtlAgreementAttribution>
      */
     @GetMapping("/manager/attributionTemplate/getAgreementAttribution")
-    HttpResult<PtlAgreementAttribution> getAgreementAttribution(
-            @RequestParam("agreementId") String agreementId,
-            @RequestHeader("Authorization") String authToken,
-            @RequestHeader("system_code") String systemCode);
+    HttpResult<PtlAgreementAttribution> getAgreementAttribution(@RequestParam("agreementId") String agreementId);
 
     /**
      * 根据保司ID查询保险公司信息

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

@@ -409,7 +409,7 @@ public class UnifyOrderManager {
         paymentLinkVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
 
         QuotationBaseService quoteService = companyFactory.getPaymentLinkService(insOrders, esmInsCompanyHttpResult.getData()
-                .getCompanyCode(), baseController, paymentLinkVo);
+                .getCompanyCode(), paymentLinkVo);
 
         List<InsOrdersCarUserInfo> insOrdersCarUserInfos = insOrdersCarUserInfoService.getByOrderId(insOrders.getId());
         InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
@@ -451,7 +451,7 @@ public class UnifyOrderManager {
         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);
+        QuotationBaseService quoteService = companyFactory.getImageUploadService(insuranceUploadImageVo);
 
         quoteService.uploadImage(insuranceUploadImageVo);
 
@@ -500,7 +500,7 @@ public class UnifyOrderManager {
         clauseDataVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
         clauseDataVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
         clauseDataVo.getOrder().setAgreementId(byCompanyId.getData().get(0).getId());
-        QuotationBaseService quoteService = companyFactory.getClauseDataService(clauseDataVo, baseController);
+        QuotationBaseService quoteService = companyFactory.getClauseDataService(clauseDataVo);
         quoteService.queryClauseData(clauseDataVo);
 
         return HttpResult.ok(clauseInfoDtoList);
@@ -529,7 +529,7 @@ public class UnifyOrderManager {
         orderStatusVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
         orderStatusVo.setInsOrders(insOrders);
         //获取保司实体
-        QuotationBaseService orderStatusService = companyFactory.getOrderStatusService(orderStatusVo, insOrdersService, baseController);
+        QuotationBaseService orderStatusService = companyFactory.getOrderStatusService(orderStatusVo);
         orderStatusVo.setCarInfo(insOrdersCarInfoService.getByOrderId(insOrders.getId()));
         InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
         orderStatusVo.setInsOrdersPolicy(insOrdersPolicy);

+ 10 - 22
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -133,9 +133,7 @@ public class CompanyFactory {
 
     public QuotationBaseService getUnderwritingService(InsOrders insOrders, String companyCode, BaseController baseController, UnderwritingVo underwritingVo) {
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
-        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId(), token, systemCode);
+        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId());
         log.info("agreementAttribution对象的值:{}", JSON.toJSONString(agreementAttribution.getData()));
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
 
@@ -170,11 +168,9 @@ public class CompanyFactory {
         return getQuotationBase(Integer.parseInt(insOrders.getApiType()), companyCode);
     }
 
-    public QuotationBaseService getPaymentLinkService(InsOrders insOrders, String companyCode, BaseController baseController, PaymentLinkVo paymentLinkVo) {
+    public QuotationBaseService getPaymentLinkService(InsOrders insOrders, String companyCode, PaymentLinkVo paymentLinkVo) {
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
-        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId(), token, systemCode);
+        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId());
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
@@ -190,12 +186,10 @@ public class CompanyFactory {
         return getQuotationBase(Integer.parseInt(insOrders.getApiType()), companyCode);
     }
 
-    public QuotationBaseService getImageUploadService(InsuranceUploadImageVo insuranceUploadImageVo, BaseController baseController) {
+    public QuotationBaseService getImageUploadService(InsuranceUploadImageVo insuranceUploadImageVo) {
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
         HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insuranceUploadImageVo.getOrder()
-                .getAgreementId(), token, systemCode);
+                .getAgreementId());
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
@@ -221,13 +215,11 @@ public class CompanyFactory {
         return service;
     }
 
-    public QuotationBaseService getClauseDataService(ClauseDataVo clauseDataVo, BaseController baseController) {
+    public QuotationBaseService getClauseDataService(ClauseDataVo clauseDataVo) {
 
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
         HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(clauseDataVo.getOrder()
-                .getAgreementId(), token, systemCode);
+                .getAgreementId());
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
@@ -246,13 +238,11 @@ public class CompanyFactory {
                 .getInsuranceCompanyCode());
     }
 
-    public QuotationBaseService getOrderStatusService(OrderStatusVo orderStatusVo, InsOrdersService insOrdersService, BaseController baseController) {
+    public QuotationBaseService getOrderStatusService(OrderStatusVo orderStatusVo) {
 
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
         HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(orderStatusVo.getOrder()
-                .getAgreementId(), token, systemCode);
+                .getAgreementId());
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
@@ -272,8 +262,6 @@ public class CompanyFactory {
 
     public QuotationBaseService getDownloadPolicyService(DownloadPolicyVo downloadPolicyVo, InsOrders insOrders) {
         //设置归属信息
-        String token = baseController.getToken();
-        String systemCode = baseController.getAppSystemCode();
         HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId());
         AssertionUtils.isFail(esmInsCompanyHttpResult.getCode() != 200, "保司代码错误");
         downloadPolicyVo.getOrder().setInsuranceCompanyCode(insOrders.getCompanyId());
@@ -283,7 +271,7 @@ public class CompanyFactory {
                 .eq(InsOrdersPolicy::getOrderNo, insOrders.getId())));
         downloadPolicyVo.setCarInfo(insOrdersCarInfoService.getOne(new LambdaUpdateWrapper<InsOrdersCarInfo>()
                 .eq(InsOrdersCarInfo::getOrderNo, insOrders.getId())));
-        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId(), token, systemCode);
+        HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(insOrders.getAgreementId());
         AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject

+ 1 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/decorator/quote/QuoteDispatchDecorator.java

@@ -56,7 +56,6 @@ public class QuoteDispatchDecorator {
             String agreementId = quoteVo.getOrder().getAgreementId();
             log.info("agreementId参数的值:{}", agreementId);
 
-            String token = baseController.getToken();
             String systemCode = "";
             //如果是APP登录的话 则传递SystemCode的头部字段
             if(baseController.getUserSystemCode().equals("APP")){
@@ -67,7 +66,7 @@ public class QuoteDispatchDecorator {
                 systemCode = "WWW001";
             }
             log.info("systemCode参数的值:{}", systemCode);
-            HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(agreementId, token, systemCode);
+            HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(agreementId);
             AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
             PtlAgreementAttribution ptlAgreementAttribution = agreementAttribution.getData();