|
|
@@ -24,6 +24,8 @@ import com.hz.pm.api.common.util.BizUtils; |
|
|
|
import com.hz.pm.api.common.util.ExcelDownUtil; |
|
|
|
import com.hz.pm.api.irs.sign.IRSAPIRequest; |
|
|
|
import com.hz.pm.api.projectdeclared.manage.DefaultDeclaredProjectManage; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; |
|
|
|
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; |
|
|
|
import com.hz.pm.api.projectlib.manage.ProjectLibManage; |
|
|
|
import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO; |
|
|
|
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; |
|
|
@@ -145,6 +147,7 @@ public class TodoCenterManage { |
|
|
|
private final RepositoryService repositoryService; |
|
|
|
private final IRegionService regionService; |
|
|
|
private final ITodoService todoService; |
|
|
|
private final IPurchaseInstService purchaseInstService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 待办中心待我处理项目列表查询 |
|
|
@@ -212,7 +215,10 @@ public class TodoCenterManage { |
|
|
|
.collect(Collectors.toList()).stream() |
|
|
|
.filter(v -> processSet.add(v.getNodeId())) |
|
|
|
.collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v)); |
|
|
|
|
|
|
|
List<String> instanceIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId); |
|
|
|
List<PurchaseInst> purchaseInstList = purchaseInstService.listByInstCodes(instanceIds); |
|
|
|
Map<String, Long> purchaseInstMap = CollUtils.listToMap(purchaseInstList, |
|
|
|
PurchaseInst::getInstCode, PurchaseInst::getBidId); |
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { |
|
|
|
Project projectInfo = projectInfoMap.get(d.getInstanceId()); |
|
|
@@ -230,6 +236,7 @@ public class TodoCenterManage { |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
res.setPretrialFileId(projectInfo.getPretrialFileId()); |
|
|
|
res.setBidId(purchaseInstMap.get(d.getInstanceId())); |
|
|
|
return res; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return PageVo.of(resVos, list.size()); |
|
|
@@ -340,9 +347,7 @@ public class TodoCenterManage { |
|
|
|
VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!"); |
|
|
|
|
|
|
|
// 获取当前申报项目 |
|
|
|
Project declaredProject = projectService.getOne(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getInstCode, processInstanceId) |
|
|
|
.eq(Project::getId, projectId)); |
|
|
|
Project declaredProject = projectService.getById(projectId); |
|
|
|
VUtils.isTrue(Objects.isNull(declaredProject)).throwMessage("获取项目失败!"); |
|
|
|
|
|
|
|
// 获取当前未处理流程详情 |
|
|
@@ -679,12 +684,14 @@ public class TodoCenterManage { |
|
|
|
if (CollUtil.isEmpty(iDoList)) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
List<ProcessTaskVo> userIdoList = iDoList.stream() |
|
|
|
.skip((long) (pageNumber - 1) * pageSize) |
|
|
|
.limit(pageSize) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<String> instanceIds = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId); |
|
|
|
List<PurchaseInst> purchaseInstList = purchaseInstService.listByInstCodes(instanceIds); |
|
|
|
Map<String, Long> purchaseInstMap = CollUtils.listToMap(purchaseInstList, |
|
|
|
PurchaseInst::getInstCode, PurchaseInst::getBidId); |
|
|
|
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> { |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
Project projectInfo = projectInfoMap.get(d.getInstanceId()); |
|
|
@@ -698,6 +705,7 @@ public class TodoCenterManage { |
|
|
|
res.setProcessHandleTime(d.getTaskEndTime()); |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
res.setBidId(purchaseInstMap.get(d.getInstanceId())); |
|
|
|
return res; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return PageVo.of(resVos, iDoList.size()); |
|
|
|