# `Sp_PlanListCUT_BtnEventFinishedFHQZ` (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_PlanListCUT_BtnEventFinishedFHQZ`'`._

## Narrative

**Business context:** 生产管理 → 计划、排程 → 计划列表 — 反核签字 (FHQZ) un-check for the cut stage; reverses `Sp_PlanListCUT_BtnEventFinished` after an operator marked a plan row as cut by mistake. Allows the shop to restore an in-progress 模切 status without deleting the plan row.

**What it does:** Parses `$.params[*].value[*].sId` for the picked `mftproductionplanslave` rows; for each, `UPDATE mftproductionplanslave SET tCutDate=null, sCutPerson=null, bCut=0 WHERE sId=p_sId AND sBrandsId/sSubsidiaryId match`. No JSON-driven dynamic builder, no auxiliary writes — strict clear-flag handler.

**Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 模切反完工 / 撤销模切完工 toolbar button on the 计划列表 grid names this proc. Install script: `script/标版/30100101/Sp_PlanListCUT_BtnEventFinishedFHQZ.sql`.
