# `Sp_productionPlan_BtnEventunLockrowNotCalcTime` (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_productionPlan_BtnEventunLockrowNotCalcTime`'`._

## Narrative

**Business context:** 生产计划管理 → 生管主计划 / 生产排程 — 计划锁定：解锁. Row-level unlock variant that bypasses downstream time recomputation — used when reversing a lock that itself was applied with NotCalcTime semantics.

**What it does:** Same JSON walk of `$.params[*].slave/slaveInfo[*].sId` as the time-recalc sibling. For each dash-separated `sId`: looks up the row's 班次 via `FUN_GET_DATE_BC` joining `elemachine`'s shift fields, `DELETE FROM mftproductionplanslavelock` for `(sId, sDivRow)`, then `UPDATE mftproductionplanslave` setting `bLock=0, sLock='', tLock=NULL, bEmploy=0, sEmployPerson='', tEmploytime=NULL` and the cascade `UPDATE` to clear `iAutoOrder=0` on same-product unlocked rows at `sState IN (0,1,2)`. No `Sp_Manufacture_SetTime` follow-up.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` from a 解锁(时间不动) toolbar action on the 生产排程 grids. xly-src `script/标版/30100101/Sp_productionPlan_BtnEventunLockrowNotCalcTime.sql` ships the install copy.
