|
|
@@ -35,6 +35,10 @@ |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
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 |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
from wx_bill_other |
|
|
from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,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 |
|
|
|
|
|
from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_shop s on bill.shop_id=s.id |
|
|
left join wx_shop s on bill.shop_id=s.id |
|
|
@@ -81,6 +85,9 @@ |
|
|
union |
|
|
union |
|
|
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as |
|
|
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as |
|
|
|
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
where bill.tenant_id=#{tenantId} and bill.status=#{status} |
|
|
where bill.tenant_id=#{tenantId} and bill.status=#{status} |
|
|
<if test=" null != starttime and null!= endtime "> |
|
|
<if test=" null != starttime and null!= endtime "> |
|
|
@@ -122,6 +129,9 @@ |
|
|
union |
|
|
union |
|
|
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as |
|
|
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as |
|
|
|
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
where bill.tenant_id=#{tenantId} and bill.status=#{status} |
|
|
where bill.tenant_id=#{tenantId} and bill.status=#{status} |
|
|
<if test=" null != starttime and null!= endtime "> |
|
|
<if test=" null != starttime and null!= endtime "> |
|
|
@@ -169,6 +179,10 @@ |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
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 |
|
|
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
from wx_bill_other |
|
|
from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,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 |
|
|
|
|
|
from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_shop s on bill.shop_id=s.id |
|
|
left join wx_shop s on bill.shop_id=s.id |
|
|
@@ -244,8 +258,12 @@ select bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
from wx_bill_other |
|
|
from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as |
|
|
|
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
|
|
|
from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
where DATEDIFF(bill.receive_date,now())=3 and bill.status!=3 |
|
|
|
|
|
|
|
|
where DATEDIFF(bill.receive_date,now())=3 and bill.status!=3 and bill.status!=5 |
|
|
group by bill.tenant_id,bill.merchant_id,bill.receive_date) bill |
|
|
group by bill.tenant_id,bill.merchant_id,bill.receive_date) bill |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id |
|
|
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id |
|
|
@@ -283,8 +301,12 @@ select bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as |
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
from wx_bill_other |
|
|
from wx_bill_other |
|
|
|
|
|
union |
|
|
|
|
|
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as |
|
|
|
|
|
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type |
|
|
|
|
|
from wx_bill_other_deposit |
|
|
) bill |
|
|
) bill |
|
|
where DATEDIFF(bill.receive_date,now())<0 and bill.status!=3 |
|
|
|
|
|
|
|
|
where DATEDIFF(bill.receive_date,now())<0 and bill.status!=3 and bill.status!=5 |
|
|
group by bill.tenant_id,bill.merchant_id) bill |
|
|
group by bill.tenant_id,bill.merchant_id) bill |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join wx_merchant m on bill.merchant_id=m.id |
|
|
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id |
|
|
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id |
|
|
|