# `Sp_SaleOrderlist_BtnEventCraftworkOk` (procedure)

> 订单交接表 ok 按钮


- **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_BtnEventCraftworkOk`'`._

## Narrative

**Business context:** 销售 / 工艺 — 订单交接表 page's ok button handler. When the craftworks (工艺) reviewer accepts an order line for production, this records the acknowledgement on the order slave so sales/PMC can move to 业务部 response and downstream 下达生产.

**What it does:** Parses `$.params[*].value[*].sSlaveId` from `sProInParam`. For each slave id, `UPDATE salsalesorderslave SET iReplyCount = ifnull(iReplyCount,0)+1, iReplyResult = 3, tCraftworksReply = NOW(), sCraftworksMemo = '接收OK'` 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 ok toolbar button names this proc as the action. Inverse: `Sp_SaleOrderlist_BtnEventCraftworkDo` (拒绝接收, sets `iReplyResult=1`). Install script: `script/标版/30100101/Sp_SaleOrderlist_BtnEventCraftworkOK.sql`.
