|
@@ -459,6 +459,8 @@
|
|
|
<result property="currentPeriod" column="current_period"/>
|
|
<result property="currentPeriod" column="current_period"/>
|
|
|
<result property="enterprisePrice" column="enterprise_price"/>
|
|
<result property="enterprisePrice" column="enterprise_price"/>
|
|
|
<result property="originalPrice" column="original_price"/>
|
|
<result property="originalPrice" column="original_price"/>
|
|
|
|
|
+ <result property="thirdPartPrice" column="third_part_price"/>
|
|
|
|
|
+ <result property="periodFlag" column="period_flag"/>
|
|
|
<result property="businessHours" column="business_hours"/>
|
|
<result property="businessHours" column="business_hours"/>
|
|
|
<result property="serviceProvider" column="service_provider"/>
|
|
<result property="serviceProvider" column="service_provider"/>
|
|
|
<result property="invoiceProvider" column="invoice_provider"/>
|
|
<result property="invoiceProvider" column="invoice_provider"/>
|
|
@@ -557,6 +559,31 @@
|
|
|
ORDER BY tppi.start_time DESC
|
|
ORDER BY tppi.start_time DESC
|
|
|
LIMIT 1
|
|
LIMIT 1
|
|
|
) AS original_price,
|
|
) AS original_price,
|
|
|
|
|
+ <!-- 三方价/原价(电费+服务费) -->
|
|
|
|
|
+ (
|
|
|
|
|
+ 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 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 third_part_price,
|
|
|
|
|
+ <!-- 时段标志(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 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 period_flag,
|
|
|
<!-- 企业价 -->
|
|
<!-- 企业价 -->
|
|
|
<if test="firmId != null">
|
|
<if test="firmId != null">
|
|
|
(
|
|
(
|