From f72e5979e714f16be84e035d1ae2d86d8d182f64 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 27 Jun 2023 09:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A1=A3=E6=A1=88=E8=AF=A6?= =?UTF-8?q?=E6=83=85=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 | 25 ++++++++++++++++++++-- .../pmapi/filemanage/model/vo/ProjectFileVO.java | 9 ++++++++ .../pmapi/projectlib/manage/ProjectLibManage.java | 11 ---------- 3 files changed, 32 insertions(+), 13 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 6134969..5e47aa2 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 @@ -54,6 +54,7 @@ import com.wflow.exception.BusinessException; import com.wflow.workflow.bean.dto.OrgInfoDTO; import com.wflow.workflow.bean.process.FileBasicInfo; import com.wflow.workflow.bean.process.ProcessComment; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import com.wflow.workflow.bean.vo.ProcessStartParamsVo; import com.wflow.workflow.service.ProcessInstanceService; import com.wflow.workflow.service.ProcessModelService; @@ -184,9 +185,29 @@ public class ProjectFileManage { } public ProjectFileVO file(Long projectId) { - ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId); - return null; + UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); + String empPosUnitCode = userFullInfo.getEmpPosUnitCode(); + + // 判断该项目是否为本单位或下属单位的项目或者已经申请借阅成功的项目 + Project project = projectService.getById(projectId); + Set subOrgList = getSubOrgList(empPosUnitCode); + + if (!checkCanRead(subOrgList,project)){ + throw new BizException("您没有权限查看此项目档案!"); + } + ProjectFileVO projectFileVo = new ProjectFileVO(); + ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId); + List processDetailVos = projectLibManage.processScheduleDetail(projectId); + projectFileVo.setProjectDetailVo(projectDetailVo); + projectFileVo.setProcessDetailVos(processDetailVos); + projectFileVo.setProjectName(project.getProjectName()); + projectFileVo.setCanRead(Boolean.TRUE); + projectFileVo.setPojectCode(project.getProjectCode()); + projectFileVo.setId(projectId); + projectFileVo.setBuildOrgName(project.getBuildOrgName()); + projectFileVo.setUpdateOn(project.getUpdateOn()); + return projectFileVo; } public String wantRead(Long projectId) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java index c49c8cf..4c51371 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java @@ -1,10 +1,13 @@ package com.ningdatech.pmapi.filemanage.model.vo; +import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; +import java.util.List; /** * @Classname ProjectFileVO @@ -33,4 +36,10 @@ public class ProjectFileVO { @ApiModelProperty("最后修改时间") private LocalDateTime updateOn; + + @ApiModelProperty("项目档案详情") + private ProjectDetailVO projectDetailVo; + + @ApiModelProperty("流程进度详情") + private List processDetailVos; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index c32281b..05999dc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -551,18 +551,7 @@ public class ProjectLibManage { } public List processScheduleDetail(Long projectId) { - - UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); - String empPosUnitCode = userFullInfo.getEmpPosUnitCode(); - List processDetailVOS = new ArrayList<>(); - // 判断该项目是否为本单位或下属单位的项目或者已经申请借阅成功的项目 - Project project = projectService.getById(projectId); - Set subOrgList = getSubOrgList(empPosUnitCode); - - if (!checkCanRead(subOrgList,project)){ - throw new BizException("您没有权限查看此项目档案!"); - } return processExecuteHandle.handle(projectId, processDetailVOS); }