select lotnum, location_id, traceid, customer_id, sku, qty, qty_each, qtyallocated, qtyallocated_each, qtypa, qtyrpin, qtyrpout, qtymvin, qtymvout, qtyonhold, create_by, create_time, update_by, update_time, remark from inv_lot_loc_id insert into inv_lot_loc_id lotnum, location_id, traceid, customer_id, sku, qty, qty_each, qtyallocated, qtyallocated_each, qtypa, qtyrpin, qtyrpout, qtymvin, qtymvout, qtyonhold, create_by, create_time, update_by, update_time, remark, #{lotnum}, #{locationId}, #{traceid}, #{customerId}, #{sku}, #{qty}, #{qtyEach}, #{qtyallocated}, #{qtyallocatedEach}, #{qtypa}, #{qtyrpin}, #{qtyrpout}, #{qtymvin}, #{qtymvout}, #{qtyonhold}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, update inv_lot_loc_id lotnum = #{lotnumTo}, location_id = #{locationId}, traceid = #{traceid}, customer_id = #{customerId}, sku = #{sku}, qty = #{qty}, qty_each = #{qtyEach}, qtyallocated = #{qtyallocated}, qtyallocated_each = #{qtyallocatedEach}, qtypa = #{qtypa}, qtyrpin = #{qtyrpin}, qtyrpout = #{qtyrpout}, qtymvin = #{qtymvin}, qtymvout = #{qtymvout}, qtyonhold = #{qtyonhold}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, where lotnum = #{lotnum} and location_id = #{locationId} and customer_id = #{customerId} and sku = #{sku} update inv_lot_att set lotatt14 = '' where lotnum = #{lotnum} update inv_lot_att set lotatt15 = '' where lotnum = #{lotnum} delete from inv_lot_loc_id where lotnum = #{lotnum} delete from inv_lot_loc_id where lotnum = #{lotnum} and sku = #{sku} and location_id = #{locationId} and customer_id = #{customerId} delete from inv_lot_loc_id where lotnum in #{lotnum} delete from inv_lot_loc_id where location_id = #{locationId} delete from inv_lot_loc_id where lotnum = #{lotnum} and location_id = #{locationId} and customer_id = #{customerId} and sku = #{sku} update inv_lot_loc_id set location_id = #{locationTo} where location_id = #{locationFrom} update inv_lot_loc_id set location_id = #{locationTo},traceid = #{traceid} where location_id = #{locationFrom} update inv_lot_loc_id set location_id = #{locationTo} where location_id = #{locationFrom} and traceid = #{traceid} update inv_lot_loc_id set location_id = #{locationTo} where location_id = #{locationFrom} and lotnum = #{lotnum} update inv_lot_loc_id set location_id = #{locationTo} where lotnum = #{lotnum} and location_id = #{locationId} and customer_id = #{customerId} and sku = #{sku} delete from inv_lot_loc_id where location_id = #{locationId} delete from inv_lot_loc_id where location_id = #{locationId} and sku = #{sku} and customer_id = #{customerId} UPDATE inv_lot_att t1 SET t1.lotatt05 = #{qualityStatus} WHERE t1.lotatt01 = #{lotNumber} AND t1.lotnum IN ( SELECT lotnum FROM inv_lot_loc_id ) update inv_lot_loc_id set qtyallocated = qtyallocated + #{qty},qtyallocated_each = qtyallocated_each + #{qty} where lotnum = #{lotnum} and location_id = #{locationId} update inv_lot_loc_id set location_id = #{toLocationId}, update_time = now() where location_id = #{fromLocationId} and location_id not in (99997, 99998, 99999)