# `Sp_productionPlanInfo_BtnEventCompletionRelease` (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_productionPlanInfo_BtnEventCompletionRelease`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程 — toolbar handler "机台计划：取消加工完成" (un-complete) on `mftproductionplanslave`. Reverses `Sp_productionPlanInfo_BtnEventCompletion` when the planner discovers a row was prematurely closed.

**What it does:** Parses `sProInParam.params[*].value[*].sId` (dash-split). Per row: reads `bFrozen`; if frozen rejects with `sProductionMainPlanChildOrderDj`. Otherwise `UPDATE mftproductionplanslave SET sState='2', iComplete=0, bProductionPlanComplete=0, sReportCompletePerson=''` and `UPDATE MftWorkOrderProcess SET bProductionComplete=0` via `sSrcSlaveId` join. Logs a 取消加工完成 row to `syslog` with `sFormId='101251240115016110217762400'`.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — 生产排程 form's "取消加工完成" button. Forward complement: `Sp_productionPlanInfo_BtnEventCompletion`. xly-src ships `script/标版/30100101/schedule/Sp_productionPlanInfo_BtnEventCompletionRelease.sql`.
