From 49e9e51eb41204266c95d697de601305545a94e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Mon, 2 Dec 2024 16:21:08 +0800 Subject: [PATCH] 1 --- asg_form/Controllers/auditAndFilingController.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/asg_form/Controllers/auditAndFilingController.cs b/asg_form/Controllers/auditAndFilingController.cs index c30facf..d052113 100644 --- a/asg_form/Controllers/auditAndFilingController.cs +++ b/asg_form/Controllers/auditAndFilingController.cs @@ -139,7 +139,7 @@ namespace asg_form.Controllers { node_index = auditinfo.nodeIndex, flow_config = auditinfo.flowConfig, }; - + if (auditinfo.relativeId != null) newAudit.status = "5"; sub.T_Audit.Add(newAudit); sub.SaveChanges(); return Ok(new { code = 200, message = "成功新增" }); @@ -229,6 +229,18 @@ namespace asg_form.Controllers { { if(query == null) return Ok(new error_mb { code = 404, message = "没有对应记录" }); query.status = "4"; + if(query.relative_id != null) + { + try + { + var query2 = await sub.T_Comform.FirstOrDefaultAsync(n => n.id == query.relative_id); + if (query2 != null) query2.status = "1"; + } + catch (Exception ex) + { + return Ok(new { code = 500, message = "服务器错误", ex }); + } + } await sub.SaveChangesAsync(); return Ok(new error_mb { code = 200, message = "对应的status已经更改" }); }