diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java index 52b65fbd..5a4adb7a 100644 --- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java +++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java @@ -86,7 +86,7 @@ public class StatusController extends BaseController { Map mapSort=new TreeMap<>(); for (Map.Entry> entry : mapTime.entrySet()) { List groupItems = entry.getValue(); - long count = groupItems.stream().filter(iteam -> iteam.getDeviceStatus() == "1").count(); + long count = groupItems.stream().filter(iteam -> Objects.equals(iteam.getDeviceStatus(), "1")).count(); String onlineRate=String.format("%.2f%%", (double) count / groupItems.size() * 100); mapSort.put(entry.getKey(),onlineRate); }