فهرست منبع

调整存储位数 功率

guoqiang 3 ماه پیش
والد
کامیت
af6a858b31
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      jeecg-module-gather/src/main/java/org/jeecg/modules/fpgJob/LeanModelStatistics.java

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

@@ -202,7 +202,7 @@ public class LeanModelStatistics {
                         }
                     });
                     // 功率
-                    BigDecimal runPower = fpgGatherData.getActivePower().compareTo(new BigDecimal("0.00")) > 0 ? fpgGatherData.getActivePower().divide(new BigDecimal(12), 8, RoundingMode.HALF_UP) : new BigDecimal("0.00");
+                    BigDecimal runPower = fpgGatherData.getActivePower().compareTo(new BigDecimal("0.00")) > 0 ? fpgGatherData.getActivePower().divide(new BigDecimal(12), 12, RoundingMode.HALF_UP) : new BigDecimal("0.00");
                     // 占比
                     BigDecimal proportion = new BigDecimal("0.00");
                     // 运行时常
@@ -517,7 +517,7 @@ public class LeanModelStatistics {
                     }
                     FpgStatiscsModelMongodb fpgStatiscsModelMongo = mongoTemplate.findOne(query, FpgStatiscsModelMongodb.class, collectionName);
                     // 功率 5 分钟上报一次  除以 12
-                    BigDecimal activePower =  fpgGatherData.getActivePower().compareTo(new BigDecimal("0.00")) > 0 ? fpgGatherData.getActivePower().divide(new BigDecimal("12"), 8, RoundingMode.HALF_UP) : new BigDecimal("0.00");
+                    BigDecimal activePower =  fpgGatherData.getActivePower().compareTo(new BigDecimal("0.00")) > 0 ? fpgGatherData.getActivePower().divide(new BigDecimal("12"), 12, RoundingMode.HALF_UP) : new BigDecimal("0.00");
                     // 电流
                     BigDecimal selectricCurrent = fpgGatherData.getRunCurrent() == null ? new BigDecimal("0.00") : fpgGatherData.getRunCurrent();
                     // 运行时常