fix 增加设备type类型
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
using Dlhis.Entity.Sys.Enums;
|
||||
using Dlhis.Sys.DataPermission.Request;
|
||||
@@ -21,6 +22,7 @@ public class DataPermissionService : IDataPermissionService
|
||||
.Where(x => x.AssignValue == request.AssignValue)
|
||||
.Where(x => x.AssignType == AssignTypeEnumType.User)
|
||||
.Where(x => x.UniqueType == request.UniqueType)
|
||||
.Where(x => x.DeviceType == request.Type)
|
||||
.ToListAsync();
|
||||
|
||||
await _dbContext.DeleteReallyAsync(data);
|
||||
@@ -34,12 +36,13 @@ public class DataPermissionService : IDataPermissionService
|
||||
}).ToList());
|
||||
}
|
||||
|
||||
public async Task<List<Guid>> GetAssignmentsAsync(string assignValue, DeviceAssignmentTypeEnumType uniqueType)
|
||||
public async Task<List<Guid>> GetAssignmentsAsync(string assignValue, DeviceAssignmentTypeEnumType uniqueType, DeviceTypeEnumType type)
|
||||
{
|
||||
return await _dbContext.Queryable<DataPermissionEntity>()
|
||||
.Where(x => x.AssignValue == assignValue)
|
||||
.Where(x => x.AssignType == AssignTypeEnumType.User)
|
||||
.Where(x => x.UniqueType == uniqueType)
|
||||
.Where(x => x.DeviceType == type)
|
||||
.Select(x => x.UniqueValue)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user