# `Sp_Bd_bi4` (procedure)

> @author:zhucx
							@date:20220111 
							@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_bi4`'`._

## Narrative

**Business context:** 三屏设备 — three-screen device 现场看板 for a specific 3-PLC cluster on the workshop floor. Sibling of the bi20–bi24 four-tile family but only 3 tiles wide.

**What it does:** Hardcodes a 3-row `p_Bd_PlcNo_No(iPlcNo,iNo)` map for PLCs `10, 11, 12`, then for each PLC reads `elemachine`/`plc_currentmachinevalue`/`mft_workorder*` to assemble per-machine 当前状态/当前工单/已生产数量/调机时间 tiles into `p_Bd_workshop5`, emitting a JSON board into `sReturn`.

**Invocation:** No form-master sSqlStr, no `gdsmodule` hook, no other-routine caller, no install script under `xly-src/script/`, no Java caller. Status: appears orphan — likely a one-off dashboard variant that may still be reachable via an external HTTP endpoint by proc-name. Candidate for maintainer audit.

Flag: header date `20220111` matches the bi16-24 cohort but the `bi4` numbering is out of band (the rest run bi16–24). PLC list `10, 11, 12` tenant-deployment-specific.
