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
810aabb9
Commit
810aabb9
authored
Dec 09, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
b5d364de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
20 deletions
+12
-20
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionFutureService.java
...va/pps/core/base/service/WindPredictionFutureService.java
+12
-20
No files found.
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionFutureService.java
View file @
810aabb9
...
@@ -93,7 +93,7 @@ public class WindPredictionFutureService {
...
@@ -93,7 +93,7 @@ public class WindPredictionFutureService {
//计算时间范围,开始时间往前推1天,结束时间往后推4小时
//计算时间范围,开始时间往前推1天,结束时间往后推4小时
DateTime
beginTime
=
DateUtil
.
offsetDay
(
day
,
-
1
);
DateTime
beginTime
=
DateUtil
.
offsetDay
(
day
,
-
1
);
DateTime
endTime
=
DateUtil
.
offsetHour
(
day
,
4
);
DateTime
endTime
=
DateUtil
.
offsetHour
(
day
,
4
);
return
XListResult
.
success
(
getPowerOutput
(
context
,
beginTime
,
endTime
,
0
,
input
.
getStationId
()));
return
XListResult
.
success
(
getPowerOutput
(
context
,
beginTime
,
endTime
,
input
.
getStationId
()));
}
}
/*-----------------------------------统计分析(风能发电监控) todo 模拟数据 -----------------------------------*/
/*-----------------------------------统计分析(风能发电监控) todo 模拟数据 -----------------------------------*/
...
@@ -705,7 +705,7 @@ public class WindPredictionFutureService {
...
@@ -705,7 +705,7 @@ public class WindPredictionFutureService {
}
}
//时间出力截至时间
//时间出力截至时间
DateTime
endTime
=
DateUtil
.
offsetDay
(
inputTime
,
offsetDay
);
DateTime
endTime
=
DateUtil
.
offsetDay
(
inputTime
,
offsetDay
);
return
getPowerOutput
(
context
,
inputTime
,
endTime
,
0
,
stationId
);
return
getPowerOutput
(
context
,
inputTime
,
endTime
,
stationId
);
}
}
/**
/**
...
@@ -714,11 +714,10 @@ public class WindPredictionFutureService {
...
@@ -714,11 +714,10 @@ public class WindPredictionFutureService {
* @param context 上下文
* @param context 上下文
* @param beginTime 开始时间
* @param beginTime 开始时间
* @param endTime 结束时间
* @param endTime 结束时间
* @param betweenDay 日间
* @param stationId 站点id
* @param stationId 站点id
* @return {@link List }<{@link GetWindPredictionFutureOutput }>
* @return {@link List }<{@link GetWindPredictionFutureOutput }>
*/
*/
private
List
<
GetWindPredictionFutureOutput
>
getPowerOutput
(
XContext
context
,
DateTime
beginTime
,
DateTime
endTime
,
int
betweenDay
,
String
stationId
)
{
private
List
<
GetWindPredictionFutureOutput
>
getPowerOutput
(
XContext
context
,
DateTime
beginTime
,
DateTime
endTime
,
String
stationId
)
{
//查预测功率
//查预测功率
Map
<
Date
,
WindPredictionFutureEnt
>
predictedMap
=
this
.
getPredictedMap
(
context
,
stationId
,
beginTime
,
endTime
);
Map
<
Date
,
WindPredictionFutureEnt
>
predictedMap
=
this
.
getPredictedMap
(
context
,
stationId
,
beginTime
,
endTime
);
//查实际功率
//查实际功率
...
@@ -727,27 +726,20 @@ public class WindPredictionFutureService {
...
@@ -727,27 +726,20 @@ public class WindPredictionFutureService {
List
<
DateTime
>
rangeToList
=
DateUtil
.
rangeToList
(
beginTime
,
endTime
,
DateField
.
MINUTE
,
15
);
List
<
DateTime
>
rangeToList
=
DateUtil
.
rangeToList
(
beginTime
,
endTime
,
DateField
.
MINUTE
,
15
);
GetWindPredictionFutureOutput
output
;
GetWindPredictionFutureOutput
output
;
List
<
GetWindPredictionFutureOutput
>
outputs
=
new
ArrayList
<>(
rangeToList
.
size
());
List
<
GetWindPredictionFutureOutput
>
outputs
=
new
ArrayList
<>(
rangeToList
.
size
());
Date
dataDate
;
WindPredictionFutureEnt
windPredictionFutureEnt
;
WindPredictionFutureEnt
windPredictionFutureEnt
;
ThirdWindPowerGenerationEnt
generationEnt
;
ThirdWindPowerGenerationEnt
generationEnt
;
for
(
DateTime
dateTime
:
rangeToList
)
{
for
(
DateTime
dateTime
:
rangeToList
)
{
output
=
new
GetWindPredictionFutureOutput
();
output
=
new
GetWindPredictionFutureOutput
();
//时间偏移
output
.
setDataTime
(
dateTime
);
if
(
betweenDay
!=
0
)
{
dataDate
=
DateUtil
.
offsetDay
(
dateTime
,
betweenDay
);
}
else
{
dataDate
=
dateTime
;
}
output
.
setDataTime
(
dataDate
);
//匹配预测发电量
//匹配预测发电量
if
(
predictedMap
.
containsKey
(
dat
aDat
e
))
{
if
(
predictedMap
.
containsKey
(
dat
eTim
e
))
{
windPredictionFutureEnt
=
predictedMap
.
get
(
dat
aDat
e
);
windPredictionFutureEnt
=
predictedMap
.
get
(
dat
eTim
e
);
output
.
setPredictedPower
(
windPredictionFutureEnt
.
getPredictedPower
());
output
.
setPredictedPower
(
windPredictionFutureEnt
.
getPredictedPower
());
output
.
setWindSpeed
(
windPredictionFutureEnt
.
getWindSpeed
());
output
.
setWindSpeed
(
windPredictionFutureEnt
.
getWindSpeed
());
}
}
//匹配实际发电量
//匹配实际发电量
if
(
powerMap
.
containsKey
(
dat
aDat
e
))
{
if
(
powerMap
.
containsKey
(
dat
eTim
e
))
{
generationEnt
=
powerMap
.
get
(
dat
aDat
e
);
generationEnt
=
powerMap
.
get
(
dat
eTim
e
);
output
.
setActualWindSpeed
(
generationEnt
.
getActualWindSpeed
());
output
.
setActualWindSpeed
(
generationEnt
.
getActualWindSpeed
());
output
.
setActualPower
(
generationEnt
.
getActualPower
());
output
.
setActualPower
(
generationEnt
.
getActualPower
());
}
}
...
...
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