diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Domain.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Domain.xml index 1e04b583..ed92d4df 100644 --- a/src/WMS.Web.Api/wwwroot/WMS.Web.Domain.xml +++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Domain.xml @@ -1657,11 +1657,11 @@ 解绑 - + 出库 - 出库单号 + 出库单 diff --git a/src/WMS.Web.Domain/Mappers/OutStockMapper.cs b/src/WMS.Web.Domain/Mappers/OutStockMapper.cs index 238a7384..a71c62dc 100644 --- a/src/WMS.Web.Domain/Mappers/OutStockMapper.cs +++ b/src/WMS.Web.Domain/Mappers/OutStockMapper.cs @@ -22,7 +22,8 @@ namespace WMS.Web.Domain.Mappers CreateMap() .ForMember(x => x.Details, opt => opt.Ignore()); CreateMap() - .ForMember(x => x.ErpDetails, opt => opt.Ignore()); + .ForMember(x => x.ErpDetails, opt => opt.Ignore()) + .ForMember(x => x.BoxsDetails, opt => opt.Ignore()); CreateMap(); diff --git a/src/WMS.Web.Repositories/OutStockRepositories.cs b/src/WMS.Web.Repositories/OutStockRepositories.cs index 09094d52..ca96dc0e 100644 --- a/src/WMS.Web.Repositories/OutStockRepositories.cs +++ b/src/WMS.Web.Repositories/OutStockRepositories.cs @@ -209,11 +209,13 @@ namespace WMS.Web.Repositories var res = await _context.OutStock .Include(s => s.Details).ThenInclude(s => s.ErpDetails) + .Include(s => s.Details).ThenInclude(s => s.BoxsDetails) .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).SelectMany(s => s.BoxsDetails).ToList(), res.SelectMany(s => s.Details).SelectMany(s => s.BoxsDetails).ToList()); await _context.SaveChangesAsync(); if (_transaction != null) _transaction.Commit(); @@ -235,8 +237,8 @@ namespace WMS.Web.Repositories public async Task> GetEntityList(List ids) { var res = await _context.OutStock - .Include(s => s.Details) - .ThenInclude(s => s.ErpDetails) + .Include(s => s.Details).ThenInclude(s => s.ErpDetails) + .Include(s => s.Details).ThenInclude(s => s.BoxsDetails) .Where(f => ids.Contains(f.Id)) .ToListAsync(); @@ -258,12 +260,14 @@ namespace WMS.Web.Repositories { var res = await _context.OutStock .Include(s => s.Details).ThenInclude(s => s.ErpDetails) + .Include(s => s.Details).ThenInclude(s => s.BoxsDetails) .FirstOrDefaultAsync(f => f.Id == entity.Id); 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.SelectMany(s => s.BoxsDetails).ToList(), res.Details.SelectMany(s => s.BoxsDetails).ToList()); await _context.SaveChangesAsync(); if (_transaction != null) @@ -287,6 +291,7 @@ namespace WMS.Web.Repositories { var res = await _context.OutStock .Include(s => s.Details).ThenInclude(s => s.ErpDetails) + .Include(s => s.Details).ThenInclude(s => s.BoxsDetails) .FirstOrDefaultAsync(f => taskId == f.TaskId); return res.Clone();