|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.ningdatech.pmapi.todocenter.manage; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
@@ -120,6 +121,9 @@ public class TodoCenterManage { |
|
|
|
//因为要解耦 不能把项目和工作流一起查 |
|
|
|
//1.先查出用户工作流 |
|
|
|
List<ProcessTaskVo> userTodoList = processTaskService.getUserTodoList(param.getProcessDefId(),String.valueOf(userId)); |
|
|
|
if(CollUtil.isEmpty(userTodoList)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
//2.再分页查询项目信息 |
|
|
@@ -167,7 +171,7 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
projectListReq.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param,projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
List<Project> projects = CollUtil.isEmpty(userTodoList) ? Collections.emptyList() : projectLibManage.projectList(projectListReq); |
|
|
|
PageVo<ProjectLibListItemVO> projectLibList = projectLibManage.projectLibList(projectListReq); |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
@@ -829,10 +833,13 @@ public class TodoCenterManage { |
|
|
|
*/ |
|
|
|
public PageVo<ResToBeProcessedVO> idoList(ToBeProcessedReq param) { |
|
|
|
// 获取登录用户ID |
|
|
|
long userId = LoginUserUtil.getUserId(); |
|
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
|
|
|
|
|
// 查出用户已处理工作流 |
|
|
|
List<ProcessTaskVo> userIdoList = processTaskService.getUserIdoList(param.getProcessDefId(),String.valueOf(userId)); |
|
|
|
if(CollUtil.isEmpty(userIdoList)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
@@ -882,7 +889,8 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
projectListReq.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
List<Project> projects = CollUtil.isEmpty(userIdoList) ? Collections.emptyList() : |
|
|
|
projectLibManage.projectList(projectListReq); |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
@@ -924,6 +932,9 @@ public class TodoCenterManage { |
|
|
|
Long startUserId = LoginUserUtil.getUserId(); |
|
|
|
// 查出登录用户已提交工作流 |
|
|
|
List<ProcessInstanceVo> userSubmittedList = processInstanceService.getUserSubmittedList(String.valueOf(startUserId), param.getProcessDefId(), null); |
|
|
|
if(CollUtil.isEmpty(userSubmittedList)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = userSubmittedList.stream().map(ProcessInstanceVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分页查询项目信息 |
|
|
@@ -971,7 +982,8 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
projectListReq.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
List<Project> projects = CollUtil.isEmpty(userSubmittedList) ? Collections.emptyList() : |
|
|
|
projectLibManage.projectList(projectListReq);projectLibManage.projectList(projectListReq); |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
@@ -1013,6 +1025,9 @@ public class TodoCenterManage { |
|
|
|
|
|
|
|
// 查询抄送登录用户的工作流 |
|
|
|
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(param.getProcessDefId(), String.valueOf(userId)); |
|
|
|
if(CollUtil.isEmpty(ccMeList)){ |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = ccMeList.stream().map(ProcessInstanceVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
// 分页查询项目信息 |
|
|
@@ -1061,7 +1076,7 @@ public class TodoCenterManage { |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
projectListReq.setInstCodes(instCodes); |
|
|
|
BeanUtils.copyProperties(param, projectListReq); |
|
|
|
List<Project> projects = projectLibManage.projectList(projectListReq); |
|
|
|
List<Project> projects = CollUtil.isEmpty(ccMeList) ? Collections.emptyList() : projectLibManage.projectList(projectListReq); |
|
|
|
|
|
|
|
ExcelExportWriter excelExportWriter = new ExcelExportWriter(); |
|
|
|
|
|
|
|