Sp_afterSave_sSmo.md 1.62 KB

Sp_afterSave_sSmo (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_sSmo'._

Narrative

Business context: 半成品出库单据 — header says 半成品出库存后反写数量. Thin save-phase 反写 wrapper in the Sp_afterSave_s<Code> family that delegates the actual qty back-write to Sp_saveReturn_sSmo (the in-line sgdsemigoodsoutstoreslavesgdsemigoodsoutstoreapplyslave.dProcessOutStoreQty UPDATE chain is fully commented out).

What it does: Wraps sGuid in double-quotes if not already quoted and calls Sp_saveReturn_sSmo(sGuid, sBrId, sSuId, 2, @sCode, @sReturn) (iFlag=2 = "after save" phase). Does not propagate the inner @sCode/@sReturn back to its own OUT params.

Invocation: Reached on two paths. (1) Sp_Check_sSmo calls this proc near the tail of a successful save (the same Sp_Check_sSmo also chains a call to Sp_afterSave_sSmoa), although Sp_Check_sSmo itself currently has no live gdsmodule.sSaveProName binding in this database. (2) Sp_Invalid_backwriting dispatches to this proc on 作废/取消作废 of form 101801153119616759303641850 (半成品出库), itself triggered from Java CheckmodelServiceImpl via Sp_Invalidation.