| | |
| | | using AutoMapper; |
| | | using Dm.filter; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Logging; |
| | | using Newtonsoft.Json; |
| | | using Org.BouncyCastle.Asn1.Ocsp; |
| | |
| | | locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | } |
| | | |
| | | _locationInfoService.Repository.UpdateData(locationInfo); |
| | | _locationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); |
| | | |
| | |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(it => new Dt_OutboundOrderDetail |
| | | { |
| | | LockQuantity = currentLockQty, |
| | | LockQuantity = currentLockQty, |
| | | }) |
| | | .Where(it => it.Id == detailId) |
| | | .ExecuteCommandAsync(); |
| | |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(it => new Dt_OutboundOrderDetail |
| | | { |
| | | OrderDetailStatus = newStatus, |
| | | OrderDetailStatus = newStatus, |
| | | }) |
| | | .Where(it => it.Id == orderDetail.Id) |
| | | .ExecuteCommandAsync(); |
| | |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | OrderStatus = newStatus, |
| | | Operator = App.User.UserName, |
| | | Operator = App.User.UserName, |
| | | }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | |
| | | MaterialCode = detail.MaterielCode, |
| | | LineNo = detail.lineNo, |
| | | WarehouseCode = detail.WarehouseCode, |
| | | Qty =0, |
| | | Qty = 0, |
| | | Unit = detail.BarcodeUnit, |
| | | Barcodes = new List<BarcodeInfo>() |
| | | }; |
| | |
| | | Barcode = item.CurrentBarcode, |
| | | SupplyCode = item.SupplyCode, |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.BarcodeUnit, |
| | | Unit = detail.BarcodeUnit, |
| | | Qty = 0 |
| | | }; |
| | | // 鍗曚綅涓嶄竴鑷存椂杞崲 |
| | | if (item.BarcodeUnit != item.Unit) |
| | | if (detail.BarcodeUnit != detail.Unit) |
| | | { |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, item.Unit, item.BarcodeUnit); |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit); |
| | | barModel.Unit = convertResult.Unit; |
| | | barModel.Qty = convertResult.Quantity; |
| | | } |
| | | |
| | | else |
| | | { |
| | | barModel.Qty = item.PickedQty; |
| | | } |
| | | detailModel.Qty += barModel.Qty; |
| | | detailModel.Barcodes.Add(barModel); |
| | | } |
| | | |
| | | |
| | | allocatefeedmodel.Details.Add(detailModel); |
| | | } |
| | | |
| | | var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .Where(x => x.OrderId == outboundOrder.Id).ExecuteCommandAsync(); |
| | | |
| | | allocatefeedmodel.Details.Add(detailModel); |
| | | } |
| | | |
| | | var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 1) |
| | | .Where(x => x.OrderId == outboundOrder.Id).ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 1, |
| | | Operator = App.User.UserName, |
| | | }).Where(x => x.OrderNo == orderNo).ExecuteCommandAsync(); |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(x => new Dt_OutboundOrder |
| | | { |
| | | ReturnToMESStatus = 1, |
| | | Operator = App.User.UserName, |
| | | }).Where(x => x.OrderNo == orderNo).ExecuteCommandAsync(); |
| | | } |
| | | } |
| | | } |
| | | else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt()) |
| | |
| | | lineNo = detail.lineNo, // 娉ㄦ剰锛氳繖閲屽彲鑳介渶瑕佽皟鏁村瓧娈靛悕 |
| | | warehouseCode = detail.WarehouseCode, |
| | | qty = 0, |
| | | currentDeliveryQty =0, |
| | | currentDeliveryQty = 0, |
| | | unit = detail.Unit, |
| | | barcodes = new List<WIDESEA_DTO.Outbound.BarcodesModel>() |
| | | }; |
| | |
| | | qty = item.PickedQty |
| | | }; |
| | | // 鍗曚綅涓嶄竴鑷存椂杞崲 |
| | | if (item.BarcodeUnit != item.Unit) |
| | | if (detail.BarcodeUnit != detail.Unit) |
| | | { |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, item.Unit, item.BarcodeUnit); |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit); |
| | | barModel.unit = convertResult.Unit; |
| | | barModel.qty = convertResult.Quantity; |
| | | } |
| | | |
| | | else |
| | | { |
| | | barModel.qty = item.PickedQty; |
| | | } |
| | | detailModel.qty += barModel.qty; |
| | | detailModel.currentDeliveryQty += barModel.qty; |
| | | detailModel.barcodes.Add(barModel); |
| | |
| | | } |
| | | feedmodel.details.Add(detailModel); |
| | | } |
| | | |
| | | var result = await _invokeMESService.FeedbackOutbound(feedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |