# `Sp_BtnRepair_UpdateBackStates` (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_UpdateBackStates`'`._

## Narrative

**Business context:** 销售设计 / 变更设计状态 — bulk "批量修改" dialog handler that overwrites the design-status flag `sStates` on selected `salsalesdesignmaster` rows.

**What it does:** Parses `$.params[*].value[*].sId` and `$.changeValue.sStates` from `sProInParam`. For each row id, executes `UPDATE salsalesdesignmaster SET sStates = p_sStates WHERE sId = p_sId`. `$.changeValue.textareaValue` (memo) is parsed but not persisted by the current body.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — front-end "批量修改设计状态" toolbar dialog on the 销售设计 grid registers this procedure name. Built from the `sButtonParam.sql` template (see `xlyEntry/.../templesql/sButtonParam.sql`). Sibling of the `Sp_BtnRepair_Update*` family.
