From eda97151965a3e6a812bfaf585deb001da77d440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Mon, 9 Sep 2024 21:56:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BD=BF=E7=94=A8=E7=8A=B6?= =?UTF-8?q?=E6=80=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/TransactionBillMapper.xml | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) 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) )