diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 7ecd6d17..c910e199 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1545,30 +1545,15 @@ namespace Myshipping.Application //陈冠宇提订舱编号不允许重复 if (!string.IsNullOrWhiteSpace(input.CUSTNO)) { - bool et; - // 自用订舱模式下,因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的 - if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_NORMAL) - { - 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); - } - else - { - 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); - } + // 因存在舱位拆票产生多票订舱的情况,所以拆票的舱位是能够重复的 + bool 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("当前订舱编号已存在,请勿重复录入!"); @@ -12832,7 +12817,7 @@ namespace Myshipping.Application newOrder.VERSION = version; - if(!string.IsNullOrWhiteSpace(dto.VESSEL)) + if (!string.IsNullOrWhiteSpace(dto.VESSEL)) { newOrder.VESSEL = dto.VESSEL; @@ -12852,7 +12837,7 @@ namespace Myshipping.Application updateColumnList.Add(nameof(BookingOrder.VOYNO)); } - + if (dto.ETD.HasValue) { newOrder.ETD = dto.ETD; @@ -12940,7 +12925,7 @@ namespace Myshipping.Application updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGE)); } - if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID)) + if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID)) { newOrder.DESTINATIONID = dto.DESTINATIONID; @@ -12969,7 +12954,7 @@ namespace Myshipping.Application } } - if(updateColumnList.Count == 0) + if (updateColumnList.Count == 0) throw Oops.Bah("没有提交要修改的数据,请重新填写"); //newOrder.VOYNOINNER = dto.VOYNOINNER; @@ -13007,7 +12992,7 @@ namespace Myshipping.Application - + } #endregion } diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 0d1c5f97..e39cebc0 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -2699,6 +2699,7 @@ namespace Myshipping.Application var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite); excelwork.Write(filestream); + await Task.Delay(2000); //return HttpUtility.UrlEncode(fileName, Encoding.GetEncoding("UTF-8")); return fileName; }