diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 9cd26ae8..46d08c91 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java index 0c4fd481..23a39dc6 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java @@ -1349,6 +1349,8 @@ public class PALRepositoryQueryAPIManager { return list; } + + /**************************************************** 获取发布的流程 *****************************************************/ public List getUsedPalRepositoryModelsByPidRole(String wsId, String pid, String ruuid) { @@ -1474,16 +1476,16 @@ public class PALRepositoryQueryAPIManager { */ public List getPublishedPalRepositoryModelsByPid(String wsId, String pid) { List list = getPalRepositoryModelsByPid(wsId, pid); + List removeList = new ArrayList(); if (list != null) { - List removeList = new ArrayList(); for (PALRepositoryModel model : list) { if (!model.isPublish()) { removeList.add(model); } } - list.removeAll(removeList); } - + list.removeAll(removeList); + Collections.sort(list, new Comparator1()); return list; } @@ -1502,12 +1504,9 @@ public class PALRepositoryQueryAPIManager { if (list != null) { List removeList = new ArrayList(); - for (PALRepositoryModel model : list) { boolean depflag=false; - List relationModels = DesignerShapeRelationCache.getByFileId(model.getId(), "Issuing_department"); - // 是否有发布部门的文件属性【可能会有多个值】 if (relationModels != null && relationModels.size() > 0) { for (DesignerShapeRelationModel relationModel : relationModels) { @@ -1517,8 +1516,10 @@ public class PALRepositoryQueryAPIManager { } } - if(!methods.contains(model.getMethodId()) || !model.isPublish() || depflag==false){ - removeList.add(model); + if(!methods.contains(model.getMethodId()) || depflag==false){ + if(!model.isPublish()){ + removeList.add(model); + } } } list.removeAll(removeList); @@ -2225,29 +2226,14 @@ public class PALRepositoryQueryAPIManager { JSONArray result = new JSONArray(); List list = null; - boolean isUsed = false; - boolean isPublished = false; - if ("isUsed".equals(type) || "designer".equals(type)) { - isUsed = true; - } else if ("isPublished".equals(type)) { - isPublished = true; - } - list = getPalRepositoryModelsByTeamIdByDeptId(wsId, context.getUID(), teamId, isUsed, isPublished); + boolean isUsed = true; + boolean isPublished = true; + list = getPalRepositoryModelsByTeamIdByDeptId(wsId, context.getUID(), teamId, isUsed); if (list == null) { list = new ArrayList(); } List removeList = new ArrayList(); StringBuilder removeIds = new StringBuilder(); - // 若type为designer并且有数据,则过滤掉已发布的 - if ("designer".equals(type) && list != null && list.size() > 0) { - List tempList = new ArrayList(); - for (PALRepositoryModel model : list) { - if (!model.isPublish()) { - tempList.add(model); - } - } - list = tempList; - } String[] spilt=departId.split(","); @@ -2331,8 +2317,8 @@ public class PALRepositoryQueryAPIManager { return result; } - public List getPalRepositoryModelsByTeamIdByDeptId(String wsId, String userId, String teamId, boolean isUsed, boolean isPublished) { - List list = CoeProcessLevelUtil.getPermRepositoryListByDeptId(wsId, teamId, userId, null, null, isUsed, isPublished); + public List getPalRepositoryModelsByTeamIdByDeptId(String wsId, String userId, String teamId, boolean isUsed) { + List list = CoeProcessLevelUtil.getPermRepositoryListByDeptId(wsId, teamId, userId, null, null, isUsed); return list; } @@ -2854,8 +2840,6 @@ public class PALRepositoryQueryAPIManager { methodIdList.add(ele); } - - // 架构过滤 if (orgIdList.size() > 0 || methodIdList.size() > 0) { list = PALFrameworkFilterUtil2.filter(list, orgIdList, methodIdList); @@ -2891,20 +2875,7 @@ public class PALRepositoryQueryAPIManager { object.put("iconFont", ""); } List children = null; - if (isUsed) { - children = getUsedPalRepositoryModelsByPid(model.getWsId(), model.getId()); - if ("designer".equals(param) && children != null && children.size() > 0) {// 过滤掉发布版本 - List tempChildren = new ArrayList<>(); - for (PALRepositoryModel model2 : children) { - if (!model2.isPublish()) { - tempChildren.add(model2); - } - } - children = tempChildren; - } - } else if (isPublished) { - children = getPublishedPalRepositoryModelsByPid(model.getWsId(), model.getId()); - } + children = getPublishedPalRepositoryModelsByPid(model.getWsId(), model.getId()); if (children == null || children.size() == 0) { object.put("isParent", false); //String icon = object.getString("icon"); diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java index 52af59de..71413469 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java @@ -1617,14 +1617,14 @@ public class CoeProcessLevelUtil { } - public static List getPermRepositoryListByDeptId(String wsId, String teamId, String userId, String category, String method, boolean isUse, boolean isPublish) { + public static List getPermRepositoryListByDeptId(String wsId, String teamId, String userId, String category, String method, boolean isUse) { List result = new ArrayList<>(); Set versionIds = getPermRepositoryVersionIds(wsId, teamId, userId, category, method); for (String versionId : versionIds) { List list = PALRepositoryCache.getByVersionId(versionId); if (list != null) { for (PALRepositoryModel model : list) { - if ((isUse && model.isUse()) || (isPublish && model.isPublish())) { + if ((isUse && model.isUse())) { result.add(model); } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.pal.file.tree.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.pal.file.tree.js index 8dd2c6c6..9b5c2de1 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.pal.file.tree.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.pal.file.tree.js @@ -92,7 +92,7 @@ function searchDataByDep() { $.simpleAlert("正在查询", "loading", 3000, {model:true}); $("#tree").empty(); var params = { - versionType: versionType, + versionType: "isPublished", wsid: wsid, teamId: teamId, methodType: methodType,