From 43bb1d9e3dfd769b160223720f23b3dec2ba0397 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Mon, 19 Jun 2023 10:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A1=A3=E6=A1=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=80=9F=E9=98=85=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/filemanage/manage/ProjectFileManage.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java index c1e8580..7d4b1ed 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java @@ -133,14 +133,12 @@ public class ProjectFileManage { .like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) .like(StringUtils.isNotBlank(param.getBuildOrgName()), Project::getBuildOrgName, param.getBuildOrgName()) .eq(Project::getStatus, ProjectStatusEnum.ARCHIVED.getCode()) - // 查出自己及下属单位可查阅的项目档案 - .in(Project::getBuildOrgCode,subOrgSet) .orderByDesc(Project::getUpdateOn)); - // 从申请借阅信息表中查出本单位审批通过的项目添加到列表中 + // 从申请借阅信息表中查出本单位及下属单位审批通过的项目添加到列表中 HashSet borrowProjectIdSet = new HashSet<>(); List applyBorrowList = projectApplyBorrowService.list(Wrappers.lambdaQuery(ProjectApplyBorrow.class) - .eq(ProjectApplyBorrow::getApplyBorrowEmpPosUnitCode, empPosUnitCode) + .in(ProjectApplyBorrow::getApplyBorrowEmpPosUnitCode,subOrgSet) .eq(ProjectApplyBorrow::getIsSuccess, Boolean.TRUE)).stream() .filter(a -> borrowProjectIdSet.add(a.getProjectId())) .collect(Collectors.toList()); @@ -161,13 +159,16 @@ public class ProjectFileManage { List vos = records.stream().map(p -> { ProjectFileListVO vo = new ProjectFileListVO(); vo.setId(p.getId()); - vo.setCanRead(Boolean.TRUE); + // 用户只可查阅自己及下属单位的项目档案; + if (subOrgSet.contains(p.getBuildOrgCode())) { + vo.setCanRead(Boolean.TRUE); + } vo.setBuildOrgName(p.getBuildOrgName()); vo.setPojectCode(p.getProjectCode()); vo.setProjectName(p.getProjectName()); // 判断当前项目,当前登录用户是否已经开启了申请借阅并且没有审批完成 String instCode = p.getInstCode(); - // 获取流程通过后的流程实例 + // 获取流程实例 HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery() .processInstanceId(instCode) .singleResult();