# `Sp_productionMainPlan_upmemo` (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_upmemo`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生管主计划 — bulk "memo / 注意事项" editor for the master plan. Lets the planner stamp the same `sMemo` note across selected 排程 rows and have it propagate to all machine-task rows under the same work order.

**What it does:** Parses `$.params[0].value[*].sId` from `sProInParam` and reads `$.changeValue.textareaValue` for the new memo text. For each `sId`: `UPDATE mftproductionplan SET sMemo=<text> WHERE sId=p_sId` (排程主表 注意事项), then propagates by `UPDATE MftProductionPlanSlave a INNER JOIN mftproductionplan b ON a.sWorkOrderId=b.sWorkOrderId SET a.sMemo=b.sMemo WHERE b.sId=p_sId` (机台任务表). The `valueKey` branch is dead code in this proc — only the memo path actually runs.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — bound to the 注意事项 batch-edit toolbar on 生管主计划 / 生产排程 (`mftproductionplan`). No xly-src install script ships under that name; DB-only — candidate for maintainer audit.
