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
386abac8
Commit
386abac8
authored
Mar 22, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改校验
parent
81563edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
device-manager/src/main/java/com/mortals/xhx/module/sitestat/service/impl/SitestatServiceImpl.java
...xhx/module/sitestat/service/impl/SitestatServiceImpl.java
+18
-4
No files found.
device-manager/src/main/java/com/mortals/xhx/module/sitestat/service/impl/SitestatServiceImpl.java
View file @
386abac8
...
@@ -11,6 +11,7 @@ import com.mortals.framework.model.PageInfo;
...
@@ -11,6 +11,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.xhx.common.code.DeviceStatusEnum
;
import
com.mortals.xhx.common.code.DeviceStatusEnum
;
import
com.mortals.xhx.common.code.EnabledEnum
;
import
com.mortals.xhx.common.code.PlatformTypeEnum
;
import
com.mortals.xhx.common.code.PlatformTypeEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.key.ErrorCode
;
import
com.mortals.xhx.common.key.ErrorCode
;
...
@@ -285,10 +286,23 @@ public class SitestatServiceImpl extends AbstractCRUDCacheServiceImpl<SitestatDa
...
@@ -285,10 +286,23 @@ public class SitestatServiceImpl extends AbstractCRUDCacheServiceImpl<SitestatDa
//分别统计数据
//分别统计数据
entity
.
setDeviceTotal
(
deviceList
.
size
());
entity
.
setDeviceTotal
(
deviceList
.
size
());
Long
onlineCount
=
deviceList
.
stream
().
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
在线
.
getValue
()).
count
();
Long
onlineCount
=
deviceList
.
stream
()
Long
offlineCount
=
deviceList
.
stream
().
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
离线
.
getValue
()).
count
();
.
filter
(
f
->
f
.
getDeviceStatus
()
>
DeviceStatusEnum
.
未激活
.
getValue
())
Long
unActiveCount
=
deviceList
.
stream
().
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
未激活
.
getValue
()).
count
();
.
filter
(
f
->
f
.
getEnabled
()
==
EnabledEnum
.
启用
.
getValue
())
Long
stopCount
=
deviceList
.
stream
().
filter
(
f
->
f
.
getEnabled
()
==
YesNoEnum
.
NO
.
getValue
()).
count
();
.
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
在线
.
getValue
())
.
count
();
Long
offlineCount
=
deviceList
.
stream
()
.
filter
(
f
->
f
.
getDeviceStatus
()
>
DeviceStatusEnum
.
未激活
.
getValue
())
.
filter
(
f
->
f
.
getEnabled
()
==
EnabledEnum
.
启用
.
getValue
())
.
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
离线
.
getValue
())
.
count
();
Long
unActiveCount
=
deviceList
.
stream
()
.
filter
(
f
->
f
.
getDeviceStatus
()
==
DeviceStatusEnum
.
未激活
.
getValue
())
.
count
();
Long
stopCount
=
deviceList
.
stream
()
.
filter
(
f
->
f
.
getDeviceStatus
()
>
DeviceStatusEnum
.
未激活
.
getValue
())
.
filter
(
f
->
f
.
getEnabled
()
==
YesNoEnum
.
NO
.
getValue
())
.
count
();
entity
.
setOnlineCount
(
onlineCount
.
intValue
());
entity
.
setOnlineCount
(
onlineCount
.
intValue
());
entity
.
setOfflineCount
(
offlineCount
.
intValue
());
entity
.
setOfflineCount
(
offlineCount
.
intValue
());
...
...
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