| | |
| | | |
| | | <!-- 查询停车位信息 add by wuxw 2018-07-03 --> |
| | | <select id="getParkingSpaceInfo" parameterType="Map" resultType="Map"> |
| | | select t.area,t1.name type_cd,t1.name typeCd,t.num,t.ps_id,t.ps_id psId,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t2.name state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.user_id,t.user_id userId |
| | | from p_parking_space t,t_dict t1,t_dict t2 where t.type_cd=t1.status_cd and t1.table_name='p_parking_space' |
| | | and t.state = t2.status_cd and t2.table_name='p_parking_space' |
| | | <if test="area !=null and area != ''"> |
| | | and t.area= #{area} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="states != null and states != null"> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="psIds != null and psIds != null"> |
| | | and t.ps_id in |
| | | <foreach collection="psIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | SELECT |
| | | t.area, |
| | | t.`type_cd` typeCd, |
| | | t.`type_cd`, |
| | | t.num, |
| | | t.ps_id psId, |
| | | t.ps_id, |
| | | t.remark, |
| | | t.status_cd statusCd, |
| | | t.status_cd, |
| | | t.`state`, |
| | | t.community_id, |
| | | t.community_id communityId, |
| | | t.b_id, |
| | | t.b_id bId, |
| | | t.user_id, |
| | | t.user_id userId, |
| | | td.name stateName, |
| | | td1.name typeCdName |
| | | FROM |
| | | p_parking_space t,t_dict td,t_dict td1 |
| | | <where> |
| | | t.state = td.status_cd |
| | | and td.table_name='p_parking_space' |
| | | and td.table_columns='state' |
| | | and t.type_cd = td1.status_cd |
| | | and td1.table_name='p_parking_space' |
| | | and td1.table_columns='type_cd' |
| | | <if test="area !=null and area != ''"> |
| | | and t.area= #{area} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="states != null and states != null"> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="psIds != null and psIds != null"> |
| | | and t.ps_id in |
| | | <foreach collection="psIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |