fix 增加档案组分配检验

This commit is contained in:
2024-03-06 21:30:31 +08:00
parent b6f02b433b
commit d3e0581963

View File

@@ -91,6 +91,9 @@ public class GainfoGroupService : IGainfoGroupService
{
await _devicePermissionService.GenerateDeviceTasksAsync(async () =>
{
var pGrp = await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.Code == request.GroupCode).FirstAsync();
pGrp?.Editable.ThrowIfFalse("不可分配人员到当前分组");
var existsNextGroup = await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.PCode == request.GroupCode).AnyAsync();
existsNextGroup.ThrowIfTrue("存在下级分组,无法分配人员");