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
933c0efa
Commit
933c0efa
authored
Dec 17, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
82a81908
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
13 deletions
+39
-13
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionHistoryCloudServiceImpl.java
...e/base/service/WindPredictionHistoryCloudServiceImpl.java
+12
-12
C09-base/pps-core-base/src/main/resources/mybatis/mapper/pps/core/base/WindPredictionHistoryViewMapper.xml
.../mapper/pps/core/base/WindPredictionHistoryViewMapper.xml
+27
-1
No files found.
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionHistoryCloudServiceImpl.java
View file @
933c0efa
...
@@ -46,15 +46,15 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
...
@@ -46,15 +46,15 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//取日期范围内已预测数据
//取日期范围内已预测数据
WindPredictionFutureMapper
mapper
=
context
.
getBean
(
WindPredictionFutureMapper
.
class
);
WindPredictionFutureMapper
mapper
=
context
.
getBean
(
WindPredictionFutureMapper
.
class
);
List
<
WindPredictionFutureEnt
>
list
=
mapper
.
selectList
(
new
QueryWrapper
<
WindPredictionFutureEnt
>()
List
<
WindPredictionFutureEnt
>
list
=
mapper
.
selectList
(
new
QueryWrapper
<
WindPredictionFutureEnt
>()
.
select
(
"
station_id
"
,
.
select
(
"
STATION_ID
"
,
"
data_time
"
,
"
DATA_TIME
"
,
"
wind_direction
"
,
"
WIND_DIRECTION
"
,
"
wind_speed
"
,
"
WIND_SPEED
"
,
"
air_temperature
"
,
"
AIR_TEMPERATURE
"
,
"
humidity
"
,
"
HUMIDITY
"
,
"
pressure
"
,
"
PRESSURE
"
,
"
actual_wind_speed
"
,
"
ACTUAL_WIND_SPEED
"
,
"
actual_power AS predicted_power
"
)
"
ACTUAL_POWER AS PREDICTED_POWER
"
)
.
lambda
()
.
lambda
()
.
between
(
WindPredictionFutureEnt:
:
getDataTime
,
startTime
,
endTime
)
.
between
(
WindPredictionFutureEnt:
:
getDataTime
,
startTime
,
endTime
)
);
);
...
@@ -62,9 +62,9 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
...
@@ -62,9 +62,9 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//查实际发电数据
//查实际发电数据
ThirdWindPowerGenerationMapper
generationMapper
=
context
.
getBean
(
ThirdWindPowerGenerationMapper
.
class
);
ThirdWindPowerGenerationMapper
generationMapper
=
context
.
getBean
(
ThirdWindPowerGenerationMapper
.
class
);
List
<
ThirdWindPowerGenerationEnt
>
generationList
=
generationMapper
.
selectList
(
new
QueryWrapper
<
ThirdWindPowerGenerationEnt
>()
List
<
ThirdWindPowerGenerationEnt
>
generationList
=
generationMapper
.
selectList
(
new
QueryWrapper
<
ThirdWindPowerGenerationEnt
>()
.
select
(
"
station_id"
,
"collect_time"
,
"MAX( actual_power ) AS actual_power
"
,
.
select
(
"
STATION_ID"
,
"COLLECT_TIME"
,
"MAX( ACTUAL_POWER ) AS ACTUAL_POWER
"
,
"MAX(
actual_generation ) AS actual_generation"
,
"MAX( actual_wind_speed ) AS actual_wind_speed
"
,
"MAX(
ACTUAL_GENERATION ) AS ACTUAL_GENERATION"
,
"MAX( ACTUAL_WIND_SPEED ) AS ACTUAL_WIND_SPEED
"
,
"MAX(
actual_wind_direction ) AS actual_wind_direction
"
)
"MAX(
ACTUAL_WIND_DIRECTION ) AS ACTUAL_WIND_DIRECTION
"
)
.
lambda
()
.
lambda
()
.
between
(
ThirdWindPowerGenerationEnt:
:
getCollectTime
,
startTime
,
endTime
)
.
between
(
ThirdWindPowerGenerationEnt:
:
getCollectTime
,
startTime
,
endTime
)
.
eq
(
ThirdWindPowerGenerationEnt:
:
getSystemSource
,
ServiceUtil
.
getOilFieldCode
(
context
))
.
eq
(
ThirdWindPowerGenerationEnt:
:
getSystemSource
,
ServiceUtil
.
getOilFieldCode
(
context
))
...
...
C09-base/pps-core-base/src/main/resources/mybatis/mapper/pps/core/base/WindPredictionHistoryViewMapper.xml
View file @
933c0efa
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
AND #{endTime}
AND #{endTime}
</delete>
</delete>
<insert
id=
"batchInsert"
parameterType=
"list"
>
<insert
id=
"batchInsert"
parameterType=
"list"
databaseId=
"MySQL"
>
INSERT INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE,
INSERT INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
WNS_100M, WNS_GRD_100M) VALUES
WNS_100M, WNS_GRD_100M) VALUES
...
@@ -85,4 +85,30 @@
...
@@ -85,4 +85,30 @@
)
)
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"batchInsert"
parameterType=
"list"
databaseId=
"Oracle"
>
INSERT ALL
<foreach
collection=
"list"
item=
"item"
>
INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
WNS_100M, WNS_GRD_100M) VALUES (
#{item.id},
#{item.stationId},
#{item.dataTime},
#{item.windDirection},
#{item.windSpeed},
#{item.airTemperature},
#{item.humidity},
#{item.pressure},
#{item.actualWindDirection},
#{item.actualWindSpeed},
#{item.actualPower},
#{item.predictedPower},
#{item.wnd100m},
#{item.wns100m},
#{item.wnsGrd100m}
)
</foreach>
SELECT * FROM DUAL
</insert>
</mapper>
</mapper>
\ No newline at end of file
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