From 84f06b463f922a406b2da4e7cc9563d86f77fa00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Thu, 5 Feb 2026 13:51:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(workflow):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E9=99=84=E4=BB=B6=E5=A4=84=E7=90=86=E5=92=8C?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0=E7=BB=91=E5=AE=9A=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 ApiResult 中的 Attachments 类型从 List 改为 List - 将控制器中 InitiateFlow 方法的参数绑定方式从 [FromForm] 改为 [FromBody] - 移除多余的流程引擎初始化代码中的空行 - 修改附件保存逻辑,直接使用逗号分隔的字符串格式替代文件上传处理 - 在草稿保存功能中同步附件处理逻辑,确保数据格式一致 --- OpenAuth.App/WorkflowEngineApp.cs | 8 ++++---- OpenAuth.App/workflow/ApiResult.cs | 2 +- .../ServerController/CustomWorkflowController.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenAuth.App/WorkflowEngineApp.cs b/OpenAuth.App/WorkflowEngineApp.cs index 26e43d5..37c76f5 100644 --- a/OpenAuth.App/WorkflowEngineApp.cs +++ b/OpenAuth.App/WorkflowEngineApp.cs @@ -74,9 +74,7 @@ public class WorkflowEngineApp : SqlSugarBaseApp { new() { InstanceId = instanceId, VarKey = "Title", VarValue = requestDto.Title }, @@ -991,6 +990,7 @@ public class WorkflowEngineApp : SqlSugarBaseApp public object SaveDraft(InitiateFlowRequestDto requestDto) { + var attachmentPaths = string.Join(",", requestDto.Attachments); var user = _auth.GetCurrentUser().User; var illegalConstructionAssessment = new IllegalConstructionAssessment { @@ -998,7 +998,7 @@ public class WorkflowEngineApp : SqlSugarBaseApp /// 上传附件列表(业务相关证明材料、表单等) /// - public List Attachments { get; set; } = new List(); + public List Attachments { get; set; } = new(); } /// diff --git a/OpenAuth.WebApi/Controllers/ServerController/CustomWorkflowController.cs b/OpenAuth.WebApi/Controllers/ServerController/CustomWorkflowController.cs index c052253..bab79e1 100644 --- a/OpenAuth.WebApi/Controllers/ServerController/CustomWorkflowController.cs +++ b/OpenAuth.WebApi/Controllers/ServerController/CustomWorkflowController.cs @@ -34,7 +34,7 @@ public class WorkflowController : ControllerBase /// 发起流程请求参数 /// 流程实例ID [HttpPost] - public ActionResult> InitiateFlow([FromForm] InitiateFlowRequestDto requestDto) + public ActionResult> InitiateFlow([FromBody] InitiateFlowRequestDto requestDto) { try {