Browse Source

调整核保aop接收参数

785834757 2 năm trước cách đây
mục cha
commit
395045d094

+ 12 - 4
src/main/java/com/ydtech/modules/order/aop/aspect/AuditVerificationAspect.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.aop.aspect;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.ydtech.constants.sys.SystemConstant;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.model.SysUserRole;
@@ -12,6 +13,7 @@ import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
@@ -50,14 +52,20 @@ public class AuditVerificationAspect {
     public void doBefore(JoinPoint point) {
         Object[] args = point.getArgs();
         for (Object arg : args) {
-            //接收保险公司id参数
-            String companyId = arg.toString();
+            String companyId = "";
+            if (arg instanceof SpecialAuditVo) {
+                JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(arg));
+                companyId = jsonObject.getString("companyId");
+            }else {
+                //接收保险公司id参数
+                companyId = arg.toString();
+            }
             InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
             InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
             //先进行承保规则判断
-            feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany,insOrders);
+            feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany, insOrders);
             //再进行费用因子判断
-            feeRuleSchemeNewService.verificationCostFactor(insAreaCompany,insOrders);
+            feeRuleSchemeNewService.verificationCostFactor(insAreaCompany, insOrders);
         }
     }