修复bug

This commit is contained in:
18942506660
2024-03-06 17:20:36 +08:00
parent bab923ad2b
commit da0b1cba16
3 changed files with 36 additions and 19 deletions

View File

@@ -131,8 +131,8 @@ namespace WMS.Web.Repositories
.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());
//_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();
@@ -195,8 +195,8 @@ namespace WMS.Web.Repositories
if (res == null) return null;
_mapper.Map(entity, res);
_mapper.ToMapList(entity.Details, res.Details);
_mapper.ToMapList(entity.Details.SelectMany(s => s.ErpDetails).ToList(), res.Details.SelectMany(s => s.ErpDetails).ToList());
//_mapper.ToMapList(entity.Details, res.Details);
//_mapper.ToMapList(entity.Details.SelectMany(s => s.ErpDetails).ToList(), res.Details.SelectMany(s => s.ErpDetails).ToList());
await _context.SaveChangesAsync();
if (_transaction != null)