|
|
@@ -9,6 +9,8 @@ import com.jzg.commons.core.page.HttpResult;
|
|
|
import com.jzg.commons.entity.orders.po.*;
|
|
|
import com.jzg.commons.entity.po.*;
|
|
|
import com.jzg.commons.entity.quote.vo.aggregated.UnderwritingVo;
|
|
|
+import com.jzg.commons.entity.vo.AgreementInfoVo;
|
|
|
+import com.jzg.commons.entity.vo.AgreementVo;
|
|
|
import com.jzg.commons.entity.vo.RuleAttrMappingVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
|
@@ -79,7 +81,6 @@ public class AuditVerificationAspect {
|
|
|
InsFeeOrders insFeeOrders = insFeeOrdersService.getById(orderNo);
|
|
|
AssertionUtils.isFail(Objects.isNull(insFeeOrders),"费用信息不匹配");
|
|
|
|
|
|
-
|
|
|
// 获取订单车辆信息
|
|
|
InsOrdersCarInfo insOrdersCarInfo = insOrdersCarInfoService.getById(insOrders.getId());
|
|
|
// 获取订单险种信息
|
|
|
@@ -101,6 +102,31 @@ public class AuditVerificationAspect {
|
|
|
AssertionUtils.isFail(httpResult.getCode() == 500,"费用查找失败");
|
|
|
PtlAgreementCost ptlAgreementCost = JSONObject.parseObject(JSONObject.toJSONString(httpResult.getData()),PtlAgreementCost.class);
|
|
|
AssertionUtils.isFail(Objects.isNull(ptlAgreementCost),"费用查找失败");
|
|
|
+
|
|
|
+ // 校验费用是否在有效期内
|
|
|
+ if (ptlAgreementCost.getEffectiveTime() != null && ptlAgreementCost.getFailureTime() != null) {
|
|
|
+ java.util.Date now = new java.util.Date();
|
|
|
+ AssertionUtils.isFail(
|
|
|
+ now.before(ptlAgreementCost.getEffectiveTime()) || now.after(ptlAgreementCost.getFailureTime()),
|
|
|
+ "费用已失效,请重新报价"
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // 校验费用是否被禁用
|
|
|
+ AssertionUtils.isFail(ptlAgreementCost.getIsEnabled() != 0, "费用已禁用,请重新报价");
|
|
|
+
|
|
|
+ // 校验协议是否有效
|
|
|
+ HttpResult<AgreementInfoVo> ptlAgreement = orgClient.queryAgreementById(insOrders.getAgreementId());
|
|
|
+ AssertionUtils.isFail(ptlAgreement == null || ptlAgreement.getData() == null, "协议查找失败");
|
|
|
+ AgreementVo agreementVo = ptlAgreement.getData().getAgreement();
|
|
|
+ AssertionUtils.isFail(
|
|
|
+ "1".equals(agreementVo.getValidStatus()),
|
|
|
+ "协议已失效,请重新报价"
|
|
|
+ );
|
|
|
+ AssertionUtils.isFail(
|
|
|
+ agreementVo.getIsEnable() != null && "1".equals(agreementVo.getIsEnable().toString()),
|
|
|
+ "协议已停用,请重新报价"
|
|
|
+ );
|
|
|
+
|
|
|
String coverRuleId = ptlAgreementCost.getCoverRuleId();
|
|
|
|
|
|
// 查询承保规则实体,判断是否有parentId
|