Browse Source

Merge remote-tracking branch 'origin/master'

master
PoffyZhang 1 year ago
parent
commit
7023d71b9f
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 13
- 4
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.StopWatch;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -171,7 +172,6 @@ public class TodoCenterManage {
Integer pageSize = param.getPageSize(); Integer pageSize = param.getPageSize();
req.setProcessDefId(param.getProcessDefId()); req.setProcessDefId(param.getProcessDefId());
req.setUserId(String.valueOf(userId)); req.setUserId(String.valueOf(userId));
BeanUtils.copyProperties(param,req);
List<ProcessTaskVo> todoList = processTaskService.getUserTodoList(req); List<ProcessTaskVo> todoList = processTaskService.getUserTodoList(req);


if (CollUtil.isEmpty(todoList)) { if (CollUtil.isEmpty(todoList)) {
@@ -195,6 +195,8 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
BeanUtils.copyProperties(projectInfo, res); BeanUtils.copyProperties(projectInfo, res);
res.setProjectId(projectInfo.getId()); res.setProjectId(projectInfo.getId());
res.setBuildOrg(projectInfo.getBuildOrgName());
res.setDeclaredAmount(projectInfo.getDeclareAmount());
ProcessTaskVo taskVo = taskMap.get(d.getInstanceId()); ProcessTaskVo taskVo = taskMap.get(d.getInstanceId());
res.setNodeId(taskVo.getTaskDefKey()); res.setNodeId(taskVo.getTaskDefKey());
res.setProcessStatusName(taskVo.getStatus()); res.setProcessStatusName(taskVo.getStatus());
@@ -722,7 +724,6 @@ public class TodoCenterManage {
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.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()); List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList());



// 查出用户工作流 // 查出用户工作流
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); TodoCenterListReqDTO req = new TodoCenterListReqDTO();
Integer pageNumber = param.getPageNumber(); Integer pageNumber = param.getPageNumber();
@@ -730,7 +731,11 @@ public class TodoCenterManage {
req.setProcessDefId(param.getProcessDefId()); req.setProcessDefId(param.getProcessDefId());
req.setUserId(String.valueOf(userId)); req.setUserId(String.valueOf(userId));
req.setInstCodes(instCodes); req.setInstCodes(instCodes);
StopWatch stopWatch = new StopWatch();
stopWatch.start();
List<ProcessTaskVo> iDoList = processTaskService.getUserIdoList(req); List<ProcessTaskVo> iDoList = processTaskService.getUserIdoList(req);
stopWatch.stop();
log.info("========== 查询已处理列表时间为 {}s",stopWatch.getTotalTimeSeconds());


if (CollUtil.isEmpty(iDoList)) { if (CollUtil.isEmpty(iDoList)) {
return PageVo.empty(); return PageVo.empty();
@@ -745,6 +750,8 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId()); Project projectInfo = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(projectInfo, res); BeanUtils.copyProperties(projectInfo, res);
res.setBuildOrg(projectInfo.getBuildOrgName());
res.setDeclaredAmount(projectInfo.getDeclareAmount());
res.setProjectId(projectInfo.getId()); res.setProjectId(projectInfo.getId());
res.setProcessStatusName(d.getStatus()); res.setProcessStatusName(d.getStatus());
res.setProcessLaunchTime(d.getCreateTime()); res.setProcessLaunchTime(d.getCreateTime());
@@ -862,8 +869,9 @@ public class TodoCenterManage {
List<ResToBeProcessedVO> resVos = userSubmittedList.stream().map(d -> { List<ResToBeProcessedVO> resVos = userSubmittedList.stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project project = projectInfoMap.get(d.getInstanceId()); Project project = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(d, res);
BeanUtils.copyProperties(project, res);
res.setBuildOrg(project.getBuildOrgName()); res.setBuildOrg(project.getBuildOrgName());
res.setDeclaredAmount(project.getDeclareAmount());
res.setProjectId(project.getId()); res.setProjectId(project.getId());
res.setProcessStatusName(d.getStatus()); res.setProcessStatusName(d.getStatus());
res.setProcessLaunchTime(d.getStartTime()); res.setProcessLaunchTime(d.getStartTime());
@@ -980,10 +988,11 @@ public class TodoCenterManage {
List<ResToBeProcessedVO> resVos = ccMeInstList.stream().map(d -> { List<ResToBeProcessedVO> resVos = ccMeInstList.stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project project = projectInfoMap.get(d.getInstanceId()); Project project = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(d, res);
BeanUtils.copyProperties(project, res);
res.setNodeId(d.getNodeId()); res.setNodeId(d.getNodeId());
res.setProjectId(project.getId()); res.setProjectId(project.getId());
res.setBuildOrg(project.getBuildOrgName()); res.setBuildOrg(project.getBuildOrgName());
res.setDeclaredAmount(project.getDeclareAmount());
res.setProcessStatusName(d.getStatus()); res.setProcessStatusName(d.getStatus());
res.setProcessLaunchTime(d.getStartTime()); res.setProcessLaunchTime(d.getStartTime());
return res; return res;


Loading…
Cancel
Save