diff --git a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs index 964ea006..8f45c343 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs @@ -990,17 +990,16 @@ namespace Myshipping.Application.Service.BookingOrder //菜单375504048771141=我的任务台账 List userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi); - if (userlist == null) - userlist = new List { UserManager.UserId }; - if (userlist.Count > 0) + { + userlist.Add(UserManager.UserId); userlist = userlist.Distinct().ToList(); + } _logger.LogInformation("任务台账权限范围 {list}", userlist); - var entities = await _bookingDeliveryRecordRep.AsQueryable() - .Where(t => userlist.Contains(t.CreatedUserId.Value)) + .Where(t => userlist == null || (userlist.Count > 0 && userlist.Contains(t.CreatedUserId.Value))) .WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin) .WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd) .WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin) @@ -1296,6 +1295,7 @@ namespace Myshipping.Application.Service.BookingOrder /// /// 马士基API订舱ID组 /// 返回执行结果消息 + [HttpPost("/BookingMSKAPI/BatchSend")] public async Task BatchSend(long[] ids) { var list = await _bookingDeliveryRecordRep.AsQueryable() @@ -1316,6 +1316,7 @@ namespace Myshipping.Application.Service.BookingOrder /// 马士基API订舱ID /// 需要复制生成记录 /// 返回执行结果消息 + [HttpGet("/BookingMSKAPI/BatchSend")] public async Task BatchCopy(long id, int copyNum) {