|
@@ -718,35 +718,10 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
//测风塔List
|
|
//测风塔List
|
|
HashSet<Map<String, Object>> towerList = new HashSet<>();
|
|
HashSet<Map<String, Object>> towerList = new HashSet<>();
|
|
//拐点坐标List
|
|
//拐点坐标List
|
|
- ArrayList<Map<String,List<List<Coordinates>>>> coordinateList = new ArrayList<>();
|
|
|
|
|
|
+ ArrayList<Map<String, List<List<Coordinates>>>> coordinateList = new ArrayList<>();
|
|
//风机List
|
|
//风机List
|
|
List<HashMap<String, Object>> fanList = new ArrayList<>();
|
|
List<HashMap<String, Object>> fanList = new ArrayList<>();
|
|
HashSet<String> eqNoList = new HashSet<>();
|
|
HashSet<String> eqNoList = new HashSet<>();
|
|
- for (ProjectInfo projectInfo : projectInfoList) {
|
|
|
|
- Map<String,List<List<Coordinates>>> cmap = new HashMap<>();
|
|
|
|
- cmap.put(projectInfo.getProjectBasicInfo().getProjectNameEasy(),projectInfo.getCoordinates());
|
|
|
|
- //拐点坐标
|
|
|
|
- coordinateList.add(cmap);
|
|
|
|
-
|
|
|
|
- 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("projectId", projectInfo.getId());
|
|
|
|
- towerList.add(map);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- dataMap.put("coordinatesList", coordinateList);
|
|
|
|
-
|
|
|
|
for (StationInfo stationInfo : stationInfoList) {
|
|
for (StationInfo stationInfo : stationInfoList) {
|
|
if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
//循环测风塔信息
|
|
//循环测风塔信息
|
|
@@ -768,13 +743,46 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
for (Map.Entry<String, List<FanTower>> entry : collect.entrySet()) {
|
|
for (Map.Entry<String, List<FanTower>> entry : collect.entrySet()) {
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
List<FanTower> collect1 = stationInfo.getFanTowerList().stream().filter(w -> w.getFanModel().equals(entry.getKey())).collect(Collectors.toList());
|
|
List<FanTower> collect1 = stationInfo.getFanTowerList().stream().filter(w -> w.getFanModel().equals(entry.getKey())).collect(Collectors.toList());
|
|
- map.put("type","station");
|
|
|
|
- map.put("name",stationInfo.getStationBasicInfo().getStationName());
|
|
|
|
- map.put("data",collect1);
|
|
|
|
|
|
+ map.put("type", "station");
|
|
|
|
+ map.put("name", stationInfo.getStationBasicInfo().getStationName());
|
|
|
|
+ map.put("data", collect1);
|
|
|
|
+ fanList.add(map);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (ProjectInfo projectInfo : projectInfoList) {
|
|
|
|
+ Map<String, List<List<Coordinates>>> cmap = new HashMap<>();
|
|
|
|
+ cmap.put(projectInfo.getProjectBasicInfo().getProjectNameEasy(), projectInfo.getCoordinates());
|
|
|
|
+ //拐点坐标
|
|
|
|
+ coordinateList.add(cmap);
|
|
|
|
+
|
|
|
|
+ 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("projectId", projectInfo.getId());
|
|
|
|
+ towerList.add(map);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (projectInfo.getFanTowerList() != null && projectInfo.getFanTowerList().size() > 0) {
|
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("type", "project");
|
|
|
|
+ map.put("name", projectInfo.getProjectBasicInfo().getProjectName());
|
|
|
|
+ map.put("data", projectInfo.getFanTowerList());
|
|
fanList.add(map);
|
|
fanList.add(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ dataMap.put("coordinatesList", coordinateList);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
List<Map<String, Object>> listMap = new ArrayList<>();
|
|
List<Map<String, Object>> listMap = new ArrayList<>();
|
|
//利用塔编号过滤分组项目以及场站的id
|
|
//利用塔编号过滤分组项目以及场站的id
|
|
for (String s : eqNoList) {
|
|
for (String s : eqNoList) {
|
|
@@ -971,15 +979,16 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
}
|
|
}
|
|
//过滤塔信息
|
|
//过滤塔信息
|
|
StationInfo stationInfo = stationInfoList.get(0);
|
|
StationInfo stationInfo = stationInfoList.get(0);
|
|
- if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
|
|
- dataMap.put("longitude", stationInfo.getEquipment().get(0).getLongitude());
|
|
|
|
- dataMap.put("latitude", stationInfo.getEquipment().get(0).getLatitude());
|
|
|
|
- }
|
|
|
|
- if (stationInfo.getFanTowerList() != null && stationInfo.getFanTowerList().size() > 0) {
|
|
|
|
- dataMap.put("longitude", stationInfo.getFanTowerList().get(0).getLongitudeFan());
|
|
|
|
- dataMap.put("latitude", stationInfo.getFanTowerList().get(0).getLatitudeFan());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+// if (stationInfo.getEquipment() != null && stationInfo.getEquipment().size() > 0) {
|
|
|
|
+// dataMap.put("longitude", stationInfo.getEquipment().get(0).getLongitude());
|
|
|
|
+// dataMap.put("latitude", stationInfo.getEquipment().get(0).getLatitude());
|
|
|
|
+// }
|
|
|
|
+// if (stationInfo.getFanTowerList() != null && stationInfo.getFanTowerList().size() > 0) {
|
|
|
|
+// dataMap.put("longitude", stationInfo.getFanTowerList().get(0).getLongitudeFan());
|
|
|
|
+// dataMap.put("latitude", stationInfo.getFanTowerList().get(0).getLatitudeFan());
|
|
|
|
+// }
|
|
|
|
+ dataMap.put("longitude", stationInfo.getStationBasicInfo().getLongitude());
|
|
|
|
+ dataMap.put("latitude", stationInfo.getStationBasicInfo().getLatitude());
|
|
|
|
|
|
dataMap.put("modelT", arrayList);
|
|
dataMap.put("modelT", arrayList);
|
|
}
|
|
}
|