Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
cd006ba7
Commit
cd006ba7
authored
Oct 24, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取离散率
parent
302fede2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
50 deletions
+60
-50
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+60
-50
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 @
cd006ba7
...
@@ -1680,6 +1680,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1680,6 +1680,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
url
=
pictureUrl
+
urls
[
0
];
url
=
pictureUrl
+
urls
[
0
];
}
else
{
}
else
{
url
=
pictureUrl
+
urls
[
1
];
url
=
pictureUrl
+
urls
[
1
];
;
}
}
photoUrls
.
put
(
datass
.
getDisplayName
().
split
(
"_"
)[
0
]
+
"jddwz"
,
url
);
photoUrls
.
put
(
datass
.
getDisplayName
().
split
(
"_"
)[
0
]
+
"jddwz"
,
url
);
}
}
...
@@ -1725,14 +1726,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1725,14 +1726,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
public
HashMap
<
String
,
Object
>
getyw
(
String
gatewayId
)
{
public
HashMap
<
String
,
Object
>
getyw
(
String
gatewayId
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
Arrays
.
asList
(
"1主变"
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringSystemType
,
Arrays
.
asList
(
"模拟量"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"1主变"
);
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
// TODO: 2023/7/14 数据未整理 ---> 油面温1 油面温2 绕组温度
// TODO: 2023/7/14 数据未整理 ---> 油面温1 油面温2 绕组温度
resultMap
.
put
(
"value1"
,
"0.0"
);
resultMap
.
put
(
"value1"
,
"0.0"
);
resultMap
.
put
(
"value2"
,
"0.0"
);
resultMap
.
put
(
"value2"
,
"0.0"
);
...
@@ -1740,13 +1741,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1740,13 +1741,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
resultMap
.
put
(
"value4"
,
"0.0"
);
resultMap
.
put
(
"value4"
,
"0.0"
);
esEquipmentsList
.
forEach
(
item
->
{
esEquipmentsList
.
forEach
(
item
->
{
if
(
"档位"
.
equals
(
item
.
getDisplayName
()))
{
if
(
"档位"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value4"
,
String
.
format
(
"%.0f"
,
item
.
getValueF
()
));
resultMap
.
put
(
"value4"
,
item
.
getValue
(
));
}
else
if
(
"油面温1"
.
equals
(
item
.
getDisplayName
()))
{
}
else
if
(
"油面温1"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value1"
,
String
.
format
(
"%.1f"
,
item
.
getValueF
()
));
resultMap
.
put
(
"value1"
,
item
.
getValue
(
));
}
else
if
(
"油面温2"
.
equals
(
item
.
getDisplayName
()))
{
}
else
if
(
"油面温2"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value2"
,
String
.
format
(
"%.1f"
,
item
.
getValueF
()
));
resultMap
.
put
(
"value2"
,
item
.
getValue
(
));
}
else
if
(
"绕组温度"
.
equals
(
item
.
getDisplayName
()))
{
}
else
if
(
"绕组温度"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value3"
,
String
.
format
(
"%.1f"
,
item
.
getValueF
()
));
resultMap
.
put
(
"value3"
,
item
.
getValue
(
));
}
}
});
});
return
resultMap
;
return
resultMap
;
...
@@ -1954,58 +1955,67 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1954,58 +1955,67 @@ 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
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"路电流"
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
for
(
String
s
:
collect
.
keySet
())
{
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
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
));
resultMap
.
put
(
"avg"
,
avageValue
);
String
[]
name
=
s
.
split
(
"-"
);
resultMap
.
put
(
"zz"
,
"#"
+
name
[
0
]
+
"子阵"
);
resultMap
.
put
(
"nbq"
,
"逆变器"
+
name
[
1
]);
resultMap
.
put
(
"hlx"
,
"#"
+
name
[
2
]
+
"汇流箱"
);
double
lsv
=
0.00
;
if
(!
ValidationUtil
.
isEmpty
(
list1
))
{
List
<
ESEquipments
>
dtos
=
list1
.
stream
().
filter
(
e
->
e
.
getEquipmentNumber
().
equals
(
s
)).
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
);
}
}
//构建平台数据
//构建平台数据
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resultList
);
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resultList
);
ColModel
colModelEventMovement
=
new
ColModel
(
"zz"
,
"zz"
,
"子阵"
,
"子阵"
,
"dataGrid"
,
"zz"
);
ColModel
colModelEventMovement
=
new
ColModel
(
"zz"
,
"zz"
,
"子阵"
,
"子阵"
,
"dataGrid"
,
"zz"
);
ColModel
colModelStationName
=
new
ColModel
(
"nbq"
,
"nbq"
,
"逆变器"
,
"逆变器"
,
"dataGrid"
,
"nvq"
);
ColModel
colModelStationName
=
new
ColModel
(
"nbq"
,
"nbq"
,
"逆变器"
,
"逆变器"
,
"dataGrid"
,
"nvq"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"hlx"
,
"hlx"
,
"汇流箱"
,
"汇流箱"
,
"dataGrid"
,
"hlx"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"hlx"
,
"hlx"
,
"汇流箱"
,
"汇流箱"
,
"dataGrid"
,
"hlx"
);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"avg"
,
"avg"
,
"支路电流平均值"
,
"支路电流平均值"
,
"dataGrid"
,
"avg"
);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"avg"
,
"avg"
,
"支路电流平均值"
,
"支路电流平均值"
,
"dataGrid"
,
"avg"
);
ColModel
colModelEventTime
=
new
ColModel
(
"ls
l
"
,
"lsv"
,
"支路电流离散率"
,
"支路电流离散率"
,
"dataGrid"
,
"lsv"
);
ColModel
colModelEventTime
=
new
ColModel
(
"ls
v
"
,
"lsv"
,
"支路电流离散率"
,
"支路电流离散率"
,
"dataGrid"
,
"lsv"
);
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelAlarmGroupName
,
colModelEventTime
);
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelAlarmGroupName
,
colModelEventTime
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
return
resultsData
;
}
}
public
ArrayList
<
Map
<
String
,
Object
>>
getLSV
(
String
gatewayId
)
{
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"路电流"
);
List
<
ESEquipments
>
list
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
likeMap1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexNameNotKeyword
,
"平均电流"
);
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap1
);
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
Map
<
String
,
List
<
ESEquipments
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getEquipmentNumber
));
for
(
String
s
:
collect
.
keySet
())
{
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
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
));
resultMap
.
put
(
"avg"
,
avageValue
);
String
[]
name
=
s
.
split
(
"-"
);
resultMap
.
put
(
"zz"
,
"#"
+
name
[
0
]
+
"子阵"
);
resultMap
.
put
(
"nbq"
,
"逆变器"
+
name
[
1
]);
resultMap
.
put
(
"hlx"
,
"#"
+
name
[
2
]
+
"汇流箱"
);
double
lsv
=
0.00
;
if
(!
ValidationUtil
.
isEmpty
(
list1
))
{
List
<
ESEquipments
>
dtos
=
list1
.
stream
().
filter
(
e
->
e
.
getEquipmentNumber
().
equals
(
s
)).
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