fix 处理已知问题
This commit is contained in:
@@ -107,7 +107,7 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
await _devicePermissionService.GenerateDeviceTasksAsync(async () =>
|
||||
{
|
||||
var relationships = await _dbContext.Queryable<DeviceGroupRelationshipEntity>().Where(x => x.GroupCode == request.GroupCode).ToListAsync();
|
||||
await _dbContext.DeleteReallyAsync(relationships);
|
||||
await _dbContext.DeleteAsync(relationships);
|
||||
|
||||
var entities = request.DeviceCodes.Select(x => new DeviceGroupRelationshipEntity
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
.Where(x => x.TenantId == tenantId)
|
||||
.ToListAsync();
|
||||
|
||||
await _dbContext.DeleteReallyAsync(p);
|
||||
await _dbContext.DeleteAsync(p);
|
||||
|
||||
//保存配置的权限
|
||||
if (request.Codes.IsPresent())
|
||||
@@ -189,6 +189,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
{
|
||||
throw new Exception("系统维护中,暂不可操作");
|
||||
}
|
||||
|
||||
//获取所有人的权限
|
||||
if (userNos.IsEmpty())
|
||||
userNos = await GetPermissionUserNosAsync();
|
||||
@@ -273,7 +274,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
_logger.LogInformation("{tenant}任务产生数量{count}", tenantId, waitTasks.Count);
|
||||
if (waitTasks.Any())
|
||||
{
|
||||
// await _dbContext.InsertAsync(waitTasks);
|
||||
// await _dbContext.InsertAsync(waitTasks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,10 +424,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
public async Task GenerateDeviceTasksAsync(string userNo, DeviceTaskEnumType taskType)
|
||||
{
|
||||
var deviceCodes = await GetAssignDeviceCodesAsync(userNo);
|
||||
if (!deviceCodes.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!deviceCodes.Any()) return;
|
||||
|
||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => x.Enable)
|
||||
|
||||
@@ -98,7 +98,7 @@ public class GainfoGroupService : IGainfoGroupService
|
||||
await _devicePermissionService.GenerateDeviceTasksAsync(async () =>
|
||||
{
|
||||
var relations = await _dbContext.Queryable<GainfoGroupRelationshipEntity>().Where(x => x.GroupCode == request.GroupCode).ToListAsync();
|
||||
await _dbContext.DeleteReallyAsync(relations);
|
||||
await _dbContext.DeleteAsync(relations);
|
||||
|
||||
request.UserNos = await _dbContext.Queryable<GainfoEntity>().Where(x => request.UserNos.Contains(x.No) || request.UserNos.Contains(x.Code))
|
||||
.Select(x => x.No)
|
||||
|
||||
Reference in New Issue
Block a user