# `Sp_Calc_sPctOEE` (procedure) > @author:zhucx @date:2021.11.21 封存 @describe: 1.移动端-生产首检-保存自动调用本过程,当系统设定中本单据为自动审核时 - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `iFlag` | `int` | | 2 | IN | `iTmpCheck` | `int` | | 3 | IN | `sFormGuid` | `varchar(100)` | | 4 | IN | `sGuid` | `varchar(100)` | | 5 | IN | `sLoginId` | `varchar(100)` | | 6 | OUT | `sReturn` | `varchar(4000)` | | 7 | IN | `sBrId` | `varchar(100)` | | 8 | IN | `sSuId` | `varchar(100)` | | 9 | OUT | `sCode` | `int` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Calc_sPctOEE`'`._ ## Narrative **Business context:** Audit handler for an OEE-side 生产首检 doc on `QlyProcessTestMaster`. Header authorship: `zhucx 2021.11.21 封存`. Same business shape as `Sp_Calc_sPct3` (OEE 机长首检登记) — validates the inspection master, flips audit flags, and joins through `plc_machinedata` to mark `mftproductionplanslave.bFirst1Inspection=1`. Likely the original name before the production-bound version was renamed to `Sp_Calc_sPct3`. **What it does:** Validates `sGuid`, guards on `bInvalid` and on existing `bCheck`. Additionally checks `SysLocking` (refuses when the doc is row-locked, returning the localised `SysLocking` error). On `iFlag=1` it `Update`s `QlyProcessTestMaster` to set the audit fields and joins through `plc_machinedata` ← `QlyProcessTestMaster` to flag `mftproductionplanslave.bFirst1Inspection=1`. `iFlag=0` reverses the flags. **Invocation:** Status: appears orphaned. The live OEE 机长首检登记(OEE) module (sId `12012615914116373127639240`) is bound to `Sp_Calc_sPct3`, not `Sp_Calc_sPctOEE`. No `gdsmodule.sProcName/sSaveProName`, `gdsconfigformmaster` form-master, sibling routine, or xly-src reference picks `Sp_Calc_sPctOEE`. Candidate for maintainer audit — almost certainly a superseded predecessor of `Sp_Calc_sPct3`.