日志返回数据格式

booking_auth_dev
wet 2 years ago
parent f7ee65c3cb
commit 907abb8363

@ -457,16 +457,18 @@ namespace Myshipping.Application
/// <param name="Id"></param> /// <param name="Id"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("/BookingOrder/getLog")] [HttpGet("/BookingOrder/getLog")]
public async Task<BookingLogDto> GetLog(long Id) public async Task<List<BookingLogDto>> GetLog(long Id)
{ {
BookingLogDto list = new BookingLogDto(); List<BookingLogDto> list = new List<BookingLogDto>();
var main = await _bookinglog.FirstOrDefaultAsync(u => u.BookingId == Id); var main = await _bookinglog.AsQueryable().Where(u => u.BookingId == Id).ToListAsync();
if (main != null) list = main.Adapt<List<BookingLogDto>>();
if (list != null)
{ {
list = main.Adapt<BookingLogDto>(); foreach (var item in list)
var details = await _bookinglogdetail.AsQueryable().Where(x => x.PId == main.Id).ToListAsync(); {
var details = await _bookinglogdetail.AsQueryable().Where(x => x.PId == item.Id).ToListAsync();
list.details = details; item.details = details;
}
} }
return list; return list;
} }
@ -592,6 +594,7 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// 调用运踪接口 /// 调用运踪接口
/// </summary> /// </summary>
[NonAction]
public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO) public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO)
{ {
_logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口"); _logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口");
@ -624,6 +627,7 @@ namespace Myshipping.Application
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
[SqlSugarUnitOfWork] [SqlSugarUnitOfWork]
[NonAction]
public async Task AddBookingStatusLog(List<BookingStatusLogDto> all) public async Task AddBookingStatusLog(List<BookingStatusLogDto> all)
{ {

@ -16,7 +16,7 @@ namespace Myshipping.Application
Task Update(UpdateBookingOrderInput input); Task Update(UpdateBookingOrderInput input);
Task<BookingOrderOutput> Get(long Id); Task<BookingOrderOutput> Get(long Id);
Task<dynamic> Page([FromQuery] BookingOrderInput input); Task<dynamic> Page([FromQuery] BookingOrderInput input);
Task<BookingLogDto> GetLog(long Id); Task<List<BookingLogDto>> GetLog(long Id);
Task<List<BookingRemark>> GetRemark(long Id); Task<List<BookingRemark>> GetRemark(long Id);

Loading…
Cancel
Save