huangxiaoqiang
2025-12-17 bdf29324be453a64ac4baab479c3bb2b26a1bd5c
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs
@@ -63,13 +63,8 @@
                    return content.Error($"仓库中没有该{palletDto.WarehouseType}编号。");
                }
                List<Dt_InboundOrderDetail> details = new List<Dt_InboundOrderDetail>();
                Dt_InboundOrder inboundOrder = new Dt_InboundOrder();
                details = _inboundOrderDetailRepository.QueryData(x => x.OutBoxbarcodes == palletDto.Barcode && x.OrderDetailStatus == (int)InOrderStatusEnum.未开始);
                if (details.Count <= 0)
                {
                    details = _inboundOrderDetailRepository.QueryData(x => x.Barcode == palletDto.Barcode && x.OrderDetailStatus == (int)InOrderStatusEnum.未开始);
                }
                var details = _inboundOrderDetailRepository.QueryData(x => (x.OutBoxbarcodes == palletDto.Barcode|| x.Barcode == palletDto.Barcode) && x.OrderDetailStatus == (int)InOrderStatusEnum.未开始);
                if (details.Count() <= 0)
                {
@@ -93,6 +88,11 @@
                {
                    stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) };
                    stockInfo.Details = new List<Dt_StockInfoDetail>();
                }
                if (stockInfo != null && stockInfo.Details.Count>0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType)
                {
                    return content.Error($"该托盘组盘仓库为{stockInfo.Details.FirstOrDefault()?.WarehouseCode}与当前仓库{palletDto.WarehouseType}不一致,不允许组盘");
                }
                foreach (var item in details)
@@ -141,7 +141,7 @@
                {
                    Dt_StockInfo? NewstockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync();
                    return WebResponseContent.Instance.OK(data: NewstockInfo.Details);
                    return WebResponseContent.Instance.OK(data: NewstockInfo.Details.OrderByDescending(x => x.Id));
                }
                else
                {