Commit 3de00f5c by 杨林龙

1.23.0 添加设备定位和警情查询接口 添加设备类型参数返回

1 parent 1232d942
...@@ -18,6 +18,12 @@ import java.util.List; ...@@ -18,6 +18,12 @@ import java.util.List;
*/ */
@Data @Data
public class DeviceInformationDTO { public class DeviceInformationDTO {
/**
* 设备类型
*/
private Integer source;
/** /**
* 最新一条GPS记录 * 最新一条GPS记录
*/ */
......
...@@ -436,10 +436,24 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -436,10 +436,24 @@ public class MonitorServiceImpl implements MonitorService {
deviceInformationDTO.setLastThreePowerOffRecord(powerOffAlarmDTOList); deviceInformationDTO.setLastThreePowerOffRecord(powerOffAlarmDTOList);
} }
// 封装设备组合类型
Device device = deviceService.getBySn(sn);
deviceInformationDTO.setSource(buildDeviceSource(sn));
return deviceInformationDTO; return deviceInformationDTO;
} }
/** /**
* 封装设备组合类型
*/
private Integer buildDeviceSource(String sn) {
Device device = deviceService.getBySn(sn);
if (Objects.nonNull(device)) {
return device.getSource();
}
return null;
}
/**
* 构建GPS数据 * 构建GPS数据
*/ */
private GpsLocationDTO buildGpsLocationDTO(DataGpsLocation gpsLocation) { private GpsLocationDTO buildGpsLocationDTO(DataGpsLocation gpsLocation) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!