|
|
@@ -48,6 +48,7 @@ public class NewGetWindReportService {
|
|
|
//当月数据
|
|
|
List<TurbineInfoDay> monthList = turbineInfoDayService.monthList(time);
|
|
|
List<TurbineInfoDay> top3list = turbineInfoDayService.topList(time);
|
|
|
+ List<TurbineInfoDay> modellist = turbineInfoDayService.modelList(time);
|
|
|
List<TurbineInfoDay> fntop3list = turbineInfoDayService.fntopList(time);
|
|
|
List<TurbineInfoDay> ssdltop3list = turbineInfoDayService.ssdltopList(time);
|
|
|
List<TurbineInfoDay> bottom3list = turbineInfoDayService.bottomList(time);
|
|
|
@@ -73,6 +74,7 @@ public class NewGetWindReportService {
|
|
|
List<StationInfoMonth> qnmttlist = stationInfoMonthService.qnmttlist(time);
|
|
|
|
|
|
setTurbineIdFromNemCode(wtls, top3list);
|
|
|
+ setTurbineIdFromNemCode(wtls, modellist);
|
|
|
setTurbineIdFromNemCode(wtls, fntop3list);
|
|
|
setTurbineIdFromNemCode(wtls, ssdltop3list);
|
|
|
setTurbineIdFromNemCode(wtls, bottom3list);
|
|
|
@@ -178,6 +180,7 @@ public class NewGetWindReportService {
|
|
|
avgklyltop3 = StringUtils.round(totalKlyl / 3, 2);
|
|
|
}
|
|
|
double top1ssdl = StringUtils.round(topXdssdl[0] + topJxssdl[0] + topGzssdl[0] + topXnssdl[0] + topSlssdl[0], 2);
|
|
|
+ double top2ssdl = StringUtils.round(topXdssdl[1] + topJxssdl[1] + topGzssdl[1] + topXnssdl[1] + topSlssdl[1], 2);
|
|
|
double top3ssdl = StringUtils.round(topXdssdl[2] + topJxssdl[2] + topGzssdl[2] + topXnssdl[2] + topSlssdl[2], 2);
|
|
|
// 处理bottom3list数据
|
|
|
if (bottom3list.size() > 0) {
|
|
|
@@ -311,10 +314,37 @@ public class NewGetWindReportService {
|
|
|
}
|
|
|
fanBenchmark.setIndicators(fanIndicators);
|
|
|
|
|
|
- // 1.3 设置结论
|
|
|
- fanBenchmark.setConclusion(
|
|
|
- topIds[2] + "号与" + topIds[0] + "号风机核心差异,损失电量差" + StringUtils.round(top1ssdl - top3ssdl, 2) + "万kWh"
|
|
|
- );
|
|
|
+ // 使用 Map 存储风机数据,提高查找效率
|
|
|
+ Map<String, TurbineInfoDay> turbineMap = new HashMap<>();
|
|
|
+ for (TurbineInfoDay turbine : modellist) {
|
|
|
+ turbineMap.put(turbine.getStationId(), turbine);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> resultTexts = new ArrayList<>();
|
|
|
+ double[] ssdlValues = {top1ssdl, top2ssdl, top3ssdl};
|
|
|
+
|
|
|
+ // 遍历 topIds 进行对比计算
|
|
|
+ for (int i = 0; i < topIds.length; i++) {
|
|
|
+ String topId = topIds[i];
|
|
|
+ double currentSsdl = ssdlValues[i];
|
|
|
+ String benchmarkTurbine = topId.startsWith("1") ? "1205" : topId.startsWith("2") ? "2401" : null;
|
|
|
+
|
|
|
+ if (benchmarkTurbine == null || !turbineMap.containsKey(benchmarkTurbine)) {
|
|
|
+ continue; // 跳过无标杆风机的情况
|
|
|
+ }
|
|
|
+
|
|
|
+ TurbineInfoDay turbine = turbineMap.get(benchmarkTurbine);
|
|
|
+ double turbineSsdl = turbine.getXdss() + turbine.getXnss() + turbine.getJhjxss() +
|
|
|
+ turbine.getFjhjxss() + turbine.getSlss();
|
|
|
+ double result = Math.round((currentSsdl - turbineSsdl / bl) * 100.0) / 100.0; // 保留两位小数
|
|
|
+
|
|
|
+ String resultText = String.format("%s号风机和标杆风机%s进行对比,损失电量差为%.2f万kWh",
|
|
|
+ topId, benchmarkTurbine, result);
|
|
|
+ resultTexts.add(resultText);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将结果文本合并为字符串并设置到 conclusion
|
|
|
+ fanBenchmark.setConclusion(String.join("; ", resultTexts));
|
|
|
|
|
|
// 放入最终的 map
|
|
|
map.put("cndb", fanBenchmark);
|