Newspaper 1 год назад
Родитель
Сommit
42ef4763ef

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/Timer/DeviceOnlineTimer.java

@@ -38,7 +38,7 @@ public class DeviceOnlineTimer implements CommonTimerTaskRunner {
             Integer total = deviceOff+deviceOn;
             LocalDateTime now = LocalDateTime.now();
             try {
-                rate = (deviceOn/total)*100;
+                rate = ((float)deviceOn/(float)total)*100;
             }catch (ArithmeticException e){
                 System.out.println(e);
             }