fix 任务生成描述

This commit is contained in:
2024-12-18 11:53:32 +08:00
parent 7cfd0b7365
commit df299bb019
27 changed files with 151 additions and 218 deletions

View File

@@ -254,8 +254,8 @@ public class GainfoService : IGainfoService
(outsource == null).ThrowIfTrue("非外包人员不可手动离职");
}
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null);
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null, request.Reason);
await _dbContext.Deleteable<GainfoGroupRelationshipEntity>().Where(x => x.UserNo != gainfo.No).ExecuteCommandAsync();
await _dbContext.Deleteable<DevicePermissionEntity>().Where(x => x.AssignType == AssignTypeEnumType.User && x.AssignValue == gainfo.No).ExecuteCommandAsync();
@@ -288,7 +288,7 @@ public class GainfoService : IGainfoService
await _dbContext.UpdateAsync(gainfo);
var deviceCodes = await _devicePermissionService.GetAssignDeviceCodesAsync(gainfo.Code);
var deviceCodes = await _devicePermissionService.GetUserDeviceCodesByNoAsync(gainfo.No);
var dhDevices = await _dbContext.Queryable<DeviceEntity>().LeftJoin<DeviceTemplateEntity>((x, xt) => x.TemplateCode == xt.Code)
.Where((x, xt) => xt.Name == "大华人脸机")
@@ -306,7 +306,7 @@ public class GainfoService : IGainfoService
Version = 0,
ResultMessage = null,
CancellationId = 0,
Source = DeviceTaskSourceEnumType.Manually,
Source = "安全级别提高",
Priority = 60,
TenantId = x.TenantId
}).ToList());
@@ -451,7 +451,7 @@ public class GainfoService : IGainfoService
//海宁触发权限下发
if (gainfo.Workplace == "5")
{
await _devicePermissionService.GenerateDeviceTasksAsync(gainfo.No, DeviceTaskEnumType.Add, DeviceTaskSourceEnumType.Migration);
await _devicePermissionService.GenerateDeviceTasksAsync(gainfo.No, DeviceTaskEnumType.Add, "人员迁移生成");
}
}
}