public int Audit(CheckObject entity) { try { FlowManager flowMgr = FlowManager.Instance(); FlowEngine flowEngine = flowMgr.Load(entity.Id); if (flowEngine == null) { return(-1); } if (entity.AuditType == (int)AuditType.Passed) { flowMgr.Audit(flowEngine, (AuditType)entity.AuditType, entity.AuditDesc, entity.UserId); } else { flowMgr.Returned(flowEngine, (AuditType)entity.AuditType, entity.AuditDesc, entity.UserId); ProjectEntity project = DataHelper.GetDataItem <ProjectEntity>("Usp_Project_Get", new { Id = entity.Id }); project.I_State = 165; DataHelper.ExecuteNonQuery("Usp_Project_Insert", project); } WriteLog("流程审核", flowEngine); flowMgr.FlowSave(flowEngine); return(1); } catch (Exception ex) { return(-1); } }