optimize
wet 2 years ago
parent 955df45576
commit 1d7412ab8a

@ -72,11 +72,11 @@ namespace Myshipping.Application
public async Task<List<BookingOrderSeaeEdiServiceDto>> PageESeaeEdi(long bookingId) public async Task<List<BookingOrderSeaeEdiServiceDto>> PageESeaeEdi(long bookingId)
{ {
var entities = await _seaeedi.AsQueryable().Filter(null, true).Where(x => x.BookingId == bookingId).ToListAsync(); var entities = await _seaeedi.AsQueryable().Filter(null, true).Where(x => x.BookingId == bookingId&&x.IsDeleted==false).ToListAsync();
var list = entities.Adapt<List<BookingOrderSeaeEdiServiceDto>>(); var list = entities.Adapt<List<BookingOrderSeaeEdiServiceDto>>();
foreach (var item in list) foreach (var item in list)
{ {
var ctn = await _seaeedictn.AsQueryable().Filter(null, true).Where(x => x.PId == item.Id).ToListAsync(); var ctn = await _seaeedictn.AsQueryable().Filter(null, true).Where(x => x.PId == item.Id && x.IsDeleted == false).ToListAsync();
item.EdiCtn = ctn.Adapt<List<BookingOrderSeaeEdiCtnDto>>(); item.EdiCtn = ctn.Adapt<List<BookingOrderSeaeEdiCtnDto>>();
} }
return list; return list;

Loading…
Cancel
Save