| | |
| | | Barcodes barcodes = new Barcodes |
| | | { |
| | | Barcode = item.Barcode, |
| | | Qty = item.BarcodeQty, |
| | | Qty = item.OrderQuantity, |
| | | SupplyCode = item?.SupplyCode ?? "", |
| | | BatchNo = item?.BatchNo ?? "", |
| | | Unit = item?.Unit ?? "" |
| | |
| | | Barcodes barcodes = new Barcodes |
| | | { |
| | | Barcode = matchedDetail.Barcode, |
| | | Qty = matchedDetail.BarcodeQty, |
| | | Qty = matchedDetail.OrderQuantity, |
| | | SupplyCode = matchedDetail?.SupplyCode ?? "", |
| | | BatchNo = matchedDetail?.BatchNo ?? "", |
| | | Unit = matchedDetail?.Unit ?? "" |
| | |
| | | if (response != null && response.IsSuccess) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | .Where(it => it.OrderId == inboundOrder.Id && barCodeList.Contains(it.Barcode)).ExecuteCommand(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | .Where(it => it.OrderId == inboundOrder.Id && barCodeList.Contains(it.Barcode)).ExecuteCommand(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus =2}) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | return content.Error("鍥炰紶MES澶辫触"); |
| | | } |
| | | } |
| | |
| | | if (response != null && response.IsSuccess) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | .Where(it => it.OrderId == inboundOrder.Id && barCodeList.Contains(it.Barcode)).ExecuteCommand(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }).Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }).Where(it => it.OrderId == inboundOrder.Id && barCodeList.Contains(it.Barcode)).ExecuteCommand(); |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | return content.Error("鍥炰紶MES澶辫触"); |