|
|
@@ -35,11 +35,9 @@ import com.ydtech.modules.protocol.constants.TaxSourceStatusConstants;
|
|
|
import com.ydtech.modules.protocol.dao.PtlTaxSourceNewMapper;
|
|
|
import com.ydtech.modules.protocol.entity.dto.TaxSourceExcludeDto;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
|
+import com.ydtech.modules.protocol.entity.po.PtlAgreementGroupLinkAgreement;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlTaxSourceNew;
|
|
|
-import com.ydtech.modules.protocol.service.ITaxSourceExcludeService;
|
|
|
-import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
|
-import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
-import com.ydtech.modules.protocol.service.PtlTaxSourceNewService;
|
|
|
+import com.ydtech.modules.protocol.service.*;
|
|
|
import com.ydtech.modules.protocol.service.impl.TaxSourceServiceImpl;
|
|
|
import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
|
|
|
import com.ydtech.modules.protocols.service.InsFeeOrderNewService;
|
|
|
@@ -111,6 +109,8 @@ public class QuoteVerificationAspect {
|
|
|
|
|
|
private final SysQuoteRedisService sysQuoteRedisService;
|
|
|
|
|
|
+ private final PtlAgreementGroupLinkAgreementService ptlAgreementGroupLinkAgreementService;
|
|
|
+
|
|
|
@AfterReturning(pointcut = "@annotation(com.ydtech.modules.order.aop.QuoteVerification)", returning = "result")
|
|
|
public void doAfter(HttpResult<QuoteRespVo> result) {
|
|
|
//计算费用因子
|
|
|
@@ -120,6 +120,15 @@ public class QuoteVerificationAspect {
|
|
|
insAreaCompanyAccidentalDrivingService.getByCompanyId(insAreaCompany.getId());
|
|
|
insAreaCompany.setAccidentalDriving(insAreaCompanyAccidentalDriving);
|
|
|
InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ String agreementId = insAreaCompany.getAgreementId();
|
|
|
+ boolean isInternalAgreement = false;
|
|
|
+ // 查找是否是内部协议
|
|
|
+ PtlAgreementGroupLinkAgreement ptlAgreementGroupLinkAgreement = ptlAgreementGroupLinkAgreementService.getOne(new LambdaQueryWrapper<PtlAgreementGroupLinkAgreement>()
|
|
|
+ .eq(PtlAgreementGroupLinkAgreement::getPtlAgreementId, agreementId)
|
|
|
+ .eq(PtlAgreementGroupLinkAgreement::getPtlAgreementGroupId, 2));
|
|
|
+ if (ptlAgreementGroupLinkAgreement != null){
|
|
|
+ isInternalAgreement = true;
|
|
|
+ }
|
|
|
// 更新数据
|
|
|
if (StringUtils.isNotEmpty(insAreaCompany.getLeaderId())) {
|
|
|
SysUser sysUser = sysUserService.getById(insOrders.getUserid());
|
|
|
@@ -132,7 +141,7 @@ public class QuoteVerificationAspect {
|
|
|
StringBuilder logs = new StringBuilder();
|
|
|
//再进行费用因子判断
|
|
|
try {
|
|
|
- feeRuleSchemeNewService.verificationCostFactor(result.getData(), insAreaCompany, insOrders, logs);
|
|
|
+ feeRuleSchemeNewService.verificationCostFactor(result.getData(), insAreaCompany, insOrders, logs, isInternalAgreement);
|
|
|
InsFeeOrderNew insFeeOrderNew = insFeeOrderNewService.getInsFeeOrderNewByCompanyId(insAreaCompany.getId());
|
|
|
if (insFeeOrderNew != null) {
|
|
|
//出口
|