select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name, roadway_id, the_platoon, the_column, the_floor, status, locked from view_hand_allot_stock insert into view_hand_allot_stock stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name, roadway_id, the_platoon, the_column, the_floor, status, locked, #{stockId}, #{cargoSpaceId}, #{stockStatus}, #{productStatus}, #{lotNo}, #{inDate}, #{backDate}, #{productGuid}, #{quantity}, #{jobId}, #{trayCode}, #{outQuantity}, #{stockinDetailId}, #{stockinId}, #{inType}, #{inClassId}, #{warehouseId}, #{stackingId}, #{spare1}, #{spare2}, #{spare3}, #{spare4}, #{spare5}, #{spare6}, #{productId}, #{productName}, #{voltage}, #{power}, #{phase}, #{netWeight}, #{grossWeight}, #{distribution}, #{model}, #{orderId}, #{spare7}, #{spare8}, #{cargoSpaceName}, #{roadwayId}, #{thePlatoon}, #{theColumn}, #{theFloor}, #{status}, #{locked}, update view_hand_allot_stock cargo_space_id = #{cargoSpaceId}, stock_status = #{stockStatus}, product_status = #{productStatus}, lot_no = #{lotNo}, in_date = #{inDate}, back_date = #{backDate}, product_guid = #{productGuid}, quantity = #{quantity}, job_id = #{jobId}, tray_code = #{trayCode}, out_quantity = #{outQuantity}, stockin_detail_id = #{stockinDetailId}, stockin_id = #{stockinId}, in_type = #{inType}, in_class_id = #{inClassId}, warehouse_id = #{warehouseId}, stacking_id = #{stackingId}, spare1 = #{spare1}, spare2 = #{spare2}, spare3 = #{spare3}, spare4 = #{spare4}, spare5 = #{spare5}, spare6 = #{spare6}, product_id = #{productId}, product_name = #{productName}, voltage = #{voltage}, power = #{power}, phase = #{phase}, net_weight = #{netWeight}, gross_weight = #{grossWeight}, distribution = #{distribution}, model = #{model}, order_id = #{orderId}, spare7 = #{spare7}, spare8 = #{spare8}, cargo_space_name = #{cargoSpaceName}, roadway_id = #{roadwayId}, the_platoon = #{thePlatoon}, the_column = #{theColumn}, the_floor = #{theFloor}, status = #{status}, locked = #{locked}, where stock_id = #{stockId} delete from view_hand_allot_stock where stock_id = #{stockId} delete from view_hand_allot_stock where stock_id in #{stockId}