# `Sp_productionPlanInfo_BtnEventResume` (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_productionPlanInfo_BtnEventResume`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程 — toolbar handler "恢复" (resume) on `mftproductionplanslave`. Inverse of `Sp_productionPlanInfo_BtnEventSuspend`: takes a paused (`sState=3`) row back to active. The target state depends on the tenant's `CkxXd` flag: pre-release tenants resume to 2 (已下达), others to 1 (已排程).

**What it does:** Validates `sProInParam` (rejects short payload with `paramsErro`). Reads `SysSystemSettings.CkxXd` into `p_bXd`. Walks `sProInParam.params[*].value[*].sId`. For each `p_sId`: if `p_bXd=1` then `UPDATE mftproductionplanslave SET sState=2`, else `UPDATE mftproductionplanslave SET sState=1`, both scoped to `sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`. No syslog row.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — 生产排程 form's "恢复" button. Forward complement: `Sp_productionPlanInfo_BtnEventSuspend`. xly-src ships `script/标版/30100101/Sp_productionPlanInfo_BtnEventResume.sql` (note: not under the schedule/ sub-folder like its siblings).
