From ef9915f0ad0103283f50b19faf95fa645d9727f4 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Fri, 22 May 2026 15:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E7=BA=A7=E5=AE=89=E5=85=A8=E6=95=99?= =?UTF-8?q?=E8=82=B2=20=20=E5=B7=A5=E5=8F=B7=E5=9C=A8=20=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BA=BA=20=E5=A1=AB=E5=86=99=E5=B7=A5=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=80=95=E9=98=B6=E6=AE=B5=20=20=20=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=96=B9=E9=92=88=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=AD=90=E5=85=AC=E5=8F=B8=20=E9=99=A4=E4=BA=86=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20orgidue=E8=BF=9B=E5=85=A5=E5=88=A4=E6=96=AD=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8C=E6=AD=A5=E6=97=B6=E9=83=BD=E6=98=AF?= =?UTF-8?q?=E6=98=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/PFHomeTitleController.cs | 2 +- .../Controllers/Api/SEController/SENewUsers.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/PFHomeTitleController.cs b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/PFHomeTitleController.cs index 6aa4e45..7c0b089 100644 --- a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/PFHomeTitleController.cs +++ b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/PFHomeTitleController.cs @@ -41,7 +41,7 @@ namespace APT.PF.WebApiControllers.Api.PF try { - if (entity.ISTOCHILE) + if (entity.ISTOCHILE&& entity.ORG_ID.HasValue&&entity.ORG_ID.ToString().StartsWith("0300000")) { #region 总部 diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SENewUsers.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SENewUsers.cs index 12ba976..9762d43 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SENewUsers.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SENewUsers.cs @@ -62,6 +62,17 @@ namespace APT.SC.WebApi.Controllers.Api.SE } if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) { + var listCodeCheck = Nav_NewUserDetail.Where(e => !e.IS_DELETED && e.CODE != null && e.CODE.Length > 0).Select(e => e.CODE); + if (listCodeCheck != null && listCodeCheck.Count() > 0) + { + var listUserID = Nav_NewUserDetail.Where(e => !e.IS_DELETED && e.USER_ID.HasValue && e.CODE != null && e.CODE.Length > 0).Select(e => e.USER_ID.Value); + var listUCodeCheck = GetEntities(e => !e.IS_DELETED && listCodeCheck.Contains(e.CODE) && !listUserID.Contains(e.ID), null, null).Select(e => e.CODE); + if (listUCodeCheck != null && listUCodeCheck.Count() > 0) + { + throw new Exception("工号不能重复【" + String.Join(",", listUCodeCheck) + "】"); + } + } + var endTime = DateTime.Now.AddDays(10); var newEndTime = new DateTime(endTime.Year, endTime.Month, endTime.Day, 23, 59, 59); if (entity.TRAINNING_TIME == "0" || string.IsNullOrEmpty(entity.TRAINNING_TIME))