|
|
@@ -9,6 +9,7 @@ import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.google.common.collect.Maps; |
|
|
|
import com.google.common.collect.Sets; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
@@ -164,13 +165,17 @@ public class TodoCenterManage { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
if(CollUtil.isEmpty(projectIdList)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
if(CollUtil.isEmpty(instCodes)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setInstCodes(instCodes); |
|
|
@@ -238,14 +243,16 @@ public class TodoCenterManage { |
|
|
|
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
BeanUtils.copyProperties(param,req); |
|
|
|
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(req); |
|
|
|
List<ProcessTaskVo> userTodoList = Lists.newArrayList(); |
|
|
|
if (CollUtil.isNotEmpty(instCodes)) { |
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
BeanUtils.copyProperties(param,req); |
|
|
|
userTodoList = processTaskService.getUserTodoList(req); |
|
|
|
} |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
String fileName = null; |
|
|
@@ -724,6 +731,9 @@ public class TodoCenterManage { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
if (CollUtil.isEmpty(projectIdList)) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
@@ -780,22 +790,26 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
List<ProcessTaskVo> userIdoList = processTaskService.getUserIdoList(req); |
|
|
|
|
|
|
|
List<ProcessTaskVo> userIdoList = Lists.newArrayList(); |
|
|
|
Map<String, Project> projectInfoMap = Maps.newHashMap(); |
|
|
|
if (CollUtil.isEmpty(projects)) { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
userIdoList = processTaskService.getUserIdoList(req); |
|
|
|
} |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
@@ -843,6 +857,11 @@ public class TodoCenterManage { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if (CollUtil.isEmpty(projectIdList)) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
@@ -900,21 +919,26 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
List<ProcessInstanceVo> userSubmittedList = processInstanceService.getUserSubmittedList(req); |
|
|
|
List<ProcessInstanceVo> userSubmittedList = Lists.newArrayList(); |
|
|
|
Map<String, Project> projectInfoMap = Maps.newHashMap(); |
|
|
|
if (CollUtil.isEmpty(projects)) { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
userSubmittedList = processInstanceService.getUserSubmittedList(req); |
|
|
|
} |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
@@ -959,6 +983,11 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
|
|
|
|
if (CollUtil.isEmpty(projects)) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
@@ -1020,22 +1049,29 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分页查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param,req); |
|
|
|
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req); |
|
|
|
List<ProcessInstanceVo> ccMeList = Lists.newArrayList(); |
|
|
|
Map<String, Project> projectInfoMap = Maps.newHashMap(); |
|
|
|
if (CollUtil.isEmpty(projects)) { |
|
|
|
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); |
|
|
|
// 再查出项目关联的流程实例ID |
|
|
|
List<Long> projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, projectIdList) |
|
|
|
.orderByDesc(ProjectInst::getProjectId)); |
|
|
|
projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); |
|
|
|
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分页查出用户工作流 |
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
req.setUserId(String.valueOf(userId)); |
|
|
|
req.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param,req); |
|
|
|
ccMeList = processInstanceService.getCcMeList(req); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
|