# `Sp_SalOrder_BtnCancelOrderReview` (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_BtnCancelOrderReview`'`._

## Narrative

**Business context:** 销售管理 → 销售订单管理 → 销售订单 (`salsalesorderslave`) — workflow toolbar that withdraws / cancels a 工艺审核 (craftworks-review) approval. Sets `bCraftworksReply=0` on the selected order lines, stamps `tCraftworksReply=SYSDATE()` and records `sCraftworkPerson=sMakePerson`. Paired with `Sp_SalOrder_BtnOrderReview` (the approval variant, `bCraftworksReply=1`); same logic shape as the symmetric `Sp_SalOrder_BtnReturnOrderReview` (which also clears the flag).

**What it does:** Validates `sProInParam`, parses `$.params[*].value[*].sSlaveId`, and for each line runs `UPDATE salsalesorderslave SET bCraftworksReply=0, 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_BtnCancelOrderReview.sql`. No xly-src Java caller, no gdsmodule row — binding lives in the grid-button metadata.
