Browse Source

经济运行性能损失率、限电损失率bug

xushili 2 years ago
parent
commit
e62f9acfad

+ 5 - 5
benchmarking-impala/src/main/java/com/gyee/benchmarkingimpala/service/BenchmarkingService.java

@@ -2341,11 +2341,11 @@ public class BenchmarkingService  {
                 "sum(daynhxdssdl) daynhxdssdl," +
                 "sum(daynhqfdl) daynhqfdl," +
                 "sum(daynhcfdl) daynhcfdl, " +
-                "nullif(sum(actualpower),0)/nullif(sum(theoreticalpower),1)*100 windenergy, " +
-                "nullif(sum(daynhxdssdl),0)/nullif(sum(theoreticalpower),1)*100 powerlossrate, " +
-                "nullif(sum(daynhqfdl),0)/nullif(sum(theoreticalpower),1)*100 performancelossrate, " +
-                "nullif(sum(daynhgzssdl),0)/nullif(sum(theoreticalpower),1)*100 failurelossrate, " +
-                "nullif(sum(daynhwhssdl),0)/nullif(sum(theoreticalpower),1)*100 mainlossrate," +
+                "nvl(sum(actualpower),0)/nvl(sum(theoreticalpower),1)*100 windenergy, " +
+                "nvl(sum(daynhxdssdl),0)/nvl(sum(theoreticalpower),1)*100 powerlossrate, " +
+                "nvl(sum(daynhqfdl),0)/nvl(sum(theoreticalpower),1)*100 performancelossrate, " +
+                "nvl(sum(daynhgzssdl),0)/nvl(sum(theoreticalpower),1)*100 failurelossrate, " +
+                "nvl(sum(daynhwhssdl),0)/nvl(sum(theoreticalpower),1)*100 mainlossrate," +
                 "avg(comprehensiverate) comprehensiverate,sum(actualpower)/avg(capacity) utilizationhours," +
                 "avg(windpoweraccuracy) windpoweraccuracy," +
                 "avg(agccurvefollowing) agccurvefollowing," +

+ 2 - 10
benchmarking-impala/src/main/java/com/gyee/benchmarkingimpala/task/SaticScheduleTask.java

@@ -1,22 +1,14 @@
 package com.gyee.benchmarkingimpala.task;
 
 
-
-import com.gyee.benchmarkingimpala.model.auto.Operationrecord;
 import com.gyee.benchmarkingimpala.service.BenchmarkingService;
 import com.gyee.benchmarkingimpala.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
 
-import java.text.ParseException;
 import java.util.Date;
-import java.util.List;
 
 /**
  * @ClassName : SaticScheduleTask
@@ -37,7 +29,7 @@ public class SaticScheduleTask {
     @Scheduled(cron = "0 0 1 * * ?")
     //或直接指定时间间隔,例如:5秒
     //@Scheduled(fixedRate=5000)
-    private void configureTasks1()  {
+    public void configureTasks1()  {
         Date yestday = DateUtils.getYestday(new Date());
         String date = DateUtils.toDate1(yestday);
         String data1 = DateUtils.toDate1(new Date());
@@ -58,7 +50,7 @@ public class SaticScheduleTask {
     @Scheduled(cron = "0 0 4 * * ?")
     //或直接指定时间间隔,例如:5秒
     //@Scheduled(fixedRate=5000)
-    private void configureTasks2()  {
+    public void configureTasks2()  {
         Date yestday = DateUtils.getYestday(new Date());
         String date = DateUtils.toDate1(yestday);
         String data1 = DateUtils.toDate1(new Date());