|
|
@@ -1,13 +1,16 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.jzg.commons.entity.dto.RulesAttParam;
|
|
|
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.SysDict;
|
|
|
import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.organization.mapper.PtlAgreementUndwrtRulesAttrMapper;
|
|
|
+import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrLinkService;
|
|
|
import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrService;
|
|
|
import com.jzg.organization.service.PtlAgreementUndwrtRulesDictService;
|
|
|
import com.jzg.organization.service.PtlAreaLicenseService;
|
|
|
@@ -17,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import java.util.Collections;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -30,6 +34,9 @@ public class PtlAgreementUndwrtRulesAttrServiceImpl extends ServiceImpl<PtlAgree
|
|
|
@Autowired
|
|
|
PtlAgreementUndwrtRulesDictService ptlAgreementUndwrtRulesDictService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ PtlAgreementUndwrtRulesAttrLinkService agreementUndwrtRulesAttrLinkService;
|
|
|
+
|
|
|
@Autowired
|
|
|
RedissonClient redissonClient;
|
|
|
|
|
|
@@ -74,6 +81,21 @@ public class PtlAgreementUndwrtRulesAttrServiceImpl extends ServiceImpl<PtlAgree
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return Collections.emptyMap();
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(param.getRulesId())){
|
|
|
+ List<PtlAgreementUndwrtRulesAttrLink> linkList = agreementUndwrtRulesAttrLinkService.queryLinkList(param.getRulesId());
|
|
|
+ if(CollUtil.isNotEmpty(linkList)){
|
|
|
+ Map<String, PtlAgreementUndwrtRulesAttrLink> linkMap = linkList.stream()
|
|
|
+ .collect(Collectors.toMap(PtlAgreementUndwrtRulesAttrLink::getAttrCode
|
|
|
+ , link->link));
|
|
|
+ for (PtlAgreementUndwrtRulesAttr ptlAgreementUndwrtRulesAttr : list) {
|
|
|
+ if(linkMap.containsKey(ptlAgreementUndwrtRulesAttr.getAttrCode())){
|
|
|
+ ptlAgreementUndwrtRulesAttr.setIsCheck(1);
|
|
|
+ }else{
|
|
|
+ ptlAgreementUndwrtRulesAttr.setIsCheck(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获取字典列表
|
|
|
List<PtlAgreementUndwrtRulesDictLabal> undwrtRulesDictList = ptlAgreementUndwrtRulesDictService.getUndwrtRulesDictList();
|
|
|
Map<Integer, List<PtlAgreementUndwrtRulesDictLabal>> dictMap = undwrtRulesDictList.stream()
|