Переглянути джерело

Merge remote-tracking branch 'origin/master'

master
PoffyZhang 1 рік тому
джерело
коміт
7023d71b9f
1 змінених файлів з 13 додано та 4 видалено
  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 Переглянути файл

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

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


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

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


Завантаження…
Відмінити
Зберегти