# `Sp_BtnEvent_AccProductFrozen` (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_BtnEvent_AccProductFrozen`'`._

## Narrative

**Business context:** 财务 / 成品初始化 — button-click handler that freezes selected `accproductinitslave` rows ("送货未开票冻结" per the COMMENT, though body acts on product-init slave rows). Once frozen, downstream cost / closing logic skips them.

**What it does:** Validates `sProInParam` length, parses the `$.params[*].value[*].sSlaveId` JSON envelope, and for each id `UPDATE accproductinitslave SET bFrozen=1, sFrozenPerson=sMakePerson, tFrozenDate=NOW()`. Errors via `Sp_Sis_GetConst('paramsErro', ...)` when the envelope is malformed.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — the 成品初始化 grid's 冻结 toolbar button names `Sp_BtnEvent_AccProductFrozen` as the action. Inverse of `Sp_BtnEvent_AccProductUnFrozen`. No static caller, no `gdsmodule` hook.

Flag: COMMENT header says `送货未开票冻结` but the body updates `accproductinitslave` (成品初始化) — comment is stale.
