# `Sp_chart_sMachine_speed` (procedure)

> 机台速度


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

## Parameters

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

## Body

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

## Narrative

**Business context:** Dashboard chart card 机台速度 — designed to render the last-100 PLC speed readings (`plc_oeeupdate.dRate`) for a given machine as an x=time / y=rate series for an OEE-style line chart.

**What it does:** Selects up to 100 rows from `plc_oeeupdate` for the given `sMachineId` where `dRate > 0`, ordered by `tCreateDate DESC`, and emits a JSON payload `{data: [{type,x,y}…], xUnit, yUnit: 张}`.

**Invocation:** Status: appears orphaned. No caller found in any channel — `gdsconfigcharmaster.sProcedureName` does not reference this routine, no module hook, no form embed, no other-routine call, no xly-src reference. Candidate for maintainer audit.

The body unconditionally overrides the caller-supplied `sMachineId` with a hard-coded UUID `'e748835a-0347-44cf-b9ca-fae20a93e9ec'`, confirming this is dev/test code that was never wired up.
