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
251fb1ef
Commit
251fb1ef
authored
Oct 24, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交离散率方法
parent
45c26a42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
52 deletions
+66
-52
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+66
-52
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 @
251fb1ef
...
@@ -1954,58 +1954,72 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1954,58 +1954,72 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
ResultsData
collectingBox
(
String
gatewayId
,
int
current
,
int
size
)
{
public
ResultsData
collectingBox
(
String
gatewayId
,
int
current
,
int
size
)
{
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
getLSV
(
gatewayId
);
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
// 构建平台数据
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resultList
);
likeMap
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"路电流"
);
ColModel
colModelEventMovement
=
new
ColModel
(
"zz"
,
"zz"
,
"子阵"
,
"子阵"
,
"dataGrid"
,
"zz"
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap
);
ColModel
colModelStationName
=
new
ColModel
(
"nbq"
,
"nbq"
,
"逆变器"
,
"逆变器"
,
"dataGrid"
,
"nvq"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"hlx"
,
"hlx"
,
"汇流箱"
,
"汇流箱"
,
"dataGrid"
,
"hlx"
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"avg"
,
"avg"
,
"支路电流平均值"
,
"支路电流平均值"
,
"dataGrid"
,
"avg"
);
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
ColModel
colModelEventTime
=
new
ColModel
(
"lsv"
,
"lsv"
,
"支路电流离散率"
,
"支路电流离散率"
,
"dataGrid"
,
"lsv"
);
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
colModelAlarmGroupName
,
colModelEventTime
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
}
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
for
(
String
s
:
collect
.
keySet
())
{
public
ArrayList
<
Map
<
String
,
Object
>>
getLSV
(
String
gatewayId
)
{
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Double
avageValue
=
0.0
;
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
avageValue
=
indicatorsDtos
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
getValueF
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
average
().
getAsDouble
();
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
avageValue
=
Double
.
valueOf
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
avageValue
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
resultMap
.
put
(
"avg"
,
avageValue
);
likeMap
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"路电流"
);
String
[]
name
=
s
.
split
(
"-"
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
resultMap
.
put
(
"zz"
,
"#"
+
name
[
0
]
+
"子阵"
);
ESEquipments
.
class
,
likeMap
);
resultMap
.
put
(
"nbq"
,
"逆变器"
+
name
[
1
]);
resultMap
.
put
(
"hlx"
,
"#"
+
name
[
2
]
+
"汇流箱"
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
double
lsv
=
0.00
;
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
if
(!
ValidationUtil
.
isEmpty
(
list1
))
{
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
List
<
ESEquipments
>
dtos
=
list1
.
stream
().
filter
(
e
->
e
.
getEquipmentNumber
().
equals
(
s
)).
collect
(
Collectors
.
toList
());
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
if
(!
ValidationUtil
.
isEmpty
(
dtos
))
{
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
for
(
ESEquipments
esEquipments
:
indicatorsDtos
)
{
ESEquipments
.
class
,
likeMap1
);
lsv
=
lsv
+
Math
.
pow
(
esEquipments
.
getValueF
()
-
avageValue
,
2
);
}
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
}
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
()
lsv
=
lsv
/
indicatorsDtos
.
size
();
.
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
lsv
=
Math
.
sqrt
(
lsv
);
for
(
String
s
:
collect
.
keySet
())
{
}
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
resultMap
.
put
(
"lsv"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
lsv
));
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultList
.
add
(
resultMap
);
Double
avageValue
=
0.0
;
}
avageValue
=
indicatorsDtos
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
getValueF
()))
}
.
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
average
().
getAsDouble
();
//构建平台数据
avageValue
=
Double
.
valueOf
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
avageValue
));
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resultList
);
resultMap
.
put
(
"avg"
,
avageValue
);
ColModel
colModelEventMovement
=
new
ColModel
(
"zz"
,
"zz"
,
"子阵"
,
"子阵"
,
"dataGrid"
,
"zz"
);
String
[]
name
=
s
.
split
(
"-"
);
ColModel
colModelStationName
=
new
ColModel
(
"nbq"
,
"nbq"
,
"逆变器"
,
"逆变器"
,
"dataGrid"
,
"nvq"
);
resultMap
.
put
(
"zz"
,
"#"
+
name
[
0
]
+
"子阵"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"hlx"
,
"hlx"
,
"汇流箱"
,
"汇流箱"
,
"dataGrid"
,
"hlx"
);
resultMap
.
put
(
"nbq"
,
"逆变器"
+
name
[
1
]);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"avg"
,
"avg"
,
"支路电流平均值"
,
"支路电流平均值"
,
"dataGrid"
,
"avg"
);
resultMap
.
put
(
"hlx"
,
"#"
+
name
[
2
]
+
"汇流箱"
);
ColModel
colModelEventTime
=
new
ColModel
(
"lsl"
,
"lsv"
,
"支路电流离散率"
,
"支路电流离散率"
,
"dataGrid"
,
"lsv"
);
double
lsv
=
0.00
;
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelAlarmGroupName
,
colModelEventTime
);
if
(!
ValidationUtil
.
isEmpty
(
list1
))
{
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
List
<
ESEquipments
>
dtos
=
list1
.
stream
().
filter
(
e
->
e
.
getEquipmentNumber
().
equals
(
s
))
return
resultsData
;
.
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
dtos
))
{
for
(
ESEquipments
esEquipments
:
indicatorsDtos
)
{
lsv
=
lsv
+
Math
.
pow
(
esEquipments
.
getValueF
()
-
avageValue
,
2
);
}
}
lsv
=
lsv
/
indicatorsDtos
.
size
();
lsv
=
Math
.
sqrt
(
lsv
);
}
resultMap
.
put
(
"lsv"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
lsv
));
resultList
.
add
(
resultMap
);
}
}
return
resultList
;
}
public
List
<
Map
<
String
,
Object
>>
solarPowerOperation
(
String
gatewayId
)
{
public
List
<
Map
<
String
,
Object
>>
solarPowerOperation
(
String
gatewayId
)
{
...
...
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