sp_updateEnglishBasic.md 1.59 KB

sp_updateEnglishBasic (procedure)

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

Parameters

# Mode Name Type
1 OUT sCode int
2 OUT sReturn longtext

Body

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

Narrative

Business context: Internationalisation one-shot — swaps the Chinese sName/sProcessName/sMaterialsName/sBoxType/sColorName columns with their English counterparts (sEnglishName, sEnglishProcessName, sMaterialsEnglishName, etc.) across the basic-data dictionaries. Effectively flips a tenant's primary language by promoting the English column to the displayed column.

What it does: For each basic-data table (sisproductclassify, sisprocessclassify, eleprocess, elematerials, sisboxtype, sisproductclassifycolor, eleprocessdynamic, sisboxtypeparam, sisboxtypesetting, sisproductclassifypart, …), creates a temp snapshot via CREATE TEMPORARY TABLE tmp_X SELECT sId, sName, sEnglishName FROM X then does UPDATE X JOIN tmp_X ON sId SET X.sEnglishName=tmp.sName, X.sName=tmp.sEnglishName — i.e. a column swap. The 工序分类表 branch guards IFNULL(sEnglishName,'')<>'' to skip rows with no English set.

Invocation: Status: appears orphaned. No caller found in any channel — no form-master, no gdsmodule hook, no other routine, no xly-src grep. One-off DBA migration helper; running it twice undoes itself. Candidate for maintainer audit before any tenant relies on it.