1、仿真执行中,只显示有任务的工位
This commit is contained in:
@@ -615,6 +615,9 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
||||
}
|
||||
List<NodeAllBase> workspaceNodeList = children.stream().filter(node -> NodeTypeEnum.WORKSPACE.getValue().equals(node.getNodeType())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(workspaceNodeList)) {
|
||||
for (NodeAllBase child : children) {
|
||||
sortWorkspaceNode((ProjectNodePo) child);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// 对工位进行排序,-M工位顺序排第一个
|
||||
|
||||
@@ -615,8 +615,24 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
}
|
||||
List<NodeAllBase> workspaceNodeList = children.stream().filter(node -> NodeTypeEnum.WORKSPACE.getValue().equals(node.getNodeType())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(workspaceNodeList)) {
|
||||
for (NodeAllBase child : children) {
|
||||
sortWorkspaceNode((ProjectNodePo) child);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// 只显示有任务的工位
|
||||
Iterator<NodeAllBase> workspaceNodeListIterator = workspaceNodeList.iterator();
|
||||
while (workspaceNodeListIterator.hasNext()) {
|
||||
List<NodeAllBase> childrenNodeList = workspaceNodeListIterator.next().getChildren();
|
||||
if (CollectionUtils.isEmpty(childrenNodeList)) {
|
||||
workspaceNodeListIterator.remove();
|
||||
continue;
|
||||
}
|
||||
List<NodeAllBase> taskNodeList = childrenNodeList.stream().filter(node -> NodeTypeEnum.TASK.getValue().equals(node.getNodeType())).toList();
|
||||
if (CollectionUtils.isEmpty(taskNodeList)) {
|
||||
workspaceNodeListIterator.remove();
|
||||
}
|
||||
}
|
||||
// 对工位进行排序,-M工位顺序排第一个
|
||||
workspaceNodeList = workspaceNodeList.stream().sorted(Comparator.comparing(NodeAllBase::getNodeCode)).collect(Collectors.toList());
|
||||
NodeAllBase specialWorkspaceNode = workspaceNodeList.stream().filter(workspaceNode -> workspaceNode.getNodeCode().contains("-M")).findFirst().orElse(null);
|
||||
|
||||
Reference in New Issue
Block a user