fix isDeleted

This commit is contained in:
2025-03-21 10:04:17 +08:00
parent 7013fbf8e5
commit 5a7938c966
2 changed files with 3 additions and 3 deletions

View File

@@ -146,7 +146,7 @@ public class WorkGridService : IWorkGridService
LeaderUserCode = x.LeaderUserCode,
UserName = ga.Name,
Remark = x.Remark,
UserCount = SqlFunc.Subqueryable<WorkGridUserEntity>().Where(p => p.WorkGridCode == x.Code).Count()
UserCount = SqlFunc.Subqueryable<WorkGridUserEntity>().Where(p => p.WorkGridCode == x.Code && x.IsDeleted == false).Count()
})
.ToPageListAsync(request);
}
@@ -259,7 +259,7 @@ public class WorkGridService : IWorkGridService
var role = _currentUser.GetRole();
var specific = (role is "admin" or "tenant-admin" or "WGZGLY") && request.WorkGridCode.HasValue;
var currentUserCode = _currentUser.GetUserClaim(UserClaimConstants.JinkoCode);
var myWorkGrid = await _dbContext.Queryable<WorkGridEntity>()
.WhereIF(specific, x => x.Code == request.WorkGridCode)
.WhereIF(specific == false, x => x.LeaderUserCode == currentUserCode)