Sp_UndeliverIsRelated (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 PROCEDURESpUndeliverIsRelated'._
Narrative
Business context: 送货单 — undo the "relate to upstream" flag on saldelivergoodsslavechildren rows so a 送货单 children-line can be re-linked or re-sourced. Used when finance/storage needs to detach a delivery-line's relationship to its source (e.g., 销售订单 slave) without deleting it.
What it does: Validates sProInParam, parses $.params[0].value[i].sSlaveId JSON; for each non-empty id runs update saldelivergoodsslavechildren set bRelated = 0 where sId = p_sId. Nothing else — no audit log, no message, no cascade.
Invocation: Dispatched dynamically by GenericProcedureCallServiceImpl.doGenericProcedureCall() (POST /procedureCall/doGenericProcedureCall) — bound to a toolbar button on the 送货单 children-detail grid (action name Sp_UndeliverIsRelated). The proc COMMENT ('主管确认:通过') is copy-pasted from Sp_UnConfirm_Zg and unrelated to behaviour — flag for review. Install script script/标版/30100101/Sp_UndeliverIsRelated.sql.