Commit 006972ee authored by caotao's avatar caotao

1.风机实时运行数据排序未生效问题处理

parent 867d8dde
......@@ -254,6 +254,17 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeMap.put("systemType", systemType);
}
List<ESEquipments> result = commonServiceImpl.getListDataByCondtionsAndLike(queryCondtion, null, ESEquipments.class, likeMap);
List<String> powerOther = Arrays.asList("月发电量", "年发电量", "总发电量");
if (!stationBasic.getStationType().equals("FDZ")) {
result.forEach(esEquipments -> {
if (esEquipments.getEquipmentIndexName().equals("日发电量")) {
esEquipments.setValue(String.format(CommonConstans.Fourdecimalplaces, Double.valueOf(esEquipments.getValue()) * CommonConstans.pvGenPoweActor * CommonConstans.pvGenPoweActorDay));
}
if (powerOther.contains(esEquipments.getEquipmentIndexName())) {
esEquipments.setValue(String.format(CommonConstans.Fourdecimalplaces, Double.valueOf(esEquipments.getValue()) * CommonConstans.pvGenPoweActorCurrentData));
}
});
}
result.stream().forEach(e -> {
e.setValue(String.format(CommonConstans.Twodecimalplaces, e.getValueF()));
});
......@@ -271,17 +282,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
.skip((long) (current - 1) * size)
.limit(size)
.collect(Collectors.toList());
List<String> powerOther = Arrays.asList("月发电量", "年发电量", "总发电量");
if (!stationBasic.getStationType().equals("FDZ")) {
collect.forEach(esEquipments -> {
if (esEquipments.getEquipmentIndexName().equals("日发电量")) {
esEquipments.setValue(String.format(CommonConstans.Fourdecimalplaces, Double.valueOf(esEquipments.getValue()) * CommonConstans.pvGenPoweActor * CommonConstans.pvGenPoweActorDay));
}
if (powerOther.contains(esEquipments.getEquipmentIndexName())) {
esEquipments.setValue(String.format(CommonConstans.Fourdecimalplaces, Double.valueOf(esEquipments.getValue()) * CommonConstans.pvGenPoweActorCurrentData));
}
});
}
page.setTotal(result.size());
page.setRecords(collect);
return page;
......
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