From d3e0581963b54d7cf8e7b87119e309b05258bb96 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 6 Mar 2024 21:30:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A2=9E=E5=8A=A0=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E7=BB=84=E5=88=86=E9=85=8D=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Organization/Services/Implements/GainfoGroupService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoGroupService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoGroupService.cs index fceb4425..4bf17d67 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoGroupService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoGroupService.cs @@ -89,8 +89,11 @@ public class GainfoGroupService : IGainfoGroupService public async Task AssignGainfosAsync(GainfoAssignRequest request) { - await _devicePermissionService.GenerateDeviceTasksAsync(async ()=> + await _devicePermissionService.GenerateDeviceTasksAsync(async () => { + var pGrp = await _dbContext.Queryable().Where(x => x.Code == request.GroupCode).FirstAsync(); + pGrp?.Editable.ThrowIfFalse("不可分配人员到当前分组"); + var existsNextGroup = await _dbContext.Queryable().Where(x => x.PCode == request.GroupCode).AnyAsync(); existsNextGroup.ThrowIfTrue("存在下级分组,无法分配人员");