select d.id, d.staff_id, d.name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.approve_status ,s.dept_name from t_st_yearplan d
left join sys_dept s on s.dept_id = d.dept_id
SELECT seq_t_st_yearplan.NEXTVAL as id FROM DUAL
insert into t_st_yearplan
id,staff_id,name,del_flag,creater_code,createdate,updater_code,updatedate,dept_id,approve_status,#{id},#{staffId},#{name},#{delFlag},#{createrCode},#{createdate},#{updaterCode},#{updatedate},#{deptId},#{approveStatus},
update t_st_yearplan
staff_id = #{staffId},name = #{name},del_flag = #{delFlag},creater_code = #{createrCode},createdate = #{createdate},updater_code = #{updaterCode},updatedate = #{updatedate},dept_id = #{deptId},approve_status = #{approveStatus},
where id = #{id}
update t_st_yearplan set del_flag = 2 where id = #{id}
update t_st_yearplan set del_flag = 2 where id in
#{id}