# `Sp_beforeSave_sOpn1` (procedure)

> 发外到货存前反写数量


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sGuid` | `varchar(2000)` |
| 2 | IN | `sBrId` | `varchar(100)` |
| 3 | IN | `sSuId` | `varchar(100)` |
| 4 | OUT | `sCode` | `int` |
| 5 | OUT | `sReturn` | `varchar(4000)` |

## Body

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

## Narrative

**Business context:** Outsourcing-arrivals — `sOpn1`-coded variant of the `发外到货` before-save delegator. Body is identical to `Sp_beforeSave_sOpn` and forwards to the same writer `Sp_saveReturn_sOpn`. Comment header: `发外到货存前反写数量`.

**What it does:** Normalises `sGuid` to a quoted-CSV form, then `CALL Sp_saveReturn_sOpn(sGuid, sBrId, sSuId, 1, @sCode, @sReturn)` — same payload as `Sp_beforeSave_sOpn`.

**Invocation:** Status: appears orphaned. No `gdsmodule` hook, no form-master sSqlStr, no other-routine caller, no xly-src reference (the dispatchers call only the un-suffixed `Sp_beforeSave_sOpn`). Looks like a copy held in reserve for a separate `sOpn1`-coded document variant that is not configured in this DB. Candidate for maintainer audit.
