|
|
@@ -5,10 +5,12 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.service.SysUserRoleService;
|
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
|
+import com.ydtech.modules.fee.service.FeeRuleSchemeService;
|
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompanyAccidentalDriving;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.vo.FeeOrderNewVo;
|
|
|
import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyAccidentalDrivingService;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
@@ -16,7 +18,9 @@ import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
|
import com.ydtech.modules.protocol.service.impl.TaxSourceServiceImpl;
|
|
|
import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
|
|
|
+import com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsNew;
|
|
|
import com.ydtech.modules.protocols.service.InsFeeOrderNewService;
|
|
|
+import com.ydtech.modules.protocols.service.PtlAgreementProductCostsNewService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.aspectj.lang.JoinPoint;
|
|
|
@@ -24,6 +28,8 @@ import org.aspectj.lang.annotation.Aspect;
|
|
|
import org.aspectj.lang.annotation.Before;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
+
|
|
|
@Slf4j
|
|
|
@Aspect
|
|
|
@Component
|
|
|
@@ -32,6 +38,8 @@ public class AuditVerificationAspect {
|
|
|
|
|
|
private final FeeRuleSchemeNewService feeRuleSchemeNewService;
|
|
|
|
|
|
+ private final FeeRuleSchemeService feeRuleSchemeService;
|
|
|
+
|
|
|
private final InsAreaCompanyService insAreaCompanyService;
|
|
|
|
|
|
private final InsOrdersService insOrdersService;
|
|
|
@@ -40,6 +48,8 @@ public class AuditVerificationAspect {
|
|
|
|
|
|
private final InsFeeOrderNewService insFeeOrderNewService;
|
|
|
|
|
|
+ private final PtlAgreementProductCostsNewService ptlAgreementProductCostsNewService;
|
|
|
+
|
|
|
@Before("@annotation(com.ydtech.modules.order.aop.AuditVerification)")
|
|
|
public void doBefore(JoinPoint point) {
|
|
|
Object[] args = point.getArgs();
|
|
|
@@ -61,6 +71,16 @@ public class AuditVerificationAspect {
|
|
|
if(insFeeOrderNewByCompanyId == null){
|
|
|
throw new SystemException("费用信息不匹配");
|
|
|
}
|
|
|
+ PtlAgreementProductCostsNew costsNew = ptlAgreementProductCostsNewService.getById(insFeeOrderNewByCompanyId.getCostsId());
|
|
|
+
|
|
|
+ //出口费用是否出现负数 如果出现提示异常
|
|
|
+ FeeOrderNewVo feeOrderNewVo = feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNewByCompanyId, costsNew);
|
|
|
+ if(feeOrderNewVo.getExportFee().get(0).getTotalAmount().compareTo(BigDecimal.ZERO) < 0 ||
|
|
|
+ feeOrderNewVo.getExportFee().get(1).getTotalAmount().compareTo(BigDecimal.ZERO) < 0 ||
|
|
|
+ feeOrderNewVo.getExportFee().get(2).getTotalAmount().compareTo(BigDecimal.ZERO) < 0){
|
|
|
+ throw new SystemException("费用信息异常");
|
|
|
+ }
|
|
|
+
|
|
|
//再进行费用因子判断
|
|
|
try {
|
|
|
//先进行承保规则判断
|