a.id AS "id", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", a.remarks AS "remarks", a.del_flag AS "delFlag", a.staff_id AS "staff", a.name AS "name", a.agency AS "agency", a.address AS "address", a.start_date AS "startDate", a.end_date AS "endDate", a.type AS "type", a.hours AS "hours", a.certificate AS "certificate", a.file_path AS "filePath", a.file_name AS "fileName" INSERT INTO work_staff_training( id, create_by, create_date, update_by, update_date, remarks, del_flag, staff_id, name, agency, address, start_date, end_date, type, hours, certificate, file_path, file_name ) VALUES ( #{id}, #{createBy.id}, #{createDate}, #{updateBy.id}, #{updateDate}, #{remarks}, #{delFlag}, #{staff}, #{name}, #{agency}, #{address}, #{startDate}, #{endDate}, #{type}, #{hours}, #{certificate}, #{filePath}, #{fileName} ) UPDATE work_staff_training SET update_by = #{updateBy.id}, update_date = #{updateDate}, remarks = #{remarks}, staff_id = #{staff}, name = #{name}, agency = #{agency}, address = #{address}, start_date = #{startDate}, end_date = #{endDate}, type = #{type}, hours = #{hours}, certificate = #{certificate}, file_path = #{filePath}, file_name = #{fileName} WHERE id = #{id} DELETE FROM work_staff_training WHERE id = #{id} UPDATE work_staff_training SET del_flag = #{DEL_FLAG_DELETE} WHERE id = #{id} UPDATE work_staff_training SET del_flag = '1' WHERE id in (select l.son_id from work_staff_achives_log l where l.staff_id=#{id} and l.module='培训经历' and l.type='删除')