select d.id, d.ppe_type, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.status, d.patrol_type, d.wardrobe_type ,s.dept_name from t_ps_dev_wardrobe d left join sys_dept s on s.dept_id = d.dept_id SELECT seq_t_ps_dev_wardrobe.NEXTVAL as id FROM DUAL insert into t_ps_dev_wardrobe id, ppe_type, del_flag, creater_code, createdate, updater_code, updatedate, remarks, dept_id, status, patrol_type, wardrobe_type, #{id}, #{ppeType}, #{delFlag}, #{createrCode}, #{createdate}, #{updaterCode}, #{updatedate}, #{remarks}, #{deptId}, #{status}, #{patrolType}, #{wardrobeType}, update t_ps_dev_wardrobe ppe_type = #{ppeType}, del_flag = #{delFlag}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, remarks = #{remarks}, dept_id = #{deptId}, status = #{status}, patrol_type = #{patrolType}, wardrobe_type = #{wardrobeType}, where id = #{id} update t_ps_dev_wardrobe set del_flag = 2 where id = #{id} update t_ps_dev_wardrobe set del_flag = 2 where id in #{id}