Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
0820bba2
Commit
0820bba2
authored
Oct 11, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交风机告警
parent
8d1bfdaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
30 deletions
+48
-30
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+48
-30
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
0820bba2
...
...
@@ -120,36 +120,54 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
void
UpdateMonitorFanIndicator
(
List
<
IndexDto
>
list
)
{
monitorFanIndicatorregionMapper
.
UpdateMonitorFanIndicator
(
list
);
}
@Override
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
queryCodntion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gateway
));
queryCodntion
.
put
(
CommonConstans
.
QueryStringIsAlarmKeyword
,
Arrays
.
asList
(
"1"
));
List
<
ESEquipments
>
alldata
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCodntion
,
null
,
ESEquipments
.
class
,
null
);
List
<
ESEquipments
>
waringData
=
alldata
.
stream
().
filter
(
esEquipments
->
!
esEquipments
.
getValue
().
equals
(
"0.0"
)
&&
!
esEquipments
.
getValue
().
equals
(
esEquipments
.
getValueLabel
())).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotEmpty
(
equipmentNumber
))
{
waringData
=
waringData
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getEquipmentNumber
().
equals
(
equipmentNumber
)).
collect
(
Collectors
.
toList
());
}
if
(
CollectionUtils
.
isNotEmpty
(
waringData
))
{
Integer
newSize
=
waringData
.
size
()
>=
size
?
size
:
waringData
.
size
();
waringData
=
waringData
.
stream
().
sorted
(
Comparator
.
comparing
(
ESEquipments:
:
getCreatedTime
).
reversed
()).
collect
(
Collectors
.
toList
()).
subList
(((
current
-
1
)
*
newSize
),
(
current
*
newSize
));
}
//对于查询到的告警信息进行按照时间顺序进行排序
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
!
waringData
.
isEmpty
()
?
waringData
.
size
()
:
0
,
false
,
current
,
waringData
);
ColModel
colModelequipmentNumber
=
new
ColModel
(
"equipmentNumber"
,
"equipmentNumber"
,
"设备"
,
"设备"
,
"dataGrid"
,
"equipmentNumber"
);
ColModel
colModelvalueLabel
=
new
ColModel
(
"valueLabel"
,
"valueLabel"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"valueLabel"
);
ColModel
colModelcreatedTime
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"发生时间"
,
"发生时间"
,
"dataGrid"
,
"createdTime"
);
ColModel
colModelvalue
=
new
ColModel
(
"value"
,
"value"
,
"告警值"
,
"告警值"
,
"dataGrid"
,
"value"
);
List
<
ColModel
>
listColModel
=
new
ArrayList
<>();
listColModel
.
add
(
colModelequipmentNumber
);
listColModel
.
add
(
colModelvalueLabel
);
listColModel
.
add
(
colModelcreatedTime
);
listColModel
.
add
(
colModelvalue
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
@Override
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
queryCodntion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gateway
));
queryCodntion
.
put
(
CommonConstans
.
QueryStringIsAlarmKeyword
,
Arrays
.
asList
(
"1"
));
List
<
ESEquipments
>
alldata
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCodntion
,
null
,
ESEquipments
.
class
,
null
);
List
<
ESEquipments
>
waringData
=
alldata
.
stream
()
.
filter
(
esEquipments
->
(!
esEquipments
.
getValue
().
equals
(
"0.0"
)
&&
!
esEquipments
.
getValue
().
equals
(
esEquipments
.
getValueLabel
())
||
(
esEquipments
.
getValue
().
equals
(
"true"
))))
.
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotEmpty
(
equipmentNumber
))
{
waringData
=
waringData
.
stream
()
.
filter
(
esEquipments
->
esEquipments
.
getEquipmentNumber
().
equals
(
equipmentNumber
))
.
collect
(
Collectors
.
toList
());
}
if
(
CollectionUtils
.
isNotEmpty
(
waringData
))
{
Integer
newSize
=
waringData
.
size
()
>=
size
?
size
:
waringData
.
size
();
waringData
=
waringData
.
stream
().
sorted
(
Comparator
.
comparing
(
ESEquipments:
:
getCreatedTime
).
reversed
())
.
collect
(
Collectors
.
toList
()).
subList
(((
current
-
1
)
*
newSize
),
(
current
*
newSize
));
waringData
.
forEach
(
i
->{
if
(
"true"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"合"
);
}
});
}
// 对于查询到的告警信息进行按照时间顺序进行排序
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
!
waringData
.
isEmpty
()
?
waringData
.
size
()
:
0
,
false
,
current
,
waringData
);
ColModel
colModelequipmentNumber
=
new
ColModel
(
"equipmentNumber"
,
"equipmentNumber"
,
"设备"
,
"设备"
,
"dataGrid"
,
"equipmentNumber"
);
ColModel
colModelvalueLabel
=
new
ColModel
(
"valueLabel"
,
"valueLabel"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"valueLabel"
);
ColModel
colModelcreatedTime
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"发生时间"
,
"发生时间"
,
"dataGrid"
,
"createdTime"
);
ColModel
colModelvalue
=
new
ColModel
(
"value"
,
"value"
,
"告警值"
,
"告警值"
,
"dataGrid"
,
"value"
);
List
<
ColModel
>
listColModel
=
new
ArrayList
<>();
listColModel
.
add
(
colModelequipmentNumber
);
listColModel
.
add
(
colModelvalueLabel
);
listColModel
.
add
(
colModelcreatedTime
);
listColModel
.
add
(
colModelvalue
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
@Override
public
ResultsData
getLsNationWideInfo
(
int
current
,
int
size
,
String
stationBasicId
,
String
equipmentNumber
)
{
...
...
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