# `Sp_productionPlan_BtnEventLockrowNotCalcTime` (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_BtnEventLockrowNotCalcTime`'`._

## Narrative

**Business context:** 生产计划管理 → 生管主计划 / 生产排程 — 计划锁定：移动到计划确认表（时间不动）. Row-level lock variant of `Sp_productionPlan_BtnEventLockrow` that suppresses downstream time recomputation — used when the planner wants to capture a snapshot lock without disturbing the machine timeline.

**What it does:** Same JSON parsing of `$.params[*].slave/slaveInfo[*].sId` as the time-recalc sibling. For each chosen `sId`: loads `bFrozen, sState, tStartDate, dHour` from `mftproductionplanslave`, rejects on `dHour=0` with `sStandardWorkHourZero`, deletes any stale row in `mftproductionplanslavelock`, copies the slave row into `mftproductionplanslavelock` via `MftProductionPlanSlave_Tmp_div`, and `UPDATE mftproductionplanslave` to set `bLock=1, sLock, tLock, bEmploy=1, sEmployPerson, tEmploytime, sState=2`. Does not invoke any time-recalc proc.

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