# `Sp_productionMainPlan_BtnEventUnBlockOne` (procedure)

> 主计划：锁定 状态为8


- **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_productionMainPlan_BtnEventUnBlockOne`'`._

## Narrative

**Business context:** 生产管理 / 主计划 → 解锁(单条) — per-slave-row variant of 解锁. Releases the resource lock on a single `mftproductionplanslave` line without touching the master `mftproductionplan.sState`, so the planner can free one machine slot while keeping the master row in its locked state. The master-row guard from `BtnEventUnBlock` is commented out in the body.

**What it does:** Parses `$.params[*].value[*].sId` (slave ids, not master). For each id: `UPDATE mftproductionplanslave SET bEmploy=0, sEmployPerson='', tEmploytime=NULL WHERE sId=p_sId`. No state check, no master-row mutation.

**Invocation:** Standard `Sp_<Module>_BtnEvent*` slot — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` when the 主计划 slave grid's 解锁 button names this procedure. Sibling: `Sp_productionMainPlan_BtnEventUnBlock` (master-level unlock). Inverse: `Sp_productionMainPlan_BtnEventBlockOne`.
