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
0b9d46d3
Commit
0b9d46d3
authored
Oct 13, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
泰和-升压站-箱变-实时运行数据 测点显示及排序
parent
1279dda1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
29 deletions
+35
-29
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+35
-29
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 @
0b9d46d3
...
...
@@ -219,13 +219,19 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeMap
.
put
(
"systemType"
,
systemType
);
}
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
String
>
needDisplayDisplayNameFrontModule
=
Arrays
.
asList
(
"箱变"
);
List
<
String
>
needDisplayDisplayNameSystemType
=
Arrays
.
asList
(
"实时运行数据"
);
result
.
stream
().
forEach
(
e
->
{
e
.
setValue
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
e
.
getValueF
()));
});
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
Collections
.
sort
(
result
,
(
e1
,
e2
)
->
{
return
instance
.
compare
(
e1
.
getEquipmentIndexName
(),
e2
.
getEquipmentIndexName
());
});
if
(
needDisplayDisplayNameSystemType
.
contains
(
systemType
)
&&
needDisplayDisplayNameFrontModule
.
contains
(
frontModule
))
{
result
.
sort
(
Comparator
.
comparing
(
ESEquipments:
:
getTraceId
,
Comparator
.
comparingInt
(
Integer:
:
parseInt
)));
}
else
{
Collections
.
sort
(
result
,
(
e1
,
e2
)
->
{
return
instance
.
compare
(
e1
.
getEquipmentIndexName
(),
e2
.
getEquipmentIndexName
());
});
}
List
<
ESEquipments
>
collect
=
result
.
stream
()
.
skip
((
long
)
(
current
-
1
)
*
size
)
.
limit
(
size
)
...
...
@@ -491,11 +497,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Double
installedCapacity
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
activePowerList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
xiazaoActivePowerPoint
,
stationBasic
.
getBoosterGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
xiazaoWindSpeedrPoint
,
stationBasic
.
getFanGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
xiazaoWindSpeedrPoint
,
stationBasic
.
getFanGatewayId
());
groupMap
=
otherList
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndicatorData:
:
getCreatedTime
,
Collectors
.
averagingDouble
(
IndicatorData:
:
getValueF
)));
}
else
{
activePowerList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
taiheActivePowerPoint
,
stationBasic
.
getBoosterGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
taiheIrradiationPonit
,
stationBasic
.
getBoosterGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
taiheIrradiationPonit
,
stationBasic
.
getBoosterGatewayId
());
}
for
(
int
i
=
0
;
i
<
activePowerList
.
size
();
i
++)
{
IndicatorData
indicatorData
=
activePowerList
.
get
(
i
);
...
...
@@ -1126,37 +1132,37 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ArrayList
<
Map
<
String
,
String
>>
resultList1
=
new
ArrayList
<>();
List
<
String
>
nameList
=
new
ArrayList
<>();
Map
<
String
,
String
>
handleData
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
originalData
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
originalData
=
new
HashMap
<>();
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
handleData
=
windSqlList
.
stream
().
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentIndexName
,
esEquipments
->
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
esEquipments
.
getValueF
())));
nameList
=
CommonConstans
.
xiazaoElectricityMeter
;
originalData
=
CommonConstans
.
xiazaoElectricityMeterPointSort
;
}
else
{
handleData
=
windSqlList
.
stream
().
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentIndexName
,
esEquipments
->
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
esEquipments
.
getValueF
()*
0.01
)));
handleData
=
windSqlList
.
stream
().
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentIndexName
,
esEquipments
->
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
esEquipments
.
getValueF
()
*
0.01
)));
nameList
=
CommonConstans
.
taiheElectricityMeter
;
originalData
=
CommonConstans
.
taiheElectricityMeterPointSort
;
originalData
=
CommonConstans
.
taiheElectricityMeterPointSort
;
}
for
(
int
i
=
0
;
i
<
nameList
.
size
();
i
++)
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
String
name
=
nameList
.
get
(
i
);
stringStringHashMap
.
put
(
"name"
,
name
);
Double
electricityIndicator
=
1.0
;
stringStringHashMap
.
put
(
"name"
,
name
);
Double
electricityIndicator
=
1.0
;
List
<
String
>
dataList
=
originalData
.
get
(
name
);
stringStringHashMap
.
put
(
"zxzyg"
,
handleData
.
get
(
dataList
.
get
(
0
)));
stringStringHashMap
.
put
(
"fxzyg"
,
handleData
.
get
(
dataList
.
get
(
1
)));
stringStringHashMap
.
put
(
"zxzwg"
,
handleData
.
get
(
dataList
.
get
(
2
)));
stringStringHashMap
.
put
(
"fxzwg"
,
handleData
.
get
(
dataList
.
get
(
3
)));
if
(
name
.
equals
(
"夏雩线212主表"
))
{
stringStringHashMap
.
put
(
"zxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
0
)))*
0.001
));
stringStringHashMap
.
put
(
"fxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
1
)))*
0.001
));
stringStringHashMap
.
put
(
"zxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
2
)))*
0.001
));
stringStringHashMap
.
put
(
"fxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
3
)))*
0.001
));
stringStringHashMap
.
put
(
"zxzyg"
,
handleData
.
get
(
dataList
.
get
(
0
)));
stringStringHashMap
.
put
(
"fxzyg"
,
handleData
.
get
(
dataList
.
get
(
1
)));
stringStringHashMap
.
put
(
"zxzwg"
,
handleData
.
get
(
dataList
.
get
(
2
)));
stringStringHashMap
.
put
(
"fxzwg"
,
handleData
.
get
(
dataList
.
get
(
3
)));
if
(
name
.
equals
(
"夏雩线212主表"
))
{
stringStringHashMap
.
put
(
"zxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
0
)))
*
0.001
));
stringStringHashMap
.
put
(
"fxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
1
)))
*
0.001
));
stringStringHashMap
.
put
(
"zxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
2
)))
*
0.001
));
stringStringHashMap
.
put
(
"fxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
3
)))
*
0.001
));
}
if
(
name
.
equals
(
"夏雩线212副表"
))
{
stringStringHashMap
.
put
(
"zxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
0
)))*
0.01
));
stringStringHashMap
.
put
(
"fxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
1
)))*
0.01
));
stringStringHashMap
.
put
(
"zxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
2
)))*
0.01
));
stringStringHashMap
.
put
(
"fxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
3
)))*
0.01
));
if
(
name
.
equals
(
"夏雩线212副表"
))
{
stringStringHashMap
.
put
(
"zxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
0
)))
*
0.01
));
stringStringHashMap
.
put
(
"fxzyg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
1
)))
*
0.01
));
stringStringHashMap
.
put
(
"zxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
2
)))
*
0.01
));
stringStringHashMap
.
put
(
"fxzwg"
,
String
.
format
(
CommonConstans
.
Threedecimalplaces
,
Double
.
valueOf
(
handleData
.
get
(
dataList
.
get
(
3
)))
*
0.01
));
}
resultList
.
add
(
stringStringHashMap
);
}
...
...
@@ -1367,12 +1373,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondition
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondition
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondition
,
null
,
ESEquipments
.
class
);
List
<
String
>
displayName
=
Arrays
.
asList
(
"Ua"
,
"Ub"
,
"Uc"
);
List
<
String
>
displayName
=
Arrays
.
asList
(
"Ua"
,
"Ub"
,
"Uc"
);
// 10kVⅡ段母线数据
List
<
ESEquipments
>
xianData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getFrontModule
().
contains
(
"35kVⅠ母PT"
)
&&
!
displayName
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
List
<
ESEquipments
>
xianData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getFrontModule
().
contains
(
"35kVⅠ母PT"
)
&&
!
displayName
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
xianData
.
forEach
(
item
->
resultMap
.
put
(
item
.
getDisplayName
(),
keepTwoDecimalPlaces
(
item
.
getValueF
().
toString
())));
List
<
ESEquipments
>
xianData1
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
contains
(
"南瑞光差保护_313"
)
&&
displayName
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
List
<
ESEquipments
>
xianData1
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
contains
(
"南瑞光差保护_313"
)
&&
displayName
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
xianData1
.
forEach
(
item
->
resultMap
.
put
(
item
.
getDisplayName
(),
keepTwoDecimalPlaces
(
item
.
getValueF
().
toString
())));
List
<
String
>
xyxDisplayNameList
=
Arrays
.
asList
(
"Ia"
,
"P"
,
"Q"
);
List
<
ESEquipments
>
xyxSqlData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getFrontModule
().
equals
(
"35kV前万线"
)
&&
xyxDisplayNameList
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
...
...
@@ -1860,7 +1866,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
Map
<
String
,
Object
>
hlWindSpeeds
(
String
gatewayId
,
String
equipNum
)
{
List
<
IndicatorData
>
originarPVs
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtimeAndEquipmentNumberPv
(
equipNum
,
gatewayId
);
List
<
IndicatorData
>
originarPVs
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtimeAndEquipmentNumberPv
(
equipNum
,
gatewayId
);
originarPVs
.
size
();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
List
<
IndicatorData
>>
data
=
originarPVs
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndicatorData:
:
getEquipmentIndexName
,
TreeMap:
:
new
,
Collectors
.
toList
()));
...
...
@@ -1944,7 +1950,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
});
}
statusMaps
.
sort
(
Comparator
.
comparingInt
(
o
->
Integer
.
parseInt
(
o
.
get
(
"titie"
).
toString
())));
statusMaps
.
sort
(
Comparator
.
comparingInt
(
o
->
Integer
.
parseInt
(
o
.
get
(
"titie"
).
toString
())));
IPage
<
Map
<
String
,
String
>>
result
=
new
Page
<>();
result
.
setRecords
(
statusMaps
);
result
.
setCurrent
(
1
);
...
...
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