insert into business_parking_space(area, operate, num, ps_id, pa_id, remark, state, community_id, b_id, parking_type) values (#{area}, #{operate}, #{num}, #{psId}, #{paId}, #{remark}, #{state}, #{communityId}, #{bId}, #{parkingType}) insert into parking_space(area, num, ps_id, pa_id, remark, state, community_id, b_id, parking_type, create_time) values (#{area}, #{num}, #{psId}, #{paId}, #{remark}, #{state}, #{communityId}, #{bId}, #{parkingType}, #{createTime}) insert into parking_space( area,num,ps_id,pa_id,remark,status_cd,state,community_id,b_id,parking_type ) select t.area,t.num,t.ps_id,t.pa_id,t.remark,'0',t.state,t.community_id,t.b_id,t.parking_type from business_parking_space t where 1=1 and t.area= #{area} and t.operate= 'ADD' and t.num= #{num} and t.ps_id= #{psId} and t.pa_id= #{paId} and t.remark= #{remark} and t.state= #{state} and t.community_id= #{communityId} and t.b_id= #{bId} and t.parking_type= #{parkingType} update parking_space t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.area= #{area} , t.num= #{num} , t.pa_id= #{paId} , t.remark= #{remark} , t.state= #{state} , t.community_id= #{communityId} ,t.parking_type = #{parkingType} where 1=1 and t.ps_id= #{psId} and t.b_id= #{bId}