select d.dev_type,d.id, d.sub_id, d.approve_id, d.tag_no, d.equipment_name, d.work_des, d.pid_no, d.completion_date, d.confirmed_person,u.NICK_NAME confirmed_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_overhaul_exchanger d left join sys_dept s on s.dept_id = d.dept_id left join sys_user u on u.user_id = d.CONFIRMED_PERSON update T_PSSR_OVERHAUL_EXCHANGER approve_status = #{approveStatus}, updater_code = #{updaterCode}, updatedate = #{updatedate}, where sub_id= #{subId} and APPROVE_STATUS=0 SELECT seq_t_pssr_overhaul_exchanger.NEXTVAL as id FROM DUAL insert into t_pssr_overhaul_exchanger id, sub_id, approve_id, tag_no, equipment_name, work_des, dev_type, pid_no, completion_date, confirmed_person, del_flag, creater_code, createdate, updater_code, updatedate, dept_id, remarks, approve_status, #{id}, #{subId}, #{approveId}, #{tagNo}, #{equipmentName}, #{workDes}, #{devType}, #{pidNo}, #{completionDate}, #{confirmedPerson}, #{delFlag}, #{createrCode}, #{createdate}, #{updaterCode}, #{updatedate}, #{deptId}, #{remarks}, #{approveStatus}, update t_pssr_overhaul_exchanger sub_id = #{subId}, approve_id = #{approveId}, tag_no = #{tagNo}, equipment_name = #{equipmentName}, work_des = #{workDes}, dev_type = #{devType}, pid_no = #{pidNo}, completion_date = #{completionDate}, confirmed_person = #{confirmedPerson}, del_flag = #{delFlag}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, dept_id = #{deptId}, remarks = #{remarks}, approve_status = #{approveStatus}, where id = #{id} update t_pssr_overhaul_exchanger completion_date = #{completionDate}, confirmed_person = #{confirmedPerson}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, remarks = #{remarks}, where id in #{id} update t_pssr_overhaul_exchanger set del_flag = 2 where id = #{id} update t_pssr_overhaul_exchanger set del_flag = 2 where id in #{id}