|
|
|
@ -323,13 +323,13 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
var list = entities.Adapt<SqlSugarPagedList<PageBookingOrder>>();
|
|
|
|
|
|
|
|
|
|
var status =await _repBookingStatus.AsQueryable().ToListAsync();
|
|
|
|
|
var remark =await _bookingremark.AsQueryable().ToListAsync();
|
|
|
|
|
var status = await _repBookingStatus.AsQueryable().ToListAsync();
|
|
|
|
|
var remark = await _bookingremark.AsQueryable().ToListAsync();
|
|
|
|
|
foreach (var item in list.Items)
|
|
|
|
|
{
|
|
|
|
|
var sta = status.Where(x => x.BookingId == item.Id).ToList();
|
|
|
|
|
var sta = status.Where(x => x.BookingId == item.Id).ToList();
|
|
|
|
|
if (sta != null) { item.bookstatus = sta; }
|
|
|
|
|
var st = remark.Where(x => x.PId == item.Id).ToList();
|
|
|
|
|
var st = remark.Where(x => x.PId == item.Id).ToList();
|
|
|
|
|
if (st != null) { item.bookremark = st; }
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(item.ETD))
|
|
|
|
|
{
|
|
|
|
@ -4783,7 +4783,8 @@ namespace Myshipping.Application
|
|
|
|
|
public async Task<dynamic> GetAllData(long bookingId)
|
|
|
|
|
{
|
|
|
|
|
BookingAllData allData = new BookingAllData();
|
|
|
|
|
if (bookingId==0) {
|
|
|
|
|
if (bookingId == 0)
|
|
|
|
|
{
|
|
|
|
|
return allData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4799,23 +4800,23 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
var statuslog = await _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == bookingId).OrderByDescending(x => x.OpTime).ToListAsync();
|
|
|
|
|
var dto = statuslog.Adapt<List<BookingStatusLogDto>>();
|
|
|
|
|
var statuslogdetail =await _statuslogdetail.AsQueryable().ToListAsync();
|
|
|
|
|
var statuslogdetail = await _statuslogdetail.AsQueryable().ToListAsync();
|
|
|
|
|
foreach (var item in dto)
|
|
|
|
|
{
|
|
|
|
|
var detail = statuslogdetail.Where(x => x.PId == item.Id).ToList();
|
|
|
|
|
item.detail = detail.Adapt<List<BookingStatusLogDetailDto>>();
|
|
|
|
|
}
|
|
|
|
|
allData.statuslog = dto;
|
|
|
|
|
var bookinglog =await _bookinglog.AsQueryable().ToListAsync();
|
|
|
|
|
var bookinglog = await _bookinglog.AsQueryable().ToListAsync();
|
|
|
|
|
List<BookingLogDto> list = new List<BookingLogDto>();
|
|
|
|
|
var main = bookinglog.Where(u => u.BookingId == bookingId).ToList();
|
|
|
|
|
var main = bookinglog.Where(u => u.BookingId == bookingId).ToList();
|
|
|
|
|
list = main.Adapt<List<BookingLogDto>>();
|
|
|
|
|
if (list != null)
|
|
|
|
|
{
|
|
|
|
|
var bookinglogdetail = await _bookinglogdetail.AsQueryable().ToListAsync();
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var details = bookinglogdetail.Where(x => x.PId == item.Id).ToList();
|
|
|
|
|
var details = bookinglogdetail.Where(x => x.PId == item.Id).ToList();
|
|
|
|
|
item.details = details;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|