From fa9cbd561d5a2d4198953766838b41cb13e7f771 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 26 Mar 2024 15:36:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A9=AC=E5=A3=AB=E5=9F=BAAP?= =?UTF-8?q?I=E8=AE=A2=E8=88=B1=E7=9A=84=E5=8F=B0=E8=B4=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingMSKAPIService.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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) {