# `Sp_PlanListMemo_BtnRepair` (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_PlanListMemo_BtnRepair`'`._

## Narrative

**Business context:** 生产管理 → 计划、排程 → 计划列表 — inline-edit/repair handler for the 备注 (memo) and 拆分 (decompose / split) text fields on the production-plan slave grid. Lets the operator amend `sManualNo` and `sDecompose` on the plan row from the grid without opening the master form. Sister of the stage-specific repair procs (`Sp_PlanListCTP_BtnRepair`, etc.).

**What it does:** Pulls `$.changeValue.sManualNo` and `$.changeValue.sDecompose` from `sProInParam`, strips JSON quotes, then walks each `$.params[*].value[*].sId` (a `mftproductionplanslave.sId`) and conditionally runs `UPDATE mftproductionplanslave SET sManualNo=p_sManualNo WHERE sId=p_sPlanId AND p_sManualNo<>''` and the parallel `Update … Set sDecompose=p_sDecompose …` — each guarded so empty inputs are no-ops, allowing the front end to update one field without clobbering the other.

**Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 备注修改 / 拆分修改 cell-edit button on the 计划列表 grid names this proc. DB-only.
