| | |
| | | } |
| | | else |
| | | { |
| | | Dt_InventoryInfo? _InventoryInfo = _stockService.InventoryInfoService.Repository.QueryData(x => x.BatchNo == inventoryInfo.BatchNo && (x.StockStatus == StockStatusEmun.å
¥åºä¸.ObjToInt() || x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt())).OrderByDescending(x => x.ModifyDate).FirstOrDefault(); |
| | | Dt_InventoryInfo? _InventoryInfo = _stockService.InventoryInfoService.Repository.QueryData(x => x.BatchNo == inventoryInfo.BatchNo && x.StockStatus == StockStatusEmun.å
¥åºä¸.ObjToInt()).OrderByDescending(x => x.ModifyDate).FirstOrDefault(); |
| | | |
| | | if (_InventoryInfo != null) |
| | | { |
| | | locationInfo = _basicService.LocationInfoService.GetLocation(_InventoryInfo.LocationCode); |
| | | if (locationInfo?.MaxQty <= locationInfo?.CurrentQty) locationInfo = null; |
| | | } |
| | | if (locationInfo == null) |
| | | { |
| | | _InventoryInfo = _stockService.InventoryInfoService.Repository.QueryData(x => x.BatchNo == inventoryInfo.BatchNo && x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt()).OrderByDescending(x => x.InDate).FirstOrDefault(); |
| | | if (_InventoryInfo != null) |
| | | { |
| | | locationInfo = _basicService.LocationInfoService.GetLocation(_InventoryInfo.LocationCode); |
| | | if (locationInfo?.MaxQty <= locationInfo?.CurrentQty) locationInfo = null; |
| | | } |
| | | } |
| | | if (locationInfo == null)//åé
æ°è´§ä½ |
| | | { |
| | | var Qty = Convert.ToInt32(inboundOrderDetail.OrderQuantity - inboundOrderDetail.OverInQuantity); |
| | | var Qty = Convert.ToInt32(inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity); |
| | | var ts = Qty / 320; |
| | | if (Qty % 320 > 0) ts++; |
| | | int inboundOrderCount = ts > 12 ? 2 : 1; |
| | |
| | | task.SourceIsPickPlace = false; |
| | | inventoryInfo.LocationCode = locationInfo.LocationCode; |
| | | inventoryInfo.StockStatus = StockStatusEmun.å
¥åºä¸.ObjToInt(); |
| | | inventoryInfo.ModifyDate = DateTime.Now; |
| | | locationInfo.CurrentQty++; |
| | | if (locationInfo.MaxQty < locationInfo.CurrentQty) locationInfo.CurrentQty = locationInfo.MaxQty; |
| | | inventoryInfo.SerialNumber = locationInfo.CurrentQty; |