|
|
@@ -45,6 +45,7 @@ import com.wflow.contants.HisProInsEndActId; |
|
|
|
import com.wflow.exception.BusinessException; |
|
|
|
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; |
|
|
|
import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO; |
|
|
|
import com.wflow.workflow.bean.process.ProcessComment; |
|
|
|
import com.wflow.workflow.bean.process.ProgressNode; |
|
|
|
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessInstanceVo; |
|
|
@@ -127,20 +128,13 @@ public class TodoCenterManage { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
List<HistoricProcessInstance> instances = historyService.createHistoricProcessInstanceQuery() |
|
|
|
.list(); |
|
|
|
Map<String, HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId); |
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = projectPage.getRecords().stream().map(d -> { |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
BeanUtils.copyProperties(d, res); |
|
|
|
res.setProjectId(d.getId()); |
|
|
|
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode()); |
|
|
|
res.setNodeId(taskVo.getTaskDefKey()); |
|
|
|
if (instanceMap.containsKey(d.getInstCode())) { |
|
|
|
res.setProcessStatusName(processInstanceService |
|
|
|
.buildProcessStatusStr(instanceMap.get(d.getInstCode()))); |
|
|
|
} |
|
|
|
res.setProcessStatusName(taskVo.getStatus()); |
|
|
|
res.setProcessLaunchTime(d.getCreateOn()); |
|
|
|
return res; |
|
|
|
}).collect(Collectors.toList()); |
|
|
@@ -628,9 +622,8 @@ public class TodoCenterManage { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
List<HistoricProcessInstance> instances = historyService.createHistoricProcessInstanceQuery() |
|
|
|
.list(); |
|
|
|
Map<String, HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId); |
|
|
|
Map<String, ProcessTaskVo> taskVoMap = userIdoList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v)); |
|
|
|
|
|
|
|
|
|
|
|
// 分页查询项目信息 |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
@@ -645,7 +638,8 @@ public class TodoCenterManage { |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
BeanUtils.copyProperties(d, res); |
|
|
|
res.setProjectId(d.getId()); |
|
|
|
res.setProcessStatusName(processInstanceService.buildProcessStatusStr(instanceMap.get(d.getInstCode()))); |
|
|
|
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode()); |
|
|
|
res.setProcessStatusName(taskVo.getStatus()); |
|
|
|
res.setProcessLaunchTime(d.getCreateOn()); |
|
|
|
res.setProcessHandleTime(d.getUpdateOn()); |
|
|
|
return res; |
|
|
@@ -906,7 +900,7 @@ public class TodoCenterManage { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public String adjustment(AdjustHandleDTO dto) { |
|
|
|
public String adjustmentAndHandle(AdjustHandleDTO dto) { |
|
|
|
ProjectDTO projectDto = dto.getProjectInfo(); |
|
|
|
Project projectInfo = projectService.getById(projectDto.getId()); |
|
|
|
|
|
|
@@ -926,7 +920,6 @@ public class TodoCenterManage { |
|
|
|
handlerDTO.setInstanceId(dto.getInstanceId()); |
|
|
|
handlerDTO.setTaskId(dto.getTaskId()); |
|
|
|
handlerDTO.setAction(ProcessHandlerEnum.PASS); |
|
|
|
handlerDTO.setAuditInfo(dto.getAuditInfo()); |
|
|
|
handler(handlerDTO); |
|
|
|
return dto.getInstanceId(); |
|
|
|
|
|
|
|