update 高德

This commit is contained in:
2023-06-25 17:14:23 +08:00
parent d3982f81d1
commit 9a0bf581fd
8 changed files with 210 additions and 6 deletions

View File

@@ -489,4 +489,41 @@
and t2.station_id = #{stationId,jdbcType=VARCHAR}
order by t2.publish_time desc
</select>
<select id="selectBillingTemplateByStationIdList" resultType="com.jsowell.pile.vo.web.BillingTemplateVO">
select
t1.id as stationId,
t2.id as templateId,
t2.template_code as templateCode,
t2.name as templateName,
t2.remark as remark,
t2.type as deviceType,
t2.publish_time as publishTime,
t3.electricity_price AS sharpElectricityPrice,
t3.service_price AS sharpServicePrice,
t3.apply_time AS sharpApplyDate,
t4.electricity_price AS peakElectricityPrice,
t4.service_price AS peakServicePrice,
t4.apply_time AS peakApplyDate,
t5.electricity_price AS flatElectricityPrice,
t5.service_price AS flatServicePrice,
t5.apply_time AS flatApplyDate,
t6.electricity_price AS valleyElectricityPrice,
t6.service_price AS valleyServicePrice,
t6.apply_time AS valleyApplyDate
from
pile_billing_template t2
left join pile_station_info t1 on t1.id = t2.station_id
left JOIN pile_billing_detail t3 ON t3.template_code = t2.template_code AND t3.time_type = '1'
left JOIN pile_billing_detail t4 ON t4.template_code = t2.template_code AND t4.time_type = '2'
left JOIN pile_billing_detail t5 ON t5.template_code = t2.template_code AND t5.time_type = '3'
left JOIN pile_billing_detail t6 ON t6.template_code = t2.template_code AND t6.time_type = '4'
where
t2.del_flag = '0'
and t2.status = '1'
and t2.station_id in
<foreach collection="stationIdList" item="item" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>