diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 6c66ac27..86bf4aac 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -2073,10 +2073,18 @@ namespace Myshipping.Application .Select(x => x.SLOT_BOOKING_NO) .ToListAsync(); + List list = new List(); + result.ext = list; foreach (var item in data) { if (existsNoList.Contains(item.Key.SLOT_BOOKING_NO)) { + list.Add(new + { + IsSuccess = false, + FailReason = "此订舱编号已存在", + SlotBookingNo = item.Key.SLOT_BOOKING_NO + }); continue; } @@ -2090,15 +2098,15 @@ namespace Myshipping.Application }); await _repCtn.InsertAsync(item.Value); } + list.Add(new + { + IsSuccess = true, + SlotBookingNo = item.Key.SLOT_BOOKING_NO + }); } result.succ = true; - result.msg = $"导入成功,共导入{data.Count}条舱位信息"; - if (existsNoList.Any()) - { - result.msg += $";其中下列订舱编号因已在系统中已存在所以未导入:{string.Join("、", existsNoList)}"; - } } catch (Exception ex) {