wangxinhui
2026-03-23 531c6e89dc07bb6997e6249a6cd9f53a9bd474a5
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -365,6 +365,10 @@
                    throw new Exception($"未找到条码{stockInfoOld.PalletCode}一期ERP库存不存在");
                }
                BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"一期ERP未返回{stockInfoOld.PalletCode}的库存信息");
                if (stockInfoOld.StockLength <= 0 || bSTStockInfoDTO.StockMeter<=0)
                {
                    throw new Exception($"{stockInfoOld.RfidCode}绑定条码{stockInfoOld.PalletCode}库存为0");
                }
                stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
                decimal stockLength = bSTStockInfoDTO.StockMeter;
                decimal errWeight = Math.Abs(weight - bSTStockInfoDTO.Qty);
@@ -398,6 +402,11 @@
                stockInfoOld.StockLength = stockLength;
                stockInfoOld.StockOutLength = 0;
                stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
                List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x=>x.PalletCode==stockInfoOld.PalletCode);
                if (outLineViewsDel.Count>0)
                {
                    _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel);
                }
                content.OK("成功",data:stockInfoOld);
            }
            catch (Exception ex)
@@ -966,6 +975,10 @@
                {
                    item.Count -= count.Count;
                }
                if (item.Count >= 50 && count?.Count<=2)
                {
                    return item.RoadwayNo;
                }
            }
            return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
        }