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
ab9e0fd9
Commit
ab9e0fd9
authored
Dec 23, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
0e271fcb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerLongTermDataCloudServiceImpl.java
...vice/PlantPredictedPowerLongTermDataCloudServiceImpl.java
+3
-3
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerLongTermDataCloudServiceImpl.java
View file @
ab9e0fd9
...
@@ -47,14 +47,14 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
...
@@ -47,14 +47,14 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
for
(
GetBasePhotovoltaicPlantCloudOutput
output
:
list
)
{
for
(
GetBasePhotovoltaicPlantCloudOutput
output
:
list
)
{
//获取最近七天的实际数据
//获取最近七天的实际数据
QueryWrapper
<
PlantPowerDataEnt
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PlantPowerDataEnt
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"IFNULL(
avg(power ) , 0 ) power
"
)
queryWrapper
.
select
(
"IFNULL(
AVG(POWER ) , 0 ) POWER
"
)
.
lambda
()
.
lambda
()
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offsetDay
(
currentDate
,
-
7
));
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offsetDay
(
currentDate
,
-
7
));
PlantPowerDataEnt
currentEnt
=
powerDataMapper
.
selectOne
(
queryWrapper
);
PlantPowerDataEnt
currentEnt
=
powerDataMapper
.
selectOne
(
queryWrapper
);
//获取同期七天的实际数据
//获取同期七天的实际数据
queryWrapper
.
clear
();
queryWrapper
.
clear
();
queryWrapper
.
select
(
"IFNULL(
avg(power ) , 0 ) power
"
)
queryWrapper
.
select
(
"IFNULL(
AVG(POWER ) , 0 ) POWER
"
)
.
lambda
()
.
lambda
()
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offset
(
currentDate
,
DateField
.
YEAR
,
-
1
));
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offset
(
currentDate
,
DateField
.
YEAR
,
-
1
));
...
@@ -66,7 +66,7 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
...
@@ -66,7 +66,7 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
}
}
//获取同期30天数据
//获取同期30天数据
queryWrapper
.
clear
();
queryWrapper
.
clear
();
queryWrapper
.
select
(
"
plant_id, data_date, temperature, humidity, wind_speed, wind_direction, pressure, plane_irradiance, horizontal_irradiance, power
"
);
queryWrapper
.
select
(
"
PLANT_ID, DATA_DATE, TEMPERATURE, HUMIDITY, WIND_SPEED, WIND_DIRECTION, PRESSURE, PLANE_IRRADIANCE, HORIZONTAL_IRRADIANCE, POWER
"
);
queryWrapper
.
lambda
()
queryWrapper
.
lambda
()
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
eq
(
PlantPowerDataEnt:
:
getPlantId
,
output
.
getId
())
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offset
(
currentDate
,
DateField
.
YEAR
,
-
1
))
.
ge
(
PlantPowerDataEnt:
:
getDataDate
,
DateUtil
.
offset
(
currentDate
,
DateField
.
YEAR
,
-
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