This commit is contained in:
tongfei
2024-03-22 15:15:48 +08:00
parent 31af75a15e
commit 522e26fae7
2 changed files with 4 additions and 3 deletions

View File

@@ -640,8 +640,9 @@ namespace WMS.Web.Domain.Services
foreach (var entity in list)
{
var det_ids = entity.Details.Select(s => s.Id).ToList();
var change_ids = det_ids.Intersect(dto.Ids).ToList();
//作废
entity.Repeal(loginInfo.UserInfo.StaffId, det_ids);
entity.Repeal(loginInfo.UserInfo.StaffId, change_ids);
}
var isSuccess = await _inStockTaskRepositories.UpdateRange(list, true);
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);

View File

@@ -107,12 +107,12 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<List<InStockTask>> GetListByDetailIds(List<int> ids)
{
var res = await _context.InStockTask
var list = await _context.InStockTask
.Include(s => s.Details)
.Where(f => f.Details.Where(dw => ids.Contains(dw.Id)).Count() > 0)
.ToListAsync();
return res.Clone();
return list;
}