Sp_MftPlanPhase_BtnEventLockRow (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 PROCEDURESpMftPlanPhase_BtnEventLockRow'._
Narrative
Business context: 生产管理 → 生产计划跟进 — "锁定本行" / dynamic per-阶段 lock button: locks (or relocks at a new date) the specific 工序阶段 cells the user just edited. Sibling of Sp_MftPlanPhase_BtnEventLockAll but row-scoped and with per-phase dates parsed from the grid's dynamic columns.
What it does: Validates sProInParam, walks $.params[*].value[*] rows where each value carries dynamic keys like s_印刷阶段-锁定_23 → 3.17. Stages the parsed (sId, sValue) pairs into temp table p_TempDel, then opens a cursor over eleprocessphase (sName ordered by iOrder) — for each phase name found inside the row's value string, extracts the date string after :, formats it as YYYY-MM-DD, and UPDATEs mftproductionplanslave joined to eleprocess (e.sProcessPhase = p_sName) setting bLock=1, tLock=p_s1, sLock=sMakePerson. So one row + one phase ⇒ one slave update per matching machine.
Invocation: Dispatched dynamically by GenericProcedureCallServiceImpl.doGenericProcedureCall() on the 生产计划跟进 grid. The header comment shows the sBtnContent JSON: {"sproName":"Sp_MftPlanPhase_BtnEventLockRow","inMap":"slave.sId,slave.s_蓝纸确认-锁定_20,slave.s_印刷阶段-锁定_23"} — the inMap lists which dynamic columns to ship in sProInParam. xly-src ships script/标版/30100101/schedule/Sp_MftPlanPhase_BtnEventLockRow.sql (install).