# `Sp_Process_BtnEventCancelInvalid` (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_Process_BtnEventCancelInvalid`'`._

## Narrative

**Business context:** 基础资料 → 工艺 (`eleprocess`) — 取消作废 (un-invalidate) handler for the 工序 list. Proc COMMENT: "取消供应商作废" (mislabeled — it operates on `eleprocess` 工序 records, not 供应商; the `syslog.sFormId='11811781131121915166036411380'` is the 工序 form). Inverse of `Sp_Process_BtnEventInvalid`.

**What it does:** Parses `$.params[*].value[*].sId` from `sProInParam`. Each `sId` can be hyphen-joined (`p_sId.split('-')`) — loops on every sub-id. For each, reads `eleprocess.sProcessName` (filtered by branch/subsidiary), runs `UPDATE eleprocess SET bInvalid=0 WHERE sId=p_sIdOne`, then writes a `syslog` row with `sLog=CONCAT('取消作废工序：',sProcessName)`, `sOperationType='取消作废工序'`, `sFormId='11811781131121915166036411380'`. Returns the `chooseData` localised error when the input is empty.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — 工序 (`eleprocess`) grid's 取消作废 toolbar button names this proc. Install script `xly-src/script/标版/30100101/Sp_Process_BtnEventCancelInvalid.sql`. Twin: `Sp_Process_BtnEventInvalid` (the 作废 side).
