From 7c9eaefb253cb31f6d78e3a33fdb3c18870077a7 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Wed, 23 Oct 2019 17:22:31 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=95=86=E6=88=B7=E8=B4=A6=E5=8D=95][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/WxBillAllMapper.xml | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index 9219bc60d..d325e7487 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -775,32 +775,25 @@ xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.rent_shop_type, ifnull(round( (select sum(bill.receive_pay)+sum(bill.late_pay_price)+bill.receivePay from ( - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from wx_bill_rent where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_rent_deposit where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,late_pay_price from wx_bill_property where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_property_deposit where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_daily where type in(1,2,3) and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_other where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_other_deposit where status not in(3,6) ) bill where bill.merchant_id = m.id )/100,2),0) receivePay, @@ -826,33 +819,26 @@ (ifnull(round( (select sum(bill.receive_pay)+sum(bill.late_pay_price)+bill.receivePay from ( - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,late_pay_price from wx_bill_rent where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_rent_deposit where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,late_pay_price from wx_bill_property where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_property_deposit where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_daily where type in(1,2,3) and status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_other where status not in(3,6) union all - select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select - service_charge_rate from wx_pay_account_bill where tenant_id=#{tenantId})) receivePay,0 late_pay_price from + select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay, receivePay,0 late_pay_price from wx_bill_other_deposit where status not in(3,6) ) bill where bill.merchant_id = m.id )/100,2),0)-