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
b05ad7e1
Commit
b05ad7e1
authored
May 30, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加智慧办公回调信息
parent
1e4521b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
...ortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
+1
-1
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceAlarmInfoServiceImpl.java
...odule/device/service/impl/DeviceAlarmInfoServiceImpl.java
+4
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
View file @
b05ad7e1
...
...
@@ -70,7 +70,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
DeviceAlarmInfoEntity
)
{
DeviceAlarmInfoEntity
tmp
=
(
DeviceAlarmInfoEntity
)
obj
;
if
(
this
.
getAlarmDevice
()
==
tmp
.
getAlarmDevice
(
))
{
if
(
this
.
getAlarmDevice
()
.
equals
(
tmp
.
getAlarmDevice
()
))
{
return
true
;
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceAlarmInfoServiceImpl.java
View file @
b05ad7e1
...
...
@@ -88,12 +88,14 @@ public class DeviceAlarmInfoServiceImpl extends AbstractCRUDServiceImpl<DeviceAl
Map
<
String
,
Long
>
siteDeviceCollect
=
deviceList
.
parallelStream
().
collect
(
groupingBy
(
x
->
x
.
getSiteName
(),
counting
()));
deviceAlarmInfo
.
setSiteDeviceCollect
(
siteDeviceCollect
);
//分站点统计设备今日告警数量
Map
<
String
,
Long
>
siteDeviceAlarmCollect
=
deviceAlarmInfoList
.
parallelStream
().
distinct
().
collect
(
groupingBy
(
x
->
x
.
getSiteId
(),
counting
()))
Map
<
String
,
Long
>
siteDeviceAlarmCollect
=
deviceAlarmInfoList
.
parallelStream
().
distinct
().
collect
(
groupingBy
(
x
->
x
.
getSiteId
(),
counting
()))
.
entrySet
().
stream
().
sorted
(
Map
.
Entry
.
comparingByValue
(
Comparator
.
reverseOrder
()))
.
collect
(
Collectors
.
toMap
(
x
->
siteMap
.
get
(
x
.
getKey
())
==
null
?
"未知站点"
:
siteMap
.
get
(
x
.
getKey
()).
getSiteName
(),
y
->
y
.
getValue
(),
(
o
,
n
)
->
n
));
deviceAlarmInfo
.
setSiteDeviceAlarmCollect
(
siteDeviceAlarmCollect
);
//设备类型分布
Map
<
String
,
String
>
deviceConnTypeCollect
=
deviceList
.
parallelStream
().
collect
(
groupingBy
(
x
->
DeviceSrcEnum
.
getByValue
(
x
.
getDeviceSrc
()).
getDesc
(),
Collectors
.
collectingAndThen
(
counting
(),
y
->
Map
<
String
,
String
>
deviceConnTypeCollect
=
deviceList
.
parallelStream
().
collect
(
groupingBy
(
x
->
DeviceSrcEnum
.
getByValue
(
x
.
getDeviceSrc
()).
getDesc
(),
Collectors
.
collectingAndThen
(
counting
(),
y
->
NumberUtil
.
div
(
y
,
deviceTotalCount
).
multiply
(
new
BigDecimal
(
100
)).
setScale
(
2
,
ROUND_HALF_DOWN
).
toString
()
)));
deviceAlarmInfo
.
setDeviceConnTypeCollect
(
deviceConnTypeCollect
);
...
...
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