|
@@ -3,6 +3,7 @@ package com.persagy.adm.diagram.core.model.logic;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.persagy.adm.diagram.core.DataStrategy;
|
|
|
import com.persagy.adm.diagram.core.model.Diagram;
|
|
|
+import com.persagy.adm.diagram.core.model.DiagramNode;
|
|
|
import com.persagy.adm.diagram.core.model.EquipmentNode;
|
|
|
import com.persagy.adm.diagram.core.model.Line;
|
|
|
import com.persagy.adm.diagram.core.model.base.Container;
|
|
@@ -73,6 +74,12 @@ public class CalcContext {
|
|
|
|
|
|
if(MainPipe.TYPE.equals(type)) {
|
|
|
return (T)template.getMainPipeById(id);
|
|
|
+ } else if(EquipmentNode.TYPE.equals(type)) {
|
|
|
+ for(DiagramNode node : diagram.getNodes()) {
|
|
|
+ if(node.getId().equals(id)){
|
|
|
+ return (T)node;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if(Container.TYPE.equals(type)) {
|
|
|
return (T)template.getContainerById(id);
|
|
|
} else {
|