| | |
| | | <select id="selectHouseRentalPage" resultType="org.springblade.modules.house.vo.HouseRentalTenantVO"> |
| | | SELECT jhr.*,jda.address_name as houseName,b.tenantName,b.phone, |
| | | concat(jh.district_name," ",jh.building," ",unit," ",room) as address, |
| | | case when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 then 1 |
| | | case when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 then 1 |
| | | when TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4 then 3 |
| | | else 2 end as dldType, |
| | | if(jhr.termination_time is null,if(date_format(jhr.due_time,'%Y-%m-%d') >= date_format(now(),'%Y-%m-%d'),0,1),2) as status |
| | |
| | | </if> |
| | | <if test="vo.auditStatus ==20"> |
| | | AND TIMESTAMPDIFF( day, now(), jhr.due_time )<30 |
| | | AND TIMESTAMPDIFF( day, now(), jhr.due_time )>= 0 |
| | | </if> |
| | | <if test="vo.auditStatus ==30"> |
| | | AND date_format(jhr.due_time,'%Y-%m-%d')< date_format(now(),'%Y-%m-%d') |
| | |
| | | </if> |
| | | <if test="vo.dldType != null"> |
| | | <if test="vo.dldType ==1 "> |
| | | AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 |
| | | AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 |
| | | </if> |
| | | <if test="vo.dldType ==2 "> |
| | | AND 4 <= TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time ) |