| | |
| | | Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(stockInfoDetail.OrderNo); |
| | | if (inboundOrder == null) throw new Exception($"æªæ¾å°æç[{lineDTO.Barcode}]çå
¥åºåä¿¡æ¯"); |
| | | |
| | | var BatchNo = stockInfoDetail.BatchNo.Substring(0, 2); |
| | | var BatchNo = stockInfoDetail.BatchNo; |
| | | #region 夿æ¯å¦æå®è´§ä½ |
| | | Dt_InboundOrderDetail? orderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfoDetail.BatchNo); |
| | | if (orderDetail == null) throw new Exception($"æªæ¾å°æç[{lineDTO.Barcode}]çå
¥åºåæç»ä¿¡æ¯"); |
| | |
| | | #endregion |
| | | else |
| | | { |
| | | instockInfoDetail = _stockService.StockInfoDetailService.Get_StockInfoDetail(stockInfoDetail.OrderNo, BatchNo);//å
¥åºååå¨åºåï¼å¤æè´§ä½ |
| | | instockInfoDetail = _stockService.StockInfoDetailService.Get_StockInfoDetail(stockInfoDetail.OrderNo /*BatchNo*/);//å
¥åºååå¨åºåï¼å¤æè´§ä½ |
| | | if (instockInfoDetail != null) instockInfo = _stockService.StockInfoService.Repository.GetStockInfo(instockInfoDetail.StockId); |
| | | if (instockInfo != null) |
| | | { |
| | |
| | | |
| | | if (locationInfo == null)//åé
æ°è´§ä½ |
| | | { |
| | | List<Dt_InboundOrderDetail> inboundOrderDetailList = inboundOrder.Details.Where(x => x.BatchNo.Contains(BatchNo) && x.OverInQuantity == 0).ToList(); |
| | | List<Dt_InboundOrderDetail> inboundOrderDetailList = inboundOrder.Details.Where(x => /*x.BatchNo.Contains(BatchNo) &&*/ x.OverInQuantity == 0).ToList(); |
| | | int inboundOrderCount = inboundOrderDetailList.Count; |
| | | locationInfo = _basicService.LocationInfoService.AssignLocation(inboundOrderCount);//éæ°åé
è´§ä½ |
| | | } |
| | |
| | | task.TargetAddress = task.NextAddress; |
| | | string[] targetCodes = task.NextAddress.Split("-"); |
| | | var Row = Convert.ToInt16(targetCodes[0]); |
| | | task.TargetIsPickPlace = /*Row > 1 ?*/ locationInfo.MaxQty - locationInfo.CurrentQty == 1; |
| | | task.TargetIsPickPlace = locationInfo.MaxQty - locationInfo.CurrentQty == 1; |
| | | task.SourceIsPickPlace = false; |
| | | stockInfo.LocationCode = locationInfo.LocationCode; |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºä¸.ObjToInt(); |
| | | stockInfoDetail.Status = StockStatusEmun.å
¥åºä¸.ObjToInt(); |
| | | locationInfo.CurrentQty++; |
| | | if (locationInfo.MaxQty < locationInfo.CurrentQty) locationInfo.CurrentQty = locationInfo.MaxQty; |
| | | stockInfo.SerialNumber = locationInfo.CurrentQty; |
| | | orderDetail.OverInQuantity++; |
| | | if (locationInfo.MaxQty < locationInfo.CurrentQty) throw new Exception(); |
| | | /*if (locationInfo.MaxQty == 12)*/ |
| | | if (orderDetail.OverInQuantity > orderDetail.ReceiptQuantity) |
| | | orderDetail.OverInQuantity = orderDetail.ReceiptQuantity; |
| | | locationInfo.EnableStatus = EnableStatusEnum.OnlyOut.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Inbounding.ObjToInt(); |
| | | |