|
@@ -316,45 +316,6 @@ public class DiagramBuilder {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //test code TODO
|
|
|
-// diagram.getLines().clear();
|
|
|
- EquipmentNode n1 = null;
|
|
|
- EquipmentNode n2 = null;
|
|
|
- MainPipe mp2 = null;
|
|
|
- for(Object o : equipMap.values()) {
|
|
|
- if(o instanceof EquipmentNode){
|
|
|
- String txt = DiagramBuilder.getName((ObjectNode) ((EquipmentNode) o).getDataObject());
|
|
|
- if("1#进线柜".equals(txt))
|
|
|
- n1 = (EquipmentNode) o;
|
|
|
- else if("2#变压器柜".equals(txt))
|
|
|
- n2 = (EquipmentNode) o;
|
|
|
- } else if(o instanceof MainPipe){
|
|
|
- String txt = DiagramBuilder.getName((ObjectNode) ((MainPipe) o).getDataObject());
|
|
|
- if("1#高压供电母线".equals(txt))
|
|
|
- mp2 = (MainPipe) o;
|
|
|
- }
|
|
|
- }
|
|
|
- if(n1 != null && n2 != null && mp2 != null) {
|
|
|
- ConnectPoint p1 = new ConnectPoint();
|
|
|
- p1.setHostType(EquipmentNode.TYPE);
|
|
|
- p1.setHostId(n1.getId());
|
|
|
- p1.setAnchorCode("B3");
|
|
|
- p1.setHostObj(n1);
|
|
|
-
|
|
|
- ConnectPoint p2 = new ConnectPoint();
|
|
|
-// p2.setHostType(EquipmentNode.TYPE);
|
|
|
-// p2.setHostId(n2.getId());
|
|
|
-// p2.setAnchorCode("T3");
|
|
|
-// p2.setHostObj(n2);
|
|
|
- p2.setHostType(MainPipe.TYPE);
|
|
|
- p2.setHostId(mp2.getId());
|
|
|
- p2.setHostObj(mp2);
|
|
|
-
|
|
|
- Line line = new Line();
|
|
|
- line.setFrom(p1);
|
|
|
- line.setTo(p2);
|
|
|
- addLine(line);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
private ConnectPoint getConnectPoint(Object obj, String relType, Object theOtherEnd){
|