优化接口

This commit is contained in:
tongfei
2024-04-11 16:55:53 +08:00
parent 20ecf4f1ce
commit 0773b932f8
4 changed files with 19 additions and 0 deletions

View File

@@ -653,6 +653,14 @@ namespace WMS.Web.Domain.Services
if (boxs == null || boxs.Count == 0)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxNoData);
//判断箱不存在所选的物料
foreach (var item in boxs)
{
var isAnyHave= item.Details.Any(x => x.MaterialNumber == dto.MaterialNumber);
if(!isAnyHave)
return Result<ContrastMaterialsResponse>.ReFailure(item.BoxBillNo+ResultCodes.BoxNoMaterialError.Item2, ResultCodes.BoxNoMaterialError.Item1);
}
//3.判断箱里面对应的物料是否存在;不存在就报错
foreach (var item in boxs)
{