select id, require_id,require_track_id, bom_line_id, bom_line_code, before_stock_amount, deduction_amount, after_stock_amount, org_code, batch_number, del_flag, create_time, create_by, update_by, update_time from aps_plate_standard_require_bom_stock_detail insert into aps_plate_standard_require_bom_stock_detail id, require_id, require_track_id, bom_line_id, bom_line_code, before_stock_amount, deduction_amount, after_stock_amount, org_code, batch_number, del_flag, create_time, create_by, update_by, update_time, #{id}, #{requireId}, #{requireTrackId}, #{bomLineId}, #{bomLineCode}, #{beforeStockAmount}, #{deductionAmount}, #{afterStockAmount}, #{orgCode}, #{batchNumber}, #{delFlag}, #{createTime}, #{createBy}, #{updateBy}, #{updateTime}, update aps_plate_standard_require_bom_stock_detail require_id = #{requireId}, require_track_id = #{requireTrackId}, bom_line_id = #{bomLineId}, bom_line_code = #{bomLineCode}, before_stock_amount = #{beforeStockAmount}, deduction_amount = #{deductionAmount}, after_stock_amount = #{afterStockAmount}, org_code = #{orgCode}, batch_number = #{batchNumber}, del_flag = #{delFlag}, create_time = #{createTime}, create_by = #{createBy}, update_by = #{updateBy}, update_time = #{updateTime}, where id = #{id} delete from aps_plate_standard_require_bom_stock_detail where id = #{id} delete from aps_plate_standard_require_bom_stock_detail where id in #{id} update aps_plate_standard_require_bom_stock_detail set del_flag = '1' where del_flag = '0' and batch_number != #{batchNumber} insert into aps_plate_standard_require_bom_stock_detail (id,require_id, require_track_id, bom_line_id, bom_line_code, before_stock_amount, deduction_amount , after_stock_amount, org_code, batch_number, del_flag, create_time, create_by) values ( #{item.id}, #{item.requireId}, #{item.requireTrackId}, #{item.bomLineId}, #{item.bomLineCode} , #{item.beforeStockAmount} , #{item.deductionAmount}, #{item.afterStockAmount}, #{item.orgCode} , #{item.batchNumber} , #{item.delFlag}, #{item.createTime}, #{item.createBy} )