# `Sp_Bd_bi17` (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_bi17`'`._ ## Narrative **Business context:** 模烫车间 workshop dashboard (kanban) — board procedure for the 模烫 (die-cut + hot-stamping) workshop in the `Sp_Bd_bi` workshop-board family. Returns the per-machine current-shift status block consumed by the 看板/dashboard page. **What it does:** Same shape as `Sp_Bd_bi16` (sibling for 喷码) — seeds `p_Bd_PlcNo_No` with four 模烫 machine PLC numbers (`8,9,10,11`), cursor-iterates per machine, reads current 工单 / 班组 / 设备状态 via `viw_plc_machine`, joins `mftworkordermaster`+`mftworkorderprocess`, computes 实际/标准/偏差 调机时间 + 当前色号 + 完成版数/模数 from `plc_machinedata`, aggregates into `p_Bd_workshop5(sName,sValue)` and emits a `{"data":[...]}` JSON for the dashboard widget. **Invocation:** Installed by `xly-src/script/标版/30100101/kanban/Sp_Bd_bi17-模烫.sql`. No form-master sSqlStr, no `gdsmodule` hook, no other-routine caller, no Java caller. Status: appears reachable only via an external dashboard HTTP endpoint that invokes the proc by name. Per wiki scope, kanban dashboard procs sit outside the routine call-graph wiring tracked in this catalog. Tenant note: `iPlcNo` literals (`8,9,10,11`) are tied to one deployment's machine numbering — cloning requires re-mapping per `elemachine.iPlcNo`.