select d.id, d.ppe_type, d.use_post, d.is_equip, d.is_pollution, d.put_as_required, d.is_identification, d.main_id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id ,s.dept_name from t_ppe_cmldef_locker d
left join sys_dept s on s.dept_id = d.dept_id
SELECT seq_t_ppe_cmldef_locker.NEXTVAL as id FROM DUAL
insert into t_ppe_cmldef_locker
id,
ppe_type,
use_post,
is_equip,
is_pollution,
put_as_required,
is_identification,
main_id,
del_flag,
creater_code,
createdate,
updater_code,
updatedate,
remarks,
dept_id,
#{id},
#{ppeType},
#{usePost},
#{isEquip},
#{isPollution},
#{putAsRequired},
#{isIdentification},
#{mainId},
#{delFlag},
#{createrCode},
#{createdate},
#{updaterCode},
#{updatedate},
#{remarks},
#{deptId},
update t_ppe_cmldef_locker
ppe_type = #{ppeType},
use_post = #{usePost},
is_equip = #{isEquip},
is_pollution = #{isPollution},
put_as_required = #{putAsRequired},
is_identification = #{isIdentification},
main_id = #{mainId},
del_flag = #{delFlag},
creater_code = #{createrCode},
createdate = #{createdate},
updater_code = #{updaterCode},
updatedate = #{updatedate},
remarks = #{remarks},
dept_id = #{deptId},
where id = #{id}
update t_ppe_cmldef_locker set del_flag = 2 where id = #{id}
update t_ppe_cmldef_locker set del_flag = 2 where id in
#{id}