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已经更改" }); }