出库单结构调整

This commit is contained in:
18942506660
2023-11-16 11:42:37 +08:00
parent 865bc0d5df
commit dab5b29c53
8 changed files with 120 additions and 43 deletions

View File

@@ -125,12 +125,12 @@ namespace WMS.Web.Repositories
List<int> list = entitys.Select(s => s.Id).ToList();
var res = await _context.OutStockTask
.Include(s => s.Details)
.Include(s => s.Details).ThenInclude(s => s.ErpDetails)
.Where(f => list.Contains(f.Id)).ToListAsync();
_mapper.ToMapList(entitys, res);
_mapper.ToMapList(entitys.SelectMany(s => s.Details).ToList(), res.SelectMany(s => s.Details).ToList());
_mapper.ToMapList(entitys.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList(), res.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList());
await _context.SaveChangesAsync();
if (_transaction != null)
_transaction.Commit();