xushili 1 ماه پیش
والد
کامیت
353139a59e

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 992 - 149
ruoyi-admin/src/main/java/com/ruoyi/web/controller/JavaFunctionJobHandler.java


+ 125 - 35
ruoyi-admin/src/test/java/com/ruoyi/NewTests.java

@@ -27,10 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
 import javax.swing.*;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @SpringBootTest//classes = RuoYiApp.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT
@@ -62,11 +59,14 @@ public class NewTests {
         //example.setLocationRelativeTo(null);
         //example.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
         //example.setVisible(true);
-        List<Double> xdl = new ArrayList<>();
-        xdl.add(0.0);
-        Double v = xdl.get(0);
-        v = v + 3;
-        System.out.println(xdl.get(0));
+        //List<Double> xdl = new ArrayList<>();
+        //xdl.add(0.0);
+        //Double v = xdl.get(0);
+        //v = v + 3;
+        //int i = DateUtil.endOfMonth(DateUtil.date()).dayOfMonth();
+        Map<String, String> map = new HashMap<>();
+        Set<String> strings = map.keySet();
+        System.out.println();
     }
 
     private static void aadd(SFunction<TurbineInfoDay, String> a) {
@@ -227,7 +227,7 @@ public class NewTests {
     public void test4() {
                 while (true){
                     task.calcStationRealtimeLLgl();
-                    ThreadUtil.sleep(6000);
+                    ThreadUtil.sleep(1000);
                 }
         //DateTime start = DateUtil.parse("2023-12-01");
         //DateTime end = DateUtil.parse("2023-12-01");
@@ -255,15 +255,15 @@ public class NewTests {
         //        task.calcStationRjhfdl(date);
         //        task.calcKhfs(date);
 
-        task.calcTurbine5s2(date);
+        //task.calcTurbine5s2(date);
         //风机状态时间
         task.calcTurbineStateMin(date);
-        task.writeReportPool5SPjfsLlfdlZtsj(date);
+        //task.writeReportPool5SPjfsLlfdlZtsj(date);
         //风机日切入
-        task.cutInWindSpeed(date);
+        //task.cutInWindSpeed(date);
         //风机日额定风速
-        task.calcGlqxnh_edfs(date);
-        task.calcPredictExamin2(date);
+        //task.calcGlqxnh_edfs(date);
+        //task.calcPredictExamin2(date);
     }
 
     @Test
@@ -342,29 +342,26 @@ public class NewTests {
         //task.calcStationZhcyRfDlSameDay();
         //task.calcLineSwGWCyDlSameDay();
         //task.calcTurbine5s2_ha(date);
-        task.calcStationRfdlFj(date);
-        task.calcHaBbHz(date);
-        //task.calcHaBbHzSs();
-        //task.calcHaBbHzSs(date);
+        //task.calcStationRfdlFj(date);
+        //task.calcLineRfdl_ha(date);
+        //task.haxdRecalc(date);
+        task.calcStationZhcyRfDl_ha(date);
+        //task.calcHaBbHz(date);
     }
 
     @Test
     public void test10() {
-        //        DateTime date = DateUtil.date();
-        // 创建日期范围生成器
-        DateTime start = DateUtil.parse("2025-02-02");
-        DateTime end = DateUtil.parse("2025-02-24");
+        DateTime start = DateUtil.parse("2025-03-27");
+        DateTime end = DateUtil.parse("2025-04-02");
         DateRange range = DateUtil.range(start, end, DateField.DAY_OF_YEAR);
         for (DateTime date : range) {
-            //System.out.println(DateUtil.date() + ":" + date);
+            System.out.println(DateUtil.date() + ":" + date);
             //
             //task.calcTurbineRFDL_ha(date);
-            //task.calcLineRfdl_ha(date);
+            task.calcLineRfdl_ha(date);
             //
             ////上网购网厂用电量
             //task.calcStationSwGwCyRdl_ha(date);
-            ////计算综合厂用电量
-            //task.calcStationZhcyRfDl(date);
             ////风机日环境温度
             //task.ambientTemperature(date);
             ////计算日发电量--风机汇总方式
@@ -382,21 +379,23 @@ public class NewTests {
             //task.calcGlqxnh_edfs(date);
             ////计算惠安报表汇总实时
             //task.calcStationCftfsfxQfxdl(date);
-            //task.calcMeterDlHdl(date);
             //task.calcStationKqmd(date);
             //
             //task.calcStationKydlzql(date);
             //task.calcTurbineJfplFxYxfssBll(date);
-            //task.calcTurbineLyxs(date);
+            //task.calcTurbineLyxs2(date,10);
+
             //task.calcMeterDlHdl(date);
             //DateTime t2 = DateUtil.offsetMinute(date,-1);
             //DateTime t1 = DateUtil.beginOfDay(t2);
             DateTime b1 = DateUtil.offsetDay(date, -1);
             DateTime b2 = DateUtil.endOfDay(b1);
+            ////计算综合厂用电量
+            //task.calcStationZhcyRfDl_ha(b1, b2);
             //task.calcTurbineRFDL(t1, t2);
             //task.calcStationRfdlFj(b1);
             task.calcHaBbHz(date);
-            //task.calcHaBbHzSs(b1, b2);
+            task.calcHaBbHzSs(b1, b2);
             //task.calcRYNxdl(b, date);
 
             //task.calcTurbineStateMin(date);
@@ -432,7 +431,7 @@ public class NewTests {
         //DateTime begin = DateUtil.beginOfDay(end);
         //task.calcTurbineRFDL(begin, end);
         //task.calcTurbineStateMin(begin, end);
-        task.calcTurbine5s(begin, end, 0.1);
+        //task.calcTurbine5s(begin, end, 0.1);
         //task.calcTurbineLyxs(begin);
         //task.calcStationCftfsfxQfxdl(begin, end);
         //task.calcTurbineJfplFxYxfssBll(begin, end);
@@ -450,13 +449,44 @@ public class NewTests {
 
     @Test
     public void test15() {
-        DateTime begin = DateUtil.parse("2025-01-01");
-        DateTime end = DateUtil.parse("2025-01-19");
+        DateTime begin = DateUtil.parse("2025-06-01");
+        DateTime end = DateUtil.parse("2025-06-05");
         DateRange range = DateUtil.range(begin, end, DateField.DAY_OF_YEAR);
         for (DateTime begin1 : range) {
             DateTime end1 = DateUtil.endOfDay(begin1);
+            DateTime date = DateUtil.offsetDay(begin1,1);
+            //task.calcStationSwGwCyRdl_ha(date);
+            //task.abc(begin1);
             //task.calcTurbineLyxs(begin1, 10);
-            task.calcRYNxdl(begin1, end1);
+            //task.calcRYNxdl(begin1, end1);
+            //task.calcMtMonth(end1);
+
+            //task.haxdRecalc(date);
+            //task.calcStationRfdlFj(begin1);
+            //task.acc(begin1);
+
+            //task.calcMeterDlHdl(date);
+
+
+            //task.calcStationKqmd(date);
+            //task.calcTurbineJfplFxYxfssBll(date);
+            //task.calcStationKydlzql(date);
+            //task.calcStationCftfsfxQfxdl(date);
+            //task.calcTurbineStateMin(date);
+            //task.haxdRecalc(date);
+            //task.calcTurbine5s(begin1, end1, 0.1);
+
+            //task.calcLineRfdl_ha(date);
+            //task.haxdRecalc(date);
+            //task.calcStationZhcyRfDl_ha(date);
+            task.calcHaBbHzSs(begin1, end1);
+            //区域集控.惠安风场.一期本期故障损失电量
+            task.calcHaBbHz(date);
+
+            //task.calcStationZhcyRfDl_ha(date);
+            task.calcTurbineRFDL(begin1, end1);
+            //task.getIsFubing(begin1, end1);
+
         }
     }
 
@@ -500,8 +530,68 @@ public class NewTests {
 
     @Test
     public void test17() {
-        DateTime begin = DateUtil.parse("2025-02-23");
+        DateTime begin = DateUtil.parse("2025-05-05");
         DateTime end = DateUtil.endOfDay(begin);
         task.calcTurbine5s(begin, end, 0.1);
+        //task.calcHaBbHzSs(begin, end);
+    }
+
+    @Test
+    public void test18() {
+        //task.abc();
+        DateTime parse = DateUtil.parse("2025-05-22");
+        //task.calcCzRxd2(DateUtil.beginOfDay(parse), DateUtil.endOfDay(parse));
+        task.haxdRecalc(parse);
+        task.calcHaBbHz(parse);
+        //task.calcStationKydlzql(parse);
     }
+
+    @Test
+    public void test19() {
+        DateTime begin0 = DateUtil.parse("2025-05-16");
+        DateTime end0 = DateUtil.parse("2025-05-18");
+        DateRange range = DateUtil.range(begin0, end0, DateField.DAY_OF_YEAR);
+        for (DateTime begin : range) {
+            DateTime end = DateUtil.endOfDay(begin);
+            DateTime date = DateUtil.offsetDay(begin,1);
+
+            task.calcTurbineRFDL_ha(date);
+
+            task.calcLineRfdl_ha(date);
+
+            //上网购网厂用电量
+            task.calcStationSwGwCyRdl_ha(date);
+            //计算综合厂用电量
+            task.calcStationZhcyRfDl_ha(begin,end);
+            //风机日环境温度
+            //task.ambientTemperature();
+            //计算日发电量--风机汇总方式
+            task.calcStationRfdlFj(date);
+
+            task.calcLineSwGWCyDl(date);
+
+            task.calcTurbine5s(begin, end, 0.1);
+            //风机状态时间
+            task.calcTurbineStateMin(date);
+            //计算惠安报表汇总实时
+            task.calcMeterDlHdl(date);
+            task.calcStationKqmd(date);
+
+            task.calcStationKydlzql(date);
+            task.calcTurbineJfplFxYxfssBll(date);
+            task.calcTurbineLyxs(begin, 10);
+            task.haxdRecalc(date);
+            task.calcStationCftfsfxQfxdl(date);
+            task.calcHaBbHz(date);
+
+            task.calcHaBbHzSs(begin, end);
+            task.calcMtMonth(end);
+
+            //风机日切入
+            //task.cutInWindSpeed();
+            //风机日额定风速
+            //task.calcGlqxnh_edfs();
+        }
+    }
+
 }

+ 10 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/entity/PowerLosses.java

@@ -32,4 +32,14 @@ public class PowerLosses implements Serializable {
     private Date endTime;
 
     private Double xdss;
+
+    private Double fdl;
+
+    private Double pjfs;
+
+    private String stationId;
+
+    private String turbineId;
+
+    private String item;
 }