| | |
| | | '0' |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 'building_room' and td.table_columns = 'state' |
| | | WHERE 1 =1 |
| | | <if test="communityId !=null and communityId != ''"> |
| | | AND t.`community_id` = #{communityId} |
| | | </if> |
| | | and t.status_cd ='0' |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.`floor_id`= #{floorId} |
| | |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="roomIds != null"> |
| | | and t.room_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="layer !=null and layer != ''"> |
| | | and t.layer= #{layer} |
| | |
| | | left join t_dict td1 on t.room_sub_type = td1.status_cd and td1.table_name = 'building_room' and |
| | | td1.table_columns = 'room_sub_type' |
| | | WHERE 1 =1 |
| | | <if test="floorId !=null and floorId != ''"> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | AND t.`community_id` = #{communityId} |
| | | </if> |
| | | <if test="floorId !=null and floorId != ''"> |
| | |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by f.seq,u.unit_num,CONVERT(t.layer,SIGNED),CONVERT(t.room_num,SIGNED) asc |
| | | <!-- order by t.create_time desc--> |