瀏覽代碼

电签配置区分:本表配置,电签库,项目匹配

lvy 1 月之前
父節點
當前提交
456a2e7bb0

+ 1 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TextdictInfoVO.java

@@ -36,6 +36,6 @@ public class TextdictInfoVO extends TextdictInfo {
     //1.电签配置 2.系统识别
     private Integer showType;
 
-    @ApiModelProperty("是否引用系统级电签配置,1 系统级,0 项目级")
+    @ApiModelProperty("本表配置 绿色0,电签库 蓝色1,项目匹配 橙色2")
     private Integer isSystem = 0;
 }

+ 16 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -83,7 +83,6 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                         textdict = new ArrayList<>();
                     }
                     if (!keys.isEmpty()) {
-                        // 查询系统级电签配置
                         TextdictInfoVO temp = null;
                         if (textdict != null && !textdict.isEmpty()) {
                             temp = textdict.get(0);
@@ -95,6 +94,7 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                             temp.setTabId(privateInfo.getPKeyId() + "");
                             temp.setType(2);
                         }
+                        // 查询电签库配置
                         List<TextdictInfoVO> textdictList = iSignConfigService.hasSignConfig(privateInfo.getInitTableName(), keys, temp);
                         if (textdict == null || textdict.isEmpty()) {
                             textdict = textdictList;
@@ -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(2);
+                            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);
                 }