瀏覽代碼

项目档案列表借阅信息修改

tags/24080901
CMM 1 年之前
父節點
當前提交
43bb1d9e3d
共有 1 個檔案被更改,包括 7 行新增6 行删除
  1. +7
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java

+ 7
- 6
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<Long> borrowProjectIdSet = new HashSet<>();
List<ProjectApplyBorrow> 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<ProjectFileListVO> 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();


Loading…
取消
儲存