From 28c77bedbe8dc0683e98e914a4c781cd3d1f8702 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 25 Feb 2025 17:46:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=9F=A5=E7=9C=8B=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=88=86=E9=A1=B5PC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkGrids/Services/Implements/WorkGridService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs index 1072ded7..0a217deb 100644 --- a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs +++ b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridService.cs @@ -1,5 +1,6 @@ using Dlhis.Basic.WorkGrids.Request; using Dlhis.Basic.WorkGrids.Response; +using Dlhis.Constants; using Dlhis.Entity.Basic.Entity; using Kurisu.AspNetCore.Authentication.Abstractions; using Kurisu.AspNetCore.DataAccess.Dto; @@ -66,8 +67,13 @@ public class WorkGridService : IWorkGridService /// public async Task> GetPageAsync(WorkGridPageRequest request) { + var role = _currentUser.GetRole(); + var userCode = _currentUser.GetUserClaim(UserClaimConstants.JinkoCode); + var isAll = role is "admin" or "tenant-admin"; + return await _dbContext.Queryable() .LeftJoin((x, ga) => x.LeaderUserCode == ga.Code) + .WhereIF(!isAll, x => x.LeaderUserCode == userCode) .Select((x, ga) => new WorkGridPageResponse { Id = x.Id,