|
@@ -39,6 +39,8 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.DoubleStream;
|
|
|
|
|
|
+import static java.lang.Math.abs;
|
|
|
+
|
|
|
@Api(tags = {"大屏页面"})
|
|
|
@Slf4j
|
|
|
@RestController
|
|
@@ -81,7 +83,7 @@ public Map<String, Object> gpsInfo() throws IOException {
|
|
|
realtimeData.forEach(p->{
|
|
|
Map<String, Object> thisData = new HashMap<>();
|
|
|
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;
|
|
|
+ ((abs(Double.parseDouble(p.get("latitude").toString()))) < 0.0001 && (abs(Double.parseDouble(p.get("longitude").toString()))) < 0.0001)) return;
|
|
|
if (!snList.contains(p.get("devcode"))) return;
|
|
|
thisData.put("latitude", p.getOrDefault("latitude", null));
|
|
|
thisData.put("longitude", p.getOrDefault("longitude", null));
|