update InvoiceItem set disposableGoodsId=(select max(disposableGoodsID) from DiposableGoodsItem where invoiceItemID=InvoiceItem.id) where diposable='是'; update InvoiceItem set disposableGoodsStockId=(select max(disposableGoodsStockID) from DiposableGoodsItem where invoiceItemID=InvoiceItem.id) where diposable='是'; update InvoiceItem set disposableGoodsBatchId=(select max(disposableGoodsBatchID) from DiposableGoodsItem where invoiceItemID=InvoiceItem.id) where diposable='是'; update InvoiceItem set disposableGoodsBatchStockId=(select max(disposableGoodsBatchStockID) from DiposableGoodsItem where invoiceItemID=InvoiceItem.id) where diposable='是'; update ReturnGoodsItem set disposableGoodsID=diposableGoodsID where disposableGoodsID is null;