@@ -65,7 +65,7 @@
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,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,service_charge_pay
late_pay_price,0 service_charge_pay
from wx_bill_rent_deposit where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
@@ -77,7 +77,7 @@
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,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,service_charge_pay from wx_bill_property_deposit where
late_pay_price,0 service_charge_pay from wx_bill_property_deposit where
tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
@@ -259,9 +259,9 @@
(2,3,4))
union all
select '' settle_number,id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,''
price_detail,freeze,0 late_pay_price,service_charge_pay
price_detail,freeze,0 late_pay_price,0 service_charge_pay
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
@@ -274,9 +274,9 @@
where status in(2,3,4))
union all
select '' settle_number,id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,''
price_detail,freeze,0 late_pay_price,service_charge_pay
price_detail,freeze,0 late_pay_price,0 service_charge_pay
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))
@@ -308,7 +308,7 @@
owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit
union all
@@ -318,7 +318,7 @@
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit
union all
@@ -356,7 +356,7 @@
owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit
union all
@@ -366,7 +366,7 @@
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay -pay)
bill_type,need_pay,receive_pay,pay,(receive_pay-pay)
owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit
union all
@@ -745,7 +745,7 @@
select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay,
res.receive_pay,res.pay,res.owe
owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0
late_pay_price,service_charge_pay from(
late_pay_price,0 service_charge_pay from(
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金'
bill_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,service_charge_pay from wx_bill_rent_deposit where tenant_id = #{tenantId}
@@ -753,7 +753,7 @@
union all
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,4 bill_type_value,'欠缴押金'
bill_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,service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId}
endtime,rent_shop_type,0 service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId}
<include refid="getOweBillAsPageConditions"/>
union all
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,8 bill_type_value,'欠缴押金' bill_type,0 as
@@ -804,13 +804,13 @@
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,ifnull(service_charge_pay, 0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_rent_deposit where status not in(3,6)
union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) 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,ifnull(service_charge_pay, 0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_property_deposit where status not in(3,6)
union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from
@@ -849,13 +849,13 @@
wx_bill_rent
where is_preview = 0 and status not in(3,6)
union all
select merchant_id,receive_pay,ifnull(service_charge_pay, 0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_rent_deposit where status not in(3,6)
union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) 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,ifnull(service_charge_pay, 0) receivePay,0 late_pay_price from
select merchant_id,receive_pay,0 receivePay,0 late_pay_price from
wx_bill_property_deposit where status not in(3,6)
union all
select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from