|
|
|
@@ -84,13 +84,14 @@ |
|
|
|
br.`revenue`,br.`late_pay_ratio` latePayRatio,br.`late_pay_time` latePayTime,br.`period`, |
|
|
|
br.`rent_contract_id` rentContractId,d.receive_pay deposit,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 latePayPrice, |
|
|
|
(select max(period) from wx_bill_rent where id=br.id) allPeriod,d.`status` depositStatus |
|
|
|
(select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status` |
|
|
|
depositStatus |
|
|
|
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_rent_contract r on br.rent_contract_id=r.id |
|
|
|
left join wx_bill_rent_deposit d on br.rent_contract_id=d.rent_contract_id and br.merchant_id=d.merchant_id |
|
|
|
<where> |
|
|
|
is_preview = 0 |
|
|
|
br.is_preview = 0 |
|
|
|
<if test=" null != id ">and br.`id` = #{id}</if> |
|
|
|
<if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if> |
|
|
|
<if test=" null != merchantName and ''!=merchantName ">and m.`name` like concat('%',#{merchantName},'%')</if> |
|
|
|
@@ -100,7 +101,7 @@ |
|
|
|
<if test=" null != starttime and null!=endtime ">and br.`receive_date` between #{starttime} and #{endtime}</if> |
|
|
|
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if> |
|
|
|
</where> |
|
|
|
order by ${sortColumns} |
|
|
|
order by br.${sortColumns} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> |
|
|
|
|