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
6d84013c
Commit
6d84013c
authored
Dec 16, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
18a11145
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/ThirdDataAccessCloudServiceImpl.java
...e/prediction/service/ThirdDataAccessCloudServiceImpl.java
+1
-1
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/EnergyConsumptionAnalysisViewMapper.xml
...s/core/prediction/EnergyConsumptionAnalysisViewMapper.xml
+31
-1
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
...prediction/WellheadDailyProductionSituationViewMapper.xml
+20
-3
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/ThirdDataAccessCloudServiceImpl.java
View file @
6d84013c
...
...
@@ -483,7 +483,7 @@ public class ThirdDataAccessCloudServiceImpl implements IThirdDataAccessCloudSer
.
lineId
(
lineId
)
.
stationName
(
power
.
getStationName
())
.
powerGeneration
(
power
.
getPhotovoltaicPower
())
.
powerConsumption
(
collect
.
get
(
lineId
))
.
powerConsumption
(
collect
.
get
OrDefault
(
lineId
,
BigDecimal
.
ZERO
))
.
dataDate
(
power
.
getCreateDate
())
.
systemSource
(
oilFieldCode
)
.
build
());
...
...
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/EnergyConsumptionAnalysisViewMapper.xml
View file @
6d84013c
...
...
@@ -40,7 +40,7 @@
ID=#{id}
</select>
<insert
id=
"batchInsertList"
parameterType=
"list"
>
<insert
id=
"batchInsertList"
parameterType=
"list"
databaseId=
"MySQL"
>
INSERT INTO ENERGY_CONSUMPTION_ANALYSIS ( ID, LINE_ID, STATION_NAME, POWER_GENERATION, POWER_CONSUMPTION,
DATA_DATE, SYSTEM_SOURCE )
VALUES
...
...
@@ -56,4 +56,34 @@
)
</foreach>
</insert>
<insert
id=
"batchInsertList"
parameterType=
"list"
databaseId=
"Oracle"
>
INSERT ALL
<foreach
collection=
"list"
item=
"item"
>
INTO ENERGY_CONSUMPTION_ANALYSIS ( ID,
<if
test=
"item.lineId != null and item.lineId != ''"
>
LINE_ID,
</if>
STATION_NAME, POWER_GENERATION,
<if
test=
"item.powerConsumption != null"
>
POWER_CONSUMPTION,
</if>
DATA_DATE, SYSTEM_SOURCE )
VALUES
(
#{item.id},
<if
test=
"item.lineId != null and item.lineId != ''"
>
#{item.lineId},
</if>
#{item.stationName},
#{item.powerGeneration},
<if
test=
"item.powerConsumption != null"
>
#{item.powerConsumption},
</if>
#{item.dataDate},
#{item.systemSource}
)
</foreach>
SELECT * FROM DUAL
</insert>
</mapper>
\ No newline at end of file
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
View file @
6d84013c
...
...
@@ -111,7 +111,7 @@
</resultMap>
<select
id=
"selectSumDailyElectricityConsumption"
parameterType=
"date"
resultType=
"pps.core.prediction.entity.WellheadDailyProductionSituationView"
>
resultType=
"pps.core.prediction.entity.WellheadDailyProductionSituationView"
databaseId=
"MySQL"
>
SELECT W.LINE_ID AS LINE_ID,
L.LINE_NAME AS LINE_NAME,
IFNULL(SUM(S.DAILY_ELECTRICITY_CONSUMPTION), 0) AS DAILY_ELECTRICITY_CONSUMPTION
...
...
@@ -120,9 +120,26 @@
LEFT JOIN BASE_POWER_LINE L ON W.LINE_ID = L.ID
WHERE W.IS_DELETED = 1
AND S.DATA_DATE = #{date}
<if
test=
"
systemSource != null
"
>
AND S.SYSTEM_SOURCE = #{
systemSourc
e}
<if
test=
"
oilFieldCode != null and oilFieldCode != ''
"
>
AND S.SYSTEM_SOURCE = #{
oilFieldCod
e}
</if>
GROUP BY W.LINE_ID
</select>
<select
id=
"selectSumDailyElectricityConsumption"
parameterType=
"date"
resultType=
"pps.core.prediction.entity.WellheadDailyProductionSituationView"
databaseId=
"Oracle"
>
SELECT W.LINE_ID AS LINE_ID,
L.LINE_NAME AS LINE_NAME,
NVL(SUM(S.DAILY_ELECTRICITY_CONSUMPTION), 0) AS DAILY_ELECTRICITY_CONSUMPTION
FROM BASE_POWER_LINE_WELLHEAD W
JOIN WELLHEAD_DAILY_PRODUCTION_SITUATION S ON W.WELLHEAD_ID = S.WELLHEAD_ID
LEFT JOIN BASE_POWER_LINE L ON W.LINE_ID = L.ID
WHERE W.IS_DELETED = 1
AND S.DATA_DATE = #{date}
<if
test=
"oilFieldCode != null and oilFieldCode != ''"
>
AND S.SYSTEM_SOURCE = #{oilFieldCode}
</if>
GROUP BY W.LINE_ID,
L.LINE_NAME
</select>
</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