|
@@ -50,6 +50,8 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
|
|
|
private final ProjectProgressService proProjectInfoService;
|
|
|
private final TotalityInfoService totalityInfoService;
|
|
|
+ private final FanModelDataService fanModelDataService;
|
|
|
+
|
|
|
|
|
|
private final BigDecimal threeParameterOne = new BigDecimal("1.146");
|
|
|
private final BigDecimal threeParameterTow = new BigDecimal("77.42");
|
|
@@ -739,12 +741,27 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
List<ProjectInfo> projectInfoList = projectInfoService.getProjectInfoList();
|
|
|
//根据项目ID过滤指定数据
|
|
|
List<ProjectInfo> collect = projectInfoList.stream().filter(p -> p.getId().equals(projectId)).collect(Collectors.toList());
|
|
|
+ ArrayList<HashMap<String, String>> arrayList = new ArrayList<>();
|
|
|
+
|
|
|
if (collect.size() > 0) {
|
|
|
ProjectInfo projectInfo = collect.get(0);
|
|
|
dataMap.put("projectOverview", projectInfo.getProjectBasicInfo().getProjectOverview());
|
|
|
dataMap.put("resourcesOverview", projectInfo.getProjectBasicInfo().getResourcesOverview());
|
|
|
//拐点坐标
|
|
|
dataMap.put("coordinates", projectInfo.getCoordinates());
|
|
|
+ if (projectInfo.getEquipment().size() > 0) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ for (Equipment equipment : projectInfo.getEquipment()) {
|
|
|
+ //经度
|
|
|
+ map.put("longitude", equipment.getLongitude());
|
|
|
+ map.put("latitude", equipment.getLatitude());
|
|
|
+ map.put("towerName", equipment.getName());
|
|
|
+ arrayList.add(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ //测风塔坐标
|
|
|
+ dataMap.put("towerInfo", arrayList);
|
|
|
}
|
|
|
//项目中所有的塔、拐点坐标、 TODO 地图四个角信息
|
|
|
return dataMap;
|
|
@@ -818,20 +835,41 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
|
//场站信息
|
|
|
List<StationInfo> stationInfos = stationInfoService.selectStationInfo();
|
|
|
List<StationInfo> stationInfoList = stationInfos.stream().filter(s -> s.getId().equals(stationId)).collect(Collectors.toList());
|
|
|
+ List<FanModelData> fanModelDataList = fanModelDataService.getFanModelDataList();
|
|
|
+ //过滤
|
|
|
+ List<FanModelData> collect = fanModelDataList.stream().filter(f -> f.getStationId().equals(stationId)).collect(Collectors.toList());
|
|
|
+
|
|
|
HashMap<String, Object> dataMap = new HashMap<>();
|
|
|
if (stationInfoList.size() > 0) {
|
|
|
- ArrayList<HashMap<String,Object>> arrayList = new ArrayList<>();
|
|
|
+ ArrayList<HashMap<String, Object>> arrayList = new ArrayList<>();
|
|
|
//根据风机类型分组
|
|
|
Map<String, List<FanTower>> modelMap = stationInfoList.get(0).getFanTowerList().stream()
|
|
|
.collect(Collectors.groupingBy(FanTower::getFanModel));
|
|
|
//遍历map指定key
|
|
|
for (Map.Entry<String, List<FanTower>> entry : modelMap.entrySet()) {
|
|
|
- HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("modelType", entry.getKey());
|
|
|
- map.put("modelTotal", entry.getValue().size());
|
|
|
- arrayList.add(map);
|
|
|
+ for (FanModelData fanModelData : collect) {
|
|
|
+ if (fanModelData.getModelName().equals(entry.getKey())) {
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ //风机名称
|
|
|
+ map.put("modelType", entry.getKey());
|
|
|
+ //风机数量
|
|
|
+ map.put("modelTotal", entry.getValue().size());
|
|
|
+ //满发小时数
|
|
|
+ map.put("wsAve", fanModelData.getWsAve());
|
|
|
+ //主风向
|
|
|
+ map.put("wdSum", fanModelData.getWdSum());
|
|
|
+ //发电量
|
|
|
+ map.put("generatingCapacity", fanModelData.getGeneratingCapacity());
|
|
|
+ //满发小时数
|
|
|
+ map.put("realTimeTotal", fanModelData.getRealTimeTotal());
|
|
|
+ arrayList.add(map);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- dataMap.put("modelT",arrayList);
|
|
|
+ dataMap.put("modelT", arrayList);
|
|
|
+ //风机点位
|
|
|
dataMap.put("modelTower", stationInfoList.get(0).getFanTowerList());
|
|
|
}
|
|
|
return dataMap;
|