|
@@ -695,19 +695,18 @@ public class RealTimeDisplayServiceImpl implements RealTimeDisplayService {
|
|
|
* @param eqId
|
|
|
* @param height
|
|
|
*/
|
|
|
- public List<Map<String, Object>> getWindShear(Long startTime, Long endTime, String eqId, String height) {
|
|
|
+ public List<Map<String, Object>> getWindShear(Long startTime, Long endTime, String eqId, String height,String heightMin) {
|
|
|
List<ProphaseAnemometryData> anemometryData = prophaseAnemometryDataService.selectWdAveAndWdAveAndWsSta(eqId, new Timestamp(startTime), new Timestamp(endTime));
|
|
|
- String[] heights = windTowerInfoService.getByEquipmentNo(eqId).get(0).getHeights().split(",");
|
|
|
- ArrayList<String> heightAll = new ArrayList<>(Arrays.asList(heights));
|
|
|
- //获取最小层高
|
|
|
- List<Integer> collect = heightAll.stream().map(h -> {
|
|
|
- return Integer.parseInt(CalculationUtil.getNumberFromString(h));
|
|
|
- }).sorted().collect(Collectors.toList());
|
|
|
- Integer heightMin = collect.get(0);
|
|
|
- String finalHeight = height;
|
|
|
- if (height.contains("A")) {
|
|
|
- finalHeight = height.substring(0, height.length() - 1);
|
|
|
- }
|
|
|
+// String[] heights = windTowerInfoService.getByEquipmentNo(eqId).get(0).getHeights().split(",");
|
|
|
+// ArrayList<String> heightAll = new ArrayList<>(Arrays.asList(heights));
|
|
|
+// //获取最小层高
|
|
|
+// List<Integer> collect = heightAll.stream().map(h -> {
|
|
|
+// return Integer.parseInt(CalculationUtil.getNumberFromString(h));
|
|
|
+// }).sorted().collect(Collectors.toList());
|
|
|
+// String finalHeight = height;
|
|
|
+// if (height.contains("A")) {
|
|
|
+// finalHeight = height.substring(0, height.length() - 1);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
BigDecimal zero = new BigDecimal(0);
|
|
@@ -719,10 +718,10 @@ public class RealTimeDisplayServiceImpl implements RealTimeDisplayService {
|
|
|
//获取平均风速
|
|
|
BigDecimal avgWindSpeed = CalculationUtil.getAvgWind(CalculationUtil.getWsForHeight(heightAndWindDirectionEnum, height));
|
|
|
|
|
|
- BigDecimal avgWindSpeed10 = CalculationUtil.getAvgWind(CalculationUtil.getWsForHeight(heightAndWindDirectionEnum, heightMin.toString()));
|
|
|
+ BigDecimal avgWindSpeed10 = CalculationUtil.getAvgWind(CalculationUtil.getWsForHeight(heightAndWindDirectionEnum, heightMin));
|
|
|
BigDecimal bigDecimal = new BigDecimal(-99);
|
|
|
if (avgWindSpeed10.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
- bigDecimal = CalculationUtil.caWindShear(avgWindSpeed, avgWindSpeed10, new BigDecimal(finalHeight), new BigDecimal(heightMin));
|
|
|
+ bigDecimal = CalculationUtil.caWindShear(avgWindSpeed, avgWindSpeed10, new BigDecimal(height), new BigDecimal(heightMin));
|
|
|
}
|
|
|
|
|
|
map.put(value.name(), bigDecimal.equals(new BigDecimal(-99)) ? zero : bigDecimal);
|