# `Sp_MftPlanPhaseProduct_BtnEventConvertPlanA` (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_MftPlanPhaseProduct_BtnEventConvertPlanA`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 备用生产计划跟进(成品) — toolbar action that moves a selected work-order line from the "备用" (alternate / standby) pool back into the regular production plan. The 备用 mechanism lets planners park lower-priority work-order lines outside the active 跟进 view; this proc undoes that parking on the 成品 (finished-product) side. Procedure comment says 产品 but it targets the 成品 跟进 grid.

**What it does:** Parses `$.params[*].value[*].sId` from `sProInParam`. For each id, `UPDATE mftworkorderslave SET bPlanB = 0 WHERE sId = p_sId AND sBrandsId = sBrId AND sSubsidiaryId = sSuId` and `UPDATE CalcProductsPhase SET bPlanB = 0 WHERE sId = p_sId`. Setting `bPlanB = 0` reclassifies the row from 备用 to 常规.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — the 转入常规计划 button on the 备用生产计划跟进(成品) grid (`gdsmodule.sId 16476791850003258044449836560000`) names `Sp_MftPlanPhaseProduct_BtnEventConvertPlanA` as the action. Inverse: `Sp_MftPlanPhaseProduct_BtnEventConvertPlanB`. xly-src ships `script/标版/30100101/schedule/Sp_MftPlanPhaseProduct_BtnEventConvertPlanA.sql` (install script).
