增加提示
This commit is contained in:
@@ -78,6 +78,14 @@ namespace WMS.Web.Domain.Services
|
||||
if (sCount > 0)
|
||||
return Result.ReFailure(ResultCodes.SerialNumbersBoxError);
|
||||
}
|
||||
else
|
||||
{
|
||||
//有原箱的情况下验证序列号和原箱是否一致
|
||||
var s = d.Details.SelectMany(s => s.SerialNumbers).ToList();
|
||||
var boxCount = serialNumberList.Where(w => s.Contains(w.SerialNumber)).GroupBy(s => s.BoxId).Select(s => s.Key).ToList();
|
||||
if (boxCount.Count() > 1 || boxCount[0] != d.SrcBoxId)
|
||||
return Result.ReFailure(ResultCodes.SerialNumbersSrcBoxError);
|
||||
}
|
||||
var box = boxs.FirstOrDefault(f => f.BoxId == d.SrcBoxId);
|
||||
//原箱在库存中的话 进行验证
|
||||
if (box != null)
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace WMS.Web.Domain.Values
|
||||
|
||||
public static ValueTuple<int, string> SerialNumbersNoData = (610000, "序列号不存在");
|
||||
public static ValueTuple<int, string> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
|
||||
public static ValueTuple<int, string> SerialNumbersSrcBoxError = (610003, "序列号不在原有箱号内");
|
||||
public static ValueTuple<int, string> TakeStockStockError = (610001, "一次不能盘多个仓库");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user