|
@@ -133,14 +133,12 @@ public class ProjectFileManage { |
|
|
.like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) |
|
|
.like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) |
|
|
.like(StringUtils.isNotBlank(param.getBuildOrgName()), Project::getBuildOrgName, param.getBuildOrgName()) |
|
|
.like(StringUtils.isNotBlank(param.getBuildOrgName()), Project::getBuildOrgName, param.getBuildOrgName()) |
|
|
.eq(Project::getStatus, ProjectStatusEnum.ARCHIVED.getCode()) |
|
|
.eq(Project::getStatus, ProjectStatusEnum.ARCHIVED.getCode()) |
|
|
// 查出自己及下属单位可查阅的项目档案 |
|
|
|
|
|
.in(Project::getBuildOrgCode,subOrgSet) |
|
|
|
|
|
.orderByDesc(Project::getUpdateOn)); |
|
|
.orderByDesc(Project::getUpdateOn)); |
|
|
|
|
|
|
|
|
// 从申请借阅信息表中查出本单位审批通过的项目添加到列表中 |
|
|
|
|
|
|
|
|
// 从申请借阅信息表中查出本单位及下属单位审批通过的项目添加到列表中 |
|
|
HashSet<Long> borrowProjectIdSet = new HashSet<>(); |
|
|
HashSet<Long> borrowProjectIdSet = new HashSet<>(); |
|
|
List<ProjectApplyBorrow> applyBorrowList = projectApplyBorrowService.list(Wrappers.lambdaQuery(ProjectApplyBorrow.class) |
|
|
List<ProjectApplyBorrow> applyBorrowList = projectApplyBorrowService.list(Wrappers.lambdaQuery(ProjectApplyBorrow.class) |
|
|
.eq(ProjectApplyBorrow::getApplyBorrowEmpPosUnitCode, empPosUnitCode) |
|
|
|
|
|
|
|
|
.in(ProjectApplyBorrow::getApplyBorrowEmpPosUnitCode,subOrgSet) |
|
|
.eq(ProjectApplyBorrow::getIsSuccess, Boolean.TRUE)).stream() |
|
|
.eq(ProjectApplyBorrow::getIsSuccess, Boolean.TRUE)).stream() |
|
|
.filter(a -> borrowProjectIdSet.add(a.getProjectId())) |
|
|
.filter(a -> borrowProjectIdSet.add(a.getProjectId())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
@@ -161,13 +159,16 @@ public class ProjectFileManage { |
|
|
List<ProjectFileListVO> vos = records.stream().map(p -> { |
|
|
List<ProjectFileListVO> vos = records.stream().map(p -> { |
|
|
ProjectFileListVO vo = new ProjectFileListVO(); |
|
|
ProjectFileListVO vo = new ProjectFileListVO(); |
|
|
vo.setId(p.getId()); |
|
|
vo.setId(p.getId()); |
|
|
vo.setCanRead(Boolean.TRUE); |
|
|
|
|
|
|
|
|
// 用户只可查阅自己及下属单位的项目档案; |
|
|
|
|
|
if (subOrgSet.contains(p.getBuildOrgCode())) { |
|
|
|
|
|
vo.setCanRead(Boolean.TRUE); |
|
|
|
|
|
} |
|
|
vo.setBuildOrgName(p.getBuildOrgName()); |
|
|
vo.setBuildOrgName(p.getBuildOrgName()); |
|
|
vo.setPojectCode(p.getProjectCode()); |
|
|
vo.setPojectCode(p.getProjectCode()); |
|
|
vo.setProjectName(p.getProjectName()); |
|
|
vo.setProjectName(p.getProjectName()); |
|
|
// 判断当前项目,当前登录用户是否已经开启了申请借阅并且没有审批完成 |
|
|
// 判断当前项目,当前登录用户是否已经开启了申请借阅并且没有审批完成 |
|
|
String instCode = p.getInstCode(); |
|
|
String instCode = p.getInstCode(); |
|
|
// 获取流程通过后的流程实例 |
|
|
|
|
|
|
|
|
// 获取流程实例 |
|
|
HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery() |
|
|
HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery() |
|
|
.processInstanceId(instCode) |
|
|
.processInstanceId(instCode) |
|
|
.singleResult(); |
|
|
.singleResult(); |
|
|