Sp_Create_sControlFaceNameTableTwo.md 1.71 KB

Sp_Create_sControlFaceNameTableTwo (procedure)

插入ControlFaceName

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

Parameters

# Mode Name Type
1 IN p_sControlFaceName longtext
2 OUT p_iOut int
3 IN p_sControlFacesCharDefalut varchar(255)
4 IN p_sControlFacesTitleFirst varchar(255)

Body

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

Narrative

Business context: 生产排程 → 印刷拼版/折页清单展开 — variant 2 of the Sp_Create_sControlFaceNameTable dispatcher family that fills sControlFaceName_tmp from a 控面 (control-face) descriptor. This variant handles the simple A-B range pattern (no +, no ,), e.g. 1-16 expanded into 16 sequential 贴 rows.

What it does: Splits p_sControlFaceName on - to obtain start (Fun_GetNum of part 1) and end (part 2), takes the trailing 中文 suffix via Fun_GetGb as sControlFacesChar (defaulting to p_sControlFacesCharDefalut, typically ). Then while-loops from start to end, inserting one row per index into sControlFaceName_tmp(iIndex, sControlFaceNameNum, sControlFacesChar, sId) with title concatenation logic (avoids double- suffix). p_iOut is advanced past the last index.

Invocation: Called by Sp_Create_sControlFaceNameTable (the dispatcher) when the control-face descriptor has only a -, no + and no ,. The dispatcher chain is reached from Sp_Manufacture_InsertMftPlanSlave during 生产计划/排程 row-creation. No form-master, gdsmodule hook, or Java caller — internal helper only.