Sp_Calc_sSmoa.md 1.86 KB

Sp_Calc_sSmoa (procedure)

装配工单

  • Type: PROCEDURE
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

# Mode Name Type
1 IN iFlag int
2 IN iTmpCheck int
3 IN sFormGuid varchar(100)
4 IN sGuid varchar(100)
5 IN sLoginId varchar(100)
6 OUT sReturn varchar(4000)
7 IN sBrId varchar(100)
8 IN sSuId varchar(100)
9 OUT sCode int

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpCalc_sSmoa'._

Narrative

Business context: 半成品出库申请 (semi-goods outbound application — sgdsemigoodsoutstoreapplymaster) audit / un-audit. Mirror of Sp_Calc_sSmia: the application bill pre-commits an outbound qty against a 工单 line; auditing locks the application and back-writes the work-order process slave.

What it does: Validates sGuid/bInvalid and SysLocking, then on iFlag=1 sets bCheck=1, sCheckPerson, tCheckDate on sgdsemigoodsoutstoreapplymaster; iterates sgdsemigoodsoutstoreapplyslave and Update mftworkorderprocess to mark the originating work-order process step as planned to issue. iFlag=0 reverses both.

Invocation: Status: appears orphaned. No gdsmodule.sProcName binding, no form-master sSqlStr ref, no other-routine caller. xly-src carries script/标版/30100101/Sp_Calc_sSmoa.sql (install) and script/标版/optimize/Sp_Calc_sSmoa.sql (perf patch) but no Java caller. Candidate for maintainer audit. Despite the page comment 装配工单, the deployed body targets the outbound-application master.

Flag: page comment 装配工单 does not match the deployed body (which targets sgdsemigoodsoutstoreapplymaster). One of the two is stale — candidate for maintainer audit.