From 37ec22366e140b8025673a9b95c84ab514187711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <10755671+mei-rong-he@user.noreply.gitee.com> Date: Thu, 25 Dec 2025 09:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E8=A7=92=E8=89=B2=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APT.PF.WebApi/Controllers/Api/ApprovalRoleController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/ApprovalRoleController.cs b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/ApprovalRoleController.cs index 2d11d05..32afe1f 100644 --- a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/ApprovalRoleController.cs +++ b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/ApprovalRoleController.cs @@ -49,9 +49,9 @@ namespace APT.PF.WebApi.Controllers.Api } var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId; - //var roleCodes = this.GetEntities(t => true, new BaseFilter(orgId)).Select(x => x.NAME).ToList(); - //if (roleCodes.Contains(entity.NAME)) - // throw new Exception("系统已存在审批角色编码为" + entity.NAME + "的数据,请勿重复!"); + var roleCodes = this.GetEntities(t => !t.IS_DELETED, new BaseFilter(orgId)).Select(x => x.NAME).ToList(); + if (roleCodes.Contains(entity.NAME)) + throw new Exception("系统已存在审批角色为" + entity.NAME + "的数据,请勿重复!"); var departs = entity.Nav_ApproveDeparts; entity.Nav_ApproveDeparts = null; if (departs != null && departs.Any())