# `Sp_Bd_cq_workshop_mt` (procedure)

> @author:zhucx
							@date:20211224 
							@describe: 模烫车间


- **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 PROCEDURE `Sp_Bd_cq_workshop_mt`'`._

## Narrative

**Business context:** 模烫车间 — workshop-wide 车间看板 for the 模烫 (die-cutting/embossing) line, covering 13 PLCs from the mid-range cluster `8, 15-26`. Predecessor of the narrower 4-tile `Sp_Bd_bi21` 模烫现场 board. The "root" of the cq_workshop_* family — its `Sp_Bd_cq_workshop_mt` call-comment is copy-pasted into every sibling's header.

**What it does:** Hardcodes a 13-row `p_Bd_PlcNo_No(iPlcNo,iNo)` map for the 模烫 cluster, then per-PLC reads `elemachine`/`plc_currentmachinevalue`/`mft_workorder*` to assemble 当前状态/当前工单号/已生产数量/调机时间/异常 rows into `p_Bd_workshop5`, emits a JSON board into `sReturn`.

**Invocation:** No form-master sSqlStr, no `gdsmodule` hook, no install script under `xly-src/script/` for this proc. Other-routine callers `Sp_Bd_cq_workshop_hh/pj/pm/sy` reference it only in the stale `-- call Sp_Bd_cq_workshop_mt(...)` comment. Status: reachable only via an external dashboard HTTP endpoint.

Flag: PLC literals `8, 15-26` tenant-deployment-specific.
