# `Sp_MacRepClaim_BtnEventMaterialsZP` (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_BtnEventMaterialsZP`'`._ ## Narrative **Business context:** 生产管理 → 工单材料 — 指派测试材料部门 button on a 工单材料 (`mftworkordermaterials`) grid. A dispatcher assigns a 认领人 (`sClaimPerson`) to selected material lines; mirrors the `*ZP` (指派) pattern on the materials side rather than the repair side. **What it does:** Parses `$.params[*].value[*].sSlaveId` and `$.changeValue.sClaimPerson` + `$.changeValue.textareaValue` from `sProInParam`. For each sSlaveId, when `sClaimPerson` is non-blank, `UPDATE mftworkordermaterials` sets `bClaim=1`, `sClaimPerson=`, `tClaimDate=NOW()` filtered by `sBrandsId/sSubsidiaryId`. **Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 工单材料 grid's 指派 toolbar button names this proc by string. Companion ZP-family procs: `Sp_MacRepClaim_BtnEventClaimZP` (EptMachineRepairFixMaster), `Sp_MacRepClaim_BtnEventGroupLaderZP` (salsalesorderslave.sGroupLeader).