|
@@ -2418,7 +2418,26 @@ public class BenchmarkingService {
|
|
|
}
|
|
|
public void getTb(String timetype, String foreigntype,List<Benchmark> resultList) throws Exception {
|
|
|
QueryWrapper<Benchmark> qw = new QueryWrapper<>();
|
|
|
- qw.select("max(foreignkeyid) foreignkeyid,sum(theoreticalpower) theoreticalpower,sum(actualpower) actualpower,sum(daynhgzssdl) daynhgzssdl,sum(daynhwhssdl) daynhwhssdl,sum(daynhxdssdl) daynhxdssdl,sum(daynhqfdl) daynhqfdl,sum(daynhcfdl) daynhcfdl,sum(actualpower)/sum(theoreticalpower)*100 windenergy,sum(daynhxdssdl)/sum(theoreticalpower)*100 powerlossrate,sum(daynhqfdl)/sum(theoreticalpower)*100 performancelossrate,sum(daynhgzssdl)/sum(theoreticalpower)*100 failurelossrate,sum(daynhwhssdl)/sum(theoreticalpower)*100 mainlossrate,avg(resettimelyrate) resettimelyrate,avg(statetransitionrate) statetransitionrate,avg(eliminationrate) eliminationrate,avg(comprehensiverate) comprehensiverate,avg(windpoweraccuracy) windpoweraccuracy,avg(agccurvefollowing) agccurvefollowing");
|
|
|
+
|
|
|
+ qw.select("max(foreignkeyid) foreignkeyid," +
|
|
|
+ "sum(theoreticalpower) theoreticalpower," +
|
|
|
+ "sum(actualpower) actualpower," +
|
|
|
+ "sum(daynhgzssdl) daynhgzssdl," +
|
|
|
+ "sum(daynhwhssdl) daynhwhssdl," +
|
|
|
+ "sum(daynhxdssdl) daynhxdssdl," +
|
|
|
+ "sum(daynhqfdl) daynhqfdl," +
|
|
|
+ "sum(daynhcfdl) daynhcfdl," +
|
|
|
+ "CASE WHEN sum(theoreticalpower) = 1 THEN 0 ELSE sum(actualpower)/sum(theoreticalpower)*100 END AS windenergy," +
|
|
|
+ "CASE WHEN sum(theoreticalpower) = 1 THEN 0 ELSE sum(daynhxdssdl)/sum(theoreticalpower)*100 END AS powerlossrate," +
|
|
|
+ "CASE WHEN sum(theoreticalpower) = 1 THEN 0 ELSE sum(daynhqfdl)/sum(theoreticalpower)*100 END AS performancelossrate," +
|
|
|
+ "CASE WHEN SUM ( theoreticalpower ) = 0 THEN 0 ELSE SUM ( daynhgzssdl ) / SUM ( theoreticalpower ) * 100 END AS failurelossrate,"+
|
|
|
+ "CASE WHEN SUM ( theoreticalpower ) = 0 THEN 0 ELSE SUM ( daynhwhssdl ) / SUM ( theoreticalpower ) * 100 END AS mainlossrate," +
|
|
|
+ "avg(resettimelyrate) resettimelyrate," +
|
|
|
+ "avg(statetransitionrate) statetransitionrate," +
|
|
|
+ "avg(eliminationrate) eliminationrate," +
|
|
|
+ "avg(comprehensiverate) comprehensiverate," +
|
|
|
+ "avg(windpoweraccuracy) windpoweraccuracy," +
|
|
|
+ "avg(agccurvefollowing) agccurvefollowing");
|
|
|
if (foreigntype.equals("风电")){
|
|
|
qw.like("foreignkeyid","_FDC");
|
|
|
}else {
|