Преглед изворни кода

补传资料 保险公司上传影像 接口统一

785834757 пре 1 година
родитељ
комит
98338afab3
1 измењених фајлова са 59 додато и 0 уклоњено
  1. 59 0
      src/main/java/com/ydtech/modules/order/controller/QuoteController.java

+ 59 - 0
src/main/java/com/ydtech/modules/order/controller/QuoteController.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.constants.enums.InsuranceRisk;
 import com.ydtech.constants.enums.dict.agreement.ProductsType;
 import com.ydtech.core.page.HttpResult;
@@ -13,6 +14,8 @@ import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
@@ -96,6 +99,13 @@ public class QuoteController extends BaseController {
     @Autowired
     InsOrdersService insOrdersService;
 
+    @Autowired
+    InsAreaCompanyService insAreaCompanyService;
+
+
+    @Autowired
+    YongAnOrderService yongAnOrderService;
+
     @QuoteVerification("报价授权")
     @PostMapping(value = "/quote")
     public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<Object> quoteVo) throws Exception {
@@ -247,4 +257,53 @@ public class QuoteController extends BaseController {
         }
         return respVo;
     }
+
+    @PostMapping(value = "submitImage")
+    public HttpResult submitImage(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        if(Objects.isNull(ptlAgreementAttribution) || Objects.isNull(ptlAgreementAttribution.getApiType())){
+            throw new SystemException("协议数据出错,请联系管理员");
+        }
+        HttpResult httpResult = null;
+        //判断是否是爬虫
+        if(ptlAgreementAttribution.getApiType() == 2){
+            httpResult = insCrawlerOrderService.submitImage(companyId);
+        }else if(ptlAgreementAttribution.getApiType() == 1){
+            //渤海
+            if(insAreaCompany.getCompanyId().equals("BPIC1000000")){
+                httpResult = boHaiOrderApiService.submitImage(companyId);
+            }
+            //大家
+            if(insAreaCompany.getCompanyId().equals("DJPC1000000")){
+                httpResult = daJiaOrderService.submitImage(companyId);
+            }
+            //国任
+            if(insAreaCompany.getCompanyId().equals("XDCX1000000")){
+                httpResult = guorenOrderApiService.uploadImageApi(companyId);
+            }
+            //华泰
+            if(insAreaCompany.getCompanyId().equals("HTIC1000000")){
+                httpResult = huaTaiOrderApiService.submitImage(companyId);
+            }
+            //永安
+            if(insAreaCompany.getCompanyId().equals("YAIC1000000")){
+                httpResult = yongAnOrderService.submitImage(companyId);
+            }
+            //永诚
+            if(insAreaCompany.getCompanyId().equals("AICS1000000")){
+                httpResult = yongchengOrderApiService.uploadImageApi(companyId);
+            }
+            //中煤
+            if(insAreaCompany.getCompanyId().equals("ZMBX1000000")){
+                httpResult = zhongMeiOrderApiService.submitImage(companyId);
+            }
+            //紫金
+            if(insAreaCompany.getCompanyId().equals("ZKIC1000000")){
+                httpResult = zijinOrderApiService.submitImage(companyId);
+            }
+        }
+
+        return httpResult;
+    }
 }