|
|
@ -86,7 +86,7 @@ public class StatusController extends BaseController { |
|
|
|
Map<String,String> mapSort=new TreeMap<>(); |
|
|
|
for (Map.Entry<String, List<Status>> entry : mapTime.entrySet()) { |
|
|
|
List<Status> 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); |
|
|
|
} |
|
|
|