# `Sp_bd_MachineOee` (procedure)

> 设备OEE展示


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sLoginId` | `varchar(100)` |
| 2 | IN | `sBrId` | `varchar(100)` |
| 3 | IN | `sSuId` | `varchar(100)` |
| 4 | IN | `bFilter` | `varchar(5000)` |
| 5 | OUT | `sCode` | `int` |
| 6 | OUT | `sReturn` | `longtext` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_bd_MachineOee`'`._

## Narrative

**Business context:** 设备OEE展示 — composite OEE four-bar chart on the 看板管理 / 数字工厂 dashboard, showing 时间稼动率 / 速度稼动率 / 全局设备效率 / 计划达标率 side-by-side. Stub placeholder — emits hardcoded sample values rather than computed ones.

**What it does:** Builds a 4-row inline `UNION` table with literal `dYvalue` constants (`89`, `69`, `29`, `70`) keyed by `iOrder`, serialises to JSON `{"data":[{"x":"<sXName>","y":<dYvalue>}], "xUnit":"","yUnit":"%"}` and returns. No reads from `plc_machinedata`, `elemachine`, or any production table.

**Invocation:** Installed by `xly-src/script/标版/30100101/Sp_bd_MachineOee.sql`. No form-master sSqlStr, no `gdsmodule` hook, no other-routine caller, no Java caller. Reachable only via an external dashboard HTTP endpoint that invokes the proc by name.

Body emits four hardcoded constants (89/69/29/70%) — the live OEE composite must be computed elsewhere (likely `Sp_bd_EqSpeed` + `Sp_bd_EqTime` joined by the front-end). This proc is a display-only placeholder; the COMMENT header `设备OEE展示` overstates what the body delivers.
