|
@@ -2,6 +2,7 @@ package com.ydtech.modules.order.aop.aspect;
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.service.SysUserRoleService;
|
|
import com.ydtech.modules.admin.service.SysUserRoleService;
|
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
@@ -14,6 +15,8 @@ import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
|
import com.ydtech.modules.protocol.service.impl.TaxSourceServiceImpl;
|
|
import com.ydtech.modules.protocol.service.impl.TaxSourceServiceImpl;
|
|
|
|
|
+import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
|
|
|
|
|
+import com.ydtech.modules.protocols.service.InsFeeOrderNewService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.aspectj.lang.JoinPoint;
|
|
import org.aspectj.lang.JoinPoint;
|
|
@@ -35,6 +38,8 @@ public class AuditVerificationAspect {
|
|
|
|
|
|
|
|
private final InsAreaCompanyAccidentalDrivingService insAreaCompanyAccidentalDrivingService;
|
|
private final InsAreaCompanyAccidentalDrivingService insAreaCompanyAccidentalDrivingService;
|
|
|
|
|
|
|
|
|
|
+ private final InsFeeOrderNewService insFeeOrderNewService;
|
|
|
|
|
+
|
|
|
@Before("@annotation(com.ydtech.modules.order.aop.AuditVerification)")
|
|
@Before("@annotation(com.ydtech.modules.order.aop.AuditVerification)")
|
|
|
public void doBefore(JoinPoint point) {
|
|
public void doBefore(JoinPoint point) {
|
|
|
Object[] args = point.getArgs();
|
|
Object[] args = point.getArgs();
|
|
@@ -51,7 +56,11 @@ public class AuditVerificationAspect {
|
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = insAreaCompanyAccidentalDrivingService.getByCompanyId(insAreaCompany.getId());
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = insAreaCompanyAccidentalDrivingService.getByCompanyId(insAreaCompany.getId());
|
|
|
insAreaCompany.setAccidentalDriving(insAreaCompanyAccidentalDriving);
|
|
insAreaCompany.setAccidentalDriving(insAreaCompanyAccidentalDriving);
|
|
|
InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
-
|
|
|
|
|
|
|
+ //查找费用 找不到则抛出异常
|
|
|
|
|
+ InsFeeOrderNew insFeeOrderNewByCompanyId = insFeeOrderNewService.getInsFeeOrderNewByCompanyId(companyId);
|
|
|
|
|
+ if(insFeeOrderNewByCompanyId == null){
|
|
|
|
|
+ throw new SystemException("费用信息不匹配");
|
|
|
|
|
+ }
|
|
|
//再进行费用因子判断
|
|
//再进行费用因子判断
|
|
|
try {
|
|
try {
|
|
|
//先进行承保规则判断
|
|
//先进行承保规则判断
|