diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 44ac76b..ead6b2c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/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 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 projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p-> projectsMap.get(p.getProjectId()))); List 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 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 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 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;