From 0c99f8b8b115cd51b74f95fa816b53fd3fd9162b Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 22 Aug 2019 17:32:38 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=97=A5=E5=B8=B8=E8=B4=A6=E5=8D=95][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][B=E7=AB=AF=E6=98=BE=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/WxBillAllMapper.xml | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index 7e6860768..fcb118f17 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -235,26 +235,30 @@ bill.receive_pay receivePay,bill.pay,bill.owe,bill.receive_date receiveDate,bill.pay_date payDate,DATEDIFF(now(),bill.receive_date) expiredDay,bill.status, bill.tenant_id tenantId,m.name merchantName,s.shop_number shopNumber,bill.starttime,bill.endtime,bill.name,pb.pay_bill_status payBillStatus, pb.pay_time_end tradeTime,pb.transaction_id transactionId,pb.pay_amount payAmount,bill.rent_shop_type - rentShopType from ( + rentShopType,bill.price_detail priceDetail from ( select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type + bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' + price_detail from wx_bill_rent where is_preview = 0 and tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type + bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' + price_detail from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type + bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' + price_detail from wx_bill_property where is_preview = 0 and tenant_id=#{tenantId} and property_contract_id in (select id from wx_property_contract where status in(2,3,4)) union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type + bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' + price_detail from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from wx_property_contract where status in (2,3,4)) @@ -262,15 +266,17 @@ select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value, case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type, 0 as need_pay,receive_pay, - pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type + pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,price_detail from wx_bill_daily where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他费用' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type + need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type,'' + price_detail from wx_bill_other where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type + need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type,'' + price_detail from wx_bill_other_deposit where tenant_id=#{tenantId} ) bill left join wx_merchant m on bill.merchant_id=m.id