diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 0ecd46f7..96058951 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 6ba00a22..73b0c83f 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -7808,8 +7808,11 @@ public class CoeProcessLevelWeb extends ActionWeb { return true; } boolean flag = false; - if (createUserList.contains(((JSONObject)item).getString("createUser")) || createUserList.contains(((JSONObject)item).getString("modifyUser"))) { - flag = true; + if ("process.framework".equals(((JSONObject)item).getString("plMethodId")) || "default".equals(((JSONObject)item).getString("plMethodId"))){ + // 递归判断当前架构下是否有符合的文件类型 + flag = this.filterIsMatchRepositoryByCreateUser(((JSONObject)item).getString("wsId"), ((JSONObject)item).getString("currId"),createUserList); + }else { + flag = createUserList.contains(((JSONObject)item).getString("createUser")) || createUserList.contains(((JSONObject)item).getString("modifyUser")); } return flag; }) @@ -8964,18 +8967,6 @@ public String deleteReply(String replyid, String messageid) { JSONObject methodIcons = new JSONObject(); // 获取最近编辑的文件 List recentList = CoeProcessLevelUtil.getRecentUpdateRepositoryList(wsId, teamId, _uc.getUID(), null, null, 30); - JSONArray tempArr = new JSONArray(); - recentList.stream().forEach(model -> { - JSONObject temp = new JSONObject(); - temp.put("id",model.getId()); - temp.put("name",model.getName()); - temp.put("category",model.getMethodCategory()); - temp.put("methodId",model.getMethodId()); - temp.put("createUser",model.getCreateUser()); - temp.put("modifyUser",model.getModifyUser()); - tempArr.add(temp); - }); - SDK.getLogAPI().consoleInfo("当前接口【最近编辑与收藏】过滤前数据是 " + tempArr); // 伊利需求【架构筛选】不过滤组织图与IT系统图 // 先过滤掉空的架构与空的文件夹 if (createUserList.size() > 0 || orgIdList.size() > 0 || methodIdList.size() > 0) { @@ -9009,40 +9000,19 @@ public String deleteReply(String replyid, String messageid) { } // 如果勾选了创建人则用创建人与模型的创建人与修改人匹配 if (createUserList.size() > 0) { - JSONArray filterBeforeArr = new JSONArray(); - JSONArray filterAfterArr = new JSONArray(); - recentList.stream().forEach(model -> { - JSONObject temp = new JSONObject(); - temp.put("id",model.getId()); - temp.put("name",model.getName()); - temp.put("category",model.getMethodCategory()); - temp.put("methodId",model.getMethodId()); - temp.put("createUser",model.getCreateUser()); - temp.put("modifyUser",model.getModifyUser()); - filterBeforeArr.add(temp); - }); recentList = recentList.stream().filter(model -> { boolean flag = false; if ("org".equals(model.getMethodCategory()) || "itsystem.normal".equals(model.getMethodId())) { return true; } - if (createUserList.contains(model.getCreateUser()) || createUserList.contains(model.getModifyUser())) { - flag = true; + if ("process.framework".equals(model.getMethodId()) || "default".equals(model.getMethodId())){ + // 递归判断当前架构下是否有符合的文件类型 + flag = this.filterIsMatchRepositoryByCreateUser(model.getWsId(), model.getId(),createUserList); + }else { + flag = createUserList.contains(model.getCreateUser()) || createUserList.contains(model.getModifyUser()); } return flag; }).collect(Collectors.toList()); - recentList.stream().forEach(model -> { - JSONObject temp = new JSONObject(); - temp.put("id",model.getId()); - temp.put("name",model.getName()); - temp.put("category",model.getMethodCategory()); - temp.put("methodId",model.getMethodId()); - temp.put("createUser",model.getCreateUser()); - temp.put("modifyUser",model.getModifyUser()); - filterAfterArr.add(temp); - }); - SDK.getLogAPI().consoleInfo("当前接口【最近编辑与收藏】过滤前【创建人集合】是 "+createUserList+" 过滤前数据是 " + filterBeforeArr); - SDK.getLogAPI().consoleInfo("当前接口【最近编辑与收藏】过滤后【创建人集合】是 "+createUserList+" 过滤后数据是 " + filterAfterArr); } // 如果勾选了组织机构则根据文件属性中的发布部门去匹配 if (orgIdList.size() > 0) { @@ -9171,8 +9141,11 @@ public String deleteReply(String replyid, String messageid) { if ("org".equals(model.getMethodCategory()) || "itsystem.normal".equals(model.getMethodId())) { return true; } - if (createUserList.contains(model.getCreateUser()) || createUserList.contains(model.getModifyUser())) { - flag = true; + if ("process.framework".equals(model.getMethodId()) || "default".equals(model.getMethodId())){ + // 递归判断当前架构下是否有符合的文件类型 + flag = this.filterIsMatchRepositoryByCreateUser(model.getWsId(), model.getId(),createUserList); + }else { + flag = createUserList.contains(model.getCreateUser()) || createUserList.contains(model.getModifyUser()); } return flag; }).collect(Collectors.toList()); @@ -9285,7 +9258,7 @@ public String deleteReply(String replyid, String messageid) { Iterator iterator = PALRepositoryCache.getByPid(wsId, pid); while (iterator.hasNext()) { PALRepositoryModel currentModel = iterator.next(); - if ("process.framework".equals(currentModel.getMethodId())) { + if ("process.framework".equals(currentModel.getMethodId()) || "default".equals(currentModel.getMethodId())) { flag = this.filterChildLevelModelByPid(wsId,currentModel.getId(),methodIdList); }else { flag = methodIdList.contains(currentModel.getMethodId()); @@ -9295,6 +9268,29 @@ public String deleteReply(String replyid, String messageid) { return flag; } + /** + * 判断当前架构或者文件夹下是否含有 + * 匹配的 创建人或者修改人 + * @param wsId + * @param pid + * @param createUserList + * @return + */ + private boolean filterIsMatchRepositoryByCreateUser(String wsId,String pid,JSONArray createUserList){ + boolean flag = false; + Iterator iterator = PALRepositoryCache.getByPid(wsId, pid); + while (iterator.hasNext()) { + PALRepositoryModel currentModel = iterator.next(); + if ("process.framework".equals(currentModel.getMethodId()) || "default".equals(currentModel.getMethodId())) { + flag = this.filterIsMatchRepositoryByCreateUser(wsId,currentModel.getId(),createUserList); + }else { + flag = createUserList.contains(currentModel.getCreateUser()) || createUserList.contains(currentModel.getModifyUser()); + } + if (flag) break; + } + return flag; + } + /** * 判断当前架构或者文件夹下是否含有 * 匹配的文件属性【发布部门】 @@ -9576,18 +9572,6 @@ public String deleteReply(String replyid, String messageid) { JSONArray createUserList = UtilString.isNotEmpty(createUsers) ? JSONArray.parseArray(createUsers) : new JSONArray(); JSONArray orgIdList = UtilString.isNotEmpty(orgIds) ? JSONArray.parseArray(orgIds) : new JSONArray(); JSONArray methodIdList = UtilString.isNotEmpty(methodIds) ? JSONArray.parseArray(methodIds) : new JSONArray(); - JSONArray tempArr = new JSONArray(); - tableData.stream().forEach(item -> { - JSONObject temp = new JSONObject(); - temp.put("id",((JSONObject)item).getString("id")); - temp.put("name",((JSONObject)item).getString("name")); - temp.put("category",((JSONObject)item).getString("category")); - temp.put("methodId",((JSONObject)item).getString("methodId")); - temp.put("createUser",((JSONObject)item).getString("createUser")); - temp.put("modifyUser",((JSONObject)item).getString("modifyUser")); - tempArr.add(temp); - }); - SDK.getLogAPI().consoleInfo("当前接口【左侧树点击右侧显示子文件】过滤前【初始数据】是 " + tempArr); // 先过滤掉空的架构与空的文件夹 if (createUserList.size() > 0 || orgIdList.size() > 0 || methodIdList.size() > 0) { tableData = tableData.stream().filter(item -> { @@ -9620,43 +9604,21 @@ public String deleteReply(String replyid, String messageid) { } // 根据创建人过滤 if (createUserList.size() > 0) { - JSONArray filterBeforeArr = new JSONArray(); - JSONArray filterAfterArr = new JSONArray(); - tableData.stream().forEach(item -> { - JSONObject temp = new JSONObject(); - temp.put("id",((JSONObject)item).getString("id")); - temp.put("name",((JSONObject)item).getString("name")); - temp.put("category",((JSONObject)item).getString("category")); - temp.put("methodId",((JSONObject)item).getString("methodId")); - temp.put("createUser",((JSONObject)item).getString("createUser")); - temp.put("modifyUser",((JSONObject)item).getString("modifyUser")); - filterBeforeArr.add(temp); - }); - tableData = tableData.stream() .filter(item -> { if ("org".equals(((JSONObject)item).getString("category")) || "itsystem.normal".equals(((JSONObject)item).getString("methodId"))) { return true; } boolean flag = false; - if (createUserList.contains(((JSONObject)item).getString("createUser")) || createUserList.contains(((JSONObject)item).getString("modifyUser"))) { - flag = true; + if ("process.framework".equals(((JSONObject)item).getString("methodId")) || "default".equals(((JSONObject)item).getString("methodId"))){ + // 递归判断当前架构下是否有符合的文件类型 + flag = this.filterIsMatchRepositoryByCreateUser(((JSONObject)item).getString("wsId"), ((JSONObject)item).getString("id"),createUserList); + }else { + flag = createUserList.contains(((JSONObject)item).getString("createUser")) || createUserList.contains(((JSONObject)item).getString("modifyUser")); } return flag; }) .collect(Collectors.toCollection(JSONArray::new)); - tableData.stream().forEach(item -> { - JSONObject temp = new JSONObject(); - temp.put("id",((JSONObject)item).getString("id")); - temp.put("name",((JSONObject)item).getString("name")); - temp.put("category",((JSONObject)item).getString("category")); - temp.put("methodId",((JSONObject)item).getString("methodId")); - temp.put("createUser",((JSONObject)item).getString("createUser")); - temp.put("modifyUser",((JSONObject)item).getString("modifyUser")); - filterAfterArr.add(temp); - }); - SDK.getLogAPI().consoleInfo("当前接口【左侧树点击右侧显示子文件】过滤前【创建人集合】是 "+createUserList+" 过滤前数据是 " + filterBeforeArr); - SDK.getLogAPI().consoleInfo("当前接口【左侧树点击右侧显示子文件】过滤后【创建人集合】是 "+createUserList+" 过滤后数据是 " + filterAfterArr); } // 根据组织架构过滤 if (orgIdList.size() > 0) {