# `Sp_BtnRepairUpdateJzMemo` (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_BtnRepairUpdateJzMemo`'`._

## Narrative

**Business context:** 质量事故 — bulk "批量修改" dialog handler that lets the 集中 (JZ, centralised-review) reviewer record a final-judgement memo `sJzMemo` on selected `mftqualityaccidentMaster` rows, stamping reviewer + review date alongside.

**What it does:** Parses `$.params[*].value[*].sId` and `$.changeValue.textareaValue` from `sProInParam`. For each master id, opens a cursor against `mftqualityaccidentMaster` scoped by `sBrandsId=sBrId AND sSubsidiaryId=sSuId`, and per row sets `sJzMemo = p_textareaValue, sJZPerson = sMakePerson, tJZDate = NOW()`. Cursor loop is structurally degenerate (single-row by key) but provides the tenancy filter.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — front-end "集中处理意见" dialog on the 质量事故 grid registers this procedure name. Older naming convention without the trailing underscore. Sibling of `Sp_BtnRepairUpdateCheckMemo` (`sCheckMemo` counterpart on the same table).
