报告生成器查询架构文件夹代码优化

This commit is contained in:
zhaol 2025-05-07 16:15:34 +08:00
parent f00ddaaf5d
commit ad90c06acb
3 changed files with 15 additions and 16 deletions

View File

@ -1516,15 +1516,13 @@ public class PALRepositoryQueryAPIManager {
} }
} }
if(!methods.contains(model.getMethodId()) || depflag==false){ if(!methods.contains(model.getMethodId()) || depflag==false || !model.isPublish()){
if(!model.isPublish()){
removeList.add(model); removeList.add(model);
} }
}
} }
list.removeAll(removeList); list.removeAll(removeList);
} }
return list; return list;
} }
@ -1653,7 +1651,6 @@ public class PALRepositoryQueryAPIManager {
} }
modelList = tempList; modelList = tempList;
} }
if (onlyPublish){ if (onlyPublish){
List<PALRepositoryModel> modelList2 = new ArrayList<PALRepositoryModel>(); List<PALRepositoryModel> modelList2 = new ArrayList<PALRepositoryModel>();
for (PALRepositoryModel repositoryModel : modelList) { for (PALRepositoryModel repositoryModel : modelList) {
@ -1672,7 +1669,6 @@ public class PALRepositoryQueryAPIManager {
} }
modelList = modelList2; modelList = modelList2;
} }
List<PALRepositoryModel> newList = setNewPid(modelList); List<PALRepositoryModel> newList = setNewPid(modelList);
Collections.sort(newList, new Comparator1()); Collections.sort(newList, new Comparator1());
@ -2256,6 +2252,7 @@ public class PALRepositoryQueryAPIManager {
List<PALRepositoryModel> modelList2 = new ArrayList<PALRepositoryModel>(); List<PALRepositoryModel> modelList2 = new ArrayList<PALRepositoryModel>();
for (PALRepositoryModel repositoryModel : list) { for (PALRepositoryModel repositoryModel : list) {
if ("process.framework".equals(repositoryModel.getMethodId()) || "default".equals(repositoryModel.getMethodId())){ if ("process.framework".equals(repositoryModel.getMethodId()) || "default".equals(repositoryModel.getMethodId())){
// 判断文件夹及所有子级下是否存在已发布模型 // 判断文件夹及所有子级下是否存在已发布模型
List<PALRepositoryModel> children = new ArrayList<>(); List<PALRepositoryModel> children = new ArrayList<>();
getAllPublishedPalRepositoryModelsByPidDep(wsId, repositoryModel.getId(), children,methods,departId,tempOrgList); getAllPublishedPalRepositoryModelsByPidDep(wsId, repositoryModel.getId(), children,methods,departId,tempOrgList);
@ -2264,6 +2261,8 @@ public class PALRepositoryQueryAPIManager {
continue; continue;
} }
} }
if (repositoryModel.isPublish()){ if (repositoryModel.isPublish()){
modelList2.add(repositoryModel); modelList2.add(repositoryModel);
@ -2271,6 +2270,7 @@ public class PALRepositoryQueryAPIManager {
} }
list = modelList2; list = modelList2;
} }
Collections.sort(list, new Comparator1()); // 按级别排序 Collections.sort(list, new Comparator1()); // 按级别排序
List<PALRepositoryModel> newList = setNewPid(list); List<PALRepositoryModel> newList = setNewPid(list);

View File

@ -1636,7 +1636,6 @@ public class CoeProcessLevelUtil {
} }
return result; return result;
} }