Sp_chart_EquipmentLod1.md 1.53 KB

Sp_chart_EquipmentLod1 (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 PROCEDURESpchart_EquipmentLod1'._

Narrative

Business context: 制造管理 / 仪表盘 — typo-named twin of Sp_chart_EquipmentLoad1 (note Lod vs Load). Same heatmap of machine-hours per day across active production plans; identical body except the debug SELECT p_sData, p_sDay, p_sMachines line is removed so only the JSON OUT remains.

What it does: Reads DATEDIFF(MAX(tStartDate), SYSDATE()) from mftproductionplanslave (state in 1,2), clamps to 30 days, builds TMP_Machine (distinct sMachineId ordered by sType) and TMP_MachineDate (per-machine per-day SUM(dHour)/60), loops to emit [i,j,dHour] triples and day labels, and assigns {"data":[...], "day":[...], "sMachines":[...]} to OUT sReturn.

Invocation: Status: appears orphaned. No form-master, gdsmodule hook, other-routine caller, or Java caller — only its install script script/标版/30100101/Sp_chart_EquipmentLod1.sql. Almost certainly a typo-introduced duplicate of Sp_chart_EquipmentLoad1; flag for cleanup.