# `Sp_Create_sControlFaceNameTableFour` (procedure)

> 拥有加号的处理


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `p_iArrangeSrcValue` | `int` |
| 2 | IN | `p_sControlFaceName` | `longtext` |
| 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 PROCEDURE `Sp_Create_sControlFaceNameTableFour`'`._

## Narrative

**Business context:** 生产管理 → 排版/拼版 — case 4 of the 控版面名 (`sControlFaceName`) splitter: the "拥有加号" shape `A+B` (no `-`, no `,`). Branches on `p_iArrangeSrcValue=2` (折页/fold) vs other (印版付数/plate copies) so that fold signatures get one row per signature while plate-count cases get expanded by the leading number.

**What it does:** Guards on `INSTR(...,'-')=0 AND INSTR(...,'+')>0 AND INSTR(...,',')=0`. Resolves the title-first override (`p_sControlFacesTitleFirst`) when set. For `p_iArrangeSrcValue=2`: parses the leading number with `Fun_GetNum(Fn_split_string(... , '+', 1))`, inserts one `sControlFaceName_tmp` row carrying `iIndex=p_i`, the concatenated title+`贴` label and a fresh `NewId()`, and returns that number via `p_iOut`. For other arrange-source values: loops `p_sControlFacesJhSum` times and emits one row per plate copy.

**Invocation:** Called by `Sp_Create_sControlFaceNameTable` as one of its dispatch branches.
