Sp_oee_getmachinedata.md 2.07 KB

Sp_oee_getmachinedata (procedure)

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

Parameters

# Mode Name Type
1 IN sBrId varchar(100)
2 IN sSuId varchar(100)
3 IN sMachineId varchar(100)
4 IN sWorkOrderNo varchar(100)
5 IN bFilter text
6 IN pageNum int
7 IN pageSize int
8 OUT totalCount int
9 IN countCloumn text
10 OUT countMapJson longtext
11 IN sFilterOrderBy text
12 IN sGroupby_select_sql text
13 IN sGroupby_group_sql text

Body

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

Narrative

Business context: OEE管理 — paged production-task feed for an OEE machine workstation: given a machine id and a work-order filter, returns the per-process rows the operator at that machine should see (with derived barcode/dispatch quantities, wage, team, customer, plate counts, status, etc.).

What it does: IFNULL-defaults pagination args, then runs one big SELECT against the production-task slave table (alias A) joined to mftproductionplanslave, sisformula (for sWageName), and a status lookup S. Computes derived columns inline: dBarCodeQty1 from the dProcessQty / dBarcodeQty / dSrcQty precedence, dProduceHour converted from minutes, plus formatted tStartDate / tCreateDate / tEndDate strings. The full paged signature (pageNum/pageSize/totalCount/countCloumn/countMapJson/sFilterOrderBy/sGroupby_*) matches the form-master report contract, so a paging wrapper (Sp_Outstanding_Query-style) is expected to splice the dynamic SQL.

Invocation: Status: appears orphaned. No gdsconfigformmaster binding, no gdsmodule hook, no other proc/function call, and no xly-src caller (Java, MyBatis, install script) — the proc looks like a half-wired OEE machine console feed that never got referenced. Candidate for maintainer audit.