fix 档案组分配人员

This commit is contained in:
2024-03-06 23:13:51 +08:00
parent 83aa9cb954
commit 3416b16e02

View File

@@ -92,9 +92,9 @@ public class GainfoGroupService : IGainfoGroupService
if (request.UserNos.IsPresent())
{
var pGrp = await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.Code == request.GroupCode).FirstAsync();
pGrp?.Editable.ThrowIfFalse("不可分配人员到当前分组");
(pGrp?.Editable == false && pGrp?.IsDefault == true).ThrowIfTrue("不可分配人员到当前分组");
}
var existsNextGroup = await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.PCode == request.GroupCode).AnyAsync();
existsNextGroup.ThrowIfTrue("存在下级分组,无法分配人员");