update 订单相关修改

This commit is contained in:
Lemon
2023-03-14 09:19:47 +08:00
parent db31e0679b
commit 1b3fa33bb8
9 changed files with 78 additions and 15 deletions

View File

@@ -438,4 +438,37 @@
order by t2.publish_time DESC
limit 1
</select>
<select id="queryStationBillingTemplateListForUniApp" resultType="com.jsowell.pile.vo.web.BillingTemplateVO">
select
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.station_id = #{stationId,jdbcType=VARCHAR}
order by t2.publish_time desc
</select>
</mapper>