# `Sp_Check_sScd` (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_sScd`'`._

## Narrative

**Business context:** Inferred from the name and routine comment: 销售管理 → 长期合同 — placeholder post-save validator for the long-term-contract form pair (`长期合同单据` / `长期合同明细`, masters at sId `16033546780009409151975037702000` / `16033543010008296913785356518000`). The body is a no-op stub that delegates to `Sp_afterSave_sScd` and returns immediately.

**What it does:** Initialises `sCode=1`, defaults `iFlag` to 0, clears `sReturn`, opens an empty `top:` block, and calls `Sp_afterSave_sScd(sGuid, sBrId, sSuId, sCode, sReturn)`. No table touch, no validation.

**Invocation:** Status: appears orphaned. The peer `Sp_Calc_sScd` is bound on both 长期合同 modules' `sProcName`, but `Sp_Check_sScd` itself is not wired as `sSaveProName`/`sSaveProNameBefore` on any module. No other routine references it, no `xly-src` hit (no install script). Effectively a stub awaiting a rule — candidate for maintainer audit.
