|
@@ -19,7 +19,7 @@
|
|
|
</delete>
|
|
|
<select id="selectOriginDataMonth" resultType="com.shcd.vo.SpStatementShipUsageDetail">
|
|
|
select STARTTIME chargeStartDate, ENDTIME chargeEndDate ,ELECT shorePowerCount from GHJG_PORT_MANAGE.SHORE_POWER_CONN_RECORD_INFO
|
|
|
- where (STARTTIME between #{lastDate} and #{thisDate}) OR (STARTTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})
|
|
|
+ where (ENDTIME between #{lastDate} and #{thisDate}) OR (ENDTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})
|
|
|
</select>
|
|
|
<select id="selectGhDataMonth" resultType="com.shcd.vo.SpStatementShipUsageMonthVo">
|
|
|
select decode(sum(SHORE_POWER_BOAT_USE_NUMBER),null,0,sum(SHORE_POWER_BOAT_USE_NUMBER)) shipUsage,decode(sum(POWER_CONN_HOURS),null,0,sum(POWER_CONN_HOURS)) shorePowerTime,decode(sum(ELECTRICITY_CONSUMPTION),null,0,sum(ELECTRICITY_CONSUMPTION)) shorePowerCount from GHJG_PORT_MANAGE.SHORE_POWER_DEVICE_USAGE
|
|
@@ -58,9 +58,9 @@
|
|
|
from GHJG_PORT_MANAGE.SHORE_POWER_CONN_RECORD_INFO i
|
|
|
left join GHJG_PORT_MANAGE.SHORE_POWER_BERTH_INFO_NEW b on i.BERTHID = b.BERTHID
|
|
|
where b.BERTHTYPE is not null
|
|
|
- AND ((i.STARTTIME >= #{startDate}
|
|
|
- AND i.STARTTIME <= #{endDate})
|
|
|
- OR (i.STARTTIME >= #{newStartDate} and i.STARTTIME <= #{newStartEnd} AND
|
|
|
+ AND ((i.ENDTIME >= #{startDate}
|
|
|
+ AND i.ENDTIME <= #{endDate})
|
|
|
+ OR (i.ENDTIME >= #{newStartDate} and i.ENDTIME <= #{newStartEnd} AND
|
|
|
i.MODIFYTIME >= #{startDate} and i.MODIFYTIME <= #{endDate}))
|
|
|
</select>
|
|
|
<select id="selectQuarterBlBerth" resultType="com.shcd.vo.SpQuarterReportBlVo">
|
|
@@ -73,7 +73,7 @@
|
|
|
</select>
|
|
|
<select id="selectWgqMonth" resultType="com.shcd.vo.SpStatementShipUsageDetail">
|
|
|
select STARTTIME chargeStartDate, ENDTIME chargeEndDate ,ELECT shorePowerCount from GHJG_PORT_MANAGE.SHORE_POWER_CONN_RECORD_INFO
|
|
|
- where ((STARTTIME between #{lastDate} and #{thisDate}) OR (STARTTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})) and ENTERPRISESNAME in ('上海外高桥发电有限责任公司','上海外高桥第二发电有限责任公司','上海外高桥第三发电有限责任公司')
|
|
|
+ where ((ENDTIME between #{lastDate} and #{thisDate}) OR (ENDTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})) and ENTERPRISESNAME in ('上海外高桥发电有限责任公司','上海外高桥第二发电有限责任公司','上海外高桥第三发电有限责任公司')
|
|
|
</select>
|
|
|
<select id="selectWgqYear" resultType="com.shcd.vo.SpStatementShipUsageMonthVo">
|
|
|
select SHIP_USAGE_YEAR shipUsage, SHORE_POWER_COUNT_YEAR shorePowerCount,SHORE_POWER_TIME_YEAR shorePowerTime
|
|
@@ -83,7 +83,7 @@
|
|
|
<select id="getInRiverDataThisMonth" resultType="com.shcd.vo.SpStatementShipUsageDetail">
|
|
|
select STARTTIME chargeStartDate, ENDTIME chargeEndDate ,ELECT shorePowerCount from GHJG_PORT_MANAGE.SHORE_POWER_CONN_RECORD_INFO i
|
|
|
left join GHJG_PORT_MANAGE.SHORE_POWER_PORT_INFO_NEW b on B.PORTID = i.PORTID
|
|
|
- where ((STARTTIME between #{lastDate} and #{thisDate}) OR (STARTTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})) and (CONNTYPE = '低压(标准化)' and area >= 2 AND b.AREA <= 12)
|
|
|
+ where ((ENDTIME between #{lastDate} and #{thisDate}) OR (ENDTIME between #{lastCycleStart} and #{lastCycleEnd} AND MODIFYTIME between #{lastDate} and #{thisDate})) and (CONNTYPE = '低压(标准化)' and area >= 2 AND b.AREA <= 12)
|
|
|
</select>
|
|
|
<select id="getInRiverDataSelfThisMonth" resultType="com.shcd.vo.SpStatementShipUsageMonthVo">
|
|
|
select sum(USE_COUNT) shipUsage, sum(ELE_TIME) shorePowerCount, sum(USE_ELECTRICITY) shorePowerTime from GHJG_PORT_MANAGE.Shore_Power_Blberthmonthuse b
|
|
@@ -105,4 +105,16 @@
|
|
|
where T.DATA_SOURCE = 99
|
|
|
AND T.REPORT_DATE >= #{start} AND T.REPORT_DATE <= #{end}
|
|
|
</select>
|
|
|
+ <select id="selectNhAndWgMonth" resultType="com.shcd.vo.SpStatementShipUsageDetail">
|
|
|
+ select STARTTIME chargeStartDate, ENDTIME chargeEndDate, ELECT shorePowerCount
|
|
|
+ from GHJG_PORT_MANAGE.SHORE_POWER_CONN_RECORD_INFO
|
|
|
+ where CONNTYPE = '低压(标准化)'
|
|
|
+ and (ENDTIME > #{lastDate} and ENDTIME < #{thisDate}
|
|
|
+ or
|
|
|
+ (ENDTIME > #{lastCycleStart} and ENDTIME < #{lastDate} and MODIFYTIME > #{lastCycleStart} and MODIFYTIME < #{lastCycleEnd}))
|
|
|
+ </select>
|
|
|
+ <select id="selectNhAndWgLastMonthSum" resultType="com.shcd.vo.SpStatementShipUsageMonthVo">
|
|
|
+ select SHIP_USAGE_YEAR shipUsage, SHORE_POWER_TIME_YEAR shorePowerTime, SHORE_POWER_COUNT_YEAR shorePowerCount from GHJG_PORT_MANAGE.SP_STATEMENT_SHIP_USAGE_MONTH
|
|
|
+ where trunc(REPORT_DATE) = trunc(#{thisMonth}) and DATA_SOURCE = 101
|
|
|
+ </select>
|
|
|
</mapper>
|