解决停用版本问题
This commit is contained in:
parent
8f751bbc9d
commit
ce20a019b1
Binary file not shown.
@ -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<PALRepositoryModel> list = dao.getPublishedRepositoryList(wsId);
|
||||
List<PALRepositoryModel> orglist = dao.getPublishedRepositoryList(wsId);
|
||||
|
||||
|
||||
//根据名称去重
|
||||
List<PALRepositoryModel> list = orglist.stream().collect(Collectors.collectingAndThen(
|
||||
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(PALRepositoryModel::getName))), ArrayList::new));
|
||||
|
||||
|
||||
// List<String> versionIds = CoeCooperationAPIManager.getInstance().queryCooperationRoleDataPermByTeamUser(teamId, _uc.getUID());
|
||||
Set<String> 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<PALRepositoryModel> list2 = new ArrayList<>();
|
||||
for (PALRepositoryModel model : list) {
|
||||
List<PALRepositoryModel> 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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user