# `待产量上报` (procedure) - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `iState` | `int` | | 2 | IN | `sLoginId` | `varchar(100)` | | 3 | IN | `sMachineId_s` | `varchar(100)` | | 4 | IN | `sSuId` | `varchar(100)` | | 5 | IN | `sBrId` | `varchar(100)` | | 6 | IN | `bFilter` | `varchar(5000)` | | 7 | IN | `pageNum` | `int` | | 8 | IN | `pageSize` | `int` | | 9 | OUT | `totalCount` | `int` | | 10 | IN | `countCloumn` | `varchar(5000)` | | 11 | OUT | `countMapJson` | `varchar(5000)` | | 12 | IN | `sFilterOrderBy` | `varchar(5000)` | | 13 | IN | `sGroupby_select_sql` | `varchar(5000)` | | 14 | IN | `sGroupby_group_sql` | `varchar(5000)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `待产量上报`'`._ ## Narrative **Business context:** Chinese-named alias of the **待产量上报列表** list — the 生产部 → 设定单据 → 产量上报 module's "completed processes pending output-report" view (gdsmodule sId `19211681019715326709731800`, also surfaced on OEE mobile under `OEE本设备生产任务` / `OEE本设备对应工序任务`). Reports work-orders whose `dProcessQty` is greater than their `dProductionReportQty` so operators can file the missing output reports. **What it does:** reads `CbxProductionReport` (workorder|plan|machine), `CkxProcessFilter` and the login user's `Fun_GetLookCustomer`/`Fun_GetLookProcess` data-scope, then for the chosen mode inserts a row per pending process into temp table `p_Tmp_ProductionReport` (sourced from `viw_MftWorkOrderProcess` or `viw_MftProductionPlan`). Joins back to `elemachine` / `eleproduct` / `elecustomer` / `eleteam` / `sisformula` for display fields. Drops rows without a machine, then hands the result to `Sp_Outstanding_Query` for paging/filter/group-by. **Invocation:** Status: appears orphaned. The live form (sId `19211681019715326710140550`) and OEE mobile entries (sIds `101251240115016040215303900`, `101251240115016087809801610`) all call `Sp_Manufacture_ProductionReport`, not this Chinese-named clone. No form-master / gdsmodule-hook / other-routine / xly-src reference targets the Chinese-named proc — candidate for maintainer audit / deletion (likely a developer rename artefact).