Commit 7201cd54 authored by wujiang's avatar wujiang

提交代码

parent ecf04911
......@@ -1125,19 +1125,31 @@ public class LargeScreenImpl {
values.add(String.format(CommonConstans.Twodecimalplaces, vl));
}
String max = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).max().getAsDouble());
String min = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).min().getAsDouble());
String mean = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).average().getAsDouble());
activePowerInfo.put("mean", mean);
activePowerInfo.put("max", max);
activePowerInfo.put("min", min);
activePowerInfo.put("maxTime", time.get(values.lastIndexOf(max)));
activePowerInfo.put("minTime", time.get(values.lastIndexOf(min)));
activePowerInfo.put("load", String.format(CommonConstans.Twodecimalplaces,
Double.valueOf(values.get(values.size() - 1)) / installedCapacity.get()));
if(!values.isEmpty())
{
String max = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).max().getAsDouble());
String min = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).min().getAsDouble());
String mean = String.format(CommonConstans.Twodecimalplaces,
values.stream().mapToDouble(Double::parseDouble).average().getAsDouble());
activePowerInfo.put("mean", mean);
activePowerInfo.put("max", max);
activePowerInfo.put("min", min);
activePowerInfo.put("maxTime", time.get(values.lastIndexOf(max)));
activePowerInfo.put("minTime", time.get(values.lastIndexOf(min)));
activePowerInfo.put("load", String.format(CommonConstans.Twodecimalplaces,
Double.valueOf(values.get(values.size() - 1)) / installedCapacity.get()));
}else
{
activePowerInfo.put("mean", null);
activePowerInfo.put("max", null);
activePowerInfo.put("min", null);
activePowerInfo.put("maxTime", null);
activePowerInfo.put("minTime", null);
activePowerInfo.put("load",null);
}
List<Map<String, Object>> seriesData = new ArrayList<>();
Map<String, Object> map3 = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment