1845c80c 张雷

资产列表接口

1 个父辈 0d2b123c
...@@ -81,9 +81,9 @@ public class AssetsController { ...@@ -81,9 +81,9 @@ public class AssetsController {
81 Result<List<EquipmentTreeVO>> result = new Result<>(); 81 Result<List<EquipmentTreeVO>> result = new Result<>();
82 List<EquipmentTreeVO> resultData = new LinkedList<>(); 82 List<EquipmentTreeVO> resultData = new LinkedList<>();
83 for (TreeData treeData : treeList) { 83 for (TreeData treeData : treeList) {
84 EquipmentTreeVO vo = new EquipmentTreeVO(treeData.getTitle(), treeData.getTitle(), "md-settings"); 84 EquipmentTreeVO vo = new EquipmentTreeVO(treeData.getTitle(), treeData.getTitle(), "md-settings", treeData.getExt().get("code"));
85 resultData.add(vo); 85 resultData.add(vo);
86 vo.setChildren(treeData.getChildren().stream().map(v -> new EquipmentTreeVO(v.getTitle(), v.getKey(),"md-settings")).collect(Collectors.toList())); 86 vo.setChildren(treeData.getChildren().stream().map(v -> new EquipmentTreeVO(v.getTitle(), v.getKey(),"md-settings",v.getExt().get("code"))).collect(Collectors.toList()));
87 } 87 }
88 result.setResult(resultData); 88 result.setResult(resultData);
89 result.setSuccess(true); 89 result.setSuccess(true);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 '0' AS parent_id, 43 '0' AS parent_id,
44 ss.struct_name AS title, 44 ss.struct_name AS title,
45 '0' AS nodeType, 45 '0' AS nodeType,
46 ss.struct_code AS code, 46 '' AS code,
47 ss.sort_num AS sno 47 ss.sort_num AS sno
48 FROM 48 FROM
49 fm_twin_equip fe 49 fm_twin_equip fe
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
70 e.struct_id AS parent_id, 70 e.struct_id AS parent_id,
71 e.equip_name AS title, 71 e.equip_name AS title,
72 '1' AS nodeType, 72 '1' AS nodeType,
73 e.equip_unit AS code, 73 t.twin_id AS code,
74 '1' AS sno 74 '1' AS sno
75 FROM 75 FROM
76 fm_twin_equip t 76 fm_twin_equip t
......
...@@ -17,12 +17,16 @@ public class EquipmentTreeVO { ...@@ -17,12 +17,16 @@ public class EquipmentTreeVO {
17 @ApiModelProperty(value = "icon") 17 @ApiModelProperty(value = "icon")
18 private String icon; 18 private String icon;
19 19
20 @ApiModelProperty(value = "twinId")
21 private String twinId;
22
20 @ApiModelProperty(value = "children") 23 @ApiModelProperty(value = "children")
21 private List<EquipmentTreeVO> children; 24 private List<EquipmentTreeVO> children;
22 25
23 public EquipmentTreeVO(String name, String value, String icon) { 26 public EquipmentTreeVO(String name, String value, String icon, String twinId) {
24 this.name = name; 27 this.name = name;
25 this.value = value; 28 this.value = value;
26 this.icon = icon; 29 this.icon = icon;
30 this.twinId = twinId;
27 } 31 }
28 } 32 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!