优化接口

This commit is contained in:
tongfei
2024-01-03 14:25:04 +08:00
parent 9488b88256
commit 8be6864b3c
5 changed files with 83 additions and 3 deletions

View File

@@ -597,10 +597,9 @@ namespace WMS.Web.Domain.Services
});
//2.修改箱和任务单的绑定关系,先判断箱没有被收货过
var taskBoxList = await _inStockTaskBoxRepositories.GetListBy(entity.Id);
var dto_boxIds = dto.Boxs.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
var isHaveBox = taskBoxList.Where(x => dto_boxIds.Contains(x.BoxId)).Any();
if (isHaveBox)
var taskBoxList = await _inStockTaskBoxRepositories.GetListBy(dto_boxIds);
if (taskBoxList != null && taskBoxList.Count != 0)
return Result<InStockTask>.ReFailure(ResultCodes.InStockTaskBoxIsHaveData);
//3.组装绑定关系表,要添加的集合