# `PRO_ERPMERGEBASEMFTWORKORDERCONTROL` (procedure) - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sMftWorkOrderControlId` | `varchar(100)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `PRO_ERPMERGEBASEMFTWORKORDERCONTROL`'`._ ## Narrative **Business context:** Manufacturing — work-order print-control sync. When a row in `MFTWORKORDERCONTROL` (the per-process print-control table that owns 正面色数 / 反面色数 / 印刷模式 / 色序 / 拼版数 / 单产量 etc.) is updated from inside the 施工单 (work-order) flow, this proc copies those production-control fields onto every `ERPMERGEPRODUCTIONREPORT` row whose `sSrcControlId` matches, so production-report rows reflect the current print plan. **What it does:** reads the 12 control fields (`iPositiveColor`, `iPositiveSpecialColor`, `iOppositeColor`, `iOppositeSpecialColor`, `dSinglePQty`, `dSumPQty`, `iStick`, `sColorSerial`, `dMachineQty`, `dSumMachineQty`, `iPrintModePo`, `iPrintMode`) from `MFTWORKORDERCONTROL` and updates the matching `ERPMERGEPRODUCTIONREPORT` rows by `sSrcControlId`. **Invocation:** member of the `PRO_ERPMERGEBASE*` denorm-merge family. Called by `ProDao.proErpMergeBaseWorkOrderControl(map)` via MyBatis CALLABLE mapper `ProMapper.xml`, driven from `ChangeWorkOrderControlServiceImpl.changeTableData()` after the JMS `CHANGE_GDS_MODULE` consumer detects a `MFTWORKORDERCONTROL` row mutation. See [Cache invalidation on metadata change](../../reference/maintainer/cache-invalidation.md).