增加提示
This commit is contained in:
@@ -91,6 +91,14 @@ namespace WMS.Web.Domain.Services
|
||||
return Result.ReFailure(ResultCodes.OutStockTaskAlready);
|
||||
if (outStockTask.Status == OutStockStatus.Repeal)
|
||||
return Result.ReFailure(ResultCodes.OutStockTaskRepeal);
|
||||
|
||||
var mIds = dto.Details.GroupBy(g => g.MaterialId).Select(s => s.Key).ToList();
|
||||
foreach (var m in mIds)
|
||||
{
|
||||
var d_boxIds = dto.Details.Where(w => w.MaterialId == m).Select(s => s.BoxId);
|
||||
if (d_boxIds.Distinct().Count() != d_boxIds.Count())
|
||||
return Result.ReFailure(ResultCodes.BoxOutStockTaskBoxError);
|
||||
}
|
||||
//上传的物料在任务单里没有找到不能出库
|
||||
var ex = dto.Details.Select(s => s.MaterialId).Except(outStockTask.Details.Select(s => s.MaterialId)).ToList();
|
||||
if (ex.Count() > 0 && dto.Method == 2)
|
||||
@@ -141,7 +149,7 @@ namespace WMS.Web.Domain.Services
|
||||
}
|
||||
}
|
||||
|
||||
var mIds = dto.Details.GroupBy(g => g.MaterialId).Select(s => s.Key).ToList();
|
||||
|
||||
OutStock entity = new OutStock();
|
||||
foreach (var mid in mIds)
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace WMS.Web.Domain.Values
|
||||
public static ValueTuple<int, string> MergeNumberError = (70006, "必须选择两个及以上的单合并");
|
||||
public static ValueTuple<int, string> BoxNumberError= (70007, "该批箱数量不符,不能出库");
|
||||
public static ValueTuple<int, string> BoxOutStockTaskMaterialError = (70008, "该批箱物料和出库单中不存在,不能出库");
|
||||
public static ValueTuple<int, string> BoxOutStockTaskBoxError = (70009, "存在重复的箱号,请清空后重新操作");
|
||||
|
||||
public static ValueTuple<int, string> BoxIsTrueShelf = (80000, "箱号已上架入库");
|
||||
public static ValueTuple<int, string> BoxNoData = (80000, "系统找不到该箱号");
|
||||
|
||||
Reference in New Issue
Block a user