Sp_Quantity_PatrolDailyPaper.md 2.1 KB

Sp_Quantity_PatrolDailyPaper (procedure)

@author:杨恒林 @date:20210523 封存 @describe: 巡检日报主管审批过程 质量管理-过程管理-巡检日报-主管审核按钮:

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

Parameters

# Mode Name Type
1 IN sProInParam varchar(10000)
2 IN sMakePerson varchar(100)
3 IN sBrId varchar(100)
4 IN sSuId varchar(100)
5 OUT sReturn varchar(1000)
6 OUT sCode int

Body

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

Narrative

Business context: 质量管理 → 过程管理 → 巡检日报 — supervisor (主管) approval button on the 巡检日报 daily-inspection summary. The DB COMMENT explicitly marks the proc as 20210523 封存 (sealed/deprecated 2021-05-23) and authored by 杨恒林.

What it does: Parses sProInParam for $.params[*].value[*] and $.changeValue.textareaValue (the supervisor's remark). For each row it reads tCreateDate + sMakePerson and runs UPDATE QlyProcessTestMaster SET bCheck=1, sStatus=1, sCheckPerson=sMakePerson, tCheckDate=NOW() WHERE sMakePerson=p_sMakePerson AND DATE_FORMAT(tCreateDate,'%Y-%m-%d') = LEFT(p_tCreateDate,10) scoped by sBrId/sSuId — i.e. it stamps every patrol-test record that the named operator created on that day. Each row also writes a syslog audit entry with sFormId='12012615914116371204913630' (巡检日报 form id) and sOperationType='巡检日报审批'.

Invocation: Signature is the standard Sp_BtnEvent_* generic-dispatch shape, but no live binding: gdsmodule.sSaveProName/sProcName empty, no other routine references it, and grep -rln on xly-src returns one hit — script/标版/30100101/Sp_Quantity_PatrolDailyPaper.sql (install script only). Status: deprecated by COMMENT, orphaned in the live config; the replacement is the per-row approval on QlyProcessTestMaster directly. Candidate for maintainer audit / removal.