liuyc 1 tahun lalu
induk
melakukan
24ba5ad2c6

+ 1 - 54
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java

@@ -1479,8 +1479,7 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
      * @param lowestNodeParentIds 最底层节点ParentIds
      * @param nodesAll            所有节点
      */
-    public void recursiveGetParentNodes
-    (List<WbsTreeContractLazyVO> result, List<Long> lowestNodeParentIds, List<WbsTreeContractLazyVO> nodesAll) {
+    public void recursiveGetParentNodes(List<WbsTreeContractLazyVO> result, List<Long> lowestNodeParentIds, List<WbsTreeContractLazyVO> nodesAll) {
         if (lowestNodeParentIds.isEmpty()) {
             return;
         }
@@ -1517,58 +1516,6 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
         }
     }
 
-    /*public void recursiveGetParentNodes(List<WbsTreeContractLazyVO> result, List<Long> lowestNodeParentIds, List<WbsTreeContractLazyVO> nodesAll) {
-        if (lowestNodeParentIds.isEmpty()) {
-            return;
-        }
-
-        //父级Id与出现的次数Map
-        Map<Long, Long> parentIdGroup = lowestNodeParentIds.parallelStream()
-                .collect(Collectors.groupingByConcurrent(Function.identity(), Collectors.counting()));
-
-        Set<Long> keysWithValueOne = new HashSet<>(); //单次
-        Map<Long, Long> keysWithValueSome = new ConcurrentHashMap<>(); //多次
-
-        parentIdGroup.forEach((key, value) -> {
-            if (value == 1L) {
-                keysWithValueOne.add(key);
-            } else {
-                keysWithValueSome.put(key, value);
-            }
-        });
-
-        //批量查询单次节点
-        List<WbsTreeContractLazyVO> parentNodes = new ArrayList<>();
-        if (!keysWithValueOne.isEmpty()) {
-            parentNodes = nodesAll.parallelStream()
-                    .filter(f -> keysWithValueOne.contains(f.getId()))
-                    .collect(Collectors.toList());
-        }
-
-        //批量查询多次节点
-        List<WbsTreeContractLazyVO> multipleParentNodes = new ArrayList<>();
-        keysWithValueSome.forEach((key, count) -> {
-            List<WbsTreeContractLazyVO> nodes = nodesAll.parallelStream()
-                    .filter(f -> key.equals(f.getId()))
-                    .limit(1)  //限制只取一个
-                    .collect(Collectors.toList());
-            if (!nodes.isEmpty()) {
-                multipleParentNodes.addAll(Collections.nCopies(count.intValue(), nodes.get(0)));
-            }
-        });
-
-        //结果集
-        List<Long> collect = Stream.concat(parentNodes.stream(), multipleParentNodes.stream())
-                .map(WbsTreeContractLazyVO::getParentId)
-                .collect(Collectors.toList());
-
-        if (!collect.isEmpty()) {
-            result.addAll(parentNodes);
-            result.addAll(multipleParentNodes);
-            this.recursiveGetParentNodes(result, collect, nodesAll);
-        }
-    }*/
-
     @Override
     public boolean syncTabData(String pKeyId) throws Exception {
         WbsTreeContract node = baseMapper.selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, pKeyId));