# `Sp_Report_GetFlowPerson` (procedure)

> 获取节点审核人


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sId` | `varchar(100)` |
| 2 | IN | `p_sNodeName` | `varchar(100)` |
| 3 | IN | `sMakePerson` | `varchar(100)` |
| 4 | IN | `sBrId` | `varchar(100)` |
| 5 | IN | `sSuId` | `varchar(100)` |
| 6 | OUT | `sReturn` | `varchar(1000)` |
| 7 | OUT | `sCode` | `int` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Report_GetFlowPerson`'`._

## Narrative

**Business context:** Workflow helper — for a given source-bill sId and node name, returns the approver(s) and timing for that node from the Activiti BPMN history (`biz_todo_item` + `biz_flow` + `act_hi_comment`). COMMENT `'获取节点审核人'` ("get node approver"). Intended for reports/print templates that need to render "who approved which step and when".

**What it does:** Builds a TEMP table `tbFlowPerson(sId, sSlaveId, Id, sItemName, sNodeName, sHideUserName, tToDate, tHandleDate, sMessage)`. Inserts from `biz_todo_item A INNER JOIN (SELECT instance_id FROM biz_flow WHERE sSrcId=sId ORDER BY create_time DESC LIMIT 1) F ON F.instance_id = A.instance_id AND A.node_name = p_sNodeName` — the approval-history rows for the most recent flow on the bill. The `sMessage` column is sub-selected from `act_hi_comment` by task_id. If empty, inserts one placeholder row. Returns the temp table via `SELECT * FROM tbFlowPerson`.

**Invocation:** Status: appears orphaned. The "Sp_Report_*" naming suggests it was meant for a Jasper print template's data-source, but it's not referenced from `gdsmodule`, form-master sSqlStr, other procedures, or xly-src — candidate for maintainer audit.
