From cadd709e06fb1fd9caa81defca0e03194fd07e17 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: Fri, 7 Nov 2025 11:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A5=A8=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=A3=8E=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrucialLicenseJobController.cs | 23 ++++++++++++++---- .../CrucialLicenseJobOutsourceController.cs | 24 +++++++++++++++---- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs index e1af729..65463bb 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs @@ -85,7 +85,7 @@ namespace APT.FO.WebApi.Controllers if (string.IsNullOrEmpty(id)) this.ThrowError("060010"); var result = this.GetEntity(id, new string[] { "Nav_CrucialLicensePerson", "Nav_CrucialLicensePerson.Nav_User","Nav_Files.Nav_ImgFile", - "Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme", + "Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme","Nav_Risks", "Nav_JobScheme.Nav_PreOperSchFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile"}); if (result != null) { @@ -161,7 +161,7 @@ namespace APT.FO.WebApi.Controllers // "Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile", "Nav_CrucialLicensePerson.Nav_User" }; //var entity = this.GetEntity(id); var entity = this.GetEntity(id, - "Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department"); + "Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department", "Nav_Risks"); if (entity != null) { var newFilter = new BaseFilter(filter.OrgId); @@ -243,6 +243,7 @@ namespace APT.FO.WebApi.Controllers // dealMeasures = dealMeasures.Where(t => !t.IS_DELETED).ToList(); //} var files = entity.Nav_Files; + var risks = entity.Nav_Risks; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; if (entity.TaskID != Guid.Empty) { @@ -257,6 +258,7 @@ namespace APT.FO.WebApi.Controllers entity.Nav_SafeMeasures = null; entity.Nav_DealMeasures = null; entity.Nav_Files = null; + entity.Nav_Risks = null; entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿; entity.APPLY_USER_ID = loginUserId; var loginUser = this.GetEntity(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId); @@ -309,6 +311,15 @@ namespace APT.FO.WebApi.Controllers x.Nav_CrucialLicenseJob = null; x.Nav_ImgFile = null; }); + } + if (risks != null && risks.Any()) + { + risks.ForEach(x => + { + x.ORG_ID = entity.ORG_ID; + x.CRUCIAL_LICENSE_JOB_ID = entity.ID; + x.Nav_CrucialLicenseJob = null; + }); } if (string.IsNullOrEmpty(entity.CODE)) { @@ -399,7 +410,9 @@ namespace APT.FO.WebApi.Controllers else throw new Exception("作业后处理措施不能为空!"); if (files != null && files.Any()) - BantchSaveEntityNoCommit(files); + BantchSaveEntityNoCommit(files); + if (risks != null && risks.Any()) + BantchSaveEntityNoCommit(risks); if (notices != null && notices.Any()) this.BantchSaveEntityNoCommit(notices); if (task != null) @@ -444,7 +457,9 @@ namespace APT.FO.WebApi.Controllers else throw new Exception("作业后处理措施不能为空!"); if (files != null && files.Any()) - BantchSaveEntityNoCommit(files); + BantchSaveEntityNoCommit(files); + if (risks != null && risks.Any()) + BantchSaveEntityNoCommit(risks); if (notices != null && notices.Any()) this.BantchSaveEntityNoCommit(notices); if (task != null) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs index 7afa0e6..81df395 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs @@ -56,7 +56,7 @@ namespace APT.FO.WebApi.Controllers if (string.IsNullOrEmpty(id)) this.ThrowError("060010"); var entity = this.GetEntity(id, - "Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department"); + "Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department","Nav_Risks"); if (entity != null) { var newFilter = new BaseFilter(filter.OrgId); @@ -105,7 +105,8 @@ namespace APT.FO.WebApi.Controllers var users = entity.Nav_CrucialLicensePerson; var safeConfirms = entity.Nav_SafeConfirms; var safeMeasures = entity.Nav_SafeMeasures; - var dealMeasures = entity.Nav_DealMeasures; + var dealMeasures = entity.Nav_DealMeasures; + var risks = entity.Nav_Risks; var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; if (entity.TaskID != Guid.Empty) { @@ -118,7 +119,8 @@ namespace APT.FO.WebApi.Controllers entity.Nav_CrucialLicensePerson = null; entity.Nav_SafeConfirms = null; entity.Nav_SafeMeasures = null; - entity.Nav_DealMeasures = null; + entity.Nav_DealMeasures = null; + entity.Nav_Risks = null; entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿; entity.APPLY_USER_ID = loginUserId; entity.DEPARTMENT_ID = this.GetEntity(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId)?.DEPARTMENT_ID; @@ -155,7 +157,17 @@ namespace APT.FO.WebApi.Controllers }); } else - throw new Exception("作业后处理措施必须填写!"); + throw new Exception("作业后处理措施必须填写!"); + + if (risks != null && risks.Any()) + { + risks.ForEach(x => + { + x.ORG_ID = entity.ORG_ID; + x.CRUCIAL_LICENSE_JOB_ID = entity.ID; + x.Nav_CrucialLicenseJob = null; + }); + } if (string.IsNullOrEmpty(entity.CODE)) { //取审批流水码 @@ -220,6 +232,8 @@ namespace APT.FO.WebApi.Controllers BantchSaveEntityNoCommit(safeMeasures); //保存子表 if (dealMeasures != null && dealMeasures.Any()) BantchSaveEntityNoCommit(dealMeasures); //保存子表 + if (risks != null && risks.Any()) + BantchSaveEntityNoCommit(risks); }, null, null, null, null, "", "FO025_SHOWPRINT", userIdss); return true; } @@ -242,6 +256,8 @@ namespace APT.FO.WebApi.Controllers BantchSaveEntityNoCommit(safeMeasures); //保存子表 if (dealMeasures != null && dealMeasures.Any()) BantchSaveEntityNoCommit(dealMeasures); //保存子表 + if (risks != null && risks.Any()) + BantchSaveEntityNoCommit(risks); //if (notices != null && notices.Any()) // this.BantchSaveEntityNoCommit(notices); //if (tech != null)