Commit 82178a0c authored by tangwei's avatar tangwei

解决冲突

parents fd0b67d5 eef6a715
......@@ -988,9 +988,10 @@ public class MonitoringServiceImpl {
List<String> superPowerShortYdata = new ArrayList<>();
for (int i = 0; i < 25; i++) {
xdata.add(String.format("%02d", i) + ":00");
currentPowerYdata.add(String.format("%.2f", Math.random() * 30.0));
shortPowerYdata.add(String.format("%.2f", Math.random() * 40.0));
superPowerShortYdata.add(String.format("%.2f", Math.random() * 35.0));
Random random =new Random();
currentPowerYdata.add(String.format("%.2f", random.nextDouble()*30));
shortPowerYdata.add(String.format("%.2f", random.nextDouble()*40));
superPowerShortYdata.add(String.format("%.2f", random.nextDouble()*50));
}
result.put("xData", xdata);
HashMap<String, Object> currentPowerHashMap = new HashMap<>();
......@@ -999,11 +1000,11 @@ public class MonitoringServiceImpl {
result.put("currentPower", currentPowerHashMap);
HashMap<String, Object> shortPowerHashMap = new HashMap<>();
shortPowerHashMap.put("title", "短期功率预测 "+date);
shortPowerHashMap.put("yData", currentPowerYdata);
shortPowerHashMap.put("yData", shortPowerYdata);
result.put("shortPower", shortPowerHashMap);
HashMap<String, Object> superShortPowerHashMap = new HashMap<>();
superShortPowerHashMap.put("title", "超短期功率预测 "+ date);
superShortPowerHashMap.put("yData", currentPowerYdata);
superShortPowerHashMap.put("yData", superPowerShortYdata);
result.put("superShortPower", superShortPowerHashMap);
HashMap<String, Object> footerList = new HashMap<>();
String currentMin = String.format("%.2f",currentPowerYdata.stream().mapToDouble(Double::parseDouble).min().getAsDouble());
......@@ -1029,9 +1030,9 @@ public class MonitoringServiceImpl {
sj2.add(xdata.get(currentPowerYdata.indexOf(currentMax)));
sj2.add(xdata.get(shortPowerYdata.indexOf(shortMax)));
sj2.add(xdata.get(superPowerShortYdata.indexOf(supreMax)));
String currentAvg = currentPowerYdata.stream().mapToDouble(Double::parseDouble).average().toString();
String shortAvg = shortPowerYdata.stream().mapToDouble(Double::parseDouble).average().toString();
String supreAvg = superPowerShortYdata.stream().mapToDouble(Double::parseDouble).average().toString();
String currentAvg =String.format("%.2f", currentPowerYdata.stream().mapToDouble(Double::parseDouble).average().getAsDouble());
String shortAvg = String.format("%.2f", shortPowerYdata.stream().mapToDouble(Double::parseDouble).average().getAsDouble());
String supreAvg = String.format("%.2f", superPowerShortYdata.stream().mapToDouble(Double::parseDouble).average().getAsDouble());
List<String> pjz = new ArrayList<>();
List<String> fjl = new ArrayList<>();
pjz.add(currentAvg);
......
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