From 907abb8363044f2d72a1b65df37ea5b9b8f3bbda Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Thu, 17 Nov 2022 10:58:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BF=94=E5=9B=9E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 20 +++++++++++-------- .../BookingOrder/IBookingOrderService.cs | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index b05341f7..ed169a5a 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -457,16 +457,18 @@ namespace Myshipping.Application /// /// [HttpGet("/BookingOrder/getLog")] - public async Task GetLog(long Id) + public async Task> GetLog(long Id) { - BookingLogDto list = new BookingLogDto(); - var main = await _bookinglog.FirstOrDefaultAsync(u => u.BookingId == Id); - if (main != null) + List list = new List(); + var main = await _bookinglog.AsQueryable().Where(u => u.BookingId == Id).ToListAsync(); + list = main.Adapt>(); + if (list != null) { - list = main.Adapt(); - var details = await _bookinglogdetail.AsQueryable().Where(x => x.PId == main.Id).ToListAsync(); - - list.details = details; + foreach (var item in list) + { + var details = await _bookinglogdetail.AsQueryable().Where(x => x.PId == item.Id).ToListAsync(); + item.details = details; + } } return list; } @@ -592,6 +594,7 @@ namespace Myshipping.Application /// /// 调用运踪接口 /// + [NonAction] public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO) { _logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口"); @@ -624,6 +627,7 @@ namespace Myshipping.Application /// [AllowAnonymous] [SqlSugarUnitOfWork] + [NonAction] public async Task AddBookingStatusLog(List all) { diff --git a/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs index cf963c3e..8db10aca 100644 --- a/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs @@ -16,7 +16,7 @@ namespace Myshipping.Application Task Update(UpdateBookingOrderInput input); Task Get(long Id); Task Page([FromQuery] BookingOrderInput input); - Task GetLog(long Id); + Task> GetLog(long Id); Task> GetRemark(long Id);