# `Sp_Check_sSfu` (procedure)

> 商机跟进保存之前数据校验


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sTableName` | `varchar(100)` |
| 2 | IN | `sGuid` | `varchar(100)` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sLoginId` | `varchar(100)` |
| 5 | IN | `sBrId` | `varchar(100)` |
| 6 | IN | `sSuId` | `varchar(100)` |
| 7 | IN | `iFlag` | `int` |
| 8 | OUT | `sCode` | `int` |
| 9 | OUT | `sReturn` | `varchar(4000)` |

## Body

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

## Narrative

**Business context:** Inferred from the name and routine comment: 销售管理 → 销售单据 → 商机跟进 — placeholder post-save validator for the opportunity-follow-up form (`商机跟进单据`, sId `101251240115016035948853880`). The body is a no-op stub that delegates to `Sp_afterSave_sSfu` and returns immediately.

**What it does:** Initialises `sCode=1`, defaults `iFlag` to 0, clears `sReturn`. After a block of local-variable declarations (left-over scaffolding from the family template — billno/srcId/etc., all unused), calls `Sp_afterSave_sSfu(sGuid, sBrId, sSuId, sCode, sReturn)` and flips `sCode=-1` if it returns a message.

**Invocation:** Status: appears orphaned. The peer `Sp_Calc_sSfu` is bound on `商机跟进单据` via `sProcName`, but `Sp_Check_sSfu` itself is not wired as `sSaveProName`/`sSaveProNameBefore` on that module or any other. No other routine references it. xly-src ships `script/标版/30100101/Sp_Check_sSfu.sql` as the install body — the script is in the codebase but the hook is not bound — candidate for maintainer audit.
