dongxin 1 rok pred
rodič
commit
9170f5e567

+ 2 - 0
commons/src/main/java/com/jzg/commons/entity/dto/RulesAttParam.java

@@ -11,5 +11,7 @@ public class RulesAttParam {
     @Schema(description = "属性名称")
     @Schema(description = "属性名称")
     private String attrName;
     private String attrName;
 
 
+    @Schema(description = "承保规则id")
+    private String rulesId;
 
 
 }
 }

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/po/PtlAgreementUndwrtRulesAttr.java

@@ -55,6 +55,9 @@ public class PtlAgreementUndwrtRulesAttr extends BaseModel {
     @TableField(exist = false)
     @TableField(exist = false)
     private String max;
     private String max;
 
 
+    @TableField(exist = false)
+    private Integer isCheck;
+
     @TableField(exist = false)
     @TableField(exist = false)
     private List<SysDict> rulesDict;
     private List<SysDict> rulesDict;
 
 

+ 0 - 3
commons/src/main/java/com/jzg/commons/entity/vo/AgreementRulesVo.java

@@ -33,7 +33,4 @@ public class AgreementRulesVo extends BaseModel {
     @Schema(description = "费用列表")
     @Schema(description = "费用列表")
     private List<PtlAgreementCostVo> costVoList;
     private List<PtlAgreementCostVo> costVoList;
 
 
-    @Schema(description = "选中的费用属性id列表")
-    private List<String> attrIdList;
-
 }
 }

+ 22 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementUndwrtRulesAttrServiceImpl.java

@@ -1,13 +1,16 @@
 package com.jzg.organization.service.impl;
 package com.jzg.organization.service.impl;
 
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.entity.dto.RulesAttParam;
 import com.jzg.commons.entity.dto.RulesAttParam;
 import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
 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.PtlAgreementUndwrtRulesDictLabal;
 import com.jzg.commons.entity.po.SysDict;
 import com.jzg.commons.entity.po.SysDict;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.organization.mapper.PtlAgreementUndwrtRulesAttrMapper;
 import com.jzg.organization.mapper.PtlAgreementUndwrtRulesAttrMapper;
+import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrLinkService;
 import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrService;
 import com.jzg.organization.service.PtlAgreementUndwrtRulesAttrService;
 import com.jzg.organization.service.PtlAgreementUndwrtRulesDictService;
 import com.jzg.organization.service.PtlAgreementUndwrtRulesDictService;
 import com.jzg.organization.service.PtlAreaLicenseService;
 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.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
 import java.util.Collections;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
@@ -30,6 +34,9 @@ public class PtlAgreementUndwrtRulesAttrServiceImpl extends ServiceImpl<PtlAgree
     @Autowired
     @Autowired
     PtlAgreementUndwrtRulesDictService ptlAgreementUndwrtRulesDictService;
     PtlAgreementUndwrtRulesDictService ptlAgreementUndwrtRulesDictService;
 
 
+    @Autowired
+    PtlAgreementUndwrtRulesAttrLinkService agreementUndwrtRulesAttrLinkService;
+
     @Autowired
     @Autowired
     RedissonClient redissonClient;
     RedissonClient redissonClient;
 
 
@@ -74,6 +81,21 @@ public class PtlAgreementUndwrtRulesAttrServiceImpl extends ServiceImpl<PtlAgree
             if (CollectionUtils.isEmpty(list)) {
             if (CollectionUtils.isEmpty(list)) {
                 return Collections.emptyMap();
                 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();
             List<PtlAgreementUndwrtRulesDictLabal> undwrtRulesDictList = ptlAgreementUndwrtRulesDictService.getUndwrtRulesDictList();
             Map<Integer, List<PtlAgreementUndwrtRulesDictLabal>> dictMap = undwrtRulesDictList.stream()
             Map<Integer, List<PtlAgreementUndwrtRulesDictLabal>> dictMap = undwrtRulesDictList.stream()

+ 0 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementUndwrtRulesServiceImpl.java

@@ -145,9 +145,6 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
         AgreementRulesVo rulesVo = new AgreementRulesVo();
         AgreementRulesVo rulesVo = new AgreementRulesVo();
         BeanUtils.copyProperties(rules, rulesVo);
         BeanUtils.copyProperties(rules, rulesVo);
         List<PtlAgreementUndwrtRulesAttrLink> linkList = agreementUndwrtRulesAttrLinkService.queryLinkList(ruleId);
         List<PtlAgreementUndwrtRulesAttrLink> linkList = agreementUndwrtRulesAttrLinkService.queryLinkList(ruleId);
-
-        List<String> attrIdList = linkList.stream().map(PtlAgreementUndwrtRulesAttrLink::getAttrId).collect(Collectors.toList());
-        rulesVo.setAttrIdList(attrIdList);
         // 获取费用因子属性
         // 获取费用因子属性
         List<PtlAgreementUndwrtRulesAttr> attrList = agreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         List<PtlAgreementUndwrtRulesAttr> attrList = agreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         Map<String, PtlAgreementUndwrtRulesAttr> attrMap = attrList.stream()
         Map<String, PtlAgreementUndwrtRulesAttr> attrMap = attrList.stream()

+ 1 - 2
tenant/organization/src/main/resources/mapper/PtlAgreementCostMapper.xml

@@ -78,7 +78,6 @@
         t.product_id,
         t.product_id,
         t.cover_rule_id,
         t.cover_rule_id,
         t.effective_time,
         t.effective_time,
-        t.deadline_time,
         t.failure_time,
         t.failure_time,
         t.audit_method,
         t.audit_method,
         t.cost_describe,
         t.cost_describe,
@@ -121,4 +120,4 @@
     </select>
     </select>
 
 
 
 
-</mapper>
+</mapper>