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
e21a7391
Commit
e21a7391
authored
Sep 15, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档问题处理
parent
86bb350a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+2
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+1
-1
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+7
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
e21a7391
...
...
@@ -80,7 +80,7 @@ public class CommonConstans {
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexName
=
"equipmentIndexName.keyword"
;
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexNameNotKeyword
=
"equipmentIndexName
.keyword
"
;
public
static
final
String
QueryStringEquipmentIndexNameNotKeyword
=
"equipmentIndexName"
;
//es gatewayId 查绚关键字
public
static
final
String
QueryStringGateWayId
=
"gatewayId.keyword"
;
public
static
final
String
QueryStringFrontMoudle
=
"frontModule.keyword"
;
...
...
@@ -92,6 +92,7 @@ public class CommonConstans {
public
static
final
String
QueryStringDataType
=
"dataType"
;
public
static
final
String
QueryStringDisplayName
=
"displayName"
;
public
static
final
String
QueryStringIsAlarm
=
"isAlarm"
;
public
static
final
String
QueryStringIsAlarmKeyword
=
"isAlarm.keyword"
;
public
static
final
String
Twodecimalplaces
=
"%.2f"
;
public
static
final
String
Fourdecimalplaces
=
"%.4f"
;
public
static
final
String
QueryStringFrontMoudleNotKeyWord
=
"frontModule"
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
e21a7391
...
...
@@ -519,7 +519,7 @@ public class CommonServiceImpl {
List
<
T
>
list
=
searchHitList
.
stream
().
map
(
hit
->
hit
.
getContent
()).
collect
(
Collectors
.
toList
());
return
list
;
}
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
...
...
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 @
e21a7391
...
...
@@ -124,15 +124,17 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
String
table
=
gateway
;
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
queryCodntion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gateway
));
queryCodntion
.
put
(
CommonConstans
.
QueryStringIsAlarm
,
Arrays
.
asList
(
"1"
));
List
<
ESEquipments
>
alldata
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodntion
,
null
,
ESEquipments
.
class
);
queryCodntion
.
put
(
CommonConstans
.
QueryStringIsAlarm
Keyword
,
Arrays
.
asList
(
"1"
));
List
<
ESEquipments
>
alldata
=
commonServiceImpl
.
getListDataByCondtions
AndLike
(
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
());
}
List
<
ESEquipments
>
lisSort
=
waringData
.
stream
().
sorted
(
Comparator
.
comparing
(
ESEquipments:
:
getCreatedTime
).
reversed
()).
collect
(
Collectors
.
toList
()).
subList
(((
current
-
1
)
*
size
),(
current
*
size
));
if
(
CollectionUtils
.
isNotEmpty
(
waringData
))
{
waringData
=
waringData
.
stream
().
sorted
(
Comparator
.
comparing
(
ESEquipments:
:
getCreatedTime
).
reversed
()).
collect
(
Collectors
.
toList
()).
subList
(((
current
-
1
)
*
size
),(
current
*
size
));
}
//对于查询到的告警信息进行按照时间顺序进行排序
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
!
waringData
.
isEmpty
()
?
waringData
.
size
()
:
0
,
false
,
current
,
lisSort
);
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"
);
...
...
@@ -1578,7 +1580,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtions
AndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
...
...
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