This commit is contained in:
tongfei
2023-11-10 18:26:58 +08:00
parent 1a76ffdfc1
commit 848083c707
3 changed files with 85 additions and 2 deletions

View File

@@ -344,11 +344,11 @@ namespace WMS.Web.Domain.Services
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxNoData);
//3.比对false为比对失败;
bool isRight = box.Details.All(x => task.Details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty == x.Qty)) && box.Details.Count == task.Details.Count;
bool isRight = box.Details.All(x => task.Details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty >= x.Qty)) && box.Details.Count == task.Details.Count;
if(!isRight)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.ContrastError);
//4.是否存在箱号判断:存在的话,就不能收货或者非采购上架
//4.是否任务单存在绑定箱号判断:存在的话,就不能收货或者非采购上架
bool isHave = task.Boxs.Where(x => x.BoxBillNo == box.BoxBillNo).Any();
if(isHave)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxHaveError);