|
|
|
@ -401,11 +401,11 @@ namespace Myshipping.Application
|
|
|
|
|
[HttpGet("/BookingOrder/get")]
|
|
|
|
|
public async Task<BookingOrderOutput> Get(long Id)
|
|
|
|
|
{
|
|
|
|
|
BookingOrderOutput list = new BookingOrderOutput();
|
|
|
|
|
BookingOrderOutput ordOut = new BookingOrderOutput();
|
|
|
|
|
var main = await _rep.FirstOrDefaultAsync(u => u.Id == Id);
|
|
|
|
|
if (main != null)
|
|
|
|
|
{
|
|
|
|
|
list = main.Adapt<BookingOrderOutput>();
|
|
|
|
|
ordOut = main.Adapt<BookingOrderOutput>();
|
|
|
|
|
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).ToListAsync();
|
|
|
|
|
var ctninput = ctnlist.Adapt<List<BookingCtnDto>>();
|
|
|
|
|
foreach (var item in ctninput)
|
|
|
|
@ -413,9 +413,20 @@ namespace Myshipping.Application
|
|
|
|
|
var ctndetaillist = await _ctndetailrep.AsQueryable().Where(x => x.CTNID == item.Id).ToListAsync();
|
|
|
|
|
item.ctnDetailInputs = ctndetaillist.Adapt<List<BookingCtnDetailDto>>();
|
|
|
|
|
}
|
|
|
|
|
list.ctnInputs = ctninput;
|
|
|
|
|
ordOut.ctnInputs = ctninput;
|
|
|
|
|
|
|
|
|
|
var ordUrl = _repOrderUrl.FirstOrDefault(x => x.BookingId == Id);
|
|
|
|
|
if (ordUrl != null)
|
|
|
|
|
{
|
|
|
|
|
ordOut.Link = new BookingOrderUrlOutput()
|
|
|
|
|
{
|
|
|
|
|
LinkUrlTxxp = ordUrl.UrlTxxp,
|
|
|
|
|
LinkUrlVgm = ordUrl.UrlVgm,
|
|
|
|
|
LinkUrlVmgSi = ordUrl.UrlVgmSi,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
return ordOut;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|