Bläddra i källkod

电量除以10就行,不用除以100

hfxc226 1 månad sedan
förälder
incheckning
75903f1382

+ 6 - 6
platform-service/src/main/java/com/platform/service/big/impl/BigScreenSbInfoServiceImpl.java

@@ -200,8 +200,8 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
                                             positiveTotal = positiveTotal.subtract(new BigDecimal(lastR.get().getResult()));
                                         }
                                     }
-                                    totalDay = totalDay.add(positiveTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
-                                    dictJsonObject.put("positive", positiveTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue());
+                                    totalDay = totalDay.add(positiveTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP));
+                                    dictJsonObject.put("positive", positiveTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP).doubleValue());
                                 } else {
                                     negativeTotal = negativeTotal.add(new BigDecimal(degreeLog.getResult()));
                                     // 找到上个时间
@@ -217,7 +217,7 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
                                             negativeTotal = negativeTotal.subtract(new BigDecimal(lastR.get().getResult()));
                                         }
                                     }
-                                    dictJsonObject.put("negative", negativeTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue());
+                                    dictJsonObject.put("negative", negativeTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP).doubleValue());
                                 }
                             }
                         }
@@ -296,8 +296,8 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
                             }
                         }
                     }
-                    dictJsonObject.put("positive", positiveTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue());
-                    dictJsonObject.put("negative", negativeTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).doubleValue());
+                    dictJsonObject.put("positive", positiveTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP).doubleValue());
+                    dictJsonObject.put("negative", negativeTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP).doubleValue());
                     lineArray.add(dictJsonObject);
                 }
                 jsonObject.put("lines", lineArray);
@@ -367,7 +367,7 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
                                         positiveTotal = positiveTotal.subtract(new BigDecimal(lastR.get().getResult()));
                                     }
                                 }
-                                totalDay = totalDay.add(positiveTotal.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
+                                totalDay = totalDay.add(positiveTotal.divide(BigDecimal.valueOf(10), 2, RoundingMode.HALF_UP));
                             }
                         }
                     }