dengjunjie
2025-07-04 441b6f8d257a01b2998253ef0515a201777d7e68
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -192,7 +192,7 @@
                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}]的入库单明细信息");
@@ -217,7 +217,7 @@
                    #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)
                        {
@@ -238,7 +238,7 @@
                    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);//重新分配货位
                    }
@@ -254,15 +254,17 @@
                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();