# `Sp_CTPPlanList_BtnEventFinished_cut` (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_CTPPlanList_BtnEventFinished_cut`'`._

## Narrative

**Business context:** 生产管理 → 出版/印版 → 待出版任务列表 (CTPPlanList) — sibling of `Sp_CTPPlanList_BtnEventFinished` that marks selected plan rows as "切版完成". Stamps `bCut=1` plus cut-person/cut-date on each `mftproductionplanslave` row when the 切版完成 button fires.

**What it does:** Validates `sProInParam` (≥5 chars), parses `$.params[].value[].sId` from the JSON payload, then for each `sId` runs `UPDATE mftproductionplanslave SET tPublishDate=NOW(), sCutPerson=sMakePerson, bCut=1 WHERE sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`. Note: copies the publish-stamp column `tPublishDate` even though this is the cut step — that field-name reuse is intentional (the table tracks the most-recent stage timestamp).

**Invocation:** `sp_btn_action*`-style — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` when the 切版完成 button on the CTPPlanList form is wired to this proc. xly-src ships `script/标版/30100101/Sp_CTPPlanList_BtnEventFinished_cut.sql` as the install body. No form-master/gdsmodule hook reference; the button binding lives in form configuration.
