From 5865049bc9f22cd47814176ab97bbd431039a2d6 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Mon, 16 Mar 2026 16:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=84=8F=E8=AF=86=E8=B0=83?= =?UTF-8?q?=E6=9F=A5=20=E6=97=B6=E9=97=B4=E5=88=B0=E4=BA=86=20=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E5=9B=9E=E6=94=B6=20=E5=9F=B9=E8=AE=AD=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E8=B0=83=E6=9F=A5=20=E4=BA=BA=E5=91=98=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E9=87=8D=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/SEController.cs | 26 +++++++++++-------- .../SEController/2SETrainSurveyController.cs | 8 +++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs index f2c8756..48168c5 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs @@ -1375,12 +1375,26 @@ namespace APT.PP.WebApi.Controllers.Api.PP t.Nav_LaunchUser = null; }); var sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, filter.GetOrgId(), allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(1), (int)FMFormTypeEnum.计划任务通知, "SE005_REPORTEDIT"); + + //wyw 未处理的安全意识调查 转无需办理 + var listTaskDeal = GetEntities(e => e.NOTICE_STATUS == 0 && e.SOURCE_DATA_ID.HasValue && allSendDataIds.Contains(e.SOURCE_DATA_ID.Value), null, null); + if (listTaskDeal != null && listTaskDeal.Any()) + { + foreach (var item in listTaskDeal) + { + item.NOTICE_STATUS = 4;// FMNoticeStatusEnum.超时无需办理; + item.TASK_DT = dt; + } + } + UnifiedCommit(() => { if (surveys.Any()) BantchUpdateEntityNoCommit(surveys); if (sendNotices.Any()) BantchAddEntityNoCommit(sendNotices); + if (listTaskDeal != null && listTaskDeal.Any()) + BantchSaveEntityNoCommit(listTaskDeal); }); return true; }); @@ -1426,6 +1440,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP IEnumerable listTaskStop = null; if (listDemandID != null && listDemandID.Count() > 0) { + //处理 未操作的待办 listTaskStop = GetEntities(e => e.NOTICE_STATUS == 0 && e.SOURCE_FORMCODE == "SE007_INPUTPAGE" && e.SOURCE_DATA_ID.HasValue && listDemandID.Contains(e.SOURCE_DATA_ID.Value), null, null); listTaskStop.ForEach(e => { @@ -1434,15 +1449,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP }); } - //wyw 未处理的安全意识调查 转无需办理 - var listTaskDeal = GetEntities(e => e.NOTICE_STATUS == 0 && e.SOURCE_DATA_ID.HasValue && allSendDataIds.Contains(e.SOURCE_DATA_ID.Value), null, null); - if (listTaskDeal != null && listTaskDeal.Any()) - { - foreach (var item in listTaskDeal) - { - item.NOTICE_STATUS = 4;// FMNoticeStatusEnum.超时无需办理; - } - } //待测试会不会有bug BantchSaveEntityNoCommit(surveys); 检查 LAUNCH_USER_ID 报错? UnifiedCommit(() => { @@ -1452,8 +1458,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP BantchAddEntityNoCommit(sendNotices); if (listTaskStop != null && listTaskStop.Count() > 0) BantchSaveEntityNoCommit(listTaskStop); - if (listTaskDeal != null && listTaskDeal.Count() > 0) - BantchSaveEntityNoCommit(listTaskDeal); }); return true; }); diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/2SETrainSurveyController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/2SETrainSurveyController.cs index b8741da..02fdce0 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/2SETrainSurveyController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/2SETrainSurveyController.cs @@ -83,11 +83,17 @@ namespace APT.SC.WebApi.Controllers.Api.SE List Nav_Demands = null; List noticeTask = null; + var listUserID = Demands.Where(e => e.USER_ID.HasValue).Select(e => e.USER_ID.Value); + var listUserIDCheck = listUserID.Distinct(); + var ccCheck = listUserID.Count() - listUserIDCheck.Count(); + if (ccCheck > 0) + { + throw new Exception("调查人员不能重复("+ ccCheck + "人)!"); + } if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) { Nav_Demands = new List(); entity.STATUS = SETrainSurveyStatus.调查中; - var listUserID = Demands.Where(e => e.USER_ID.HasValue).Select(e => e.USER_ID.Value); var listUser = GetEntities(e => listUserID.Contains(e.ID), null, null); var allSendUserNames = new List(); var allSendUserIds = new List();