# `Sp_Calc_sStd` (procedure)

> 销售订单


- **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(5000)` |
| 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_sStd`'`._

## Narrative

**Business context:** Bears the `Sp_Calc_s*` audit/un-audit signature against `QlyProcessTestMaster` (a quality / process-test master). The COMMENT misleadingly says 销售订单 — actual ops are on the quality table, suggesting the COMMENT was copy-pasted.

**What it does:** With `iFlag=1` runs `Update QlyProcessTestMaster Set bCheck=1 Where sId=sGuid` (scoped by brand/subsidiary); with `iFlag=0` flips `bCheck=0`. No invalidate-guard, no bill-used registration, no flow trigger — minimal compared to other `Sp_Calc_s*` siblings.

**Invocation:** Status: appears orphaned. No `gdsmodule.sProcName` row binds this name; xly-src has only the install script `script/标版/30100101/Sp_Calc_sStd.sql`. No Java caller, no other-routine caller, no form-master reference. Candidate for maintainer audit — the canonical std (品质过程测试) audit handler is named elsewhere.
