Sp_plc_implementation1.md 2.09 KB

Sp_plc_implementation1 (procedure)

机器运行情况(全部)

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

Parameters

# Mode Name Type
1 IN sMachineId varchar(100)
2 IN sBrId varchar(100)
3 IN sSuId varchar(100)
4 IN tStartDate varchar(100)
5 IN tEndDate varchar(100)
6 IN pageNum int
7 IN pageSize int
8 OUT totalCount int
9 IN countCloumn varchar(5000)
10 OUT countMapJson longtext
11 IN sFilterOrderBy varchar(5000)
12 IN sGroupby_select_sql varchar(5000)
13 IN sGroupby_group_sql varchar(5000)
14 OUT sCode int
15 OUT sReturn varchar(5000)

Body

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

Narrative

Business context: 设备 / PLC 信号采集 — variant of Sp_plc_implementation (proc COMMENT: "机器运行情况(全部)"). Same paged equipment-status decoder but scoped to elemachine WHERE iPlcNo > 2 — the second/third signal groups (the first proc handles iPlcNo < 3). Together the two procs cover the full machine fleet.

What it does: Identical structure to Sp_plc_implementation: builds Sp_plc_implementation and p_elemachine temp tables, cursors each machine, pulls top-N sysdoplclog rows by tMakeDate DESC LIMIT p_index,pageSize, decodes the pipe/comma-delimited sValues payload via Fn_split_string into 23 metric columns. Differs from Sp_plc_implementation mainly in the iPlcNo filter and in ordering by tMakeDate rather than iIncrement.

Invocation: Status: appears orphaned. No gdsmodule.sProcName binding, no form-master sSqlStr reference, no gdsconfigcharmaster.sProcedureName chart binding, no other-routine caller, no xly-src reference (no install script ships it). Signature matches the paged-report convention, suggesting it was once a report data-source — candidate for maintainer audit.