2 Commits 23717e8ff8 ... 33e149cc8a

Author SHA1 Message Date
  wangb 33e149cc8a Merge branch 'master' of http://39.101.69.29:3000/wangb/runeconomy-nx 1 week ago
  wangb c7da47cb19 单机性能分析-停机小时修改为 故障停机小时 1 week ago

+ 3 - 2
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineGoodnessDetailController.java

@@ -103,7 +103,7 @@ public class WindturbineGoodnessDetailController {
                 wtday.setRzdxs(NumberUtil.round(tb.getLxMin() / 60, 2).doubleValue());
                 wtday.setRyxfs(NumberUtil.round(tb.getYxfss(), 2).doubleValue());
                 wtday.setRssdl(NumberUtil.round((tb.getGzss() + tb.getSlss() + tb.getXdss() + tb.getJhjxss() + tb.getFjhjxss() + tb.getXnss()) / 1000, 2).doubleValue());
-                wtday.setRtjcs(NumberUtil.round(tb.getTjcs(), 2).doubleValue());
+                wtday.setRtjcs(NumberUtil.round(tb.getGzcs(), 2).doubleValue());
                 wtday.setRsbklyl(NumberUtil.round(tb.getKlyl(), 2).doubleValue());
                 wtday.setRpjwd(NumberUtil.round(tb.getHjwd(), 2).doubleValue());
                 wtday.setRbbhcs(NumberUtil.round(tb.getTjMin() / 60, 2).doubleValue());
@@ -116,7 +116,7 @@ public class WindturbineGoodnessDetailController {
                 wtday.setYjxxs(NumberUtil.round(ytb.getJxMin() / 60, 2).doubleValue());
                 wtday.setYzdxs(NumberUtil.round(ytb.getLxMin() / 60, 2).doubleValue());
                 wtday.setYyxfs(NumberUtil.round(ytb.getYxfss(), 2).doubleValue());
-                wtday.setYtjcs(NumberUtil.round(ytb.getTjcs(), 2).doubleValue());
+                wtday.setYtjcs(NumberUtil.round(ytb.getGzcs(), 2).doubleValue());
                 wtday.setYsbklyl(NumberUtil.round(ytb.getKlyl(), 2).doubleValue());
                 wtday.setYbbhcs(NumberUtil.round(ytb.getTjMin() / 60, 2).doubleValue());
                 wtday.setNfdl(NumberUtil.round(ntb.getRfdl() / 1000, 2).doubleValue());
@@ -128,6 +128,7 @@ public class WindturbineGoodnessDetailController {
                 wtday.setNzdxs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
                 wtday.setNdjxs(NumberUtil.round(ntb.getDjMin() / 60, 2).doubleValue());
                 wtday.setNyxfs(NumberUtil.round(ntb.getYxfss(), 2).doubleValue());
+                //停机小时
                 wtday.setNbbhcs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
             }
 

+ 16 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/ShutdownEvent2Service.java

@@ -1,5 +1,7 @@
 package com.gyee.runeconomy.service;
 
+import cn.hutool.core.date.DateUnit;
+import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.runeconomy.model.auto.ProEconShutdownEvent2;
@@ -9,6 +11,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.Date;
+import java.util.Iterator;
 
 @Service
 public class ShutdownEvent2Service {
@@ -41,6 +44,19 @@ public class ShutdownEvent2Service {
             proEconShutdownEvent2Service.page(pageInfo, queryWrapper);
         }
 
+        Iterator<ProEconShutdownEvent2> iterator = pageInfo.getRecords().iterator();
+        while (iterator.hasNext()) {
+            ProEconShutdownEvent2 record = iterator.next();
+            Date stopTime = record.getStopTime();
+            Date startTime = record.getStartTime();
+            long minutes = DateUtil.between(startTime, stopTime, DateUnit.MINUTE);
+
+            // 如果间隔小于 10 分钟,移除该记录
+            if (Math.abs(minutes) < 10) {
+                iterator.remove();
+            }
+        }
+
         return pageInfo;
 
     }