# `Sp_PlanListCTP_BtnEventFinished_UseQty` (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_PlanListCTP_BtnEventFinished_UseQty`'`._

## Narrative

**Business context:** 生产管理 → 计划、排程 → 计划列表 — CTP completion variant that requires the user to enter only the 出版数量 `iPublishQty`. The narrowest of the `Sp_PlanListCTP_BtnEventFinished*` family — picked when the shop just needs to confirm CTP done plus the plate count, without recording use-qty or plate-style.

**What it does:** Parses `$.changeValue.iPublishQty`; refuses with `sCode=-1, sReturn='请输入出版数量！'` if empty. For each `$.params[*].value[*].sId` row, runs the `valueKey`-driven dynamic `UPDATE mftproductionplanslave SET <fields>=…` builder (same shape as the basic variant) plus `iPublishQty=p_iPublishQty`. Sets the standard finished tuple `bCTP=1, tCTPDate=NOW(), sCTPPerson=sMakePerson`.

**Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 出版完工 toolbar button on the 计划列表 grid names this proc when the form is configured for the publish-qty-only flow. DB-only; not in xly-src `30100101`.
