Explorar o código

电签配置修改

lvy@qq.com hai 1 mes
pai
achega
4c5986b098

+ 15 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -110,6 +110,21 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                             textdict.addAll(collect);
                         }
                     }
+                    List<TextdictInfoVO> textdictList= baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
+                    if (textdict == null || textdict.isEmpty()) {
+                        textdict = textdictList;
+                    } else if (textdictList != null && !textdictList.isEmpty()) {
+                        Map<String, Map<String, TextdictInfoVO>> map = textdict.stream().collect(Collectors.groupingBy(TextdictInfoVO::getColKey, Collectors.toMap(TextdictInfoVO::getSigRoleId, v -> v, (v1, v2) -> v1)));
+                        List<TextdictInfoVO> collect = textdictList.stream().filter(textdictInfoVO -> {
+                            Map<String, TextdictInfoVO> voMap = map.get(textdictInfoVO.getColKey());
+                            textdictInfoVO.setIsSystem(1);
+                            if (voMap != null && !voMap.isEmpty() ) {
+                                return voMap.get(textdictInfoVO.getSigRoleId()) == null;
+                            }
+                            return true;
+                        }).collect(Collectors.toList());
+                        textdict.addAll(collect);
+                    }
                 }else{
                     textdict = baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
                 }