diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index aeaca8ac..1ca3dfad 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java index 1ddcf45b..e7826281 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java @@ -4,15 +4,7 @@ import java.io.File; import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.ThreadFactory; @@ -2410,7 +2402,14 @@ public class ProcessPublishWeb extends ActionWeb { if (team != null) wsId = team.getWsId(); } - List list = dao.getPublishedRepositoryList(wsId); + List orglist = dao.getPublishedRepositoryList(wsId); + + + //根据名称去重 + List list = orglist.stream().collect(Collectors.collectingAndThen( + Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(PALRepositoryModel::getName))), ArrayList::new)); + + // List versionIds = CoeCooperationAPIManager.getInstance().queryCooperationRoleDataPermByTeamUser(teamId, _uc.getUID()); Set versionIds = CooperationCache.getUserDataVisitablePermission(teamId, _uc.getUID(), false); if (UtilString.isNotEmpty(teamId)) @@ -2421,12 +2420,21 @@ public class ProcessPublishWeb extends ActionWeb { removeList.add(model); list.removeAll(removeList); } + // 只获取有未发布版本的已发布流程文件 List list2 = new ArrayList<>(); for (PALRepositoryModel model : list) { List temp = PALRepositoryCache.getByVersionId(model.getWsId(), model.getVersionId()); - if (temp != null && temp.size() > 1) - list2.add(model); + if (temp != null && temp.size() > 1) { + //判断历史版本是否存在未发布,如果有则添加 + if(temp.stream() + .filter(item->item.isPublish() + ==false) + .findAny() + .isPresent()) { + list2.add(model); + } + } } JSONArray treeData = getRepositoryTree(list2, wsId, false, true, "-", false); return treeData;