Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
dde9bc7d
Commit
dde9bc7d
authored
Dec 16, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
cfa5e22c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/EnergyConsumptionAnalysisService.java
.../prediction/service/EnergyConsumptionAnalysisService.java
+17
-10
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/EnergyConsumptionAnalysisService.java
View file @
dde9bc7d
...
@@ -1511,20 +1511,27 @@ public class EnergyConsumptionAnalysisService {
...
@@ -1511,20 +1511,27 @@ public class EnergyConsumptionAnalysisService {
//查电站列表,计算统计数据
//查电站列表,计算统计数据
List
<
DynamicQueryBasePowerLineOutput
>
powerLineList
=
ServiceUtil
.
getPowerLineList
(
context
,
lineParam
);
List
<
DynamicQueryBasePowerLineOutput
>
powerLineList
=
ServiceUtil
.
getPowerLineList
(
context
,
lineParam
);
if
(
CollUtil
.
isNotEmpty
(
powerLineList
))
{
if
(
CollUtil
.
isNotEmpty
(
powerLineList
))
{
String
oilFieldCode
=
ServiceUtil
.
getOilFieldCode
(
context
);
QueryWrapper
<
StationDailyProductionSituationEnt
>
queryWrapper
=
new
QueryWrapper
<>();
Set
<
String
>
lineNameSet
=
powerLineList
.
stream
().
map
(
DynamicQueryBasePowerLineOutput:
:
getLineName
).
collect
(
Collectors
.
toSet
());
if
(
CharSequenceUtil
.
equals
(
context
.
getProperty
(
"x.db.databaseId"
),
BusinessConstant
.
ORACLE
))
{
queryWrapper
.
select
(
"NVL( ROUND( AVG( DAILY_ELECTRICITY_CONSUMPTION ), 2 ), 0 ) AS DAILY_ELECTRICITY_CONSUMPTION"
,
"NVL( ROUND( AVG( DAILY_LIQUID_PRODUCTION ), 2 ), 0 ) AS DAILY_LIQUID_PRODUCTION"
,
"NVL( ROUND( SUM( PHOTOVOLTAIC_POWER ), 2 ), 0 ) AS PHOTOVOLTAIC_POWER"
);
}
else
{
queryWrapper
.
select
(
"IFNULL( ROUND( AVG( DAILY_ELECTRICITY_CONSUMPTION ), 2 ), 0 ) AS DAILY_ELECTRICITY_CONSUMPTION"
,
"IFNULL( ROUND( AVG( DAILY_LIQUID_PRODUCTION ), 2 ), 0 ) AS DAILY_LIQUID_PRODUCTION"
,
"IFNULL( ROUND( SUM( PHOTOVOLTAIC_POWER ), 2 ), 0 ) AS PHOTOVOLTAIC_POWER"
);
}
StationDailyProductionSituationMapper
mapper
=
context
.
getBean
(
StationDailyProductionSituationMapper
.
class
);
StationDailyProductionSituationMapper
mapper
=
context
.
getBean
(
StationDailyProductionSituationMapper
.
class
);
StationDailyProductionSituationEnt
ent
=
mapper
.
selectOne
(
new
QueryWrapper
<
StationDailyProductionSituationEnt
>()
StationDailyProductionSituationEnt
ent
=
mapper
.
selectOne
(
queryWrapper
.
lambda
()
.
select
(
"IFNULL( ROUND( AVG( daily_electricity_consumption ), 2 ), 0 ) AS daily_electricity_consumption"
,
.
in
(
StationDailyProductionSituationEnt:
:
getStationName
,
powerLineList
.
stream
()
"IFNULL( ROUND( AVG( daily_liquid_production ), 2 ), 0 ) AS daily_liquid_production"
,
.
map
(
DynamicQueryBasePowerLineOutput:
:
getLineName
)
"IFNULL( ROUND( SUM( photovoltaic_power ), 2 ), 0 ) AS photovoltaic_power"
.
collect
(
Collectors
.
toSet
()))
)
.
lambda
()
.
in
(
StationDailyProductionSituationEnt:
:
getStationName
,
lineNameSet
)
);
);
liquidProduction
=
ent
.
getDailyLiquidProduction
();
liquidProduction
=
ent
.
getDailyLiquidProduction
();
electricityConsumption
=
ent
.
getDailyElectricityConsumption
();
electricityConsumption
=
ent
.
getDailyElectricityConsumption
();
economicBenefit
=
ServiceUtil
.
getEconomicBenefitYuan
(
ent
.
getPhotovoltaicPower
(),
oilFieldCode
);
economicBenefit
=
ServiceUtil
.
getEconomicBenefitYuan
(
ent
.
getPhotovoltaicPower
(),
ServiceUtil
.
getOilFieldCode
(
context
)
);
carbonReduction
=
ServiceUtil
.
calculateCarbonReduction
(
ent
.
getPhotovoltaicPower
());
carbonReduction
=
ServiceUtil
.
calculateCarbonReduction
(
ent
.
getPhotovoltaicPower
());
}
}
return
XSingleResult
.
success
(
GetWellProductionStatusOutput
.
builder
()
return
XSingleResult
.
success
(
GetWellProductionStatusOutput
.
builder
()
...
...
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