|
@@ -770,7 +770,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
List<StationInfo> stationInfoList = stationInfoService.selectStationInfo();
|
|
|
//循环所有项目于信息
|
|
|
//测风塔List
|
|
|
- ArrayList<Map<String, Object>> towerList = new ArrayList<>();
|
|
|
+ HashSet<Map<String, Object>> towerList = new HashSet<>();
|
|
|
//拐点坐标List
|
|
|
ArrayList<List<List<Coordinates>>> coordinateList = new ArrayList<>();
|
|
|
//风机List
|
|
@@ -796,7 +796,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- dataMap.put("towerList", towerList);
|
|
|
+
|
|
|
dataMap.put("coordinatesList", coordinateList);
|
|
|
|
|
|
for (StationInfo stationInfo : stationInfoList) {
|
|
@@ -812,7 +812,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
map.put("latitude", equipment.getLatitude());
|
|
|
map.put("towerName", equipment.getName());
|
|
|
map.put("towerNo", equipment.getEquipmentNo());
|
|
|
- map.put("stationId", stationInfo.getId());
|
|
|
+ map.put("projectId", stationInfo.getId());
|
|
|
arrayList.add(map);
|
|
|
}
|
|
|
towerList.addAll(arrayList);
|
|
@@ -821,11 +821,14 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
}
|
|
|
|
|
|
ArrayList<HashMap<String, Object>> projectForStationIdList = new ArrayList<>();
|
|
|
+ List<Map<String, Object>> listMap = new ArrayList<>();
|
|
|
//利用塔编号过滤分组项目以及场站的id
|
|
|
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());
|
|
|
+ //有多条只添加一个其他都是一样的 需要删除
|
|
|
+ listMap.add(towerNo.get(0));
|
|
|
for (Map<String, Object> map : towerNo) {
|
|
|
HashMap<Object, Object> hashMap1 = new HashMap<>();
|
|
|
hashMap1.put("type",map.get("type"));
|
|
@@ -833,25 +836,19 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
hashMap1.put("id",map.get("projectId"));
|
|
|
arrayList.add(hashMap1);
|
|
|
}
|
|
|
- if (map.containsKey("stationId")) {
|
|
|
- hashMap1.put("id",map.get("stationId"));
|
|
|
- arrayList.add(hashMap1);
|
|
|
- }
|
|
|
}
|
|
|
hashMap.put("towerNo", s);
|
|
|
hashMap.put("projectForStationId", arrayList);
|
|
|
projectForStationIdList.add(hashMap);
|
|
|
}
|
|
|
//循环结果数据 替换id值
|
|
|
- for (Map<String, Object> map : towerList) {
|
|
|
+ for (Map<String, Object> map : listMap) {
|
|
|
List<HashMap<String, Object>> collect = projectForStationIdList.stream().filter(k -> k.get("towerNo").toString().equals(map.get("towerNo").toString())).collect(Collectors.toList());
|
|
|
if(map.containsKey("projectId")){
|
|
|
map.put("projectId",collect.get(0).get("projectForStationId"));
|
|
|
}
|
|
|
- if (map.containsKey("stationId")) {
|
|
|
- map.put("stationId",collect.get(0).get("projectForStationId"));
|
|
|
- }
|
|
|
}
|
|
|
+ dataMap.put("towerList", listMap);
|
|
|
dataMap.put("fan", fanList);
|
|
|
return dataMap;
|
|
|
}
|