修复bug
This commit is contained in:
@@ -12,6 +12,7 @@ using WMS.Web.Core.Help;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Mappers;
|
||||
using WMS.Web.Domain.Values;
|
||||
using WMS.Web.Domain.Values.Single;
|
||||
using WMS.Web.Repositories.Configuration;
|
||||
@@ -126,11 +127,12 @@ namespace WMS.Web.Repositories
|
||||
|
||||
try
|
||||
{
|
||||
var res = await _context.TakeStock
|
||||
var res = await _context.TakeStock.Include(x=>x.Details)
|
||||
.FirstOrDefaultAsync(f => f.Id == entity.Id);
|
||||
if (res == null) return null;
|
||||
|
||||
_mapper.Map(entity, res);
|
||||
_mapper.ToMapList(entity.Details, res.Details);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
if (_transaction != null)
|
||||
@@ -148,7 +150,7 @@ namespace WMS.Web.Repositories
|
||||
|
||||
public async Task<List<TakeStock>> GetEntityList(List<int> ids)
|
||||
{
|
||||
var res = await _context.TakeStock
|
||||
var res = await _context.TakeStock.Include(x=>x.Details)
|
||||
.Where(f => ids.Contains(f.Id))
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user