# `Sp_ProductProcessPackAll` (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 | `sBrId` | `varchar(100)` |
| 4 | IN | `sSuId` | `varchar(100)` |
| 5 | OUT | `sReturn` | `varchar(1000)` |
| 6 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 销售管理 / 备货流程 — bulk-finishes the 备货 (stockup) tally for one or more sales-order lines, marking each as fully prepared in a single click. Sibling of the per-package `Sp_ProductProcessPack`: where that proc increments package-by-package, this one is the "mark all packages done" shortcut.

**What it does:** Parses `$.params[*].value[*].sSlaveId` from `sProInParam`. For each slave id, executes `UPDATE salsalesorderslave SET dReturnTrunkQty = dTrunkQty, bStockupComplete = 1` scoped to the current brand/subsidiary. No validation or message.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — bound to a "全部备货" / "标记完成" button on the sales-order 备货 grid. Paired with the per-package counter `Sp_ProductProcessPack`. Install script ships at `script/标版/30100101/Sp_ProductProcessPackAll.sql`.
