# `Sp_Manufacture_ProductionPlanInfo1` (procedure)


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sFlag` | `varchar(225)` |
| 2 | IN | `sLoginId` | `varchar(100)` |
| 3 | IN | `sState` | `varchar(10)` |
| 4 | IN | `sBrId` | `varchar(100)` |
| 5 | IN | `sSuId` | `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 `Sp_Manufacture_ProductionPlanInfo1`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程 — earlier numbered variant of `Sp_Manufacture_ProductionPlanInfo` (the 点击机台获取排程数据 data-source). Same signature except `countMapJson varchar(5000)` (vs. the canonical `longtext`); body extracts only `sMachineId` from `bFilter` (no `sProcessId` / `sWorkCenterId` / `sId` / `tStartDate` parsing), suggesting an older revision of the same proc.

**What it does:** When `bFilter` contains "所有", rewrites it to `sMachineId = <value>`, then builds temp `PlanInfo` from `MftProductionPlanSlave` joined with customer/product/process lookups for that machine. `Update PlanInfo` to overlay derived fields and pages out via `CALL Sp_Outstanding_Query` honouring `bFilter` / `pageNum` / `pageSize` / `countCloumn` / `sGroupby_*`.

**Invocation:** No `gdsconfigformmaster.sSqlStr`, `gdsmodule` hook, other-routine, or xly-src caller references this name. Status: appears orphaned — looks like a retired numbered checkpoint left behind during the rewrite of `Sp_Manufacture_ProductionPlanInfo`; candidate for maintainer audit before deleting.
