|
@@ -775,7 +775,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
ArrayList<List<List<Coordinates>>> coordinateList = new ArrayList<>();
|
|
ArrayList<List<List<Coordinates>>> coordinateList = new ArrayList<>();
|
|
//风机List
|
|
//风机List
|
|
ArrayList<FanTower> fanList = new ArrayList<>();
|
|
ArrayList<FanTower> fanList = new ArrayList<>();
|
|
- ArrayList<String> eqNoList = new ArrayList<>();
|
|
|
|
|
|
+ HashSet<String> eqNoList = new HashSet<>();
|
|
for (ProjectInfo projectInfo : projectInfoList) {
|
|
for (ProjectInfo projectInfo : projectInfoList) {
|
|
//拐点坐标
|
|
//拐点坐标
|
|
coordinateList.add(projectInfo.getCoordinates());
|
|
coordinateList.add(projectInfo.getCoordinates());
|
|
@@ -805,6 +805,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
//循环测风塔信息
|
|
//循环测风塔信息
|
|
ArrayList<Map<String, Object>> arrayList = new ArrayList<>();
|
|
ArrayList<Map<String, Object>> arrayList = new ArrayList<>();
|
|
for (Equipment equipment : stationInfo.getEquipment()) {
|
|
for (Equipment equipment : stationInfo.getEquipment()) {
|
|
|
|
+ eqNoList.add(equipment.getEquipmentNo());
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
map.put("type", "station");
|
|
map.put("type", "station");
|
|
map.put("longitude", equipment.getLongitude());
|
|
map.put("longitude", equipment.getLongitude());
|
|
@@ -819,27 +820,35 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
fanList.addAll(stationInfo.getFanTowerList());
|
|
fanList.addAll(stationInfo.getFanTowerList());
|
|
}
|
|
}
|
|
|
|
|
|
- ArrayList<HashMap<String,Object>> projectForStationIdList = new ArrayList<>();
|
|
|
|
|
|
+ ArrayList<HashMap<String, Object>> projectForStationIdList = new ArrayList<>();
|
|
|
|
+ //利用塔编号过滤分组项目以及场站的id
|
|
for (String s : eqNoList) {
|
|
for (String s : eqNoList) {
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
ArrayList<Object> arrayList = new ArrayList<>();
|
|
ArrayList<Object> arrayList = new ArrayList<>();
|
|
List<Map<String, Object>> towerNo = towerList.stream().filter(key -> key.get("towerNo").equals(s)).collect(Collectors.toList());
|
|
List<Map<String, Object>> towerNo = towerList.stream().filter(key -> key.get("towerNo").equals(s)).collect(Collectors.toList());
|
|
for (Map<String, Object> map : towerNo) {
|
|
for (Map<String, Object> map : towerNo) {
|
|
- if(map.containsKey("projectId")){
|
|
|
|
|
|
+ if (map.containsKey("projectId")) {
|
|
arrayList.add(map.get("projectId"));
|
|
arrayList.add(map.get("projectId"));
|
|
}
|
|
}
|
|
- if(map.containsKey("stationId")){
|
|
|
|
|
|
+ if (map.containsKey("stationId")) {
|
|
arrayList.add(map.get("stationId"));
|
|
arrayList.add(map.get("stationId"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- hashMap.put("towerNo",s);
|
|
|
|
- hashMap.put("projectForStationId",arrayList);
|
|
|
|
|
|
+ hashMap.put("towerNo", s);
|
|
|
|
+ hashMap.put("projectForStationId", arrayList);
|
|
projectForStationIdList.add(hashMap);
|
|
projectForStationIdList.add(hashMap);
|
|
}
|
|
}
|
|
- dataMap.put("projectForStationId",projectForStationIdList);
|
|
|
|
-
|
|
|
|
|
|
+ //循环结果数据 替换id值
|
|
|
|
+ for (Map<String, Object> map : towerList) {
|
|
|
|
+ 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("fan", fanList);
|
|
dataMap.put("fan", fanList);
|
|
-
|
|
|
|
return dataMap;
|
|
return dataMap;
|
|
}
|
|
}
|
|
|
|
|