Sp_bd_EquipmentLoad1.md 1.67 KB

Sp_bd_EquipmentLoad1 (procedure)

本月设备产量

  • Type: PROCEDURE
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

# Mode Name Type
1 IN iFlag int
2 IN iTmpCheck int
3 IN sFormGuid varchar(100)
4 IN sGuid varchar(100)
5 IN sLoginId varchar(100)
6 OUT sReturn varchar(4000)
7 IN sBrId varchar(100)
8 IN sSuId varchar(100)
9 OUT sCode int

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpbd_EquipmentLoad1'._

Narrative

Business context: 本月设备产量 — month-to-date per-machine load chart on the 看板管理 / 数字工厂 dashboard. For the 8 top-loaded machines, returns the sum of scheduled production hours (SUM(dHour)/60) for currently in-flight work orders.

What it does: Aggregates mftproductionplanslave.dHour joined to elemachine.sMachineName for sState IN (2,3) (排程/生产中), groups by sMachineName, orders by dHour ascending with LIMIT 8, then re-sorts by sMachineName for display. Returns JSON {"data":[{"x":"<sMachineName>","y":"<hours>"}], "xUnit":"","yUnit":"h"}.

Invocation: Installed by xly-src/script/标版/30100101/Sp_bd_EquipmentLoad1.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. Carries the 9-arg (iFlag, iTmpCheck, sFormGuid, sGuid, sLoginId, sReturn, sBrId, sSuId, sCode) invocation signature shared with other dashboard chart-loader procs.