|
|
|
@ -5420,7 +5420,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("请上传正确数据");
|
|
|
|
|
}
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id) && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0 && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id) && x.TenantId == UserManager.TENANT_ID).ToListAsync();
|
|
|
|
|
|
|
|
|
|
var dto = order.Adapt<List<SyncBookingOrderDto>>();
|
|
|
|
|
if (dto.Count() == 0)
|
|
|
|
@ -5447,14 +5447,14 @@ namespace Myshipping.Application
|
|
|
|
|
item.ISSUETYPE = ISSUETYPE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var ctn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == item.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
var ctn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == item.Id ).ToListAsync();
|
|
|
|
|
item.ctnInputs = ctn.Adapt<List<BookingCtnDto>>();
|
|
|
|
|
foreach (var it in item.ctnInputs)
|
|
|
|
|
{
|
|
|
|
|
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id ).ToListAsync();
|
|
|
|
|
it.ctnDetailInputs = ctnDetailInputs.Adapt<List<BookingCtnDetailDto>>();
|
|
|
|
|
}
|
|
|
|
|
var BookingEDIExt = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id && x.IsDeleted == false).FirstAsync();
|
|
|
|
|
var BookingEDIExt = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id ).FirstAsync();
|
|
|
|
|
if (BookingEDIExt != null)
|
|
|
|
|
{
|
|
|
|
|
item.BookingEDIExt = BookingEDIExt.Adapt<BookingEDIExtDto>();
|
|
|
|
@ -5467,21 +5467,21 @@ namespace Myshipping.Application
|
|
|
|
|
ExtData = t.ExtData
|
|
|
|
|
}).Distinct().ToListAsync();
|
|
|
|
|
|
|
|
|
|
var childrens = await _rep.AsQueryable().Filter(null, true).Where(x => x.ParentId == item.Id && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToListAsync();
|
|
|
|
|
var childrens = await _rep.AsQueryable().Filter(null, true).Where(x => x.ParentId == item.Id && x.TenantId == UserManager.TENANT_ID).ToListAsync();
|
|
|
|
|
item.childrens = childrens.Adapt<List<Children>>();
|
|
|
|
|
|
|
|
|
|
foreach (var childitem in item.childrens)
|
|
|
|
|
{
|
|
|
|
|
var ctnInputs = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == childitem.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
var ctnInputs = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == childitem.Id ).ToListAsync();
|
|
|
|
|
childitem.ctnInputs = ctnInputs.Adapt<List<BookingCtnDto>>();
|
|
|
|
|
|
|
|
|
|
foreach (var it in childitem.ctnInputs)
|
|
|
|
|
{
|
|
|
|
|
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id).ToListAsync();
|
|
|
|
|
it.ctnDetailInputs = ctnDetailInputs.Adapt<List<BookingCtnDetailDto>>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var childBookingEDIExt = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == childitem.Id && x.IsDeleted == false).FirstAsync();
|
|
|
|
|
var childBookingEDIExt = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == childitem.Id ).FirstAsync();
|
|
|
|
|
if (childBookingEDIExt != null)
|
|
|
|
|
{
|
|
|
|
|
childitem.BookingEDIExt = childBookingEDIExt.Adapt<BookingEDIExtDto>();
|
|
|
|
|