|
@@ -560,13 +560,23 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
if (windTowerInfo.getDisplayHeight() != null && !windTowerInfo.getDisplayHeight().equals("")) {
|
|
if (windTowerInfo.getDisplayHeight() != null && !windTowerInfo.getDisplayHeight().equals("")) {
|
|
height = windTowerInfo.getDisplayHeight();
|
|
height = windTowerInfo.getDisplayHeight();
|
|
}
|
|
}
|
|
|
|
+ //获取风向 层高 最高层
|
|
|
|
+ String wdHeights = windTowerInfo.getWdHeights();
|
|
|
|
+ String wdHeightMax = "";
|
|
|
|
+ if(!wdHeights.isEmpty()){
|
|
|
|
+ ArrayList<String> wdHeightList = new ArrayList(Arrays.asList(wdHeights.split(",")));
|
|
|
|
+ List<Integer> collect = wdHeightList.stream().map(Integer::parseInt).sorted().collect(Collectors.toList());
|
|
|
|
+ wdHeightMax = collect.get(collect.size() - 1).toString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
if (!month.equals("")) {
|
|
if (!month.equals("")) {
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
try {
|
|
try {
|
|
Date startDate = sdf.parse(month);
|
|
Date startDate = sdf.parse(month);
|
|
Date endDate = DateTimeUtil.endOfMonth(startDate);
|
|
Date endDate = DateTimeUtil.endOfMonth(startDate);
|
|
weatherDataList = prophaseWeatherDataMapper.selectTAveAndPaAveAndAir(equipmentId, new Timestamp(startDate.getTime()), new Timestamp(endDate.getTime()));
|
|
weatherDataList = prophaseWeatherDataMapper.selectTAveAndPaAveAndAir(equipmentId, new Timestamp(startDate.getTime()), new Timestamp(endDate.getTime()));
|
|
- anemometryDataList = prophaseAnemometryDataMapper.selectWdAveAndWdAveAndWsStaForHeight(equipmentId, new Timestamp(startDate.getTime()), new Timestamp(endDate.getTime()), height);
|
|
|
|
|
|
+ anemometryDataList = prophaseAnemometryDataMapper.selectWdAveAndWdAveAndWsSta(equipmentId, new Timestamp(startDate.getTime()), new Timestamp(endDate.getTime()));
|
|
} catch (ParseException e) {
|
|
} catch (ParseException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
@@ -576,7 +586,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
DateTime startTime = DateUtil.beginOfDay(new Date(timeEnd.getTime()));
|
|
DateTime startTime = DateUtil.beginOfDay(new Date(timeEnd.getTime()));
|
|
// 最新一天数据
|
|
// 最新一天数据
|
|
weatherDataList = prophaseWeatherDataMapper.selectTAveAndPaAveAndAir(equipmentId, new Timestamp(startTime.getTime()), timeEnd);
|
|
weatherDataList = prophaseWeatherDataMapper.selectTAveAndPaAveAndAir(equipmentId, new Timestamp(startTime.getTime()), timeEnd);
|
|
- anemometryDataList = prophaseAnemometryDataMapper.selectWdAveAndWdAveAndWsStaForHeight(equipmentId, new Timestamp(startTime.getTime()), timeEnd, height);
|
|
|
|
|
|
+ anemometryDataList = prophaseAnemometryDataMapper.selectWdAveAndWdAveAndWsSta(equipmentId, new Timestamp(startTime.getTime()), timeEnd);
|
|
}
|
|
}
|
|
|
|
|
|
HashMap<String, Object> dataMap = new HashMap<>();
|
|
HashMap<String, Object> dataMap = new HashMap<>();
|
|
@@ -585,15 +595,16 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
BigDecimal pa = BigDecimal.ZERO;
|
|
BigDecimal pa = BigDecimal.ZERO;
|
|
|
|
|
|
// 风速集合
|
|
// 风速集合
|
|
- List<BigDecimal> wsForHeight = anemometryDataList.stream().map(h -> {
|
|
|
|
|
|
+ String finalHeight = height;
|
|
|
|
+ List<BigDecimal> wsForHeight = anemometryDataList.stream().filter(a -> a.getLayerHeight().equals(finalHeight)).map(h -> {
|
|
return BigDecimal.valueOf(h.getWsAve());
|
|
return BigDecimal.valueOf(h.getWsAve());
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
//最小风速集合
|
|
//最小风速集合
|
|
- List<BigDecimal> minWsForHeight = anemometryDataList.stream().map(h -> {
|
|
|
|
|
|
+ List<BigDecimal> minWsForHeight = anemometryDataList.stream().filter(a -> a.getLayerHeight().equals(minHeight)).map(h -> {
|
|
return BigDecimal.valueOf(h.getWsAve());
|
|
return BigDecimal.valueOf(h.getWsAve());
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
// 风速标准差集合
|
|
// 风速标准差集合
|
|
- List<BigDecimal> wsStaForHeight = anemometryDataList.stream().map(h -> {
|
|
|
|
|
|
+ List<BigDecimal> wsStaForHeight = anemometryDataList.stream().filter(a -> a.getLayerHeight().equals(finalHeight)).map(h -> {
|
|
return BigDecimal.valueOf(h.getWsSta());
|
|
return BigDecimal.valueOf(h.getWsSta());
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
@@ -621,7 +632,10 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
|
|
}
|
|
}
|
|
HashMap<String, Integer> wdMap = new HashMap<>();
|
|
HashMap<String, Integer> wdMap = new HashMap<>();
|
|
for (WindDirectionEnum value : WindDirectionEnum.values()) {
|
|
for (WindDirectionEnum value : WindDirectionEnum.values()) {
|
|
- List<ProphaseAnemometryData> forHeightAndWindDirectionEnum = CalculationUtil.getForHeightAndWindDirectionEnum(anemometryDataList, value);
|
|
|
|
|
|
+
|
|
|
|
+ String finalWdHeightMax = wdHeightMax;
|
|
|
|
+ List<ProphaseAnemometryData> dataList = anemometryDataList.stream().filter(a -> a.getLayerHeight().equals(finalWdHeightMax)).collect(Collectors.toList());
|
|
|
|
+ List<ProphaseAnemometryData> forHeightAndWindDirectionEnum = CalculationUtil.getForHeightAndWindDirectionEnum(dataList, value);
|
|
wdMap.put(value.name(), forHeightAndWindDirectionEnum.size());
|
|
wdMap.put(value.name(), forHeightAndWindDirectionEnum.size());
|
|
}
|
|
}
|
|
Integer total = 0;
|
|
Integer total = 0;
|