Explorar o código

gps为0过滤

lmstack %!s(int64=3) %!d(string=hai) anos
pai
achega
32c65ffa95

+ 2 - 1
src/main/java/com/lm/lib/controller/ShowDataController.java

@@ -80,7 +80,8 @@ public Map<String, Object> gpsInfo() throws IOException {
         List<Object> data = new ArrayList<>();
         realtimeData.forEach(p->{
             Map<String, Object> thisData = new HashMap<>();
-            if (ObjectUtils.isEmpty(p.get("latitude"))) return;
+            if (ObjectUtils.isEmpty(p.get("latitude")) ||
+                    (((Integer)Integer.parseInt(p.get("latitude").toString())).equals(0)&&  ((Integer)(Integer.parseInt(p.get("longitude").toString()))).equals(0))) return;
             if (!snList.contains(p.get("devcode"))) return;
             thisData.put("latitude", p.getOrDefault("latitude", null));
             thisData.put("longitude", p.getOrDefault("longitude", null));