select d.id, d.staff_id, d.company_id, d.start_date, d.end_date, d.score, d.operation_score, d.training_place, d.training_duration, d.training_cost, d.budget, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate ,s.dept_name from t_training_hisparticipants d left join sys_dept s on s.dept_id = d.dept_id SELECT seq_t_training_hisparticipants.NEXTVAL as id FROM DUAL insert into t_training_hisparticipants id, staff_id, company_id, start_date, end_date, score, operation_score, training_place, training_duration, training_cost, budget, remarks, del_flag, creater_code, createdate, updater_code, updatedate, #{id}, #{staffId}, #{companyId}, #{startDate}, #{endDate}, #{score}, #{operationScore}, #{trainingPlace}, #{trainingDuration}, #{trainingCost}, #{budget}, #{remarks}, #{delFlag}, #{createrCode}, #{createdate}, #{updaterCode}, #{updatedate}, update t_training_hisparticipants staff_id = #{staffId}, company_id = #{companyId}, start_date = #{startDate}, end_date = #{endDate}, score = #{score}, operation_score = #{operationScore}, training_place = #{trainingPlace}, training_duration = #{trainingDuration}, training_cost = #{trainingCost}, budget = #{budget}, remarks = #{remarks}, del_flag = #{delFlag}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, where id = #{id} update t_training_hisparticipants set del_flag = 2 where id = #{id} update t_training_hisparticipants set del_flag = 2 where id in #{id}