diff --git a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs index 358d3f02..0cc5ef4d 100644 --- a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs +++ b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs @@ -161,12 +161,11 @@ namespace Myshipping.Application } if (issend) { - await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray()); - - - - - + var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray(); + if (ids.Count() > 0) + { + await _bookingorderservice.SendBookingOrder(ids); + } } } diff --git a/Myshipping.Application/Service/DataSync/DataSyncService.cs b/Myshipping.Application/Service/DataSync/DataSyncService.cs index aa477373..5aee30b2 100644 --- a/Myshipping.Application/Service/DataSync/DataSyncService.cs +++ b/Myshipping.Application/Service/DataSync/DataSyncService.cs @@ -564,7 +564,12 @@ namespace Myshipping.Application //} } } - await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray()); + + var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray(); + if (ids.Count()>0) { + await _bookingorderservice.SendBookingOrder(ids); + } + } } @@ -1790,7 +1795,11 @@ namespace Myshipping.Application } if (issend) { - await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray()); + var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray(); + if (ids.Count() > 0) + { + await _bookingorderservice.SendBookingOrder(ids); + } } } } @@ -1964,12 +1973,14 @@ namespace Myshipping.Application issend = true; await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync(); } - - } if (issend) { - await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray()); + var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray(); + if (ids.Count() > 0) + { + await _bookingorderservice.SendBookingOrder(ids); + } } diff --git a/Myshipping.Core/Service/User/SysDataUserMenu.cs b/Myshipping.Core/Service/User/SysDataUserMenu.cs index c0fe6e22..2e211f19 100644 --- a/Myshipping.Core/Service/User/SysDataUserMenu.cs +++ b/Myshipping.Core/Service/User/SysDataUserMenu.cs @@ -202,6 +202,7 @@ public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController, I } DataScopeType _dataScopeType = list.Where(x => x.SysMenuId == menuid && x.SysUserId == UserManager.UserId).WhereIF(IsEdit == true, x => x.IsEdit == true).Select(x => x.DataScopeType).FirstOrDefault(); + //全部数据返回null if (_dataScopeType == DataScopeType.ALL) { datascope = null;