Commit fb8231f9 by 杨林龙

1.23.0 添加设备定位和警情查询接口 优化无效定位

1 parent e19b81c6
...@@ -347,7 +347,10 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -347,7 +347,10 @@ public class MonitorServiceImpl implements MonitorService {
// 根据设备号和类型查询最后一个位置点 // 根据设备号和类型查询最后一个位置点
DataGpsLocation gpsLocation = hdaoGpsComponent.getDeviceLastGpsInfo(sn, deviceTypeRelationEnum); DataGpsLocation gpsLocation = hdaoGpsComponent.getDeviceLastGpsInfo(sn, deviceTypeRelationEnum);
if (Objects.nonNull(gpsLocation)) { if (Objects.nonNull(gpsLocation)) {
deviceInformationDTO.setLastOneGPSRecord(buildGpsLocationDTO(gpsLocation)); // 判断如果经纬度为无效值,则不设置值
if (Float.parseFloat(gpsLocation.getLng()) != 0.0 || Float.parseFloat(gpsLocation.getLat()) != 0.0) {
deviceInformationDTO.setLastOneGPSRecord(buildGpsLocationDTO(gpsLocation));
}
} }
if (Objects.nonNull(gpsLocation)) { if (Objects.nonNull(gpsLocation)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!