diff --git a/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar b/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar index 12a703c7..366ba376 100644 Binary files a/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar and b/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar differ diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/CooperationQueryAPIManager.java b/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/CooperationQueryAPIManager.java index 765a4356..63b1e8cb 100644 --- a/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/CooperationQueryAPIManager.java +++ b/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/CooperationQueryAPIManager.java @@ -111,12 +111,13 @@ public class CooperationQueryAPIManager { // 获取符合权限的子流程 List childrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, pid); CooperationUtil.sortByLevelAndOrderIndex(childrenList); - Map grandChildrenCountMap = new HashMap<>(); - for (PALRepositoryModel chlidModel : childrenList) { - List grandChildrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, chlidModel.getId()); - grandChildrenCountMap.put(chlidModel.getId(), grandChildrenList.size()); - } - JSONArray result = list2JsonNew(childrenList, grandChildrenCountMap); + + // Map grandChildrenCountMap = new HashMap<>(); + // for (PALRepositoryModel chlidModel : childrenList) { + // List grandChildrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, chlidModel.getId()); + // grandChildrenCountMap.put(chlidModel.getId(), grandChildrenList.size()); + // } + JSONArray result = list2JsonNew(childrenList); return result; } @@ -188,7 +189,7 @@ public class CooperationQueryAPIManager { * @param childrenCountMap list中的model是否具有子节点map记录 * @return */ - private JSONArray list2JsonNew(List list, Map childrenCountMap) { + private JSONArray list2JsonNew(List list) { JSONArray jsonArray = new JSONArray(); for (PALRepositoryModel model : list) { JSONObject object = new JSONObject(); @@ -216,7 +217,7 @@ public class CooperationQueryAPIManager { } object.put("icon", icon); List children = null; - if (childrenCountMap.containsKey(model.getId()) && childrenCountMap.get(model.getId()) > 0) { + if (PALRepositoryCache.getByPid(model.getWsId(), model.getId()).hasNext()) { object.put("leaf", false);// 非叶子节点 } else { object.put("leaf", true);// 叶子节点