Explorar el Código

质检-文件提名去重
1、底层节点组装文件提名时获取节点类型18的数据错误调整

LHB hace 8 horas
padre
commit
bb91ed8955

+ 2 - 2
blade-service/blade-manager/src/main/java/com/mixsmart/utils/CustomFunction.java

@@ -1731,11 +1731,11 @@ public class CustomFunction {
                 for (Integer i : index) {
                     boolean isExist = false;
                     //获取当前节点的名称
-                    String title = map.get(i == 0 ? 1 : i == 18 ? 1 : i);
+                    String title = map.get(i == 0 ? 1 : i == 1 && map.containsKey(18) ? 18 : i);
                     //当前节点的名称是否已经在父级节点中包含了
                     if(org.apache.commons.lang.StringUtils.isNotEmpty(title)){
                         for (int j = 0; j < i; j++) {
-                            String parentTitle = map.get(j == 0 ? 1 : j == 18 ? 1 : j);
+                            String parentTitle = map.get(j == 0 ? 1 : j == 1 && map.containsKey(18) ? 18 : j);
                             //如果父级节点名称中保存当前节点名称  就跳过当前节点
                             if(org.apache.commons.lang.StringUtils.isNotEmpty(parentTitle) && org.apache.commons.lang.StringUtils.isNotEmpty(title) && parentTitle.contains(title)){
                                 isExist = true;

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/NodeBaseInfoController.java

@@ -203,11 +203,11 @@ public class NodeBaseInfoController extends BladeController {
             for (Integer i : index) {
                 boolean isExist = false;
                 //获取当前节点的名称
-                String title = map.get(i == 0 ? 1 : i == 18 ? 1 : i);
+                String title = map.get(i == 0 ? 1 : i == 1 && map.containsKey(18) ? 18 : i);
                 //当前节点的名称是否已经在父级节点中包含了
                 if(StringUtils.isNotEmpty(title)){
                     for (int j = 0; j < i; j++) {
-                        String parentTitle = map.get(j == 0 ? 1 : j == 18 ? 1 : j);
+                        String parentTitle = map.get(j == 0 ? 1 : j == 1 && map.containsKey(18) ? 18 : j);
                         //如果父级节点名称中保存当前节点名称  就跳过当前节点
                         if(StringUtils.isNotEmpty(parentTitle) && StringUtils.isNotEmpty(title) && parentTitle.contains(title)){
                             isExist = true;