Sp_afterSave_sPca.md 1.47 KB

Sp_afterSave_sPca (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_sPca'._

Narrative

Business context: 采购到货(送检)单据 → 材料库单据 → 材料库存 — header says 采购到货保存后反写数量. Thin save-phase wrapper in the Sp_afterSave_s<Code> family that delegates the qty back-write to Sp_saveReturn_sPca.

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

Invocation: Reached via Sp_Invalid_backwriting (Java CheckmodelServiceImplSp_Invalidation) on 作废/取消作废 of form 101251240115016068096930620 (采购到货(送检)单据). The save-commit chain through Sp_Check_sPca is also wired (Sp_Check_sPca's body calls this), though Sp_Check_sPca itself is currently not bound to any gdsmodule.sSaveProName slot — the dispatch is dynamic, likely through a parent module-tree binding.