소스 검색

Merge remote-tracking branch 'origin/master'

tags/24080901
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;


불러오는 중...
취소
저장