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 e96fdf8f..11ad6c17 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 dc584272..34236d90 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 @@ -12225,23 +12225,39 @@ public String deleteReply(String replyid, String messageid) { */ public String queryConditionData(String wsId,String teamId) { ResponseObject ro = ResponseObject.newOkResponse(); + JSONObject conditionData = new JSONObject(); + // 文件类型 + Map methodsMap = new HashMap<>(); // 创建人信息 JSONArray createUsers = new JSONArray(); if (UtilString.isNotEmpty(teamId)) { + Set createUserIds = new HashSet<>(); + // 获取该小组有权限的资产文件versionId + List repositoryPermByTeam = CoeCooperationAPIManager.getInstance().queryCooperationTeamPermVerIds(teamId); + for (String versionId : repositoryPermByTeam) { + List modelList = PALRepositoryCache.getByVersionId(versionId); + modelList.stream().filter(model -> { + return model.isUse(); + }).forEach(item->{ + createUserIds.add(item.getCreateUser()); + if (!"default".equals(item.getMethodId())) { // 过滤文件夹 + methodsMap.put(item.getMethodId(), item.getMethodCategory()); + } + }); + } List memberModelList = CoeCooperationAPIManager.getInstance().queryCooperationTeamMemberList(teamId); for (CoeCooperationMemberModel memberModel : memberModelList) { if (_uc.getUID().equals(memberModel.getUserId())) continue; + if (!createUserIds.contains(memberModel.getUserId())) continue; // 过滤没有创建过文件或文件夹的User JSONObject user = new JSONObject(); UserModel userModel = SDK.getORGAPI().getUser(memberModel.getUserId()); if (userModel == null) { - System.out.println("当前人员【"+memberModel.getUserId()+"】在组织架构中未找到"); continue; } user.put("userId",userModel.getUID()); user.put("userName",userModel.getUserNameI18N()); DepartmentModel department = SDK.getORGAPI().getDepartmentByUser(memberModel.getUserId()); if (department == null) { - System.out.println("当前人员【"+memberModel.getUserId()+"】的部门信息在组织架构中未找到"); continue; } user.put("deptId",department.getId()); @@ -12250,26 +12266,31 @@ public String deleteReply(String replyid, String messageid) { } }else { Set userIds = new HashSet<>(); - List teamModelList = CoeCooperationAPIManager.getInstance().queryCooperationTeamByWsId(wsId, true); - for (CoeCooperationTeamModel teamModel : teamModelList) { - List memberModelList = CoeCooperationAPIManager.getInstance().queryCooperationTeamMemberList(teamModel.getId()); - for (CoeCooperationMemberModel memberModel : memberModelList) { - if (_uc.getUID().equals(memberModel.getUserId())) continue; - userIds.add(memberModel.getUserId()); + Iterator iterator = PALRepositoryCache.getByWsId(wsId); + Set createUserIds = new HashSet<>(); + while (iterator.hasNext()) { + PALRepositoryModel model = iterator.next(); + createUserIds.add(model.getCreateUser()); + if (!"default".equals(model.getMethodId())) { // 过滤文件夹 + methodsMap.put(model.getMethodId(), model.getMethodCategory()); } } + List records = CoeWorkSpaceDaoFactory.createCoeWorkSpace().getCoeUserMainRecodes(0, 0); // 所有记录条数,暂时不分页(已与orguser联合查询) + for (CoeUserModel user : records) { + if (_uc.getUID().equals(user.getUserId())) continue; + if (!createUserIds.contains(user.getUserId())) continue; + userIds.add(user.getUserId()); + } for (String userId : userIds) { JSONObject user = new JSONObject(); UserModel userModel = SDK.getORGAPI().getUser(userId); if (userModel == null) { - System.out.println("当前人员【"+userId+"】在组织架构中未找到"); continue; } user.put("userId",userModel.getUID()); user.put("userName",userModel.getUserNameI18N()); DepartmentModel department = SDK.getORGAPI().getDepartmentByUser(userId); if (department == null) { - System.out.println("当前人员【"+userId+"】的部门信息在组织架构中未找到"); continue; } user.put("deptId",department.getId()); @@ -12321,7 +12342,6 @@ public String deleteReply(String replyid, String messageid) { // 上一次的筛选条件 JSONObject historyCondition = null; - // String queryCondition = SDK.getPortalAPI().getUserProfileItem(CoEConstant.APP_ID, _uc.getUID(), "process_query_condition", "process_query_condition"); String queryCondition = (String) _uc.getExtParam("query_condition_"+_uc.getSessionId()); if (UtilString.isNotEmpty(queryCondition)){ JSONObject condition = JSONObject.parseObject(queryCondition); @@ -12334,17 +12354,13 @@ public String deleteReply(String replyid, String messageid) { historyCondition.put("createUsers",new JSONArray()); historyCondition.put("orgIds",new JSONArray()); historyCondition.put("methodIds",new JSONArray()); - for (Object o : methodIds) { - JSONObject methodObj = (JSONObject) o; - historyCondition.getJSONArray("methodIds").add(methodObj.getString("methodId")); - } + JSONObject condtions = new JSONObject(); JSONObject condtion = new JSONObject(); condtion.put("createUsers",historyCondition.getJSONArray("createUsers")); condtion.put("orgIds",historyCondition.getJSONArray("orgIds")); condtion.put("methodIds",historyCondition.getJSONArray("methodIds")); condtions.put(_uc.getUID(),condtion); - // SDK.getPortalAPI().setUserProfileItem(CoEConstant.APP_ID,_uc.getUID(),"process_query_condition","process_query_condition",condtions.toJSONString()); _uc.setExtParam("query_condition_"+_uc.getSessionId(),condtions.toJSONString()); } ro.put("historyCondition",historyCondition);