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
53670ecc
Commit
53670ecc
authored
Sep 28, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日月年发电量运算方式处理
parent
1f6436b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
68 deletions
+71
-68
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+0
-1
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+71
-67
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
53670ecc
...
...
@@ -613,7 +613,6 @@ public class MonitorFanIdxController extends BaseController {
columnMap
.
put
(
column
,
result
);
}
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"南瑞光差保护_313P"
,
"WTX-801_25_WTX-801_总辐射累计"
,
"WTX-801_25_WTX-801_总辐射"
,
"313光差保护_总反向有功电度"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
53670ecc
...
...
@@ -205,24 +205,24 @@ public class MonitoringServiceImpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getAvagerByEquipmentIndxName
(
result
,
"瞬时风速"
)));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
)
/
1000
));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
)
/
1000
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
,
"南瑞光差保护_313P"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
,
"南瑞光差保护_313P"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
new
BigDecimal
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
)));
}
...
...
@@ -279,17 +279,17 @@ public class MonitoringServiceImpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
);
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)
);
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
);
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
);
}
installCapacity
.
updateAndGet
(
v
->
v
+
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
});
...
...
@@ -486,7 +486,7 @@ public class MonitoringServiceImpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
));
...
...
@@ -494,7 +494,7 @@ public class MonitoringServiceImpl {
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
total
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -603,17 +603,17 @@ public class MonitoringServiceImpl {
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
);
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)
);
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
);
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
);
}
});
HashMap
<
String
,
String
>
dayHashMap
=
new
HashMap
<>();
...
...
@@ -772,18 +772,18 @@ public class MonitoringServiceImpl {
Double
total
=
0.00
;
List
<
Map
<
String
,
Object
>>
mapListData
=
new
ArrayList
<>();
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
total
*
10
)
/
install
));
...
...
@@ -824,8 +824,8 @@ public class MonitoringServiceImpl {
public
void
getTotalData
()
{
//计算所有场站年计划完成量
int
year
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
LambdaQueryWrapper
<
StationPlan
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
StationPlan:
:
getYear
,
String
.
valueOf
(
year
));
LambdaQueryWrapper
<
StationPlan
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
StationPlan:
:
getYear
,
String
.
valueOf
(
year
));
List
<
StationPlan
>
stationPlans
=
stationPlanMapper
.
selectList
(
query
);
double
yearValue
=
stationPlans
.
stream
().
mapToDouble
(
StationPlan:
:
getValue
).
sum
();
double
fdzValue
=
stationPlans
.
stream
().
filter
(
e
->
e
.
getStationType
().
equals
(
"FDZ"
)).
mapToDouble
(
StationPlan:
:
getValue
).
sum
();
...
...
@@ -891,27 +891,27 @@ public class MonitoringServiceImpl {
AtomicReference
<
Double
>
powerOfMonthGF
=
new
AtomicReference
<>(
new
Double
(
0.00
));
AtomicReference
<
Double
>
powerOfAnnualGF
=
new
AtomicReference
<>(
new
Double
(
0.00
));
fdzList
.
forEach
(
stationBasic
->
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
powerOfDayFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonthFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
powerOfDayFD
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
));
powerOfMonthFD
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
));
powerOfAnnualFD
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
));
});
gfList
.
forEach
(
stationBasic
->
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
powerOfDayGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonthGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
powerOfDayGF
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
));
powerOfMonthGF
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
));
powerOfAnnualGF
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
));
});
HashMap
<
String
,
String
>
stringHashMap4
=
new
HashMap
<>();
stringHashMap4
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayFD
.
get
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
stringHashMap4
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayFD
.
get
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
list1
.
add
(
stringHashMap4
);
HashMap
<
String
,
String
>
stringHashMap5
=
new
HashMap
<>();
stringHashMap5
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfMonthFD
.
get
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfMonthGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
));
...
...
@@ -920,14 +920,14 @@ public class MonitoringServiceImpl {
stringHashMap6
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualFD
.
get
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
));
list1
.
add
(
stringHashMap6
);
HashMap
<
String
,
String
>
stringHashMap7
=
new
HashMap
<>();
stringHashMap7
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualFD
.
get
()
/
fdzValue
)
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualGF
.
get
()*
CommonConstans
.
pvGenPoweActor
/
gfvalue
));
stringHashMap7
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualFD
.
get
()
/
fdzValue
)
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
/
gfvalue
));
list1
.
add
(
stringHashMap7
);
HashMap
<
String
,
String
>
stringHashMap8
=
new
HashMap
<>();
stringHashMap8
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
.
get
()
*
CommonConstans
.
wkwhToMv
)
/
fdzInstall
.
doubleValue
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
wkwhToMv
)
/
gfInstall
.
doubleValue
()));
list1
.
add
(
stringHashMap8
);
page1
.
setRecords
(
list1
);
HashMap
<
String
,
String
>
stringHashMap9
=
new
HashMap
<>();
stringHashMap9
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayFD
.
get
()
+
(
powerOfDayGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)));
stringHashMap9
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfDayFD
.
get
()
+
(
powerOfDayGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)));
list2
.
add
(
stringHashMap9
);
HashMap
<
String
,
String
>
stringHashMap10
=
new
HashMap
<>();
stringHashMap10
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfMonthFD
.
get
()
+
powerOfMonthGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
));
...
...
@@ -936,7 +936,7 @@ public class MonitoringServiceImpl {
stringHashMap11
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
powerOfAnnualFD
.
get
()
+
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
));
list2
.
add
(
stringHashMap11
);
HashMap
<
String
,
String
>
stringHashMap12
=
new
HashMap
<>();
stringHashMap12
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
.
get
()
+
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
)
/
yearValue
));
stringHashMap12
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
.
get
()
+
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
)
/
yearValue
));
list2
.
add
(
stringHashMap12
);
page2
.
setRecords
(
list2
);
Double
totalAnnual
=
(
powerOfAnnualFD
.
get
()
+
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
);
...
...
@@ -973,18 +973,18 @@ public class MonitoringServiceImpl {
stationBasicListAll
.
forEach
(
stationBasic
->
{
List
<
Map
<
String
,
Object
>>
mapList
;
if
(
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
}
});
...
...
@@ -1170,20 +1170,24 @@ public class MonitoringServiceImpl {
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
AtomicReference
<
Double
>
total
=
new
AtomicReference
<>(
0.0
);
List
<
StationBasic
>
stationBasicListAll
=
new
ArrayList
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
stationBasicListAll
=
getListOfStationBasicByAreaName
(
areaName
);
}
else
{
stationBasicListAll
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"fan_gateway_id"
));
}
stationBasicListAll
.
forEach
(
stationBasic
->
{
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"有功功率"
));
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
esEquipmentsList
,
"有功功率"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"有功功率"
));
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
esEquipmentsList
,
"有功功率"
));
});
//有功功率换算
hashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
total
.
get
()));
return
hashMap
;
}
public
Double
keepFourdecimalPlaces
(
Double
param
)
{
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
param
));
}
}
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