Sp_bd_TmYield (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_TmYield'._
Narrative
Business context: 看板管理 / 班组产量对比分析 — per-machine raw output (产量) for the first rotary-press group (elemachine.iPlcNo 1-12), broken down across the four shift buckets 昨日白班 / 昨日晚班 / 今日白班 / 今日晚班.
What it does: Same plc_machinedata ingest as the sibling Tm procs. Aggregates per machine/team/shift into p_bd_TmYield where y is the absolute output count SUM(dQty)+SUM(dPlateQty) (no ratio — unlike ComplianceRate/Speed/Time). Classifies into 4 shift buckets via the same sShiftsWork/sOffwork rules, backfills zeroes for non-reporting machines, emits JSON {data:[{type,y,x}],xUnit:"",yUnit:""}.
Invocation: Installed by xly-src/script/标版/30100101/Sp_bd_TmYield.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_TmYield2/Sp_bd_TmYield3 cover the PLC 15-26 / 29-40 groups.