接口优化
This commit is contained in:
@@ -448,7 +448,7 @@ namespace WMS.Web.Domain.Services
|
||||
var boxDetails = boxs.SelectMany(x => x.Details).GroupBy(x => x.MaterialId).Select(x => new { MaterialId = x.Key, Qty = x.Sum(t => t.Qty) }).ToList();
|
||||
|
||||
//3.比对:false为比对失败;
|
||||
bool isRight = boxDetails.All(x => task.Details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty >= x.Qty)) && boxDetails.Count == task.Details.Count;
|
||||
bool isRight = boxDetails.All(x => task.Details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty >= x.Qty)) && boxDetails.Count <= task.Details.Count;
|
||||
if (!isRight)
|
||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.ContrastError);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user