| | |
| | | _inboundOrderService.Db.Updateable(updateInboundOrders.Values.ToList()).ExecuteCommand(); |
| | | } |
| | | |
| | | // 7. 寰幆鍒嗙粍缁撴灉锛岃皟鐢∕ES鍥炰紶鏂规硶锛堟寜鍏ュ簱鍗曞垎缁勫洖浼狅級 |
| | | foreach (var kvp in orderIdBarCodeDict) |
| | | { |
| | | int orderId = kvp.Key; |
| | | List<string> barCodeList = kvp.Value; |
| | | //鍏ュ簱鍥炰紶MES |
| | | NoStockOutBatchInOrderFeedbackToMes(orderId, barCodeList); |
| | | } |
| | | |
| | | //鍙鍑哄簱鏉$爜鐨勫嚭搴撳崟鏄庣粏杩涜璁$畻鍥炰紶 |
| | | List<Dt_OutboundOrderDetail> outboundOrderDetail = outboundOrder.Details |
| | | .Where(x => !string.IsNullOrWhiteSpace(x.documentsNO) |
| | |
| | | |
| | | foreach (var item in outboundOrderDetail) |
| | | { |
| | | item.LockQuantity = item.NoStockOutQty; |
| | | item.OverOutQuantity = item.NoStockOutQty; |
| | | item.CurrentDeliveryQty = item.OverOutQuantity; |
| | | item.LockQuantity += item.NoStockOutQty; |
| | | item.OverOutQuantity += item.NoStockOutQty; |
| | | item.CurrentDeliveryQty = item.NoStockOutQty; |
| | | //娣诲姞鍥炰紶MES鍙傛暟 |
| | | List<Barcodes> barcodesList = new List<Barcodes>(); |
| | | List<Barcodes> documentsNOList = new List<Barcodes>(); |
| | |
| | | TaskNum = 0, |
| | | ChangeType = (int)StockChangeTypeEnum.Inbound, |
| | | ChangeQuantity = -item.NoStockOutQty, |
| | | BeforeQuantity = item.OrderQuantity - item.OverOutQuantity-item.MoveQty, |
| | | AfterQuantity = item.OrderQuantity - item.OverOutQuantity - item.MoveQty - item.NoStockOutQty, |
| | | BeforeQuantity = item.OrderQuantity, |
| | | AfterQuantity = item.OrderQuantity - item.OverOutQuantity, |
| | | SupplyCode = item.SupplyCode ?? "", |
| | | WarehouseCode = item.WarehouseCode ?? "", |
| | | Remark = $"铏氭嫙鍑哄簱" |
| | |
| | | _outboundOrderService.UpdateData(outboundOrder); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | // 7. 寰幆鍒嗙粍缁撴灉锛岃皟鐢∕ES鍥炰紶鏂规硶锛堟寜鍏ュ簱鍗曞垎缁勫洖浼狅級 |
| | | foreach (var kvp in orderIdBarCodeDict) |
| | | { |
| | | int orderId = kvp.Key; |
| | | List<string> barCodeList = kvp.Value; |
| | | //鍏ュ簱鍥炰紶MES |
| | | NoStockOutBatchInOrderFeedbackToMes(orderId, barCodeList); |
| | | } |
| | | //鍑哄簱鍥炰紶MES |
| | | _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo); |
| | | |