select d.id, d.fgs_no, d.position, 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_fgs d
left join sys_dept s on s.dept_id = d.dept_id
SELECT seq_t_ps_dev_fgs.NEXTVAL as id FROM DUAL
insert into t_ps_dev_fgs
id,fgs_no,position,del_flag,creater_code,createdate,updater_code,updatedate,remarks,dept_id,status,patrol_type,#{id},#{fgsNo},#{position},#{delFlag},#{createrCode},#{createdate},#{updaterCode},#{updatedate},#{remarks},#{deptId},#{status},#{patrolType},
update t_ps_dev_fgs
fgs_no = #{fgsNo},position = #{position},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_fgs set del_flag = 2 where id = #{id}
update t_ps_dev_fgs set del_flag = 2 where id in
#{id}