|
@@ -52,7 +52,7 @@ public class ZhiBiaoCalculation {
|
|
|
|
|
|
//所有风机的风速测点
|
|
|
QueryWrapper<PointInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("uniformCode", "AI066");
|
|
|
+ queryWrapper.eq("uniform_code", "AI066");
|
|
|
List<PointInfo> pointInfos = pointInfo.selectList(queryWrapper);
|
|
|
|
|
|
//定义切入风速map集合
|
|
@@ -132,7 +132,11 @@ public class ZhiBiaoCalculation {
|
|
|
HashMap<String, Double> mapTurbineValues = mapIn.get(turbine.getTurbineId());
|
|
|
if (mapTurbineValues != null) {
|
|
|
AtomicReference<Double> sum = new AtomicReference<>(0.0);
|
|
|
+ //遍历mapTurbineValues,V大于10的舍弃,剩余算平均值
|
|
|
mapTurbineValues.forEach((k, v) -> {
|
|
|
+ if (v > 10) {
|
|
|
+ mapTurbineValues.remove(k);
|
|
|
+ }
|
|
|
sum.updateAndGet(v1 -> v1 + v);
|
|
|
});
|
|
|
double avgCutInWindSpeed = sum.get() / mapTurbineValues.size();
|
|
@@ -144,6 +148,9 @@ public class ZhiBiaoCalculation {
|
|
|
if (mapTurbineValues2 != null) {
|
|
|
AtomicReference<Double> sum = new AtomicReference<>(0.0);
|
|
|
mapTurbineValues2.forEach((k, v) -> {
|
|
|
+ if (v > 10) {
|
|
|
+ mapTurbineValues2.remove(k);
|
|
|
+ }
|
|
|
sum.updateAndGet(v1 -> v1 + v);
|
|
|
});
|
|
|
double avgCutOutWindSpeed = sum.get() / mapTurbineValues2.size();
|