fix: 报告生成器流程树,只保留已发布数据

This commit is contained in:
qinoy 2024-11-25 16:00:42 +08:00
parent e3ecf998db
commit 16b911a9d8
2 changed files with 1 additions and 14 deletions

View File

@ -429,25 +429,12 @@ public class OutPutReportWeb extends ActionWeb {
public String PALFileJsonDataRootTreeData(String methodType, String wsid, String versionType, String teamId) {
JSONArray jsonArr = null;
//if (teamId == null || "".equals(teamId)) {
versionType = "isPublished";
if (teamId == null) {
jsonArr = PALRepositoryQueryAPIManager.getInstance().getPalRepositoryTreeData(_uc, wsid, methodType, versionType);
} else {
jsonArr = PALRepositoryQueryAPIManager.getInstance().getPermPalRepositoryTreeDataByMethods(_uc, wsid, teamId, versionType, methodType);
}
// 过滤掉已经停用的
if (CollectionUtils.isNotEmpty(jsonArr)) {
JSONArray filteredJsonArr = new JSONArray();
for (Object obj : jsonArr) {
if (obj instanceof JSONObject) {
JSONObject jsonObject = (JSONObject) obj;
if (jsonObject != null && !jsonObject.getBooleanValue("isStop")) {
filteredJsonArr.add(jsonObject);
}
}
}
jsonArr = filteredJsonArr;
}
return jsonArr.toString();
}