# `Sp_salsalesor_BtnEventPerson` (procedure)

> @author:zhucx 
		     @date: 
				 @describe:


- **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_salsalesor_BtnEventPerson`'`._

## Narrative

**Business context:** 销售管理 → 销售订单 — toolbar-button handler that flags 销售订单 slave lines as "filed by responsible person" (归档/接单). Sets `salsalesorderslave.bFile=1` plus filer name and date, so the order grid can colour-code and exclude already-filed lines from open-work views.

**What it does:** Parses `sProInParam` JSON (`$.params[*].value[*].sSlaveId`) and loops every slave id. For each `sSlaveId` runs `UPDATE salsalesorderslave SET bFile=1, tFileDate=SYSDATE(), sFilePerson=sMakePerson WHERE sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`. Refuses an empty payload with the localised `paramsErro` message from `Fun_Sis_GetConst`. Inverse: `Sp_salsalesor_BtnEventPersonReturn` (sets `bFile=0`).

**Invocation:** Standard generic-dispatch shape: would be dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` when a toolbar button names this proc. Install script ships at `script/标版/30100101/schedule/Sp_salsalesor_BtnEventPerson.sql`. No live `gdsmodule.sProcName` / form binding currently points at it — status: appears orphaned in this tenant (button wiring not present in the DB), candidate for maintainer audit before removal.
