|
@@ -152,6 +152,8 @@
|
|
|
<result property="slowCharging" column="slow_charging"/>
|
|
<result property="slowCharging" column="slow_charging"/>
|
|
|
<result property="peakValue" column="peak_value"/>
|
|
<result property="peakValue" column="peak_value"/>
|
|
|
<result property="peakTime" column="peak_time"/>
|
|
<result property="peakTime" column="peak_time"/>
|
|
|
|
|
+ <result property="periodFlag" column="period_flag"/>
|
|
|
|
|
+ <result property="thirdPartPrice" column="third_part_price"/>
|
|
|
<result property="platformPrice" column="platform_price"/>
|
|
<result property="platformPrice" column="platform_price"/>
|
|
|
<result property="enterprisePrice" column="enterprise_price"/>
|
|
<result property="enterprisePrice" column="enterprise_price"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
@@ -229,6 +231,31 @@
|
|
|
ORDER BY tppi.start_time DESC
|
|
ORDER BY tppi.start_time DESC
|
|
|
LIMIT 1
|
|
LIMIT 1
|
|
|
) AS peak_time,
|
|
) AS peak_time,
|
|
|
|
|
+ <!-- 时段标志(1-尖,2-峰,3-平,4-谷) -->
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT tppi.period_flag
|
|
|
|
|
+ FROM third_party_policy_info tppi
|
|
|
|
|
+ INNER JOIN third_party_equipment_price_policy tpepp ON tppi.price_policy_id = tpepp.id AND tpepp.is_deleted = 0
|
|
|
|
|
+ INNER JOIN third_party_connector_info tpci7 ON tpepp.connector_id = tpci7.connector_id AND tpci7.is_deleted = 0
|
|
|
|
|
+ WHERE tpci7.station_id = tpsi.station_id
|
|
|
|
|
+ AND tppi.is_deleted = 0
|
|
|
|
|
+ AND tppi.start_time <= #{currentTime}
|
|
|
|
|
+ ORDER BY tppi.start_time DESC
|
|
|
|
|
+ LIMIT 1
|
|
|
|
|
+ ) AS period_flag,
|
|
|
|
|
+ <!-- 三方价/原价(电费+服务费) -->
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ROUND(IFNULL(tppi.elec_price, 0) + IFNULL(tppi.service_price, 0), 4)
|
|
|
|
|
+ FROM third_party_policy_info tppi
|
|
|
|
|
+ INNER JOIN third_party_equipment_price_policy tpepp ON tppi.price_policy_id = tpepp.id AND tpepp.is_deleted = 0
|
|
|
|
|
+ INNER JOIN third_party_connector_info tpci6 ON tpepp.connector_id = tpci6.connector_id AND tpci6.is_deleted = 0
|
|
|
|
|
+ WHERE tpci6.station_id = tpsi.station_id
|
|
|
|
|
+ AND tppi.is_deleted = 0
|
|
|
|
|
+ AND tppi.start_time <= #{currentTime}
|
|
|
|
|
+ ORDER BY tppi.start_time DESC
|
|
|
|
|
+ LIMIT 1
|
|
|
|
|
+ ) AS third_part_price,
|
|
|
<!-- 平台价(综合销售费) -->
|
|
<!-- 平台价(综合销售费) -->
|
|
|
(
|
|
(
|
|
|
SELECT
|
|
SELECT
|