# `Sp_Check_eleteststandardFeed` (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_eleteststandardFeed`'`._ ## Narrative **Business context:** 进料检验规则单据 → 质检规则设定 → 质量管理 — before saving an incoming-material inspection rule, prevent the same material from appearing in more than one active rule document so the inspection engine picks an unambiguous standard. **What it does:** Cursors `eleteststandardobject` rows under `sGuid` (the rule being saved), and for each `sTestObjectId` (material), counts other `eleteststandard` rows in form `12012615914116374916774630` (进料检验规则单据) carrying the same object. If any exist, sets `sReturn` to the localised `sStandardHaveMaterial` message plus the conflicting rule names and returns `sCode = -1`. Also rejects same-material duplicates within `sGuid` itself. **Invocation:** Save-time check on form 进料检验规则单据 — invoked via the `Sp_Check_*` dispatcher from the `Sp_Calc_*` save procedure for that form's `sCode`.