# `Sp_deliverIsRelated` (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_deliverIsRelated`'`._

## Narrative

**Business context:** 销售送货流程 → 送货单 — paired "主管确认:通过" (supervisor confirm) action for the delivery-children rows. Flips a `bRelated` flag on `saldelivergoodsslavechildren` so downstream reports can tell which child rows have passed supervisor approval. Sibling of `Sp_UndeliverIsRelated` (the un-confirm), shipped alongside it in xly-src.

**What it does:** Parses `sProInParam` as the standard button-payload JSON (`$.params[0].value` is the slave-row array). Aborts with "请选择数据" if the payload is empty. For each row, extracts `sSlaveId` and runs `UPDATE saldelivergoodsslavechildren SET bRelated = 1 WHERE sId = p_sId`.

**Invocation:** Status: appears orphaned in the live metadata. No `gdsmodule.sProcName` slot, no `gdsmoduleflow.sApplyProName`/`sCalcProName`, no `gdsconfigformmaster.sSqlStr`, and no other routine references it. xly-src ships only the install script `script/标版/30100101/Sp_deliverIsRelated.sql` and its paired un-confirm. The parameter shape matches the `GenericProcedureCallServiceImpl.doGenericProcedureCall` toolbar-button contract, so it was likely intended for a button binding that hasn't been (re-)created in this tenant — candidate for maintainer audit.
