Sp_bd_TmSpeed (procedure)
速度嫁动率(分组报表)机台
- 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 PROCEDURESpbd_TmSpeed'._
Narrative
Business context: 看板管理 / 速度嫁动率(分组报表)机台 — per-machine speed-utilization ratio for the first rotary-press group (elemachine.iPlcNo 1-12). Reports speed achieved against the team's dPrintQty target, broken down across the four shift buckets 昨日白班 / 昨日晚班 / 今日白班 / 今日晚班.
What it does: Same yesterday-to-now plc_machinedata ingest as Sp_bd_TmComplianceRate into p_machinedata. Aggregates per machine/team/shift into p_bd_TmSpeed, where y is the speed metric (SUM(dQty)+SUM(dPlateQty)) / SUM(dHour) / dPrintQty (units pieces-per-hour normalised against team target). Classifies into 4 shift buckets via the same sShiftsWork/sOffwork rules, backfills zero rows for non-reporting machines, emits JSON {data:[{type,y,x}],xUnit:"",yUnit:"%"}.
Invocation: Installed by xly-src/script/标版/30100101/Sp_bd_TmSpeed.sql. No form-master sSqlStr, no gdsmodule hook, no other-routine caller, no Java caller — reachable only via an external dashboard HTTP endpoint. Sp_bd_TmSpeed2/Sp_bd_TmSpeed3 cover the PLC 15-26 / 29-40 groups.