# `Sp_Bd_Root_allstatus25` (procedure)

> @author:zhucx
							@date:20210620 封存
							@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_Root_allstatus25`'`._

## Narrative

**Business context:** 看板管理 / 数字工厂状态看板 — 16-press production-floor status grid for the digital-factory board. For each PLC slot (1–16 keyed to demo machine numbers `00000010` / `00000005` / `CD102-7` repeated to fill the grid), reports current order, machine status, planned hours, current shift's quantity, this-month quantity. Author tagged `封存` 2021-06-20.

**What it does:** Seeds `p_Bd_PlcNo_No(iPlcNo,iNo)` with the 16-slot mapping, then cursor-loops over each slot pulling `viw_plc_machine`, `mftproductionplan*`, `plc_machinedata`, `eleteam`, etc. for that machine — recording sample times (实际调机时间 / 标准调机时间), counts (本班数量 / 本月数量, 本班单数 / 本月单数), team handoff state, plan progress — into temp table `p_Bd_workshop5(sName,sValue)`, then returns the rowset.

**Invocation:** No install script in xly-src, no form-master, no `gdsmodule` hook, no Java caller. Other DB reference is sibling `Sp_Bd_Root_allstatus25_new` only. Reached only by an external dashboard HTTP endpoint that calls the proc by name. Marked `封存` (sealed) — superseded by `Sp_Bd_Root_allstatus25_new` and the demo-fixed `iPlcNo` literals (`00000010`, `00000005`, `CD102-7`) suggest this never targeted production data.
