from xhpc_rate_time where charging_station_id =#{datchargingStationId} and start_time <=#{date} and end_time >=#{date} and status=0 and del_flag=0 and type=0
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=#{rateId}
</select>
<selectid="getXhpcRateTimeType"resultType="map">
select
ra.power_fee as powerFee,
ra.service_fee as serviceFee
from xhpc_rate as ra
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=(select rate_id from xhpc_rate_time where status=0 and del_flag=0 and type=1 and charging_station_id =#{datchargingStationId} LIMIT 1)