|
|
@@ -8,20 +8,14 @@ import com.jzg.commons.entity.dto.AgreementRulesAddParam;
|
|
|
import com.jzg.commons.entity.dto.AgreementRulesEditParam;
|
|
|
import com.jzg.commons.entity.dto.CostAgreementParam;
|
|
|
import com.jzg.commons.entity.dto.RulesGroupParam;
|
|
|
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRules;
|
|
|
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
|
|
|
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
|
|
|
-import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesDictLabal;
|
|
|
+import com.jzg.commons.entity.po.*;
|
|
|
import com.jzg.commons.entity.vo.AgreementRulesVo;
|
|
|
import com.jzg.commons.entity.vo.CostListVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
import com.jzg.commons.util.idgen.IdGenerate;
|
|
|
import com.jzg.organization.mapper.PtlAgreementUndwrtRulesAttrLinkMapper;
|
|
|
import com.jzg.organization.mapper.PtlAgreementUndwrtRulesMapper;
|
|
|
-import com.jzg.organization.service.PtlAgreementCostService;
|
|
|
-import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrLinkService;
|
|
|
-import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrService;
|
|
|
-import com.jzg.organization.service.PtlAgreementUndwrtRulesService;
|
|
|
+import com.jzg.organization.service.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@@ -62,6 +56,9 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
|
|
|
@Autowired
|
|
|
private PtlAgreementCostService ptlAgreementCostService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PtlAgreementService ptlAgreementService;
|
|
|
+
|
|
|
/**
|
|
|
* 协议规则列表
|
|
|
*
|
|
|
@@ -352,12 +349,15 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
|
|
|
@Override
|
|
|
public AgreementRulesVo rulesGet(String ruleId) {
|
|
|
PtlAgreementUndwrtRules rules = baseMapper.selectById(ruleId);
|
|
|
+ PtlAgreement agreement = ptlAgreementService.getById(rules.getAgreementId());
|
|
|
AgreementRulesVo rulesVo = new AgreementRulesVo();
|
|
|
BeanUtils.copyProperties(rules, rulesVo);
|
|
|
|
|
|
// 获取费用因子属性(公共逻辑,仅查询一次)
|
|
|
List<PtlAgreementUndwrtRulesAttr> attrList = agreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
|
Map<String, PtlAgreementUndwrtRulesAttr> attrMap = attrList.stream()
|
|
|
+ .filter(attr -> attr.getCompanyIds().equals("all"))
|
|
|
+ .filter(attr -> attr.getCompanyIds().equals(agreement.getCompanyId()))
|
|
|
.collect(Collectors.toMap(PtlAgreementUndwrtRulesAttr::getAttrCode, attr -> attr));
|
|
|
|
|
|
// 确定需要处理的规则ID列表
|