|
@@ -775,31 +775,27 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
ArrayList<List<List<Coordinates>>> coordinateList = new ArrayList<>();
|
|
|
//风机List
|
|
|
ArrayList<FanTower> fanList = new ArrayList<>();
|
|
|
-
|
|
|
+ ArrayList<String> eqNoList = new ArrayList<>();
|
|
|
for (ProjectInfo projectInfo : projectInfoList) {
|
|
|
//拐点坐标
|
|
|
coordinateList.add(projectInfo.getCoordinates());
|
|
|
- ArrayList<String> projectIdList = new ArrayList<>();
|
|
|
+
|
|
|
if (projectInfo.getEquipment() != null && projectInfo.getEquipment().size() > 0) {
|
|
|
//循环测风塔信息
|
|
|
for (Equipment equipment : projectInfo.getEquipment()) {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
+ eqNoList.add(equipment.getEquipmentNo());
|
|
|
map.put("type", "project");
|
|
|
map.put("longitude", equipment.getLongitude());
|
|
|
map.put("latitude", equipment.getLatitude());
|
|
|
map.put("towerName", equipment.getName());
|
|
|
map.put("towerNo", equipment.getEquipmentNo());
|
|
|
- map.put("projectName", projectInfo.getProjectBasicInfo().getProjectNameEasy());
|
|
|
map.put("projectId", projectInfo.getId());
|
|
|
towerList.add(map);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-// towerList.stream().filter(key -> key.get("towerNo").equals())
|
|
|
-
|
|
|
dataMap.put("towerList", towerList);
|
|
|
dataMap.put("coordinatesList", coordinateList);
|
|
|
|
|
@@ -815,7 +811,6 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
map.put("latitude", equipment.getLatitude());
|
|
|
map.put("towerName", equipment.getName());
|
|
|
map.put("towerNo", equipment.getEquipmentNo());
|
|
|
- map.put("stationName", stationInfo.getStationBasicInfo().getStationName());
|
|
|
map.put("stationId", stationInfo.getId());
|
|
|
arrayList.add(map);
|
|
|
}
|
|
@@ -823,6 +818,26 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
}
|
|
|
fanList.addAll(stationInfo.getFanTowerList());
|
|
|
}
|
|
|
+
|
|
|
+ ArrayList<HashMap<String,Object>> projectForStationIdList = new ArrayList<>();
|
|
|
+ for (String s : eqNoList) {
|
|
|
+ HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
+ ArrayList<Object> arrayList = new ArrayList<>();
|
|
|
+ List<Map<String, Object>> towerNo = towerList.stream().filter(key -> key.get("towerNo").equals(s)).collect(Collectors.toList());
|
|
|
+ for (Map<String, Object> map : towerNo) {
|
|
|
+ if(map.containsKey("projectId")){
|
|
|
+ arrayList.add(map.get("projectId"));
|
|
|
+ }
|
|
|
+ if(map.containsKey("stationId")){
|
|
|
+ arrayList.add(map.get("stationId"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ hashMap.put("towerNo",s);
|
|
|
+ hashMap.put("projectForStationId",arrayList);
|
|
|
+ projectForStationIdList.add(hashMap);
|
|
|
+ }
|
|
|
+ dataMap.put("projectForStationId",projectForStationIdList);
|
|
|
+
|
|
|
dataMap.put("fan", fanList);
|
|
|
|
|
|
return dataMap;
|