Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-devicemonitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3de00f5c
authored
Sep 13, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.23.0 添加设备定位和警情查询接口 添加设备类型参数返回
1 parent
1232d942
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/model/DeviceInformationDTO.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/model/DeviceInformationDTO.java
View file @
3de00f5
...
@@ -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记录
*/
*/
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
View file @
3de00f5
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment