| | |
| | | <!-- 保存停车位信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessParkingSpaceInfo" parameterType="Map"> |
| | | insert into business_parking_space( |
| | | area,operate,num,ps_id,pa_id, remark,state,community_id,b_id,user_id |
| | | area,operate,num,ps_id,pa_id, remark,state,community_id,b_id |
| | | ) values ( |
| | | #{area},#{operate},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId},#{userId} |
| | | #{area},#{operate},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <select id="getBusinessParkingSpaceInfo" parameterType="Map" resultType="Map"> |
| | | select t.area,t.operate,t.num,t.ps_id,t.ps_id |
| | | psId,t.pa_id,t.pa_id |
| | | paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.user_id,t.user_id userId |
| | | paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from business_parking_space t |
| | | where 1 =1 |
| | | <if test="area !=null and area != ''"> |
| | |
| | | <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> |
| | | |
| | |
| | | <!-- 保存停车位信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveParkingSpaceInfoInstance" parameterType="Map"> |
| | | insert into parking_space( |
| | | area,num,ps_id,pa_id,remark,status_cd,state,community_id,b_id,user_id |
| | | ) select t.area,t.t.num,t.ps_id,t.pa_id,t.remark,'0',t.state,t.community_id,t.b_id,t.user_id from |
| | | area,num,ps_id,pa_id,remark,status_cd,state,community_id,b_id |
| | | ) select t.area,t.num,t.ps_id,t.pa_id,t.remark,'0',t.state,t.community_id,t.b_id from |
| | | business_parking_space t where 1=1 |
| | | <if test="area !=null and area != ''"> |
| | | and t.area= #{area} |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | |
| | | |
| | | </insert> |
| | | |
| | |
| | | t.community_id communityId, |
| | | t.b_id, |
| | | t.b_id bId, |
| | | t.user_id, |
| | | t.user_id userId, |
| | | td.name stateName, |
| | | pa.num areaNum |
| | | pa.num areaNum, |
| | | pa.type_cd typeCd |
| | | FROM |
| | | parking_space t,t_dict td,parking_area pa |
| | | |
| | | <where> |
| | | t.state = td.status_cd |
| | | and td.table_name='parking_space' |
| | |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="areaNum !=null and areaNum != ''"> |
| | | and pa.num= #{areaNum} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | order by t.create_time desc |
| | | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="areaNum !=null and areaNum != ''"> |
| | | and pa.num= #{areaNum} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | |
| | | <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> |