|
|
@@ -20,6 +20,9 @@ import org.apache.commons.io.FileUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.assertj.core.util.Lists; |
|
|
|
import org.flowable.bpmn.model.BpmnModel; |
|
|
|
import org.flowable.bpmn.model.FlowElement; |
|
|
|
import org.flowable.bpmn.model.FlowElementsContainer; |
|
|
|
import org.flowable.bpmn.model.SubProcess; |
|
|
|
import org.flowable.engine.HistoryService; |
|
|
|
import org.flowable.engine.RepositoryService; |
|
|
|
import org.flowable.engine.RuntimeService; |
|
|
@@ -203,6 +206,8 @@ public class TodoCenterManage { |
|
|
|
.filter(v -> processSet.add(v.getNodeId())) |
|
|
|
.collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { |
|
|
|
Project projectInfo = projectInfoMap.get(d.getInstanceId()); |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
@@ -217,11 +222,26 @@ public class TodoCenterManage { |
|
|
|
res.setProcessLaunchTime(d.getTaskCreateTime()); |
|
|
|
res.setProcessDefName(d.getProcessDefName()); |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
return res; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return PageVo.of(resVos, list.size()); |
|
|
|
} |
|
|
|
|
|
|
|
private String findSubProcessName(ProcessTaskVo d) { |
|
|
|
|
|
|
|
BpmnModel bpmnModel = repositoryService.getBpmnModel(d.getProcessDefId()); |
|
|
|
|
|
|
|
if(Objects.nonNull(bpmnModel)){ |
|
|
|
FlowElement flowElement = bpmnModel.getFlowElement(d.getTaskDefKey()); |
|
|
|
FlowElementsContainer parentContainer = flowElement.getParentContainer(); |
|
|
|
if(parentContainer instanceof SubProcess){ |
|
|
|
return ((SubProcess) parentContainer).getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 待办中心列表导出 |
|
|
|
* |
|
|
@@ -544,6 +564,7 @@ public class TodoCenterManage { |
|
|
|
res.setProcessLaunchTime(d.getCreateTime()); |
|
|
|
res.setProcessHandleTime(d.getTaskEndTime()); |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
return res; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return PageVo.of(resVos, iDoList.size()); |
|
|
|