From f11b208a2f3b9f2a741fcab8c461d89967f04983 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Fri, 7 Jun 2024 14:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E6=94=B9=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=20=20=E5=B1=A5=E8=81=8C=E6=83=85=E5=86=B5=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=A3=80=E6=9F=A5=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/PF/PFApproveCallBackService.cs | 16 +++- .../Controllers/Api/BSSafeCheckController.cs | 77 +++++++++++++++++++ 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs index e69af85..01e09a6 100644 --- a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs +++ b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs @@ -5679,6 +5679,16 @@ namespace APT.BaseData.Services.DomainServices listLog = GetUpdateDeal(OPERATEPOINT_Enums.RiskSendAudit, RISK_SUBMIT_ID.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, listContentID, taskFinish.TASK_ENDDT); } break; + case "BS/BSRiskSubmit/DealEndNew"://整改记录 + + var contentDeal = GetEntity(modelApp.DATA_ID); + if (contentDeal != null) + { + var modelLog = GetUpdateDeal(OPERATEPOINT_Enums.RiskDealAudit, contentDeal.RISK_SUBMIT_ID.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, contentDeal.RISK_SUBMIT_CONTENT_ID, taskFinish.TASK_ENDDT); + if (modelLog != null) + listLog = new List() { modelLog }; + } + break; default: break; } @@ -5694,6 +5704,8 @@ namespace APT.BaseData.Services.DomainServices UpdateEntityNoCommit(taskFinish); if (listTaskNext != null && listTaskNext.Count > 0)//下一个节点 BantchSaveEntityNoCommit(listTaskNext); + if (listLog != null && listLog.Any())//本节点操作记录 + BantchSaveEntityNoCommit(listLog); }); } else @@ -8364,8 +8376,8 @@ namespace APT.BaseData.Services.DomainServices //} //#endregion - - #region 方法重复写 如有修改 需同步修改 BSOperateLogService 对应方法 + + #region 方法重复写 如有修改 需同步修改 BSOperateLogService 对应方法 public List GetListOperateLog(OPERATEPOINT_Enums OPERATEPOINT, Guid DATA_ID, Guid UserIDLogin, List ListDATA_ID, List ListUserID, List ListUserName, Guid? ORG_ID, Guid? DATA_ID_SUB = null, List ListUserIDDone = null, bool isEnd = false, DateTime? TASK_ENDDT = null) { diff --git a/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSSafeCheckController.cs b/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSSafeCheckController.cs index 22a81e0..e637418 100644 --- a/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSSafeCheckController.cs +++ b/APT.MicroApi/APT.BS.WebApi/Controllers/Api/BSSafeCheckController.cs @@ -8596,6 +8596,83 @@ namespace APT.BS.WebApi.Controllers.Api }); } #endregion + + + + + /// + /// 检查任务取消 + /// + /// + /// + [HttpPost, Route("Cancel")] + public JsonActionResult Cancel([FromBody] KeywordFilter filter) + { + return SafeExecute(() => + { + //后台配置自定义按钮事件 keyWord就是对应的id + //只能取消自己的单子 + Guid CheckID = Guid.Empty; + Guid TaskID = Guid.Empty; + if (!string.IsNullOrEmpty(filter.Keyword)) + { + try + { + CheckID = new Guid(filter.Keyword); + if (!string.IsNullOrEmpty(filter.Parameter1)) + { + TaskID = new Guid(filter.Parameter1); + } + } + catch { } + } + + if (CheckID == Guid.Empty) + throw new Exception("获取信息失败,请重试!"); + + var Check = GetEntity(CheckID); + if (Check == null) + throw new Exception("未获取到检查单,操作失败!"); + + Check.ENABLE_STATUS = 1; + Check.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; + Check.MODIFY_TIME = DateTime.Now; + + + T_FM_NOTIFICATION_TASK task = null; + MS.Domain.Entities.SC.BI.T_BI_NOTIFICATION_TASK_NEW taskBI = null; + if (TaskID != Guid.Empty) + { + task = NotificationTaskService.GetEntityTask(TaskID, "BS032_SHOWPRINT"); + if (task != null) + { + task.ISCANCEL = true; + task.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; + task.MODIFY_TIME = DateTime.Now; + } + taskBI = GetEntity(e => e.SOURCE_DATA_ID == CheckID && e.NOTICE_STATUS == 0 && e.SOURCE_FORMCODE == "BS032"); + if (taskBI != null) + { + taskBI.MODIFIER_ID = task.MODIFIER_ID; + taskBI.MODIFY_TIME = task.MODIFY_TIME; + taskBI.TASK_DT = task.TASK_DT; + taskBI.NOTICE_STATUS = task.NOTICE_STATUS; + taskBI.IS_DELETED = true; + } + } + + UnifiedCommit(() => + { + if (Check != null) + UpdateEntityNoCommit(Check); + if (task != null) + UpdateEntityNoCommit(task); + if (taskBI != null) + UpdateEntityNoCommit(taskBI); + }); + return true; + }); + } } ///