Sp_bd_TeamDayMonthCompare.md 1.63 KB

Sp_bd_TeamDayMonthCompare (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_TeamDayMonthCompare'._

Narrative

Business context: 看板管理 — "时间嫁动率(分组报表)机台" tile. Returns the 本班 vs 本月 grouped bar chart comparing four utilisation metrics — 速度稼动率 / 时间稼动率 / OEE效率 / 计划达标率 — for the machine view.

What it does: Hard-codes a fixed value of 89% for all eight series (本班/本月 × four metrics) into temp table p_bd_tmTime(sType,x,y,iOrder) via a UNION block, then serialises to JSON {"data":[{"type":<本班|本月>,"y":89,"x":<metric>}...],"yUnit":"%"} via OUT sReturn. The proc accepts the standard dashboard signature (sLoginId/sBrId/sSuId/bFilter) but uses none of them — there is no actual aggregation against plc_machinedata or any production table.

Invocation: No install script in xly-src, no form-master, no gdsmodule hook, no Java caller. Other DB reference is sibling Sp_bd_TeamDayMonthCompare1 only. Reached only by an external dashboard HTTP endpoint that calls the proc by name. The output is entirely demo data — verify before relying on it.