判断顺序
This commit is contained in:
@@ -160,6 +160,11 @@ namespace WMS.Web.Domain.Services
|
|||||||
if (tast_box == null)
|
if (tast_box == null)
|
||||||
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.Box_NoBind_Task_Data);
|
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找到任务单
|
//1.2找到任务单
|
||||||
var tast = await _inStockTaskRepositories.Get(tast_box.TaskId);
|
var tast = await _inStockTaskRepositories.Get(tast_box.TaskId);
|
||||||
if (tast == null)
|
if (tast == null)
|
||||||
@@ -173,11 +178,6 @@ namespace WMS.Web.Domain.Services
|
|||||||
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxBindTaskDetailsIdNotChoose);
|
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxBindTaskDetailsIdNotChoose);
|
||||||
}
|
}
|
||||||
|
|
||||||
//2.1判断箱是否上架过了
|
|
||||||
var isExist = await _inStockRepositories.IsExistBy(box.Id);
|
|
||||||
if (isExist)
|
|
||||||
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxIsTrueShelf);
|
|
||||||
|
|
||||||
//3.组装返回数据
|
//3.组装返回数据
|
||||||
var result = new BoxInStockTaskDto();
|
var result = new BoxInStockTaskDto();
|
||||||
result.SourceBillNo = tast.SourceBillNo;
|
result.SourceBillNo = tast.SourceBillNo;
|
||||||
|
|||||||
Reference in New Issue
Block a user