Sp_Check_sPdtFJ.md 1.83 KB

Sp_Check_sPdtFJ (procedure)

成品复检保存之前数据校验

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

Parameters

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

Body

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

Narrative

Business context: Post-save validator nominally for 成品复检 (per procedure summary; FJ = 复检 re-test), targeting QlyProductTestMaster/QlyProductTestSlave. Same shape as Sp_Check_sPdt — computes 合格/不合格 per slave row from dNoQualifyQty vs iReQty, then applies AQL-standard accept-reject totals across each sAqlstandardId group.

What it does: Reads sSrcSlaveId from QlyProductTestMaster. Sets QlyProductTestSlave.sActValue to 不合格 when dNoQualifyQty >= iReQty. Updates QlyProductTestMaster.dSampleAuxiliaryQty to the max dSampleQty across slaves. Opens a cursor per sAqlstandardId, sums dNoQualifyQty/dNoQualifyQty2, increments p_iResult when group totals exceed p_iAcQty/p_iAcQty2, and writes the final flag back as QlyProductTestMaster.iTestResult.

Invocation: Status: appears orphaned. No gdsmodule.sSaveProName/sSaveProNameBefore/sProcName/sDeleteProName row references it; no form-master sSqlStr ref; no other DB routine calls it; xly-src grep yields no hit (no install script under script/标版/). The 成品复检 sub-flow appears unwired — candidate for maintainer audit.