# `Sp_productionMainPlan_BtnEventSuspend_YH` (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_productionMainPlan_BtnEventSuspend_YH`'`._

## Narrative

**Business context:** 生产管理 / 主计划 → 印刷暂停 (YH = 印后, label "印刷暂停") — phase-specific variant of 暂停 that pauses a plan because the press (印刷) stage hit a problem. Sets the plan row to `sState='4'` and stamps `sMaterialsCheckResult='印刷暂停'` so the planner sees why; only the print-and-after process slaves (`sType>'1'`) are dropped to `sState='3'`, leaving any pre-press slaves running.

**What it does:** Parses `$.params[*].value[*].sId`. For each plan id: reads `sState, sWorkOrderId`; `UPDATE mftproductionplan SET sState='4', sPriorState=p_sState, sMaterialsCheckResult='印刷暂停'`. Then `UPDATE mftproductionplanslave SET sState='3' WHERE sWorkOrderId=p_sWorkOrderId AND sType > '1'`.

**Invocation:** Standard `Sp_<Module>_BtnEvent*` slot — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` when the 主计划 grid's 印刷暂停 button names this procedure. xly-src ships `script/标版/30100101/schedule/Sp_productionMainPlan_BtnEventSuspend_YH.sql`. Siblings: `Sp_productionMainPlan_BtnEventSuspend` (full plan), `Sp_productionMainPlan_BtnEventSuspend_ZY` (折后暂停 — post-folding).
