Sp_Calc_sPit2.md 1.8 KB

Sp_Calc_sPit2 (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_sPit2'._

Narrative

Business context: Finance opening-balance — finished-product (在制品财务) opening import audit on accproductinitmaster. Identical comment to Sp_Calc_sPit1 but targets the finished-product opening table rather than the WIP table; the check stamps the row into the current accounting period (sConfirmMonth, bConfirm=1).

What it does: Guards on sGuid, SysLocking, bInvalid against accproductinitmaster. On iFlag=1 updates accproductinitmaster to bCheck=1, sStatus=1, sCheckPerson, tCheckDate=NOW(), sConfirmMonth=DATE_FORMAT(NOW(),'%Y%m'), bConfirm=1. iFlag=0 clears the flags. The cross-period refusal block present in Sp_Calc_sPit1 is commented out here — sibling code suggests this variant intentionally permits multiple period rows.

Invocation: Status: appears orphaned in the live database. No gdsmodule.sProcName binding, no gdsconfigformmaster reference, no callers in information_schema.ROUTINES. xly-src ships only an install script (script/标版/30100101/Sp_Calc_sPit2.sql) — no Java/XML wiring. Candidate for maintainer audit; possibly retired in favour of Sp_Calc_sPit (成品期初).