# `Sp_System_CheckSaveFlow` (procedure)

> 业务单据保存校验


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sAllGuids` | `longtext` |
| 2 | IN | `sSlaveGuid` | `longtext` |
| 3 | IN | `sTbNames` | `longtext` |
| 4 | IN | `sTypes` | `varchar(1000)` |
| 5 | IN | `sFormGuid` | `varchar(100)` |
| 6 | IN | `sGuid` | `varchar(100)` |
| 7 | OUT | `sReturn` | `varchar(4000)` |
| 8 | IN | `sLoginId` | `varchar(100)` |
| 9 | IN | `sBrId` | `varchar(100)` |
| 10 | IN | `sSuId` | `varchar(100)` |
| 11 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 业务单据保存校验 — the formula-driven post-save validator twin of `Sp_System_CheckFlow` (which serves the audit path). Same `sAllGuids/sTbNames/sTypes` payload signature; intended to walk `elecheckmodel WHERE bSave=1` and report which conditions match on save. In the current standard-edition build the body is essentially empty (only `set sCode=1; set sReturn=''` and a never-executed `top: BEGIN ... END`) — the real save-time formula sweep was decommissioned, and `Sp_System_CheckSave`/`Sp_System_CheckSaveFlowCps` now handle the actual save-side checks.

**What it does:** Declares the same set of locals as `Sp_System_CheckFlow` (master/condition cursor placeholders, `sMaterialsGuid`, `iCheckMaster`, etc.), sets `sCode=1` and `sReturn=''`, and immediately falls out of the `top:` block. Effectively a no-op placeholder retained for ABI compatibility with callers that still `CALL` it.

**Invocation:** `CALL Sp_System_CheckSaveFlow(...)` from `Sp_System_CheckSave` (in a commented-out 送货单 branch), `Sp_BtnEventProductionmaterialSure_New`, `Sp_financialClosing_BtnEventCalcCost_New`, and `Sp_financialClosing_BtnEventExpense` — all cost / 费用录入 paths. xly-src ships `script/标版/30100101/Sp_System_CheckSaveFlow.sql` and an upgrade copy. Effectively a stub today; treat any reliance on its return as latent dead code.
