# `Sp_BtnUpdate_OnOpsOrder` (procedure)

> 外协商接收加工单


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProInParam` | `varchar(10000)` |
| 2 | IN | `sMakePerson` | `varchar(100)` |
| 3 | IN | `sUserId` | `varchar(100)` |
| 4 | IN | `sBrId` | `varchar(100)` |
| 5 | IN | `sSuId` | `varchar(100)` |
| 6 | OUT | `sReturn` | `varchar(1000)` |
| 7 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 外协加工单 / 外协商接收加工单 — outsourced-processing supplier portal: lets the subcontractor (外协商) acknowledge receipt of an `opsoutsideprocessmaster` work-order assigned to them.

**What it does:** Parses `$.params[*].value[*].sId` (master rows) and for each row whose current `bSupply=0`, sets `bSupply` to its toggle (CASE 1↔0), stamps `tSupplyDate=NOW()`, `sSupplyPerson=sMakePerson`. Reads `$.changeValue.textareaValue` but does not persist it.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — toolbar "接收加工单" button on the 外协加工单 supplier-portal grid. No callers found in DB metadata or xly-src grep for this DB instance.

Flag: same `bSupply=0` guard as the OnPurOrder/OnOpsConfirm siblings — effectively one-way acknowledge, not a toggle.
