Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
2ccf1687
Commit
2ccf1687
authored
Mar 01, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备添加产品编码字段,并添加同步更新产品编码字段
parent
b6624288
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
.../java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
+0
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java
View file @
2ccf1687
...
@@ -47,7 +47,6 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
...
@@ -47,7 +47,6 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
List
<
DeviceEntity
>
deviceOfflineList
=
deviceList
.
parallelStream
().
map
(
item
->
{
List
<
DeviceEntity
>
deviceOfflineList
=
deviceList
.
parallelStream
().
map
(
item
->
{
if
(
ObjectUtils
.
isEmpty
(
item
.
getDeviceCode
()))
return
null
;
if
(
ObjectUtils
.
isEmpty
(
item
.
getDeviceCode
()))
return
null
;
boolean
exists
=
cacheService
.
exists
(
RedisKey
.
KEY_DEVICE_ONLINE_CACHE
+
item
.
getDeviceCode
());
boolean
exists
=
cacheService
.
exists
(
RedisKey
.
KEY_DEVICE_ONLINE_CACHE
+
item
.
getDeviceCode
());
log
.
info
(
"deviceCode:{},exists:{}"
,
item
.
getDeviceCode
(),
exists
);
if
(!
exists
)
{
if
(!
exists
)
{
item
.
setDeviceStatus
(
DeviceStatusEnum
.
离线
.
getValue
());
item
.
setDeviceStatus
(
DeviceStatusEnum
.
离线
.
getValue
());
item
.
setOfflineTime
(
new
Date
());
item
.
setOfflineTime
(
new
Date
());
...
@@ -58,7 +57,6 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
...
@@ -58,7 +57,6 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
deviceOfflineList
))
{
if
(!
ObjectUtils
.
isEmpty
(
deviceOfflineList
))
{
log
.
info
(
"修正设备数量:size:{}"
,
deviceOfflineList
.
size
());
log
.
info
(
"修正设备数量:size:{}"
,
deviceOfflineList
.
size
());
deviceService
.
update
(
deviceOfflineList
);
deviceService
.
update
(
deviceOfflineList
);
deviceOfflineList
.
forEach
(
deviceEntity
->
{
deviceOfflineList
.
forEach
(
deviceEntity
->
{
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment