|
|
@@ -95,16 +95,13 @@ |
|
|
|
|
|
|
|
|
<select id="queryBillRentList" parameterType="com.iformall.domain.po.WxBillRent" resultMap="BaseResultMap"> |
|
|
<select id="queryBillRentList" parameterType="com.iformall.domain.po.WxBillRent" resultMap="BaseResultMap"> |
|
|
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, |
|
|
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, |
|
|
case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`need_pay`,m.`name` |
|
|
|
|
|
merchant_name,s.shop_number,br.`updatetime`, |
|
|
|
|
|
br.`merchant_id`,br.`rent_shop_type`,r.type as |
|
|
|
|
|
rent_type,r.pay_ratio,br.`revenue`,br.`late_pay_ratio`,br.`late_pay_time`,br.`period`, |
|
|
|
|
|
br.`rent_contract_id`,d.receive_pay deposit,case when br.late_pay_status=2 then (case when br.late_pay_time is |
|
|
|
|
|
null then 0 |
|
|
|
|
|
|
|
|
case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`need_pay`,m.`name` merchant_name, |
|
|
|
|
|
s.shop_number,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,r.type as rent_type, |
|
|
|
|
|
r.pay_ratio,br.`revenue`,br.`late_pay_ratio`,br.`late_pay_time`,br.`period`,br.`rent_contract_id`, |
|
|
|
|
|
d.receive_pay deposit,case when br.late_pay_status=2 then (case when br.late_pay_time is null then 0 |
|
|
else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) else br.late_pay_price end |
|
|
else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) else br.late_pay_price end |
|
|
late_pay_price,d.`status` deposit_status, |
|
|
|
|
|
br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime, |
|
|
|
|
|
(select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) as all_period |
|
|
|
|
|
|
|
|
late_pay_price,d.`status` |
|
|
|
|
|
deposit_status,br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime |
|
|
from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id |
|
|
from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id |
|
|
left join wx_shop s on br.shop_id=s.id |
|
|
left join wx_shop s on br.shop_id=s.id |
|
|
left join wx_rent_contract r on br.rent_contract_id=r.id |
|
|
left join wx_rent_contract r on br.rent_contract_id=r.id |
|
|
|