Sp_Create_sControlFaceNameTableThree (procedure)
插入ControlFaceName
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | p_sControlFaceName |
longtext |
| 2 | IN | p_iArrangeSrcValue |
int |
| 3 | OUT | p_iOut |
int |
| 4 | IN | p_sControlFacesCharDefalut |
varchar(255) |
| 5 | IN | p_sControlFacesTitleFirst |
varchar(255) |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpCreate_sControlFaceNameTableThree'._
Narrative
Business context: 生产排程 → 印刷拼版/折页清单展开 — variant 3 of the Sp_Create_sControlFaceNameTable dispatcher family that materialises the temp table sControlFaceName_tmp from a 控面 (control-face) descriptor string. This variant handles the 【A+B-C+D】 pattern — a 合版 (gang-up) print spec where pairs of pages run together and 折页 splits them into separate 贴 entries.
What it does: Parses p_sControlFaceName (e.g. 1+2-9+10) into start/end + +-count, computes the per-iteration title (e.g. 贴 suffix logic via Fun_GetGb/Fun_GetNum/Fn_split_string), then loops inserting one row per 贴 into sControlFaceName_tmp(iIndex, sControlFaceNameNum, sControlFacesChar, sId). Two branches: p_iArrangeSrcValue=2 (折页) emits concatenated multi-page rows (1+2, 3+4, ...); otherwise emits one row per individual page. Edge case: if the + pair before the - is symmetric (e.g. 2A+2B), it delegates to Sp_Create_sControlFaceNameTableFive and leaves the loop.
Invocation: Called by Sp_Create_sControlFaceNameTable (the dispatcher) when the control-face descriptor contains both - and + and no ,. The dispatcher chain is reached from Sp_Manufacture_InsertMftPlanSlave during 生产计划/排程 row-creation. No form-master, gdsmodule hook, or Java caller — purely an internal helper.