From 67312a9ff7b3c06931dbf246f082a2935c0dcfe2 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, 16 Apr 2026 10:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E5=8F=B7=E4=B8=8D=E8=83=BD=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 --- .../Controllers/Api/UserController.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/APT.MicroApi/APT.FM.WebApi/Controllers/Api/UserController.cs b/APT.MicroApi/APT.FM.WebApi/Controllers/Api/UserController.cs index a967942..222f246 100644 --- a/APT.MicroApi/APT.FM.WebApi/Controllers/Api/UserController.cs +++ b/APT.MicroApi/APT.FM.WebApi/Controllers/Api/UserController.cs @@ -557,14 +557,14 @@ namespace APT.FM.WebApi.Controllers.Api.FM if (entity.Nav_Person.POST_ID == null) { throw new Exception("岗位不允许为空!"); - } - + } + var isRepeat = allUsers.FirstOrDefault(t => t.CODE == entity.CODE); + if (isRepeat != null) + this.ThrowError("050001"); if (isAdd == null) { userList = this.GetEntities(t => (t.CODE == entity.CODE || t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID) && t.ORG_ID == entity.ORG_ID, null, "Nav_Department").ToList(); - var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE); - if (isRepeat != null) - this.ThrowError("050001"); + if (entity.ORG_ID != Guid.Parse("b043b28b-bbc3-c452-6052-4fba1457abfa")) { #region // @@ -681,9 +681,9 @@ namespace APT.FM.WebApi.Controllers.Api.FM { dbRuleStr = string.Join(',', isAdd.Nav_BelongRoles.OrderBy(x => x.BELONG_ROLE_ID).Select(x => x.BELONG_ROLE_ID).Distinct().ToList()); userList = this.GetEntities(t => (t.CODE == entity.CODE || t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID) && t.ID != entity.ID && t.ORG_ID == entity.ORG_ID, null, "Nav_Department").ToList(); - var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE); - if (isRepeat != null) - this.ThrowError("050001"); + //var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE); + //if (isRepeat != null) + // this.ThrowError("050001"); } if (entity.DEPARTMENT_ID == null) {