fix 向上递归包括当前部门分配
This commit is contained in:
@@ -540,7 +540,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
//Department
|
||||
var tenantDepartmentNos = permissions.Where(x => x.AssignType == AssignTypeEnumType.Department)
|
||||
.GroupBy(x => x.TenantId)
|
||||
.ToDictionary(x => x.Key, x => x.Select(x => x.AssignValue).ToList());
|
||||
.ToDictionary(x => x.Key, x => x.Select(item => item.AssignValue).Distinct().ToList());
|
||||
var departments = await _dbContext.Queryable<DepartmentEntity>().ToListAsync();
|
||||
|
||||
var gainfoByDeptWhere = LinqExpressionExtensions.False<GainfoEntity>();
|
||||
@@ -601,7 +601,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
if (assignType == AssignTypeEnumType.Department)
|
||||
{
|
||||
//递归向上获取 assignValue = department.No
|
||||
var departmentNos = new List<string>();
|
||||
var departmentNos = new List<string> { assignValue };
|
||||
DepartmentRecursionGetPNo(assignValue, departments, departmentNos);
|
||||
|
||||
tenantDevicePermissions = devicePermissions
|
||||
|
||||
Reference in New Issue
Block a user