修改小时统计

This commit is contained in:
yuyang 2021-11-11 01:22:40 +08:00
parent 63227d69b8
commit 69fa32b79d

View File

@ -610,7 +610,7 @@
left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id
left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id
left join et_dispute_orders as ed on ed.start_charge_seq = ho.internet_serial_number and ed.dispute_order_status !=2
where ho.status =0 and ho.del_flag=0 and ho.total_price !=null
where ho.status =0 and ho.del_flag=0 and ho.total_price !=0
<if test="type !=null">
and ho.type=#{type}
</if>
@ -624,7 +624,7 @@
and ho.serial_number like concat('%', #{transactionNumber}, '%')
</if>
<if test="chargingStationName !=null and chargingStationName !=''">
and ct.name like concat('%', #{transactionNumber}, '%')
and ct.name like concat('%', #{chargingStationName}, '%')
</if>
<if test="operatorId !=null">
and op.operator_id =#{operatorId}
@ -670,8 +670,13 @@
from xhpc_rate_time as rt
left join xhpc_rate ra on rt.rate_id =ra.rate_id
where rt.rate_model_id=#{rateModelId}
and ((rt.start_time &lt; #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') &gt; #{startTime})
or (rt.start_time &lt; #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') &gt; #{endTime}))
and (
(rt.start_time &lt;= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') &gt;= #{endTime} )
OR
(rt.start_time &lt;= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') &gt;= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') &lt;= #{endTime})
OR
(rt.start_time &lt;= #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') &gt;= #{endTime})
)
</select>
<select id="getById" resultType="map">