select d.id, d.position, d.valve_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.status, d.patrol_type ,s.dept_name from t_ps_dev_rainvalve d
left join sys_dept s on s.dept_id = d.dept_id
SELECT seq_t_ps_dev_rainvalve.NEXTVAL as id FROM DUAL
insert into t_ps_dev_rainvalve
id,position,valve_name,del_flag,creater_code,createdate,updater_code,updatedate,remarks,dept_id,status,patrol_type,#{id},#{position},#{valveName},#{delFlag},#{createrCode},#{createdate},#{updaterCode},#{updatedate},#{remarks},#{deptId},#{status},#{patrolType},
update t_ps_dev_rainvalve
position = #{position},valve_name = #{valveName},del_flag = #{delFlag},creater_code = #{createrCode},createdate = #{createdate},updater_code = #{updaterCode},updatedate = #{updatedate},remarks = #{remarks},dept_id = #{deptId},status = #{status},patrol_type = #{patrolType},
where id = #{id}
update t_ps_dev_rainvalve set del_flag = 2 where id = #{id}
update t_ps_dev_rainvalve set del_flag = 2 where id in
#{id}