diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml index 992c83b1..c235ac17 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/mapper/TransactionBillMapper.xml @@ -100,20 +100,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ss_channel_withdraw sc on sc.channel_id = stb.channel_id + + + + + + + + + + + + + + ( - ( - stb.suit_start_time is not null - and stb.suit_start_time < now() - and (stb.suit_end_time is null or stb.suit_end_time > now()) + !( + stb.suit_start_time is null or stb.suit_start_time > now() + or ( + stb.suit_fee_type in ('2', '3') + and (stb.suit_start_ele is null or stb.suit_start_ele > sd.total_electri_quantity) ) - or - ( - stb.suit_fee_type in ('2', '3') - and stb.suit_start_ele is not null - and stb.suit_start_ele < sd.total_electri_quantity - and (stb.suit_end_ele is null or stb.suit_end_ele > sd.total_electri_quantity) - ) + ) and !() ) @@ -122,9 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ( ( stb.suit_end_time is not null and stb.suit_end_time <= now() - ) - or - ( + ) or ( stb.suit_fee_type in ('2', '3') and (stb.suit_end_ele is not null and stb.suit_end_ele <= sd.total_electri_quantity) )