heshaofeng
2025-11-29 415931fc8e37495b1be97b975bc409c5b279ce6f
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -765,19 +765,19 @@
                if (currentLockInfo.PickedQty < context.PickingRecord.PickQuantity)
                    return ValidationResult<bool>.Error($"锁定信息已拣选数量({currentLockInfo.PickedQty})小于取消数量({context.PickingRecord.PickQuantity})");
                // éªŒè¯åº“存数据
                var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>()
                    .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId);
                ////// éªŒè¯åº“存数据
                ////var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>()
                ////    .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId);
                if (currentStockDetail == null)
                    return ValidationResult<bool>.Error($"未找到对应的库存明细记录");
                ////if (currentStockDetail == null)
                ////    return ValidationResult<bool>.Error($"未找到对应的库存明细记录");
                if (currentStockDetail.Status == StockStatusEmun.入库确认.ObjToInt() ||
                    currentStockDetail.Status == StockStatusEmun.入库完成.ObjToInt())
                    return ValidationResult<bool>.Error($"条码{context.PickingRecord.Barcode}已经回库,无法取消分拣");
                ////if (currentStockDetail.Status == StockStatusEmun.入库确认.ObjToInt() ||
                ////    currentStockDetail.Status == StockStatusEmun.入库完成.ObjToInt())
                ////    return ValidationResult<bool>.Error($"条码{context.PickingRecord.Barcode}已经回库,无法取消分拣");
                // éªŒè¯çŠ¶æ€æµè½¬çš„åˆæ³•æ€§
                if (!await CanCancelPicking(currentLockInfo, currentStockDetail))
                if (!await CanCancelPicking(currentLockInfo, null))
                    return ValidationResult<bool>.Error($"当前状态不允许取消分拣");
                return ValidationResult<bool>.Success(true);
@@ -795,9 +795,9 @@
            if (lockInfo.Status != (int)OutLockStockStatusEnum.拣选完成)
                return false;
            // åº“存状态检查
            if (stockDetail.Status == StockStatusEmun.出库完成.ObjToInt())
                return false;
            ////// åº“存状态检查
            ////if (stockDetail.Status == StockStatusEmun.出库完成.ObjToInt())
            ////    return false;
            // å¦‚果是拆包记录,还需要检查父锁定信息状态
            if (lockInfo.IsSplitted == 1 && lockInfo.ParentLockId.HasValue)
@@ -1773,7 +1773,7 @@
            if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt())
            {
                var allocate = _allocateService.Repository.QueryData(x => x.UpperOrderNo == outboundOrder.UpperOrderNo).First();
                var feedmodel = new AllocateDto
                var allocatefeedmodel = new AllocateDto
                {
                    ReqCode = Guid.NewGuid().ToString(),
                    ReqTime = DateTime.Now.ToString(),
@@ -1815,9 +1815,9 @@
                  
                   }).ToList();
                feedmodel.Details = groupedData;
                allocatefeedmodel.Details = groupedData;
                var result = await _invokeMESService.FeedbackAllocate(feedmodel);
                var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
                if (result != null && result.code == 200)
                {                    
                    await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()