diff --git a/Myshipping.Application/Entity/BookingOrder.cs b/Myshipping.Application/Entity/BookingOrder.cs index 4ad8c9ee..c172e6f6 100644 --- a/Myshipping.Application/Entity/BookingOrder.cs +++ b/Myshipping.Application/Entity/BookingOrder.cs @@ -1056,7 +1056,7 @@ namespace Myshipping.Application.Entity /// /// 是否为舱位拆票后生成的订舱 /// - public bool IsSplit { get; set; } + public bool? IsSplit { get; set; } /// /// 分单操作ID diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 97c61b20..e6a9760f 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1545,7 +1545,14 @@ namespace Myshipping.Application //陈冠宇提订舱编号不允许重复 if (!string.IsNullOrWhiteSpace(input.CUSTNO)) { - var et = await _rep.AsQueryable().Filter(null, true).AnyAsync(x => x.IsDeleted == false && x.IsSplit == false && x.CUSTNO == input.CUSTNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0 && x.Id != input.Id); + var et = await _rep.AsQueryable() + .Filter(null, true) + .AnyAsync(x => x.IsDeleted == false + && (x.IsSplit == false || x.IsSplit == null) // 自用订舱模式下,因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的 + && x.CUSTNO == input.CUSTNO + && x.TenantId == UserManager.TENANT_ID + && x.ParentId == 0 + && x.Id != input.Id); if (et) { throw Oops.Bah("当前订舱编号已存在,请勿重复录入!"); @@ -10743,7 +10750,7 @@ namespace Myshipping.Application extModel.TxxpEndTime = date; await _repextendstate.InsertAsync(extModel); } - await SendBookingOrder(new long[] { bookId }); + await SendBookingOrder(new long[] { bookId }); } #endregion