# `Sp_bd_McPlanConter` (procedure) > 计划产量 - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sLoginId` | `varchar(100)` | | 2 | IN | `sBrId` | `varchar(100)` | | 3 | IN | `sSuId` | `varchar(100)` | | 4 | IN | `bFilter` | `varchar(5000)` | | 5 | OUT | `sCode` | `int` | | 6 | OUT | `sReturn` | `longtext` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_bd_McPlanConter`'`._ ## Narrative **Business context:** 看板管理 — "计划产量" dashboard tile. Reports the planned-production counter per machine across the configured shift window so the dashboard can show planned vs actual output. **What it does:** Builds temp table `p_machinedata` from `plc_machinedata` for PLC-indexed presses (`elemachine.iPlcNo` between 1 and 7 in this brand/subsidiary), enriches with order/team/product columns, then sums planned and adjusted quantities to a JSON payload returned via `OUT sReturn`. **Invocation:** Installed by `xly-src/script/标版/30100101/Sp_bd_McPlanConter.sql`. No form-master, no `gdsmodule` hook, no other-routine caller, no Java caller in xly-src. Reached only by an external dashboard HTTP endpoint that calls the proc by name.