# `Sp_SaleOrderlist_BtnEventSaleDepartDo` (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_SaleOrderlist_BtnEventSaleDepartDo`'`._

## Narrative

**Business context:** 销售 — 订单交接表 page's 业务部 响应 button handler. After 工艺 has reviewed an order line, the business desk acknowledges (with or without an exception memo) before the order can flow to 下达生产.

**What it does:** Parses `$.params[*].value[*].sSlaveId` and the optional `$.changeValue[*].textareaValue` memo from `sProInParam`. For each slave id, `UPDATE salsalesorderslave SET iReplyCount = ifnull(iReplyCount,0)+1, iReplyResult = 2, sSaleDepartMemo = <memo|'无异议'>, tSaleDepartReply = NOW()` scoped to `sBrandsId=sBrId AND sSubsidiaryId=sSuId`. Aborts with `Sp_Sis_GetConst('paramsErro')` when the JSON payload is too short.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — 订单交接表 grid's 业务部响应 toolbar button names this proc as the action. Sibling buttons: `Sp_SaleOrderlist_BtnEventCraftworkOk`/`Sp_SaleOrderlist_BtnEventCraftworkDo`. Install script: `script/标版/30100101/Sp_SaleOrderlist_BtnEventSaleDepartDo.sql`.
