# `PRO_ERPMERGEBASEELEPROCESS` (procedure) - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sEleProcessId` | `varchar(100)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `PRO_ERPMERGEBASEELEPROCESS`'`._ ## Narrative **Business context:** 基础资料 / 工序 (Process base data) — when a process (`ELEPROCESS`) is renamed, renumbered, has its unit changed, or is moved to a different process classification in the **工序** maintenance page, this proc pushes the new `sProcessNo`/`sProcessName`/`sProcessUnit`/`sProcessClassifyId` (= `ELEPROCESS.sParentId`) to every historical production-report row that already references that process. **What it does:** `SELECT sProcessNo, sProcessName, sProcessUnit, sParentId INTO @sProcessNo, @sProcessName, @sProcessUnit, @sProcessClassifyId FROM ELEPROCESS WHERE sId = sEleProcessId`, then `UPDATE ERPMERGEPRODUCTIONREPORT SET ... WHERE sProcessId = sEleProcessId`. One-shot denormalization push. **Invocation:** Reached via `ProDao.proErpMergeBaseEleProcess(map)` → MyBatis `ProMapper.proErpMergeBaseEleProcess` (`CALL PRO_ERPMERGEBASEELEPROCESS(#{sEleProcessId})`). Fired by `ChangeEleProcessServiceImpl` (the JMS `CHANGE_GDS_MODULE` consumer for the process entity) after a base-data row mutates, keeping denormalized reporting tables in sync without a full rebuild. See [Cache invalidation on metadata change](../../reference/maintainer/cache-invalidation.md).