sp_refreshJur.md 1.51 KB

sp_refreshJur (procedure)

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

Parameters

No parameters.

Body

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

Narrative

Business context: Platform-admin helper — rebuilds the per-module permission catalog (gdsjurisdiction) for every "list-page" module (gdsmodule.sName LIKE '%indexPage/commonList%') so the permission UI reflects the current set of grid-toolbar buttons (gdsconfigformslave rows where sControlName LIKE 'Btn%'). Twin of sp_refreshJurBill (which does the same for billing-form modules).

What it does: Cursors through every list-page module, deletes its existing gdsjurisdiction rows, ensures BtnRefresh and BtnOut (导出Excel) jurisdiction rows exist, force-shows BtnForceComplete when present, then iterates the form's visible toolbar buttons and upserts a matching gdsjurisdiction(sId, sParentId=sModuleId, sName=sControlName, sChinese, iOrder) row per button. Inner commented-out blocks suggest a follow-on sysjurisdiction populate that is currently skipped — admins typically run that separately.

Invocation: No bindings found. Not referenced by gdsconfigformmaster.sSqlStr, no gdsmodule hook, no other routine calls it, no xly-src match. Status: appears orphaned — invoked manually by an admin via mysql client during permission-catalog regen; not part of any automated flow. Candidate for maintainer audit.