Sp_afterSave_sOdt.md 1.49 KB

Sp_afterSave_sOdt (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_sOdt'._

Narrative

Business context: 发外检验单据 → 质量管理单据 → 质量管理 (also 发外检验(mobile单据) → 功能操作 → 移动端管理). Header says 发外检验存后反写数量. Thin save-phase wrapper in the Sp_afterSave_s<Code> family that delegates the qty back-write to Sp_saveReturn_sOdt.

What it does: Wraps sGuid in double-quotes if not already quoted and, when sGuid is non-empty, calls Sp_saveReturn_sOdt(sGuid, sBrId, sSuId, 2, @sCode, @sReturn). Does not propagate the inner @sCode/@sReturn to its own OUT params.

Invocation: Reached on two paths. (1) Sp_Check_sOdt (bound via gdsmodule.sSaveProName on 发外检验单据 and 发外检验(mobile单据)) calls this proc near the tail of a successful save. (2) Sp_Invalid_backwriting dispatches to this proc on 作废/取消作废 of form 15827076660008241075501010830000 (发外检验单据), itself triggered by Java CheckmodelServiceImpl via Sp_Invalidation.