Commit fb8231f9 by 杨林龙

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

1 parent e19b81c6
...@@ -347,8 +347,11 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -347,8 +347,11 @@ 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)) {
// 判断如果经纬度为无效值,则不设置值
if (Float.parseFloat(gpsLocation.getLng()) != 0.0 || Float.parseFloat(gpsLocation.getLat()) != 0.0) {
deviceInformationDTO.setLastOneGPSRecord(buildGpsLocationDTO(gpsLocation)); deviceInformationDTO.setLastOneGPSRecord(buildGpsLocationDTO(gpsLocation));
} }
}
if (Objects.nonNull(gpsLocation)) { if (Objects.nonNull(gpsLocation)) {
// 获取最后一个GPS位置点的时间 // 获取最后一个GPS位置点的时间
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!