Sp_afterSave_sScr (procedure)
派车单保存后反写数量
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | sGuid |
varchar(2000) |
| 2 | IN | sBrId |
varchar(100) |
| 3 | IN | sSuId |
varchar(100) |
| 4 | OUT | sCode |
int |
| 5 | OUT | sReturn |
varchar(4000) |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpafterSave_sScr'._
Narrative
Business context: 派车单单据 → 10.物流单据 → 物流管理 — header says 派车单保存后反写数量. Thin save-phase 反写 wrapper in the Sp_afterSave_s<Code> family that delegates the actual qty back-write to Sp_saveReturn_sScr.
What it does: Wraps sGuid in double-quotes if not already quoted and unconditionally calls Sp_saveReturn_sScr(sGuid, sBrId, sSuId, 2, @sCode, @sReturn) (iFlag=2 = "after save" phase). The body carries a large commented-out dynamic-SQL block that would once have updated saldelivergoodsslave.dSendCarQty from salsendcarslave totals — inert. Does not propagate the inner @sCode/@sReturn back to its own OUT params.
Invocation: Reached only via dispatch. Sp_Check_sScr calls this proc, but Sp_Check_sScr itself has no live gdsmodule.sSaveProName binding — the 派车单单据 form's live sProcName is Sp_Calc_sScr and its save-handler slot is empty. The live path is Sp_Invalid_backwriting, which dispatches to this proc on 作废/取消作废 of form 15839936170002427227633635401000 (派车单单据), itself triggered from Java CheckmodelServiceImpl via Sp_Invalidation.