# `Sp_CombinedOrderList_BtnEventGetOrder` (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_CombinedOrderList_BtnEventGetOrder`'`._

## Narrative

**Business context:** 销售管理 → 销售订单 — operator "取单/定稿" (pick-up / lock) action on a 组合订单列表 (combined sales-order list) view. Marks one or more 销售订单 as currently being finalized by a specific person so other operators can see the row is locked.

**What it does:** Validates `sProInParam` (a delimited list of `salsalesordermaster.sId` values, rejected with `Sp_Sis_GetConst('paramsErro', …)` when shorter than 5 chars). Then `UPDATE salsalesordermaster SET sRipTrue = '人工定稿中', sLockPerson = sMakePerson, bLock = 1 WHERE INSTR(sProInParam, sId) > 0` scoped by `sBrandsId`/`sSubsidiaryId`. Pair with `Sp_CombinedOrderList_BtnEventRestart` (release back to "未处理") and `Sp_CombinedOrderList_BtnEventRetGetOrder` (release lock without clearing status).

**Invocation:** Dispatched generically by `GenericProcedureCallController.doGenericProcedureCall()` → `GenericProcedureCallServiceImpl` — i.e. the front-end button posts the proc name directly. Not bound through `gdsmodule.sProcName`, not referenced by any form-master. xly-src ships only the install script `script/标版/30100101/Sp_CombinedOrderList_BtnEventGetOrder.sql`; the calling button definition lives in the front-end (`xlyFront`), not in the database.
