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 fad5cb1b
authored
Nov 06, 2024
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.76.0 车辆运行状态时长计算问题修复
1 parent
be501126
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/DeviceServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/DeviceServiceImpl.java
View file @
fad5cb1
...
@@ -153,6 +153,8 @@ public class DeviceServiceImpl implements DeviceService {
...
@@ -153,6 +153,8 @@ public class DeviceServiceImpl implements DeviceService {
}
}
List
<
DeviceLocation
>
locationList
=
deviceLocationMapper
.
selectBySns
(
snsMap
.
keySet
());
List
<
DeviceLocation
>
locationList
=
deviceLocationMapper
.
selectBySns
(
snsMap
.
keySet
());
List
<
Device
>
devices
=
deviceMapper
.
selectBySns
(
snsMap
.
keySet
());
Map
<
String
,
Device
>
snDeviceMap
=
devices
.
stream
().
collect
(
Collectors
.
toMap
(
Device:
:
getSn
,
device
->
device
));
Map
<
String
,
DeviceLocation
>
loginDtoMap
=
locationList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLocation:
:
getSn
,
location
->
location
));
Map
<
String
,
DeviceLocation
>
loginDtoMap
=
locationList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLocation:
:
getSn
,
location
->
location
));
...
@@ -161,6 +163,12 @@ public class DeviceServiceImpl implements DeviceService {
...
@@ -161,6 +163,12 @@ public class DeviceServiceImpl implements DeviceService {
if
(
deviceLogin
==
null
)
{
if
(
deviceLogin
==
null
)
{
return
;
return
;
}
}
Date
stayStatusUpdatetime
=
deviceLogin
.
getStayStatusUpdatetime
();
if
(
Objects
.
isNull
(
stayStatusUpdatetime
))
{
deviceLogin
.
setStayStatusUpdatetime
(
snDeviceMap
.
get
(
sn
).
getActivateTime
());
}
statusModels
.
add
(
DeviceUtils
.
parseDeviceStatus
(
deviceLogin
,
deviceType
,
offlineTime
));
statusModels
.
add
(
DeviceUtils
.
parseDeviceStatus
(
deviceLogin
,
deviceType
,
offlineTime
));
});
});
return
statusModels
;
return
statusModels
;
...
...
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