浏览代码

项目档案详情修改

master
CMM 1年前
父节点
当前提交
f72e5979e7
共有 3 个文件被更改,包括 32 次插入13 次删除
  1. +23
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  2. +9
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java
  3. +0
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 23
- 2
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<String> subOrgList = getSubOrgList(empPosUnitCode);

if (!checkCanRead(subOrgList,project)){
throw new BizException("您没有权限查看此项目档案!");
}
ProjectFileVO projectFileVo = new ProjectFileVO();
ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId);
List<ProcessDetailVO> 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) {


+ 9
- 0
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<ProcessDetailVO> processDetailVos;
}

+ 0
- 11
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java 查看文件

@@ -551,18 +551,7 @@ public class ProjectLibManage {
}

public List<ProcessDetailVO> processScheduleDetail(Long projectId) {

UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
String empPosUnitCode = userFullInfo.getEmpPosUnitCode();

List<ProcessDetailVO> processDetailVOS = new ArrayList<>();
// 判断该项目是否为本单位或下属单位的项目或者已经申请借阅成功的项目
Project project = projectService.getById(projectId);
Set<String> subOrgList = getSubOrgList(empPosUnitCode);

if (!checkCanRead(subOrgList,project)){
throw new BizException("您没有权限查看此项目档案!");
}
return processExecuteHandle.handle(projectId, processDetailVOS);
}



正在加载...
取消
保存