From 5b952126a019c4fde6dd70abebffc7bc59fa85a5 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 27 May 2024 19:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E8=A6=81=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingSlot/BookingSlotService.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index b652aa7a..28c97f92 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -3104,7 +3104,17 @@ namespace Myshipping.Application } } - var slotInfo = bookingSlotAllocList.FirstOrDefault().Slot; + BookingSlotBase slotInfo = null; + + if(bookingSlotAllocList.Count > 0) + { + slotInfo = bookingSlotAllocList.FirstOrDefault().Slot; + } + else + { + slotInfo = _repBase.AsQueryable().Filter(null, true).First(t => t.Id == slotId); + } + if (slotInfo != null) {