diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 591d8f85..c4955945 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -270,7 +270,7 @@ namespace Myshipping.Application var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID) .WhereIF(!input.ISDel, x => x.IsDeleted == false) .WhereIF(input.ISDel, x => x.IsDeleted == true) - .WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && (x.CreatedUserId == UserManager.UserId || x.OPID == UserManager.UserId.ToString() || x.DOCID == UserManager.UserId.ToString() || x.ROUTEID == UserManager.UserId.ToString() || x.CUSTSERVICEID == UserManager.UserId.ToString() || x.SALEID == UserManager.UserId.ToString())) //首次加载数据:ETD前后15天,且创建人、操作是当前人 + .WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && (x.CreatedUserId == UserManager.UserId || x.OPID == UserManager.UserId.ToString() || x.DOCID == UserManager.UserId.ToString() || x.ROUTEID == UserManager.UserId.ToString() || x.LineManageID == UserManager.UserId.ToString() || x.CUSTSERVICEID == UserManager.UserId.ToString() || x.SALEID == UserManager.UserId.ToString())) //首次加载数据:ETD前后15天,且创建人、操作是当前人 .Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!! .WhereIF(input.Id != 0, x => x.Id == input.Id) .WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id)) @@ -421,8 +421,9 @@ namespace Myshipping.Application .WhereIF(input.EDELETETIME != null, u => u.DeleteTime < input.EDELETETIME.Value.AddDays(1)) .WhereIF(saleUserList != null && saleUserList.Count > 0, o => saleUserList.Contains(o.SALEID)) .WhereIF(opUserList != null && opUserList.Count > 0, o => opUserList.Contains(o.OPID)) - .WhereIF(userlist != null && userlist.Count() > 0, u => userlist.Contains((long)u.CreatedUserId) - || UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE || + .WhereIF(userlist != null && userlist.Count() > 0, u => userlist.Contains((long)u.CreatedUserId) || + UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE || + UserManager.UserId.ToString() == u.LineManageID || UserManager.Name.ToString() == u.LineManage || UserManager.UserId.ToString() == u.SALEID || UserManager.Name.ToString() == u.SALE || userlistString.Contains(u.OPID) || UserManager.Name.ToString() == u.OP || userlistString.Contains(u.DOCID) || UserManager.Name.ToString() == u.DOC || @@ -451,7 +452,7 @@ namespace Myshipping.Application */ var entities = await query.ToPagedListAsync(input.PageNo, input.PageSize); - + //var sql = query.ToSqlString(); if (traceTime) { var et = DateTime.Now - ticks; @@ -1072,12 +1073,11 @@ namespace Myshipping.Application var rightlist = await _right.GetDataScopeList(MenuConst.MenuBookingOrder, true); - //除现有配置权限外 操作和本人具有编辑权限 + //除现有配置权限外 创建人本人、操作、单证、客服 具有编辑权限 if (rightlist != null && !( mlist.OPID == UserManager.UserId.ToString() || mlist.OP == UserManager.Name.ToString() || mlist.DOCID == UserManager.UserId.ToString() || mlist.DOC == UserManager.Name.ToString() || mlist.CUSTSERVICEID == UserManager.UserId.ToString() || mlist.CUSTSERVICE == UserManager.Name.ToString() || - mlist.ROUTEID == UserManager.UserId.ToString() || mlist.ROUTE == UserManager.Name.ToString() || UserManager.UserId == 400234750476357 || mlist.CreatedUserId.ToString() == UserManager.UserId.ToString() || rightlist.Contains((long)mlist.CreatedUserId)