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 = "成功新增" });