# `Sp_SalOrder_BtnOrderReview` (procedure)

> @author:zhucx 
		     @date: 
				 @describe:


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

## Narrative

**Business context:** 销售管理 → 销售订单管理 → 销售订单 (`salsalesorderslave`) — 工艺审核通过 (craftworks-review approval) button. Sets `bCraftworksReply=1` on the selected order lines, stamps `tCraftworksReply=SYSDATE()` and records `sCraftworkPerson=sMakePerson`. Approval counterpart to `Sp_SalOrder_BtnCancelOrderReview` (which clears the flag back to 0); same flag is also reset by `Sp_SalOrder_BtnReturnOrderReview` (退回).

**What it does:** Validates `sProInParam`, parses `$.params[*].value[*].sSlaveId`, and for each line runs `UPDATE salsalesorderslave SET bCraftworksReply=1, tCraftworksReply=SYSDATE(), sCraftworkPerson=sMakePerson WHERE sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`.

**Invocation:** Generic-dispatch button signature `(sProInParam, sMakePerson, sBrId, sSuId, OUT sReturn, OUT sCode)` — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` from the 销售订单 grid's 工艺审核 line-toolbar button. Install script: `script/标版/30100101/Sp_SalOrder_BtnOrderReview.sql`. No xly-src Java caller, no gdsmodule row — binding lives in the grid-button metadata.
