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
86bb350a
Commit
86bb350a
authored
Sep 14, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档问题处理
parent
5c4720de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+2
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+7
-7
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 @
86bb350a
...
@@ -79,6 +79,8 @@ public class CommonConstans {
...
@@ -79,6 +79,8 @@ public class CommonConstans {
};
};
//es EquipIndexName 查绚关键字
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexName
=
"equipmentIndexName.keyword"
;
public
static
final
String
QueryStringEquipmentIndexName
=
"equipmentIndexName.keyword"
;
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexNameNotKeyword
=
"equipmentIndexName.keyword"
;
//es gatewayId 查绚关键字
//es gatewayId 查绚关键字
public
static
final
String
QueryStringGateWayId
=
"gatewayId.keyword"
;
public
static
final
String
QueryStringGateWayId
=
"gatewayId.keyword"
;
public
static
final
String
QueryStringFrontMoudle
=
"frontModule.keyword"
;
public
static
final
String
QueryStringFrontMoudle
=
"frontModule.keyword"
;
...
...
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 @
86bb350a
...
@@ -1570,15 +1570,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1570,15 +1570,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
shouldConditon
=
new
HashMap
<>();
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
shouldConditon
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
"路电流"
);
likeMap
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"路电流"
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
shouldConditon
,
ESEquipments
.
class
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtions
AndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
shouldConditon
1
=
new
HashMap
<>();
Map
<
String
,
String
>
likeMap
1
=
new
HashMap
<>();
shouldConditon1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
"平均电流"
);
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
shouldConditon
,
ESEquipments
.
class
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
...
@@ -1586,7 +1586,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1586,7 +1586,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Double
avageValue
=
0.0
;
Double
avageValue
=
0.0
;
avageValue
=
indicatorsDtos
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
getValue
())).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
getValue
())).
average
().
getAsDouble
();
avageValue
=
indicatorsDtos
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
getValue
Double
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueDouble
().
toString
())).
average
().
getAsDouble
();
avageValue
=
Double
.
valueOf
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
avageValue
));
avageValue
=
Double
.
valueOf
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
avageValue
));
resultMap
.
put
(
"avg"
,
avageValue
);
resultMap
.
put
(
"avg"
,
avageValue
);
String
[]
name
=
s
.
split
(
"-"
);
String
[]
name
=
s
.
split
(
"-"
);
...
...
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