qiangxuan 6 сар өмнө
parent
commit
2b2d5d3cfd

+ 3 - 5
jeecg-module-gather/src/main/java/org/jeecg/modules/fpgJob/LeanModelStatistics.java

@@ -180,7 +180,7 @@ public class LeanModelStatistics {
                     // 功率
                     BigDecimal runPower = fpgGatherData.getActivePower();
                     // 运行时常
-                    BigDecimal runTime = new BigDecimal("3000");
+                    BigDecimal runTime = new BigDecimal("300");
                     // 电流
                     BigDecimal selectricCurrent = fpgGatherData.getRunCurrent();
                     // 设备启停统计 start
@@ -401,7 +401,7 @@ public class LeanModelStatistics {
                         BigDecimal activePower = fpgGatherData.getActivePower() == null ? new BigDecimal("0.00") : fpgGatherData.getActivePower().divide(new BigDecimal("12"));
                         // 电流
                         BigDecimal selectricCurrent = fpgGatherData.getRunCurrent() == null ? new BigDecimal("0.00") : fpgGatherData.getRunCurrent();
-                        BigDecimal runTime = new BigDecimal("3000");
+                        BigDecimal runTime = new BigDecimal("300");
                         BigDecimal oldPower = fpgStatiscsModelMongo.getPower() == null ? new BigDecimal("0.00") : fpgStatiscsModelMongo.getPower();
                         BigDecimal oldingTime = fpgStatiscsModelMongo.getIngTime() == null ? new BigDecimal("0.00") : fpgStatiscsModelMongo.getIngTime();
                         // 总运行时间处理
@@ -505,9 +505,7 @@ public class LeanModelStatistics {
             });
         });
         // 数据处理完成标记已完成信息,以免重复处理
-        fpgGatherUpdateList.forEach(fpgGatherData -> {
-            fpgGatherDataService.updateById(fpgGatherData);
-        });
+        fpgGatherDataService.updateBatchById(fpgGatherUpdateList);
     }
 
     /**