sp_init_sVersionFlowId.md 1.52 KB

sp_init_sVersionFlowId (procedure)

实际库存

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

Parameters

# Mode Name Type
1 IN p_sJurisdictionClassifyId varchar(100)
2 IN p_sVersionFlowId varchar(100)

Body

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

Narrative

Business context: 权限/版本管理 — bulk-assigns a 版本流程 (version flow) id to every module that a given permission-group p_sJurisdictionClassifyId has access to. The > 实际库存 comment is misleading (likely a copy-paste artefact); the body operates on gdsmodule.sVersionFlowId / sVersionFlowCode, not on inventory.

What it does: Reads sysjurisdiction WHERE sJurisdictionClassifyId=p_sJurisdictionClassifyId AND sUserId<>'', concatenates every sKey (with - replaced by ,), and uses Fn_split_string/Fn_spit_length to explode the keys into temp table p_t_sId. Then UPDATE gdsmodule SET sVersionFlowId=p_sVersionFlowId for those module ids, and refreshes sVersionFlowCode by joining sisversionflow on the new id.

Invocation: Status: appears orphaned. No gdsmodule/form-master/workflow/other-routine reference, no xly-src match at all (not even an install script). Lower-case sp_ prefix and the stale 实际库存 comment suggest a one-off DBA utility carried in production from an earlier provisioning step; candidate for maintainer audit.