From 6e5962436cc39a43a633193ac9bae6adf5c71a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Wed, 11 Dec 2024 20:49:07 +0800 Subject: [PATCH] 1 --- asg_form/Controllers/auditAndFilingController.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/asg_form/Controllers/auditAndFilingController.cs b/asg_form/Controllers/auditAndFilingController.cs index bc221e4..7a4db02 100644 --- a/asg_form/Controllers/auditAndFilingController.cs +++ b/asg_form/Controllers/auditAndFilingController.cs @@ -151,7 +151,18 @@ namespace asg_form.Controllers { node_index = auditinfo.nodeIndex, flow_config = auditinfo.flowConfig, }; - if (auditinfo.relativeId != null) newAudit.status = "5"; + if (auditinfo.relativeId != null) + { + try + { + var query2 = await sub.T_Comform.FirstOrDefaultAsync(n => n.id == auditinfo.relativeId); + if (query2 != null) query2.status = "5"; + } + catch (Exception ex) + { + return Ok(new { code = 500, message = "服务器错误", ex }); + } + } sub.T_Audit.Add(newAudit); sub.SaveChanges(); return Ok(new { code = 200, message = "成功新增" });