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

@@ -223,6 +223,48 @@ namespace WMS.Web.Api.Controllers
}
}
//剔除不是当前选中的物料
var remobox_byMaterialNumber = new List<ReceiveBoxResponse>();
return ResultList<ReceiveBoxResponse>.ReSuccess(receiveBoxList);
}
/// <summary>
/// 来源单-已收货未入库的箱集合-采购上架使用-pad-post
/// </summary>
/// <param name="taskId"></param>
/// <returns></returns>
[HttpGet]
[Route("GetReceiveBox")]
public async Task<ResultList<ReceiveBoxResponse>> GetReceiveBox([FromBody] ReceiveBoxRequeset dto)
{
//找到收货的箱子
var receiveBoxList = await _inStockTaskRepositories.GetReceiveBox(dto.TaskId, dto.MaterialNumber);
//找到已入库的箱子
var instockBoxList = await _inStockRepositories.GetInstockBox(dto.TaskId);
var remobox = new List<ReceiveBoxResponse>();
if (receiveBoxList.Count != 0 && instockBoxList.Count != 0)
{
//剔除已入库的箱子
foreach (var boxid in instockBoxList.Distinct().ToList())
{
var reBox = receiveBoxList.Where(x => x.BoxId == boxid).FirstOrDefault();
if (reBox != null)
remobox.Add(reBox);
}
}
if (remobox.Count != 0)
{
foreach (var item in remobox)
{
receiveBoxList.Remove(item);
}
}
//剔除不是当前选中的物料
var remobox_byMaterialNumber = new List<ReceiveBoxResponse>();
return ResultList<ReceiveBoxResponse>.ReSuccess(receiveBoxList);
}