This commit is contained in:
tongfei
2024-04-11 15:07:15 +08:00
parent 1c05cf2786
commit 304160e11a
7 changed files with 122 additions and 0 deletions

View File

@@ -490,6 +490,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<List<ReceiveBoxResponse>> GetReceiveBox(int taskId)
{
return await _context.InstockTaskBox.Where(x => x.TaskId == taskId).Select(x => new ReceiveBoxResponse()
{
TaskId = x.TaskId,
@@ -498,6 +499,26 @@ namespace WMS.Web.Repositories
}).ToListAsync();
}
/// <summary>
///
/// </summary>
/// <param name="taskId"></param>
/// <param name="materialNumber"></param>
/// <returns></returns>
public async Task<List<ReceiveBoxResponse>> GetReceiveBox(int taskId, string materialNumber)
{
var list = await _context.InstockTaskBox.Include(x => x.Details).Where(x => x.TaskId == taskId).ToListAsync();
var list_last = list.Where(x => !x.Details.Any(t => t.MaterialNumber == materialNumber));
var result = list.Select(x => new ReceiveBoxResponse()
{
TaskId = x.TaskId,
BoxId = x.BoxId,
BoxBillNo = x.BoxBillNo
}).ToList();
return result;
}
/// <summary>
/// 批量添加
/// </summary>