# `Sp_MacRepClaimCancel_BtnEventClaimCancel` (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_MacRepClaimCancel_BtnEventClaimCancel`'`._

## Narrative

**Business context:** 设备管理 → 设备维修 — 设备维修任务取消认领 button on the 设备报修 grid. Releases a previously-claimed 维修任务 so another 维修员 (or the dispatcher) can re-assign it. Inverse of `Sp_MacRepClaim_BtnEventClaim`.

**What it does:** Parses `$.params[0].value[0].sId` from `sProInParam` (operates on the first selected row — single-row design despite the `$.params` shape). Reads `sClaimPerson` from `EptMachineRepairFixMaster` for the target row, then `UPDATE EptMachineRepairFixMaster` clears the claim: `bClaimed=0`, `sClaimPerson=''`, `tClaimDate=NULL`, `sClaimPersonId=''`. The textarea memo from `$.changeValue.textareaValue` is captured but not always persisted.

**Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 设备报修 grid's 取消认领 toolbar button names this proc by string. Inverse: `Sp_MacRepClaim_BtnEventClaim` (claim), `Sp_MacRepClaim_BtnEventClaimZP` (dispatcher 指派).
