fix 增加档案组分配检验
This commit is contained in:
@@ -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("存在下级分组,无法分配人员");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user