소스 검색

调整存储位数 功率

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();
                     // 运行时常