|
|
|
@@ -34,7 +34,8 @@ |
|
|
|
<result column="shopInfo" jdbcType="VARCHAR" property="shopInfo"/> |
|
|
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/> |
|
|
|
|
|
|
|
<result column="comments" property="comments"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
@@ -47,49 +48,49 @@ |
|
|
|
,bill.receive_date receiveDate, |
|
|
|
bill.pay_date payDate,DATEDIFF(now(),bill.receive_date) expiredDay,bill.status,bill.starttime, |
|
|
|
bill.endtime,bill.name,bill.rent_shop_type rentShopType,m.name merchantName, |
|
|
|
s.shop_number shopNumber, s.manager, s.manager_phone managerPhone,bill.shop_info shopInfo |
|
|
|
s.shop_number shopNumber, s.manager, s.manager_phone managerPhone,bill.shop_info shopInfo,bill.comments |
|
|
|
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,case when shop_info is null then '[]' else shop_info end shop_info |
|
|
|
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments |
|
|
|
from wx_bill_rent where is_preview = 0 |
|
|
|
union |
|
|
|
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,shop_info from wx_bill_rent_deposit |
|
|
|
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_rent_deposit |
|
|
|
union |
|
|
|
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,case when shop_info is null then '[]' else shop_info end shop_info |
|
|
|
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments |
|
|
|
from wx_bill_property where is_preview = 0 |
|
|
|
union |
|
|
|
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,shop_info from wx_bill_property_deposit |
|
|
|
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_property_deposit |
|
|
|
union |
|
|
|
select id,merchant_id,shop_id,tenant_id,'水费' name,5 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,'[]' shop_info |
|
|
|
rent_shop_type,'[]' shop_info,NULL comments |
|
|
|
from wx_bill_daily where type=1 |
|
|
|
union |
|
|
|
select id,merchant_id,shop_id,tenant_id,'电费' name,6 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,'[]' shop_info |
|
|
|
rent_shop_type,'[]' shop_info,NULL comments |
|
|
|
from wx_bill_daily where type=2 |
|
|
|
union |
|
|
|
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 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,'[]' shop_info |
|
|
|
rent_shop_type,'[]' shop_info,NULL comments |
|
|
|
from wx_bill_daily where type=3 |
|
|
|
union |
|
|
|
select id,merchant_id,shop_id,tenant_id,name,7 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,'[]' shop_info |
|
|
|
rent_shop_type,'[]' shop_info,comments |
|
|
|
from wx_bill_other |
|
|
|
union |
|
|
|
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,'[]' shop_info |
|
|
|
rent_shop_type,'[]' shop_info,comments |
|
|
|
from wx_bill_other_deposit |
|
|
|
) bill |
|
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
|
|