diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
index 9d470a3f..bd1c4480 100644
--- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
+++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
@@ -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
and ho.type=#{type}
@@ -624,7 +624,7 @@
and ho.serial_number like concat('%', #{transactionNumber}, '%')
- and ct.name like concat('%', #{transactionNumber}, '%')
+ and ct.name like concat('%', #{chargingStationName}, '%')
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 < #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') > #{startTime})
- or (rt.start_time < #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') > #{endTime}))
+ and (
+ (rt.start_time <= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{endTime} )
+ OR
+ (rt.start_time <= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') <= #{endTime})
+ OR
+ (rt.start_time <= #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{endTime})
+ )