select record_id, prepare_id, material_code, materail_name, materail_spc, unit, quantity, product_date, shift_id, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code from mes_prepare_detail insert into mes_prepare_detail record_id, prepare_id, material_code, materail_name, materail_spc, unit, quantity, product_date, shift_id, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code, #{recordId}, #{prepareId}, #{materialCode}, #{materailName}, #{materailSpc}, #{unit}, #{quantity}, #{productDate}, #{shiftId}, #{status}, #{remark}, #{attr1}, #{attr2}, #{attr3}, #{attr4}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{prodType}, #{factoryCode}, update mes_prepare_detail prepare_id = #{prepareId}, material_code = #{materialCode}, materail_name = #{materailName}, materail_spc = #{materailSpc}, unit = #{unit}, quantity = #{quantity}, product_date = #{productDate}, shift_id = #{shiftId}, status = #{status}, remark = #{remark}, attr1 = #{attr1}, attr2 = #{attr2}, attr3 = #{attr3}, attr4 = #{attr4}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, prod_type = #{prodType}, factory_code = #{factoryCode}, where record_id = #{recordId} delete from mes_prepare_detail where record_id = #{recordId} delete from mes_prepare_detail where record_id in #{recordId}