select shifts.id, shifts.employees_id,shifts.station, employees.name,employees.contact_number,post.post_name,organization.organization_name, shifts.date, shifts.start_time, shifts.end_time,shifts.scheduling, shifts.remark, shifts.create_time, shifts.update_time from dc_shifts as shifts left join dc_employees as employees on employees.id=shifts.employees_id left join sys_post as post on employees.post_id=post.post_id left join dc_organization as organization on organization.id=shifts.station insert into dc_shifts employees_id, date, start_time, end_time, remark, create_time, update_time, scheduling, station, #{employeesId}, #{date}, #{startTime}, #{endTime}, #{remark}, #{createTime}, #{updateTime}, #{scheduling}, #{station}, insert into dc_shifts_record id, operator, operation_type, operation_time, modify_content, shifts_date, station, #{id}, #{operator}, #{operationType}, #{operationTime}, #{modifyContent}, #{shiftsDate}, #{station}, update dc_shifts employees_id = #{employeesId}, date = #{date}, start_time = #{startTime}, end_time = #{endTime}, remark = #{remark}, create_time = #{createTime}, update_time = #{updateTime}, scheduling = #{scheduling}, station = #{station}, where id = #{id} delete from dc_shifts where id = #{id} delete from dc_shifts where id in #{id}