# `Sp_MacRepClaim_BtnEventClaimZP` (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 | `sUserId` | `varchar(100)` | | 4 | IN | `sBrId` | `varchar(100)` | | 5 | IN | `sSuId` | `varchar(100)` | | 6 | OUT | `sReturn` | `varchar(1000)` | | 7 | OUT | `sCode` | `int` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_MacRepClaim_BtnEventClaimZP`'`._ ## Narrative **Business context:** 设备管理 → 设备维修 — 指派维修单 button on the 设备报修 grid. Dispatcher-side reassignment: instead of the operator self-claiming, a 调度员 (dispatcher / 指派人) picks which 维修员 to assign to each selected 报修 task; the dispatcher's own login goes into `sZPPerson`. **What it does:** Parses `$.params[*].value[*].sId` and reads `$.changeValue.sClaimPerson` (the picked 维修员) and `$.changeValue.textareaValue` (optional memo) from `sProInParam`. For each id, when `sClaimPerson` is non-blank, `UPDATE EptMachineRepairFixMaster` sets `bClaimed=1`, `sClaimPerson=`, `tClaimDate=NOW()`, `sZPPerson=sMakePerson` (the dispatcher). The textarea memo is appended where applicable. **Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 设备报修 grid's 指派 toolbar button names this proc. Inverse: `Sp_MacRepClaimCancel_BtnEventClaimCancel`. Self-claim variant: `Sp_MacRepClaim_BtnEventClaim` (no 指派 chooser — operator claims own tasks). Sibling assigners on other slave tables: `Sp_MacRepClaim_BtnEventGroupLaderZP` (salsalesorderslave.sGroupLeader), `Sp_MacRepClaim_BtnEventMaterialsZP` (mftworkordermaterials.sClaimPerson).