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
844a1894
Commit
844a1894
authored
Nov 13, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
8a8fd452
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
366 additions
and
352 deletions
+366
-352
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeShortPeriodViewMapper.xml
...per/pps/core/space/SpaceOptimizeShortPeriodViewMapper.xml
+41
-41
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeShortWellheadViewMapper.xml
...r/pps/core/space/SpaceOptimizeShortWellheadViewMapper.xml
+47
-44
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraDurationViewMapper.xml
...r/pps/core/space/SpaceOptimizeUltraDurationViewMapper.xml
+36
-33
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraPeriodViewMapper.xml
...per/pps/core/space/SpaceOptimizeUltraPeriodViewMapper.xml
+45
-43
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraWellheadViewMapper.xml
...r/pps/core/space/SpaceOptimizeUltraWellheadViewMapper.xml
+46
-43
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeViewMapper.xml
...mybatis/mapper/pps/core/space/SpaceOptimizeViewMapper.xml
+41
-41
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/WellDailyElectricityTrendViewMapper.xml
...er/pps/core/space/WellDailyElectricityTrendViewMapper.xml
+76
-73
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/StationDailyProductionSituationViewMapper.xml
.../prediction/StationDailyProductionSituationViewMapper.xml
+10
-10
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/ThirdDailyAccumulationUpdateViewMapper.xml
...ore/prediction/ThirdDailyAccumulationUpdateViewMapper.xml
+13
-13
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/ThirdDailyAccumulationViewMapper.xml
.../pps/core/prediction/ThirdDailyAccumulationViewMapper.xml
+5
-5
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
...prediction/WellheadDailyProductionSituationViewMapper.xml
+6
-6
No files found.
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeShortPeriodViewMapper.xml
View file @
844a1894
...
...
@@ -2,62 +2,62 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeShortPeriodViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.SpaceOptimizeShortPeriodView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"LINE_ID"
property=
"lineId"
/>
<result
column=
"INSTITUTION_ID"
property=
"institutionId"
/>
<result
column=
"OPTIMIZE_STATE"
property=
"optimizeState"
/>
<result
column=
"OPTIMIZE_DATE"
property=
"optimizeDate"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"LINE_ID"
property=
"lineId"
/>
<result
column=
"INSTITUTION_ID"
property=
"institutionId"
/>
<result
column=
"OPTIMIZE_STATE"
property=
"optimizeState"
/>
<result
column=
"OPTIMIZE_DATE"
property=
"optimizeDate"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
is_deleted
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
line_id
,
IS_DELETED
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
LINE_ID
,
INSTITUTION_ID,
OPTIMIZE_STATE,
OPTIMIZE_DATE
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.SpaceOptimizeShortPeriodView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_SHORT_PERIOD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_SHORT_PERIOD
WHERE
ID
=#{id}
</select>
<resultMap
id=
"ExtendResultMap"
type=
"pps.core.space.entity.SpaceOptimizeShortPeriodView"
extends=
"BaseResultMap"
>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"GRID_TYPE_KEY"
property=
"gridTypeKey"
/>
<result
column=
"INSTITUTION_NAME"
property=
"institutionName"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"GRID_TYPE_KEY"
property=
"gridTypeKey"
/>
<result
column=
"INSTITUTION_NAME"
property=
"institutionName"
/>
</resultMap>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.SpaceOptimizeShortPeriodView"
resultMap=
"BaseResultMap"
>
SELECT
p.id
,
p.line_id
,
p
.INSTITUTION_ID,
p
.OPTIMIZE_STATE,
p
.OPTIMIZE_DATE,
d.ou_id
,
d.grid_type_key
,
d
.INSTITUTION_NAME
FROM SPACE_INSTITUTION_DETAIL
d
JOIN SPACE_OPTIMIZE_SHORT_PERIOD
p ON d.id = p
.INSTITUTION_ID
WHERE
p.is_deleted
= 1
AND
p.line_id
= #{lineId}
ORDER BY
p.create_time
DESC
SELECT
P.ID
,
P.LINE_ID
,
P
.INSTITUTION_ID,
P
.OPTIMIZE_STATE,
P
.OPTIMIZE_DATE,
D.OU_ID
,
D.GRID_TYPE_KEY
,
D
.INSTITUTION_NAME
FROM SPACE_INSTITUTION_DETAIL
D
JOIN SPACE_OPTIMIZE_SHORT_PERIOD
P ON D.ID = P
.INSTITUTION_ID
WHERE
P.IS_DELETED
= 1
AND
P.LINE_ID
= #{lineId}
ORDER BY
P.CREATE_TIME
DESC
</select>
</mapper>
\ No newline at end of file
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeShortWellheadViewMapper.xml
View file @
844a1894
...
...
@@ -2,75 +2,78 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeShortWellheadViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.SpaceOptimizeShortWellheadView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"SHORT_PERIOD_ID"
property=
"shortPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"START_SEQ"
property=
"startSeq"
/>
<result
column=
"
frostproof_well"
property=
"frostproofWell"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"SHORT_PERIOD_ID"
property=
"shortPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"START_SEQ"
property=
"startSeq"
/>
<result
column=
"
FROSTPROOF_WELL"
property=
"frostproofWell"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
is_deleted
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
IS_DELETED
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
SHORT_PERIOD_ID,
WELLHEAD_ID,
WELL_NUMBER,
START_SEQ,
frostproof_well
FROSTPROOF_WELL
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.SpaceOptimizeShortWellheadView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_SHORT_WELLHEAD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_SHORT_WELLHEAD
WHERE
ID
=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.SpaceOptimizeShortWellheadView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_SHORT_WELLHEAD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_SHORT_WELLHEAD
WHERE
ID
=#{id}
</select>
<resultMap
id=
"ExtResultMap"
type=
"pps.core.space.entity.SpaceOptimizeShortWellheadView"
extends=
"BaseResultMap"
>
<result
column=
"RUN_DURATION"
property=
"runDuration"
/>
<result
column=
"RUN_DURATION"
property=
"runDuration"
/>
</resultMap>
<select
id=
"selectListJoin"
parameterType=
"pps.core.space.entity.SpaceOptimizeShortWellheadView"
resultMap=
"BaseResultMap"
>
SELECT
s
.WELLHEAD_ID,
s
.WELL_NUMBER,
s
.START_SEQ,
s
.OPTIMIZE_DATE,
SELECT
S
.WELLHEAD_ID,
S
.WELL_NUMBER,
S
.START_SEQ,
S
.OPTIMIZE_DATE,
CASE
w
.RUN_TYPE_KEY
W
.RUN_TYPE_KEY
WHEN 'CONTINUOUS' THEN
24
ELSE
w
.RUN_DURATION
ELSE
W
.RUN_DURATION
END RUN_DURATION
FROM SPACE_OPTIMIZE_SHORT_WELLHEAD
s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD
w ON s.WELLHEAD_ID = w
.WELLHEAD_ID
WHERE
s.is_deleted
= 1
AND
w.is_deleted
= 1
AND
s
.SHORT_PERIOD_ID = #{shortPeriodId}
AND
s
.OPTIMIZE_DATE = #{optimizeDate}
ORDER BY
s
.START_SEQ ASC
FROM SPACE_OPTIMIZE_SHORT_WELLHEAD
S
LEFT JOIN SPACE_INSTITUTION_WELLHEAD
W ON S.WELLHEAD_ID = W
.WELLHEAD_ID
WHERE
S.IS_DELETED
= 1
AND
W.IS_DELETED
= 1
AND
S
.SHORT_PERIOD_ID = #{shortPeriodId}
AND
S
.OPTIMIZE_DATE = #{optimizeDate}
ORDER BY
S
.START_SEQ ASC
</select>
</mapper>
\ No newline at end of file
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraDurationViewMapper.xml
View file @
844a1894
...
...
@@ -2,35 +2,36 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeUltraDurationViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.SpaceOptimizeUltraDurationView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"RECORD_ID"
property=
"recordId"
/>
<result
column=
"
ultra_period_id"
property=
"ultraPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"IS_OPTIMIZE"
property=
"isOptimize"
/>
<result
column=
"GENERATION_TYPE_KEY"
property=
"generationTypeKey"
/>
<result
column=
"OPEN_WELL_TIME"
property=
"openWellTime"
/>
<result
column=
"CLOSE_WELL_TIME"
property=
"closeWellTime"
/>
<result
column=
"FIRST_START"
property=
"firstStart"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"RECORD_ID"
property=
"recordId"
/>
<result
column=
"
ULTRA_PERIOD_ID"
property=
"ultraPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"IS_OPTIMIZE"
property=
"isOptimize"
/>
<result
column=
"GENERATION_TYPE_KEY"
property=
"generationTypeKey"
/>
<result
column=
"OPEN_WELL_TIME"
property=
"openWellTime"
/>
<result
column=
"CLOSE_WELL_TIME"
property=
"closeWellTime"
/>
<result
column=
"FIRST_START"
property=
"firstStart"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
is_deleted
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
IS_DELETED
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
RECORD_ID,
ultra_period_id
,
ULTRA_PERIOD_ID
,
WELLHEAD_ID,
IS_OPTIMIZE,
GENERATION_TYPE_KEY,
...
...
@@ -38,20 +39,22 @@
CLOSE_WELL_TIME,
FIRST_START
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraDurationView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_ULTRA_DURATION
where
id
=#{id}
FROM
SPACE_OPTIMIZE_ULTRA_DURATION
WHERE
ID
=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraDurationView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_ULTRA_DURATION
where
id
=#{id}
FROM
SPACE_OPTIMIZE_ULTRA_DURATION
WHERE
ID
=#{id}
</select>
</mapper>
\ No newline at end of file
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraPeriodViewMapper.xml
View file @
844a1894
...
...
@@ -2,65 +2,67 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeUltraPeriodViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.SpaceOptimizeUltraPeriodView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"LINE_ID"
property=
"lineId"
/>
<result
column=
"INSTITUTION_ID"
property=
"institutionId"
/>
<result
column=
"EXECUTION_CYCLE"
property=
"executionCycle"
/>
<result
column=
"OPTIMIZE_STATE"
property=
"optimizeState"
/>
<result
column=
"OPTIMIZE_DEADLINE"
property=
"optimizeDeadline"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"LINE_ID"
property=
"lineId"
/>
<result
column=
"INSTITUTION_ID"
property=
"institutionId"
/>
<result
column=
"EXECUTION_CYCLE"
property=
"executionCycle"
/>
<result
column=
"OPTIMIZE_STATE"
property=
"optimizeState"
/>
<result
column=
"OPTIMIZE_DEADLINE"
property=
"optimizeDeadline"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
is_deleted
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
line_id
,
IS_DELETED
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
LINE_ID
,
INSTITUTION_ID,
EXECUTION_CYCLE,
OPTIMIZE_STATE,
OPTIMIZE_DEADLINE
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraPeriodView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_ULTRA_PERIOD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_ULTRA_PERIOD
WHERE
ID
=#{id}
</select>
<resultMap
id=
"ExtendResultMap"
type=
"pps.core.space.entity.SpaceOptimizeUltraPeriodView"
extends=
"BaseResultMap"
>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"GRID_TYPE_KEY"
property=
"gridTypeKey"
/>
<result
column=
"INSTITUTION_NAME"
property=
"institutionName"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"GRID_TYPE_KEY"
property=
"gridTypeKey"
/>
<result
column=
"INSTITUTION_NAME"
property=
"institutionName"
/>
</resultMap>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraPeriodView"
resultMap=
"BaseResultMap"
>
SELECT
p.id
,
p.line_id
,
p
.INSTITUTION_ID,
p
.EXECUTION_CYCLE,
p
.OPTIMIZE_STATE,
p
.OPTIMIZE_DEADLINE,
d.ou_id
,
d.grid_type_key
,
d
.INSTITUTION_NAME
FROM SPACE_INSTITUTION_DETAIL
d
JOIN SPACE_OPTIMIZE_ULTRA_PERIOD
p ON d.id = p
.INSTITUTION_ID
WHERE
p.is_deleted
= 1
AND
p.line_id
= #{lineId}
ORDER BY
p.create_time
DESC
SELECT
P.ID
,
P.LINE_ID
,
P
.INSTITUTION_ID,
P
.EXECUTION_CYCLE,
P
.OPTIMIZE_STATE,
P
.OPTIMIZE_DEADLINE,
D.OU_ID
,
D.GRID_TYPE_KEY
,
D
.INSTITUTION_NAME
FROM SPACE_INSTITUTION_DETAIL
D
JOIN SPACE_OPTIMIZE_ULTRA_PERIOD
P ON D.ID = P
.INSTITUTION_ID
WHERE
P.IS_DELETED
= 1
AND
P.LINE_ID
= #{lineId}
ORDER BY
P.CREATE_TIME
DESC
</select>
</mapper>
\ No newline at end of file
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeUltraWellheadViewMapper.xml
View file @
844a1894
...
...
@@ -2,73 +2,76 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeUltraWellheadViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.SpaceOptimizeUltraWellheadView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"
ultra_period_id"
property=
"ultraPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"START_SEQ"
property=
"startSeq"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"IS_DELETED"
property=
"isDeleted"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"
ULTRA_PERIOD_ID"
property=
"ultraPeriodId"
/>
<result
column=
"WELLHEAD_ID"
property=
"wellheadId"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"START_SEQ"
property=
"startSeq"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
is_deleted
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
ultra_period_id
,
IS_DELETED
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
ULTRA_PERIOD_ID
,
WELLHEAD_ID,
WELL_NUMBER,
START_SEQ
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraWellheadView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_ULTRA_WELLHEAD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_ULTRA_WELLHEAD
WHERE
ID
=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraWellheadView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SPACE_OPTIMIZE_ULTRA_WELLHEAD
where
id
=#{id}
FROM
SPACE_OPTIMIZE_ULTRA_WELLHEAD
WHERE
ID
=#{id}
</select>
<resultMap
id=
"ExtResultMap"
type=
"pps.core.space.entity.SpaceOptimizeUltraWellheadView"
extends=
"BaseResultMap"
>
<result
column=
"RUN_DURATION"
property=
"runDuration"
/>
<result
column=
"RUN_DURATION"
property=
"runDuration"
/>
</resultMap>
<select
id=
"selectListJoin"
parameterType=
"pps.core.space.entity.SpaceOptimizeUltraWellheadView"
resultMap=
"BaseResultMap"
>
SELECT
s
.WELLHEAD_ID,
s
.WELL_NUMBER,
s
.START_SEQ,
s
.OPTIMIZE_DATE,
SELECT
S
.WELLHEAD_ID,
S
.WELL_NUMBER,
S
.START_SEQ,
S
.OPTIMIZE_DATE,
CASE
w
.RUN_TYPE_KEY
W
.RUN_TYPE_KEY
WHEN 'CONTINUOUS' THEN
24
ELSE
w
.RUN_DURATION
ELSE
W
.RUN_DURATION
END RUN_DURATION
FROM SPACE_OPTIMIZE_ULTRA_WELLHEAD
s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD
w ON s.WELLHEAD_ID = w
.WELLHEAD_ID
WHERE
s.is_deleted
= 1
AND
w.is_deleted
= 1
AND
s.ultra_period_id
= #{ultraPeriodId}
AND
s
.OPTIMIZE_DATE = #{optimizeDate}
ORDER BY
s
.START_SEQ ASC
FROM SPACE_OPTIMIZE_ULTRA_WELLHEAD
S
LEFT JOIN SPACE_INSTITUTION_WELLHEAD
W ON S.WELLHEAD_ID = W
.WELLHEAD_ID
WHERE
S.IS_DELETED
= 1
AND
W.IS_DELETED
= 1
AND
S.ULTRA_PERIOD_ID
= #{ultraPeriodId}
AND
S
.OPTIMIZE_DATE = #{optimizeDate}
ORDER BY
S
.START_SEQ ASC
</select>
</mapper>
\ No newline at end of file
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/SpaceOptimizeViewMapper.xml
View file @
844a1894
...
...
@@ -3,8 +3,8 @@
<mapper
namespace=
"pps.core.space.mapper.SpaceOptimizeViewMapper"
>
<insert
id=
"longPeriodBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_LONG_PERIOD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time, line_id
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
INSERT INTO SPACE_OPTIMIZE_LONG_PERIOD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME, LINE_ID
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
OPTIMIZE_DEADLINE )
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -26,8 +26,8 @@
</insert>
<insert
id=
"longWellheadBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_LONG_WELLHEAD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time
, LONG_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
INSERT INTO SPACE_OPTIMIZE_LONG_WELLHEAD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME
, LONG_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -49,13 +49,13 @@
<insert
id=
"longDurationBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_LONG_DURATION (
id
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
ID
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
RECORD_ID,
LONG_PERIOD_ID,
WELLHEAD_ID,
...
...
@@ -96,8 +96,8 @@
</insert>
<insert
id=
"midPeriodBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_MID_PERIOD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time, line_id
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
INSERT INTO SPACE_OPTIMIZE_MID_PERIOD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME, LINE_ID
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
OPTIMIZE_DEADLINE )
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -119,8 +119,8 @@
</insert>
<insert
id=
"midWellheadBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_MID_WELLHEAD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time
, MID_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
INSERT INTO SPACE_OPTIMIZE_MID_WELLHEAD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME
, MID_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -142,13 +142,13 @@
<insert
id=
"midDurationBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_MID_DURATION (
id
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
ID
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
RECORD_ID,
MID_PERIOD_ID,
WELLHEAD_ID,
...
...
@@ -189,8 +189,8 @@
</insert>
<insert
id=
"shortPeriodBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_SHORT_PERIOD (
id, create_by_id, create_by_name, create_time, modify_by_id
,
modify_by_name, modify_time, line_id
, INSTITUTION_ID, OPTIMIZE_STATE, OPTIMIZE_DATE)
INSERT INTO SPACE_OPTIMIZE_SHORT_PERIOD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME, MODIFY_BY_ID
,
MODIFY_BY_NAME, MODIFY_TIME, LINE_ID
, INSTITUTION_ID, OPTIMIZE_STATE, OPTIMIZE_DATE)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -210,9 +210,9 @@
</insert>
<insert
id=
"shortWellheadBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_SHORT_WELLHEAD (
id, create_by_id, create_by_name, create_time, modify_by_id
,
modify_by_name, modify_time
, SHORT_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ,
OPTIMIZE_DATE,
frostproof_well
)
INSERT INTO SPACE_OPTIMIZE_SHORT_WELLHEAD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME, MODIFY_BY_ID
,
MODIFY_BY_NAME, MODIFY_TIME
, SHORT_PERIOD_ID, WELLHEAD_ID, WELL_NUMBER, START_SEQ,
OPTIMIZE_DATE,
FROSTPROOF_WELL
)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -234,8 +234,8 @@
</insert>
<insert
id=
"shortDurationBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_SHORT_DURATION (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time
, RECORD_ID, SHORT_PERIOD_ID, WELLHEAD_ID, IS_OPTIMIZE,
INSERT INTO SPACE_OPTIMIZE_SHORT_DURATION (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME
, RECORD_ID, SHORT_PERIOD_ID, WELLHEAD_ID, IS_OPTIMIZE,
GENERATION_TYPE_KEY, OPEN_WELL_TIME, CLOSE_WELL_TIME, FIRST_START, OPTIMIZE_DATE)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -268,8 +268,8 @@
</insert>
<insert
id=
"ultraPeriodBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_ULTRA_PERIOD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time, line_id
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
INSERT INTO SPACE_OPTIMIZE_ULTRA_PERIOD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME, LINE_ID
, INSTITUTION_ID, EXECUTION_CYCLE, OPTIMIZE_STATE,
OPTIMIZE_DEADLINE )
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -291,8 +291,8 @@
</insert>
<insert
id=
"ultraWellheadBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_ULTRA_WELLHEAD (
id, create_by_id, create_by_name, create_time
,
modify_by_id, modify_by_name, modify_time, ultra_period_id
, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
INSERT INTO SPACE_OPTIMIZE_ULTRA_WELLHEAD (
ID, CREATE_BY_ID, CREATE_BY_NAME, CREATE_TIME
,
MODIFY_BY_ID, MODIFY_BY_NAME, MODIFY_TIME, ULTRA_PERIOD_ID
, WELLHEAD_ID, WELL_NUMBER, START_SEQ, OPTIMIZE_DATE)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -314,15 +314,15 @@
<insert
id=
"ultraDurationBatchInsertList"
parameterType=
"list"
>
INSERT INTO SPACE_OPTIMIZE_ULTRA_DURATION (
id
,
create_by_id
,
create_by_name
,
create_time
,
modify_by_id
,
modify_by_name
,
modify_time
,
ID
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME
,
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
RECORD_ID,
ultra_period_id
,
ULTRA_PERIOD_ID
,
WELLHEAD_ID,
IS_OPTIMIZE,
GENERATION_TYPE_KEY,
...
...
C11-space/pps-core-space/src/main/resources/mybatis/mapper/pps/core/space/WellDailyElectricityTrendViewMapper.xml
View file @
844a1894
...
...
@@ -2,59 +2,62 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.space.mapper.WellDailyElectricityTrendViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.space.entity.WellDailyElectricityTrendView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"
space_run_duration"
property=
"spaceRunDuration"
/>
<result
column=
"
daily_open_hour"
property=
"dailyOpenHour"
/>
<result
column=
"
daily_green_open_hour"
property=
"dailyGreenOpenHour"
/>
<result
column=
"
daily_green_consumption"
property=
"dailyGreenConsumption"
/>
<result
column=
"
daily_electricity_consumption"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
daily_liquid_production"
property=
"dailyLiquidProduction"
/>
<result
column=
"
daily_carbon_reduction"
property=
"dailyCarbonReduction"
/>
<result
column=
"
green_electricity_rate"
property=
"greenElectricityRate"
/>
<result
column=
"VALLEY_ELECTRIC_OPEN_HOUR"
property=
"valleyElectricOpenHour"
/>
<result
column=
"VALLEY_ELECTRIC_RATE"
property=
"valleyElectricRate"
/>
<result
column=
"CREATE_DATE"
property=
"createDate"
/>
<result
column=
"SYSTEM_SOURCE"
property=
"systemSource"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"
SPACE_RUN_DURATION"
property=
"spaceRunDuration"
/>
<result
column=
"
DAILY_OPEN_HOUR"
property=
"dailyOpenHour"
/>
<result
column=
"
DAILY_GREEN_OPEN_HOUR"
property=
"dailyGreenOpenHour"
/>
<result
column=
"
DAILY_GREEN_CONSUMPTION"
property=
"dailyGreenConsumption"
/>
<result
column=
"
DAILY_ELECTRICITY_CONSUMPTION"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
DAILY_LIQUID_PRODUCTION"
property=
"dailyLiquidProduction"
/>
<result
column=
"
DAILY_CARBON_REDUCTION"
property=
"dailyCarbonReduction"
/>
<result
column=
"
GREEN_ELECTRICITY_RATE"
property=
"greenElectricityRate"
/>
<result
column=
"VALLEY_ELECTRIC_OPEN_HOUR"
property=
"valleyElectricOpenHour"
/>
<result
column=
"VALLEY_ELECTRIC_RATE"
property=
"valleyElectricRate"
/>
<result
column=
"CREATE_DATE"
property=
"createDate"
/>
<result
column=
"SYSTEM_SOURCE"
property=
"systemSource"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id
ID
,
WELL_NUMBER,
space_run_duration
,
daily_open_hour
,
daily_green_open_hour
,
daily_green_consumption
,
daily_electricity_consumption
,
daily_liquid_production
,
daily_carbon_reduction
,
green_electricity_rate
,
SPACE_RUN_DURATION
,
DAILY_OPEN_HOUR
,
DAILY_GREEN_OPEN_HOUR
,
DAILY_GREEN_CONSUMPTION
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
DAILY_CARBON_REDUCTION
,
GREEN_ELECTRICITY_RATE
,
VALLEY_ELECTRIC_OPEN_HOUR,
VALLEY_ELECTRIC_RATE,
CREATE_DATE,
SYSTEM_SOURCE
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.space.entity.WellDailyElectricityTrendView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
WELL_DAILY_ELECTRICITY_TREND
where
id
=#{id}
FROM
WELL_DAILY_ELECTRICITY_TREND
WHERE
ID
=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.space.entity.WellDailyElectricityTrendView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
WELL_DAILY_ELECTRICITY_TREND
where
id
=#{id}
FROM
WELL_DAILY_ELECTRICITY_TREND
WHERE
ID
=#{id}
</select>
<insert
id=
"batchInsert"
parameterType=
"list"
>
INSERT INTO WELL_DAILY_ELECTRICITY_TREND (WELL_NUMBER,
space_run_duration, daily_open_hour
,
daily_green_open_hour, daily_green_consumption, daily_electricity_consumption, daily_liquid_production
,
daily_carbon_reduction, green_electricity_rate
, VALLEY_ELECTRIC_OPEN_HOUR, VALLEY_ELECTRIC_RATE, CREATE_DATE,
INSERT INTO WELL_DAILY_ELECTRICITY_TREND (WELL_NUMBER,
SPACE_RUN_DURATION, DAILY_OPEN_HOUR
,
DAILY_GREEN_OPEN_HOUR, DAILY_GREEN_CONSUMPTION, DAILY_ELECTRICITY_CONSUMPTION, DAILY_LIQUID_PRODUCTION
,
DAILY_CARBON_REDUCTION, GREEN_ELECTRICITY_RATE
, VALLEY_ELECTRIC_OPEN_HOUR, VALLEY_ELECTRIC_RATE, CREATE_DATE,
SYSTEM_SOURCE) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -76,42 +79,42 @@
</insert>
<resultMap
id=
"ExtResultMap"
type=
"pps.core.space.entity.WellDailyElectricityTrendView"
extends=
"BaseResultMap"
>
<result
column=
"
month_daily_green_open_hour"
property=
"monthDailyGreenOpenHour"
/>
<result
column=
"
month_space_run_duration"
property=
"monthSpaceRunDuration"
/>
<result
column=
"
month_daily_green_consumption"
property=
"monthDailyGreenConsumption"
/>
<result
column=
"
month_valley_electric_open_hour"
property=
"monthValleyElectricOpenHour"
/>
<result
column=
"
year_daily_green_open_hour"
property=
"yearDailyGreenOpenHour"
/>
<result
column=
"
year_space_run_duration"
property=
"yearSpaceRunDuration"
/>
<result
column=
"
year_daily_green_consumption"
property=
"yearDailyGreenConsumption"
/>
<result
column=
"
year_valley_electric_open_hour"
property=
"yearValleyElectricOpenHour"
/>
<result
column=
"
MONTH_DAILY_GREEN_OPEN_HOUR"
property=
"monthDailyGreenOpenHour"
/>
<result
column=
"
MONTH_SPACE_RUN_DURATION"
property=
"monthSpaceRunDuration"
/>
<result
column=
"
MONTH_DAILY_GREEN_CONSUMPTION"
property=
"monthDailyGreenConsumption"
/>
<result
column=
"
MONTH_VALLEY_ELECTRIC_OPEN_HOUR"
property=
"monthValleyElectricOpenHour"
/>
<result
column=
"
YEAR_DAILY_GREEN_OPEN_HOUR"
property=
"yearDailyGreenOpenHour"
/>
<result
column=
"
YEAR_SPACE_RUN_DURATION"
property=
"yearSpaceRunDuration"
/>
<result
column=
"
YEAR_DAILY_GREEN_CONSUMPTION"
property=
"yearDailyGreenConsumption"
/>
<result
column=
"
YEAR_VALLEY_ELECTRIC_OPEN_HOUR"
property=
"yearValleyElectricOpenHour"
/>
</resultMap>
<select
id=
"selectWellheadAnalysisPage"
parameterType=
"pps.core.space.entity.WellDailyElectricityTrendView"
resultMap=
"ExtResultMap"
>
SELECT
z
.*
Z
.*
FROM
(
SELECT
t
.WELL_NUMBER,
t.space_run_duration
,
t.daily_liquid_production
,
t.green_electricity_rate
,
t.daily_carbon_reduction
,
t
.VALLEY_ELECTRIC_RATE,
m.month_daily_green_open_hour
,
m.month_space_run_duration
,
m.month_daily_green_consumption
,
m.month_valley_electric_open_hour
,
y.year_daily_green_open_hour
,
y.year_space_run_duration
,
y.year_daily_green_consumption
,
y.year_valley_electric_open_hour
FROM WELL_DAILY_ELECTRICITY_TREND
t
SELECT
T
.WELL_NUMBER,
T.SPACE_RUN_DURATION
,
T.DAILY_LIQUID_PRODUCTION
,
T.GREEN_ELECTRICITY_RATE
,
T.DAILY_CARBON_REDUCTION
,
T
.VALLEY_ELECTRIC_RATE,
M.MONTH_DAILY_GREEN_OPEN_HOUR
,
M.MONTH_SPACE_RUN_DURATION
,
M.MONTH_DAILY_GREEN_CONSUMPTION
,
M.MONTH_VALLEY_ELECTRIC_OPEN_HOUR
,
Y.YEAR_DAILY_GREEN_OPEN_HOUR
,
Y.YEAR_SPACE_RUN_DURATION
,
Y.YEAR_DAILY_GREEN_CONSUMPTION
,
Y.YEAR_VALLEY_ELECTRIC_OPEN_HOUR
FROM WELL_DAILY_ELECTRICITY_TREND
T
LEFT JOIN (SELECT WELL_NUMBER,
SUM(
daily_green_open_hour) AS month_daily_green_open_hour
,
SUM(
space_run_duration) AS month_space_run_duration
,
SUM(
daily_green_consumption) AS month_daily_green_consumption
,
SUM(VALLEY_ELECTRIC_OPEN_HOUR) AS
month_valley_electric_open_hour
SUM(
DAILY_GREEN_OPEN_HOUR) AS MONTH_DAILY_GREEN_OPEN_HOUR
,
SUM(
SPACE_RUN_DURATION) AS MONTH_SPACE_RUN_DURATION
,
SUM(
DAILY_GREEN_CONSUMPTION) AS MONTH_DAILY_GREEN_CONSUMPTION
,
SUM(VALLEY_ELECTRIC_OPEN_HOUR) AS
MONTH_VALLEY_ELECTRIC_OPEN_HOUR
FROM WELL_DAILY_ELECTRICITY_TREND
WHERE
MONTH ( CREATE_DATE ) = #{month}
...
...
@@ -120,12 +123,12 @@
#{item}
</foreach>
GROUP BY
WELL_NUMBER)
m ON t.WELL_NUMBER = m
.WELL_NUMBER
WELL_NUMBER)
M ON T.WELL_NUMBER = M
.WELL_NUMBER
LEFT JOIN (SELECT WELL_NUMBER,
SUM(
daily_green_open_hour) AS year_daily_green_open_hour
,
SUM(
space_run_duration) AS year_space_run_duration
,
SUM(
daily_green_consumption) AS year_daily_green_consumption
,
SUM(VALLEY_ELECTRIC_OPEN_HOUR) AS
year_valley_electric_open_hour
SUM(
DAILY_GREEN_OPEN_HOUR) AS YEAR_DAILY_GREEN_OPEN_HOUR
,
SUM(
SPACE_RUN_DURATION) AS YEAR_SPACE_RUN_DURATION
,
SUM(
DAILY_GREEN_CONSUMPTION) AS YEAR_DAILY_GREEN_CONSUMPTION
,
SUM(VALLEY_ELECTRIC_OPEN_HOUR) AS
YEAR_VALLEY_ELECTRIC_OPEN_HOUR
FROM WELL_DAILY_ELECTRICITY_TREND
WHERE
YEAR ( CREATE_DATE ) = #{year}
...
...
@@ -134,19 +137,19 @@
#{item}
</foreach>
GROUP BY
WELL_NUMBER)
y ON t.WELL_NUMBER = y
.WELL_NUMBER
WHERE
t
.CREATE_DATE = #{createDate}
AND
t
.WELL_NUMBER IN
WELL_NUMBER)
Y ON T.WELL_NUMBER = Y
.WELL_NUMBER
WHERE
T
.CREATE_DATE = #{createDate}
AND
T
.WELL_NUMBER IN
<foreach
collection=
"wellNumberList"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
)
z
)
Z
<where>
<if
test=
"wellNumber != null and wellNumber != ''"
>
AND
z.WELL_NUMBER LIKE concat
('%',#{wellNumber},'%')
AND
Z.WELL_NUMBER LIKE CONCAT
('%',#{wellNumber},'%')
</if>
</where>
ORDER BY
z
.WELL_NUMBER
Z
.WELL_NUMBER
</select>
</mapper>
\ No newline at end of file
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/StationDailyProductionSituationViewMapper.xml
View file @
844a1894
...
...
@@ -7,8 +7,8 @@
<result
column=
"STATION_ID"
property=
"stationId"
/>
<result
column=
"DATA_DATE"
property=
"dataDate"
/>
<result
column=
"production_time"
property=
"productionTime"
/>
<result
column=
"
daily_electricity_consumption
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
daily_liquid_production
"
property=
"dailyLiquidProduction"
/>
<result
column=
"
DAILY_ELECTRICITY_CONSUMPTION
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
DAILY_LIQUID_PRODUCTION
"
property=
"dailyLiquidProduction"
/>
<result
column=
"daily_utility_electricity_consumption"
property=
"dailyUtilityElectricityConsumption"
/>
<result
column=
"electricity_consumption_ph"
property=
"electricityConsumptionPh"
/>
...
...
@@ -31,8 +31,8 @@
STATION_ID,
data_date,
production_time,
daily_electricity_consumption
,
daily_liquid_production
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
daily_utility_electricity_consumption,
electricity_consumption_ph,
electricity_consumption_hh,
...
...
@@ -68,8 +68,8 @@
STATION_NAME,
data_date,
production_time,
daily_electricity_consumption
,
daily_liquid_production
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
daily_utility_electricity_consumption,
electricity_consumption_ph,
electricity_consumption_hh,
...
...
@@ -120,8 +120,8 @@
SELECT
d.STATION_NAME,
d.production_time,
d.
daily_liquid_production
,
d.
daily_electricity_consumption
,
d.
DAILY_LIQUID_PRODUCTION
,
d.
DAILY_ELECTRICITY_CONSUMPTION
,
d.PHOTOVOLTAIC_POWER,
IFNULL( m.month_photovoltaic_power, 0 ) AS month_photovoltaic_power,
y.year_photovoltaic_power
...
...
@@ -130,8 +130,8 @@
SELECT
STATION_NAME,
IFNULL( ROUND( AVG( production_time ), 2 ), 0 ) AS production_time,
IFNULL( ROUND( AVG(
daily_liquid_production ), 2 ), 0 ) AS daily_liquid_production
,
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( AVG(
DAILY_ELECTRICITY_CONSUMPTION ), 2 ), 0 ) AS DAILY_ELECTRICITY_CONSUMPTION
,
IFNULL( ROUND( AVG( PHOTOVOLTAIC_POWER ), 2 ), 0 ) AS PHOTOVOLTAIC_POWER
FROM
STATION_DAILY_PRODUCTION_SITUATION WHERE
...
...
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/ThirdDailyAccumulationUpdateViewMapper.xml
View file @
844a1894
...
...
@@ -7,8 +7,8 @@
<result
column=
"STATION_ID"
property=
"stationId"
/>
<result
column=
"CREATE_DATE"
property=
"createDate"
/>
<result
column=
"PHOTOVOLTAIC_POWER"
property=
"photovoltaicPower"
/>
<result
column=
"
daily_electricity_consumption
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
daily_liquid_production
"
property=
"dailyLiquidProduction"
/>
<result
column=
"
DAILY_ELECTRICITY_CONSUMPTION
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
DAILY_LIQUID_PRODUCTION
"
property=
"dailyLiquidProduction"
/>
<result
column=
"in_place_consumption"
property=
"inPlaceConsumption"
/>
<result
column=
"energy_storage_discharge"
property=
"energyStorageDischarge"
/>
<result
column=
"save_date"
property=
"saveDate"
/>
...
...
@@ -22,8 +22,8 @@
STATION_ID,
CREATE_DATE,
PHOTOVOLTAIC_POWER,
daily_electricity_consumption
,
daily_liquid_production
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
in_place_consumption,
energy_storage_discharge,
save_date,
...
...
@@ -49,7 +49,7 @@
<insert
id=
"batchInsertList"
parameterType=
"list"
>
INSERT INTO THIRD_DAILY_ACCUMULATION_UPDATE ( STATION_NAME, STATION_ID, CREATE_DATE, PHOTOVOLTAIC_POWER,
daily_electricity_consumption, daily_liquid_production
, in_place_consumption, energy_storage_discharge,
DAILY_ELECTRICITY_CONSUMPTION, DAILY_LIQUID_PRODUCTION
, in_place_consumption, energy_storage_discharge,
save_date, SYSTEM_SOURCE,
save_hour)
VALUES
...
...
@@ -73,7 +73,7 @@
<resultMap
id=
"ExtResultMap"
type=
"pps.core.prediction.entity.ThirdDailyAccumulationUpdateView"
extends=
"BaseResultMap"
>
<result
column=
"DAY_FLAG"
property=
"dayFlag"
/>
<result
column=
"
green_electricity_rate
"
property=
"greenElectricityRate"
/>
<result
column=
"
GREEN_ELECTRICITY_RATE
"
property=
"greenElectricityRate"
/>
<result
column=
"avoid_peak_rate"
property=
"avoidPeakRate"
/>
</resultMap>
...
...
@@ -81,12 +81,12 @@
resultMap=
"ExtResultMap"
>
SELECT z.DAY_FLAG,
ROUND(z.PHOTOVOLTAIC_POWER, 2) AS PHOTOVOLTAIC_POWER,
ROUND(z.
daily_electricity_consumption, 2) AS daily_electricity_consumption
,
IFNULL(ROUND(z.in_place_consumption / z.
daily_electricity_consumption
* 100, 2),
0) AS
green_electricity_rate
,
ROUND(z.
DAILY_ELECTRICITY_CONSUMPTION, 2) AS DAILY_ELECTRICITY_CONSUMPTION
,
IFNULL(ROUND(z.in_place_consumption / z.
DAILY_ELECTRICITY_CONSUMPTION
* 100, 2),
0) AS
GREEN_ELECTRICITY_RATE
,
IFNULL(ROUND(z.PHOTOVOLTAIC_POWER - z.in_place_consumption, 2), 0) AS avoid_peak_rate
FROM (SELECT IFNULL(SUM(PHOTOVOLTAIC_POWER), 0) AS PHOTOVOLTAIC_POWER,
IFNULL(SUM(
daily_electricity_consumption), 0) AS daily_electricity_consumption
,
IFNULL(SUM(
DAILY_ELECTRICITY_CONSUMPTION), 0) AS DAILY_ELECTRICITY_CONSUMPTION
,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
1 AS DAY_FLAG
FROM THIRD_DAILY_ACCUMULATION_UPDATE
...
...
@@ -99,7 +99,7 @@
</foreach>
UNION ALL
SELECT IFNULL(SUM(PHOTOVOLTAIC_POWER), 0) AS PHOTOVOLTAIC_POWER,
IFNULL(SUM(
daily_electricity_consumption), 0) AS daily_electricity_consumption
,
IFNULL(SUM(
DAILY_ELECTRICITY_CONSUMPTION), 0) AS DAILY_ELECTRICITY_CONSUMPTION
,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
2 AS DAY_FLAG
FROM THIRD_DAILY_ACCUMULATION_UPDATE
...
...
@@ -112,7 +112,7 @@
</foreach>
UNION ALL
SELECT IFNULL(SUM(PHOTOVOLTAIC_POWER), 0) AS PHOTOVOLTAIC_POWER,
IFNULL(SUM(
daily_electricity_consumption), 0) AS daily_electricity_consumption
,
IFNULL(SUM(
DAILY_ELECTRICITY_CONSUMPTION), 0) AS DAILY_ELECTRICITY_CONSUMPTION
,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
3 AS DAY_FLAG
FROM THIRD_DAILY_ACCUMULATION_UPDATE
...
...
@@ -131,7 +131,7 @@
resultMap=
"ExtResultMap"
>
SELECT
IFNULL( SUM( PHOTOVOLTAIC_POWER ), 0 ) AS PHOTOVOLTAIC_POWER,
IFNULL( SUM(
daily_electricity_consumption ), 0 ) AS daily_electricity_consumption
,
IFNULL( SUM(
DAILY_ELECTRICITY_CONSUMPTION ), 0 ) AS DAILY_ELECTRICITY_CONSUMPTION
,
<choose>
<when
test=
"dayFlag == 1"
>
DATE_FORMAT( CREATE_DATE, '%Y-%m-01' ) AS CREATE_DATE
...
...
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/ThirdDailyAccumulationViewMapper.xml
View file @
844a1894
...
...
@@ -7,8 +7,8 @@
<result
column=
"STATION_ID"
property=
"stationId"
/>
<result
column=
"CREATE_DATE"
property=
"createDate"
/>
<result
column=
"PHOTOVOLTAIC_POWER"
property=
"photovoltaicPower"
/>
<result
column=
"
daily_electricity_consumption
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
daily_liquid_production
"
property=
"dailyLiquidProduction"
/>
<result
column=
"
DAILY_ELECTRICITY_CONSUMPTION
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
DAILY_LIQUID_PRODUCTION
"
property=
"dailyLiquidProduction"
/>
<result
column=
"in_place_consumption"
property=
"inPlaceConsumption"
/>
<result
column=
"energy_storage_discharge"
property=
"energyStorageDischarge"
/>
<result
column=
"save_date"
property=
"saveDate"
/>
...
...
@@ -21,8 +21,8 @@
STATION_ID,
CREATE_DATE,
PHOTOVOLTAIC_POWER,
daily_electricity_consumption
,
daily_liquid_production
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
in_place_consumption,
energy_storage_discharge,
save_date
...
...
@@ -46,7 +46,7 @@
<insert
id=
"batchInsertList"
parameterType=
"list"
>
INSERT INTO THIRD_DAILY_ACCUMULATION ( STATION_NAME, STATION_ID, CREATE_DATE, PHOTOVOLTAIC_POWER,
daily_electricity_consumption, daily_liquid_production
, in_place_consumption, energy_storage_discharge,
DAILY_ELECTRICITY_CONSUMPTION, DAILY_LIQUID_PRODUCTION
, in_place_consumption, energy_storage_discharge,
save_date, SYSTEM_SOURCE )
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
View file @
844a1894
...
...
@@ -7,8 +7,8 @@
<result
column=
"WELL_NUMBER"
property=
"wellNumber"
/>
<result
column=
"DATA_DATE"
property=
"dataDate"
/>
<result
column=
"production_time"
property=
"productionTime"
/>
<result
column=
"
daily_electricity_consumption
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
daily_liquid_production
"
property=
"dailyLiquidProduction"
/>
<result
column=
"
DAILY_ELECTRICITY_CONSUMPTION
"
property=
"dailyElectricityConsumption"
/>
<result
column=
"
DAILY_LIQUID_PRODUCTION
"
property=
"dailyLiquidProduction"
/>
<result
column=
"SYSTEM_SOURCE"
property=
"systemSource"
/>
<result
column=
"daily_utility_electricity_consumption"
property=
"dailyUtilityElectricityConsumption"
/>
...
...
@@ -30,8 +30,8 @@
WELL_NUMBER,
data_date,
production_time,
daily_electricity_consumption
,
daily_liquid_production
,
DAILY_ELECTRICITY_CONSUMPTION
,
DAILY_LIQUID_PRODUCTION
,
daily_utility_electricity_consumption,
electricity_consumption_ph,
electricity_consumption_hh,
...
...
@@ -64,7 +64,7 @@
<insert
id=
"batchInsertList"
parameterType=
"list"
>
INSERT INTO WELLHEAD_DAILY_PRODUCTION_SITUATION ( WELLHEAD_ID, WELL_NUMBER, data_date, production_time,
daily_electricity_consumption, daily_liquid_production
, SYSTEM_SOURCE, daily_utility_electricity_consumption,
DAILY_ELECTRICITY_CONSUMPTION, DAILY_LIQUID_PRODUCTION
, SYSTEM_SOURCE, daily_utility_electricity_consumption,
electricity_consumption_ph,
electricity_consumption_hh,
electricity_consumption_np,
...
...
@@ -111,7 +111,7 @@
resultType=
"pps.core.prediction.entity.WellheadDailyProductionSituationView"
>
SELECT w.line_id AS line_id,
l.LINE_NAME AS LINE_NAME,
IFNULL(SUM(s.
daily_electricity_consumption), 0) AS daily_electricity_consumption
IFNULL(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
...
...
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