解决报告生成器历史已发布文件无法显示问题
This commit is contained in:
parent
e9b0147be8
commit
7d7f33c6b8
Binary file not shown.
@ -1349,6 +1349,8 @@ public class PALRepositoryQueryAPIManager {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************** 获取发布的流程 *****************************************************/
|
||||
|
||||
public List<PALRepositoryModel> getUsedPalRepositoryModelsByPidRole(String wsId, String pid, String ruuid) {
|
||||
@ -1474,16 +1476,16 @@ public class PALRepositoryQueryAPIManager {
|
||||
*/
|
||||
public List<PALRepositoryModel> getPublishedPalRepositoryModelsByPid(String wsId, String pid) {
|
||||
List<PALRepositoryModel> list = getPalRepositoryModelsByPid(wsId, pid);
|
||||
List<PALRepositoryModel> removeList = new ArrayList<PALRepositoryModel>();
|
||||
if (list != null) {
|
||||
List<PALRepositoryModel> removeList = new ArrayList<PALRepositoryModel>();
|
||||
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<PALRepositoryModel> removeList = new ArrayList<PALRepositoryModel>();
|
||||
|
||||
for (PALRepositoryModel model : list) {
|
||||
boolean depflag=false;
|
||||
|
||||
List<DesignerShapeRelationModel> 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<PALRepositoryModel> 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<PALRepositoryModel>();
|
||||
}
|
||||
List<PALRepositoryModel> removeList = new ArrayList<PALRepositoryModel>();
|
||||
StringBuilder removeIds = new StringBuilder();
|
||||
// 若type为designer并且有数据,则过滤掉已发布的
|
||||
if ("designer".equals(type) && list != null && list.size() > 0) {
|
||||
List<PALRepositoryModel> tempList = new ArrayList<PALRepositoryModel>();
|
||||
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<PALRepositoryModel> getPalRepositoryModelsByTeamIdByDeptId(String wsId, String userId, String teamId, boolean isUsed, boolean isPublished) {
|
||||
List<PALRepositoryModel> list = CoeProcessLevelUtil.getPermRepositoryListByDeptId(wsId, teamId, userId, null, null, isUsed, isPublished);
|
||||
public List<PALRepositoryModel> getPalRepositoryModelsByTeamIdByDeptId(String wsId, String userId, String teamId, boolean isUsed) {
|
||||
List<PALRepositoryModel> 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<PALRepositoryModel> children = null;
|
||||
if (isUsed) {
|
||||
children = getUsedPalRepositoryModelsByPid(model.getWsId(), model.getId());
|
||||
if ("designer".equals(param) && children != null && children.size() > 0) {// 过滤掉发布版本
|
||||
List<PALRepositoryModel> 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");
|
||||
|
||||
@ -1617,14 +1617,14 @@ public class CoeProcessLevelUtil {
|
||||
}
|
||||
|
||||
|
||||
public static List<PALRepositoryModel> getPermRepositoryListByDeptId(String wsId, String teamId, String userId, String category, String method, boolean isUse, boolean isPublish) {
|
||||
public static List<PALRepositoryModel> getPermRepositoryListByDeptId(String wsId, String teamId, String userId, String category, String method, boolean isUse) {
|
||||
List<PALRepositoryModel> result = new ArrayList<>();
|
||||
Set<String> versionIds = getPermRepositoryVersionIds(wsId, teamId, userId, category, method);
|
||||
for (String versionId : versionIds) {
|
||||
List<PALRepositoryModel> 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);
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user