1845c80c 张雷

资产列表接口

1 个父辈 0d2b123c
......@@ -81,9 +81,9 @@ public class AssetsController {
Result<List<EquipmentTreeVO>> result = new Result<>();
List<EquipmentTreeVO> resultData = new LinkedList<>();
for (TreeData treeData : treeList) {
EquipmentTreeVO vo = new EquipmentTreeVO(treeData.getTitle(), treeData.getTitle(), "md-settings");
EquipmentTreeVO vo = new EquipmentTreeVO(treeData.getTitle(), treeData.getTitle(), "md-settings", treeData.getExt().get("code"));
resultData.add(vo);
vo.setChildren(treeData.getChildren().stream().map(v -> new EquipmentTreeVO(v.getTitle(), v.getKey(),"md-settings")).collect(Collectors.toList()));
vo.setChildren(treeData.getChildren().stream().map(v -> new EquipmentTreeVO(v.getTitle(), v.getKey(),"md-settings",v.getExt().get("code"))).collect(Collectors.toList()));
}
result.setResult(resultData);
result.setSuccess(true);
......
......@@ -43,7 +43,7 @@
'0' AS parent_id,
ss.struct_name AS title,
'0' AS nodeType,
ss.struct_code AS code,
'' AS code,
ss.sort_num AS sno
FROM
fm_twin_equip fe
......@@ -70,7 +70,7 @@
e.struct_id AS parent_id,
e.equip_name AS title,
'1' AS nodeType,
e.equip_unit AS code,
t.twin_id AS code,
'1' AS sno
FROM
fm_twin_equip t
......
......@@ -17,12 +17,16 @@ public class EquipmentTreeVO {
@ApiModelProperty(value = "icon")
private String icon;
@ApiModelProperty(value = "twinId")
private String twinId;
@ApiModelProperty(value = "children")
private List<EquipmentTreeVO> children;
public EquipmentTreeVO(String name, String value, String icon) {
public EquipmentTreeVO(String name, String value, String icon, String twinId) {
this.name = name;
this.value = value;
this.icon = icon;
this.twinId = twinId;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!