# `Sp_BtnRepair_UpdateBackMemo` (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 | `sUserId` | `varchar(100)` |
| 4 | IN | `sBrId` | `varchar(100)` |
| 5 | IN | `sSuId` | `varchar(100)` |
| 6 | OUT | `sReturn` | `varchar(1000)` |
| 7 | OUT | `sCode` | `int` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_BtnRepair_UpdateBackMemo`'`._

## Narrative

**Business context:** 生产计划 / 变更主表数据 — bulk "批量修改" dialog handler that lets a planner overwrite the rejection / push-back memo (`sBackMemo`) on selected `mftproductionplanbillslave` lines from the production-plan-bill grid.

**What it does:** Parses `$.params[*].value[*].sId` and `$.changeValue.sBackMemo` from `sProInParam`. For each row id, executes `UPDATE mftproductionplanbillslave SET sBackMemo = p_sMemo WHERE sId = p_sId`. No tenancy filter on update — relies on the dialog supplying tenant-scoped sIds.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — front-end "批量修改" dialog on the 生产计划单 grid registers this procedure name. Built from the `sButtonParam.sql` template (see `xlyEntry/.../templesql/sButtonParam.sql`, whose comment documents the `BtnRepair` `changeValue` + `textareaValue` payload contract). Sibling of the `Sp_BtnRepair_Update*` family.
