Commit a441e949 authored by tangwei's avatar tangwei

修改bug

parent 4051b155
...@@ -74,6 +74,7 @@ public class EquipmentServiceImpl { ...@@ -74,6 +74,7 @@ public class EquipmentServiceImpl {
List<Map<String, Object>> buildingMapList = (List<Map<String, Object>>) response.getResult(); List<Map<String, Object>> buildingMapList = (List<Map<String, Object>>) response.getResult();
List<MenuFrom> buildingTreeList = Lists.newArrayList(); List<MenuFrom> buildingTreeList = Lists.newArrayList();
buildingMapList.forEach(building -> { buildingMapList.forEach(building -> {
MenuFrom menuFrom = new MenuFrom((String) building.get("id"), "全部建筑", (String) building.get("parentId"), MenuFrom menuFrom = new MenuFrom((String) building.get("id"), "全部建筑", (String) building.get("parentId"),
"0"); "0");
List<Map<String, Object>> children = (List<Map<String, Object>>) building.get("children"); List<Map<String, Object>> children = (List<Map<String, Object>>) building.get("children");
...@@ -92,6 +93,10 @@ public class EquipmentServiceImpl { ...@@ -92,6 +93,10 @@ public class EquipmentServiceImpl {
(String) child.get("parentId"), "0"); (String) child.get("parentId"), "0");
if (!ValidationUtil.isEmpty(child.get("children"))) { if (!ValidationUtil.isEmpty(child.get("children"))) {
parseTree(menuFrom, (List<Map<String, Object>>) child.get("children")); parseTree(menuFrom, (List<Map<String, Object>>) child.get("children"));
if(parent!=null){
parent.setIsLeaf(false);
}
} else { } else {
parent.setIsLeaf(false); parent.setIsLeaf(false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment