判断顺序

This commit is contained in:
tongfei
2023-12-07 16:24:35 +08:00
parent 420164acdc
commit 164e71c412

View File

@@ -160,6 +160,11 @@ namespace WMS.Web.Domain.Services
if (tast_box == null)
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.Box_NoBind_Task_Data);
//2.1判断箱是否上架过了
var isExist = await _inStockRepositories.IsExistBy(box.Id);
if (isExist)
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxIsTrueShelf);
//1.2找到任务单
var tast = await _inStockTaskRepositories.Get(tast_box.TaskId);
if (tast == null)
@@ -173,11 +178,6 @@ namespace WMS.Web.Domain.Services
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxBindTaskDetailsIdNotChoose);
}
//2.1判断箱是否上架过了
var isExist = await _inStockRepositories.IsExistBy(box.Id);
if (isExist)
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxIsTrueShelf);
//3.组装返回数据
var result = new BoxInStockTaskDto();
result.SourceBillNo = tast.SourceBillNo;