# `Sp_System_CheckSaveOee` (procedure)

> 业务单据保存校验


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

## Parameters

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

## Body

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

## Narrative

**Business context:** OEE-side 业务单据保存校验 stub — declares the OEE-related locals (`p_dCount`, `p_MaiCount`, `P_MaName`, `ReplaceField_*`) and the standard `sAllGuids/sTbNames/sTypes` payload variables, but the active body has been gutted: it unconditionally sets `sCode=1`, `sReturn='工单数量大于订单数，请核查数量或有无未审核工单'`, and leaves `top:`. Either a half-finished feature (the OEE save-time check against 工单 quantities vs 订单 quantities) or a deliberately disabled validator left in place for ABI compatibility.

**What it does:** Lowers `sTableName`, hard-codes `sReturn` to the 工单数量大于订单数 warning string, sets `sCode=1`, and exits. Touches no tables.

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master, `gdsmodule` hooks, other routines, xly-src grep across all extensions, dynamic-dispatch search). Naming and signature mirror `Sp_System_CheckSaveFlow` so it would slot into the same `sSaveProName` dispatcher if wired up — candidate for maintainer audit / cleanup.
