debug .
This commit is contained in:
@@ -34,12 +34,6 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
|
|
||||||
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
||||||
{
|
{
|
||||||
// if (_currentUser.GetStringSubjectId() != "14")
|
|
||||||
// {
|
|
||||||
// throw new Exception("系统维护中,暂不可操作");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
|
|
||||||
var tenantId = request.AssignType == AssignTypeEnumType.Department ? request.TenantId : _currentUser.GetStringTenantId();
|
var tenantId = request.AssignType == AssignTypeEnumType.Department ? request.TenantId : _currentUser.GetStringTenantId();
|
||||||
|
|
||||||
await GenerateDeviceTasksAsync(async () =>
|
await GenerateDeviceTasksAsync(async () =>
|
||||||
@@ -191,7 +185,10 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
public async Task GenerateDeviceTasksAsync(Func<Task> func, List<string> userNos)
|
public async Task GenerateDeviceTasksAsync(Func<Task> func, List<string> userNos)
|
||||||
{
|
{
|
||||||
var tenantId = _currentUser.GetStringTenantId();
|
var tenantId = _currentUser.GetStringTenantId();
|
||||||
|
if (_currentUser.GetStringSubjectId() != "14")
|
||||||
|
{
|
||||||
|
throw new Exception("系统维护中,暂不可操作");
|
||||||
|
}
|
||||||
//获取所有人的权限
|
//获取所有人的权限
|
||||||
if (userNos.IsEmpty())
|
if (userNos.IsEmpty())
|
||||||
userNos = await GetPermissionUserNosAsync();
|
userNos = await GetPermissionUserNosAsync();
|
||||||
@@ -276,7 +273,7 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
_logger.LogInformation("{tenant}任务产生数量{count}", tenantId, waitTasks.Count);
|
_logger.LogInformation("{tenant}任务产生数量{count}", tenantId, waitTasks.Count);
|
||||||
if (waitTasks.Any())
|
if (waitTasks.Any())
|
||||||
{
|
{
|
||||||
await _dbContext.InsertAsync(waitTasks);
|
// await _dbContext.InsertAsync(waitTasks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user