# `Sp_Bd_Cqzy_workshop2` (procedure)

> 丝印车间


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

## Narrative

**Business context:** 丝印车间 — Cqzy-family 丝印 (silk-screen) 车间看板, an older sibling of `Sp_Bd_cq_workshop_sy` from the 2021 dashboard evolution that targeted the `commonAuto/templateQCM_CQZY*` front-end templates. Covers 8 PLCs `15-22`.

**What it does:** Hardcodes an 8-row `p_Bd_PlcNo_No(iPlcNo,iNo)` map (with `iNo` starting at 3 — implies positions 1-2 expected to be filled by sibling boards), per-PLC reads `elemachine`/`plc_currentmachinevalue`/`mft_workorder*` to assemble per-machine 当前状态/工单/产量 rows into `p_Bd_workshop2`, emits a JSON board into `sReturn`.

**Invocation:** Installed by `xly-src/script/标版/30100101/Sp_Bd_Cqzy_workshop2.sql`. No form-master sSqlStr, no `gdsmodule` hook, no Java caller. Status: reachable only via an external dashboard HTTP endpoint. The COMMENT header is bare `丝印车间` (no 封存 marker yet — predates the workshop5/6 retirement).

Flag: PLC literals `15-22` tenant-deployment-specific; the iNo sequence skipping 1-2 is fragile to front-end template changes.
