mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
update 优化获取审批记录
This commit is contained in:
parent
efc4f5cfbc
commit
3e44e16857
@ -55,6 +55,7 @@ import java.util.List;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程实例 服务层实现
|
* 流程实例 服务层实现
|
||||||
*
|
*
|
||||||
@ -286,30 +287,32 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
|
|||||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(list.get(0).getProcessDefinitionId());
|
BpmnModel bpmnModel = repositoryService.getBpmnModel(list.get(0).getProcessDefinitionId());
|
||||||
List<GraphicInfoVo> graphicInfoVos = new ArrayList<>();
|
List<GraphicInfoVo> graphicInfoVos = new ArrayList<>();
|
||||||
Collection<FlowElement> flowElements = bpmnModel.getMainProcess().getFlowElements();
|
Collection<FlowElement> flowElements = bpmnModel.getMainProcess().getFlowElements();
|
||||||
|
//节点图形信息
|
||||||
|
buildGraphicInfo(flowElements, graphicInfoVos, bpmnModel);
|
||||||
|
map.put("graphicInfoVos", graphicInfoVos);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建节点图形信息
|
||||||
|
*
|
||||||
|
* @param flowElements 节点
|
||||||
|
*/
|
||||||
|
private static void buildGraphicInfo(Collection<FlowElement> flowElements, List<GraphicInfoVo> graphicInfoVos, BpmnModel bpmnModel) {
|
||||||
for (FlowElement flowElement : flowElements) {
|
for (FlowElement flowElement : flowElements) {
|
||||||
if (flowElement instanceof UserTask) {
|
|
||||||
GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(flowElement.getId());
|
|
||||||
GraphicInfoVo graphicInfoVo = BeanUtil.toBean(graphicInfo, GraphicInfoVo.class);
|
|
||||||
graphicInfoVo.setNodeId(flowElement.getId());
|
|
||||||
graphicInfoVo.setNodeName(flowElement.getName());
|
|
||||||
graphicInfoVos.add(graphicInfoVo);
|
|
||||||
}
|
|
||||||
if (flowElement instanceof SubProcess) {
|
if (flowElement instanceof SubProcess) {
|
||||||
Collection<FlowElement> subFlowElements = ((SubProcess) flowElement).getFlowElements();
|
Collection<FlowElement> subFlowElements = ((SubProcess) flowElement).getFlowElements();
|
||||||
for (FlowElement element : subFlowElements) {
|
buildGraphicInfo(subFlowElements, graphicInfoVos, bpmnModel);
|
||||||
if (element instanceof UserTask) {
|
} else {
|
||||||
GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(element.getId());
|
if (flowElement instanceof UserTask) {
|
||||||
GraphicInfoVo graphicInfoVo = BeanUtil.toBean(graphicInfo, GraphicInfoVo.class);
|
GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(flowElement.getId());
|
||||||
graphicInfoVo.setNodeId(element.getId());
|
GraphicInfoVo graphicInfoVo = BeanUtil.toBean(graphicInfo, GraphicInfoVo.class);
|
||||||
graphicInfoVo.setNodeName(element.getName());
|
graphicInfoVo.setNodeId(flowElement.getId());
|
||||||
graphicInfoVos.add(graphicInfoVo);
|
graphicInfoVo.setNodeName(flowElement.getName());
|
||||||
}
|
graphicInfoVos.add(graphicInfoVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//节点图形信息
|
|
||||||
map.put("graphicInfoVos", graphicInfoVos);
|
|
||||||
return map;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user