优化接口
This commit is contained in:
@@ -2045,6 +2045,13 @@
|
||||
<param name="boxBillNo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Infrastructure.IBoxInventoryRepositories.IsExist(System.Int32)">
|
||||
<summary>
|
||||
箱库存是否存在
|
||||
</summary>
|
||||
<param name="boxId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Infrastructure.IBoxInventoryRepositories.GetList(System.Collections.Generic.List{System.Int32})">
|
||||
<summary>
|
||||
列表-根据箱ids
|
||||
|
||||
@@ -28,6 +28,13 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// <returns></returns>
|
||||
Task<BoxInventoryResponse> GetInfoBy(string boxBillNo);
|
||||
|
||||
/// <summary>
|
||||
/// 箱库存是否存在
|
||||
/// </summary>
|
||||
/// <param name="boxId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> IsExist(int boxId);
|
||||
|
||||
/// <summary>
|
||||
/// 列表-根据箱ids
|
||||
/// </summary>
|
||||
|
||||
@@ -199,10 +199,10 @@ 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);
|
||||
//2.1判断箱是否上架过了
|
||||
var isExist = await _boxInventoryRepositories.IsExist(box.Id);
|
||||
if (isExist)
|
||||
return Result<BoxInStockTaskDto>.ReFailure(ResultCodes.BoxIsTrueShelf);
|
||||
|
||||
//1.2找到任务单
|
||||
var tast = await _inStockTaskRepositories.Get(tast_box.TaskId);
|
||||
|
||||
@@ -172,6 +172,12 @@ namespace WMS.Web.Repositories
|
||||
return await _context.BoxInventory.Include(x => x.Details).Where(x => ids.Contains(x.BoxId)).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> IsExist(int boxId)
|
||||
{
|
||||
return await _context.BoxInventory.Where(x => x.BoxId == boxId).AnyAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 实体-根据箱id
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user