# `Sp_Manufacture_ProductionPlanInfoTree` (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 | `iBillOutside` | `int` |
| 4 | IN | `sState` | `varchar(10)` |
| 5 | IN | `sBrId` | `varchar(100)` |
| 6 | IN | `sSuId` | `varchar(100)` |
| 7 | IN | `bFilter` | `varchar(5000)` |
| 8 | IN | `pageNum` | `int` |
| 9 | IN | `pageSize` | `int` |
| 10 | OUT | `totalCount` | `int` |
| 11 | IN | `countCloumn` | `varchar(5000)` |
| 12 | OUT | `countMapJson` | `longtext` |
| 13 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 14 | IN | `sGroupby_select_sql` | `varchar(5000)` |
| 15 | 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_ProductionPlanInfoTree`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程(Tree) — data source for the production-scheduling tree-grid that opens when a planner clicks a machine. The proc is a thin entry point on top of `Sp_Manufacture_ProductionPlanInfoTree_Base`; siblings `_TC`, `_YH`, `_YS` re-dispatch into the same base with different mode tags (`'TC'`, `'YH'`, `'YS'`) for sub-variants of the board.

**What it does:** Body is just `CALL Sp_Manufacture_ProductionPlanInfoTree_Base(sFlag, sLoginId, iBillOutside, sState, sBrId, sSuId, bFilter, pageNum, pageSize, totalCount, countCloumn, countMapJson, sFilterOrderBy, sGroupby_select_sql, sGroupby_group_sql, 'TREE')` — passes the standard pageable-report inputs through and tags `sTypeSear='TREE'` so the base proc builds the tree-shaped result.

**Invocation:** Bound as `gdsconfigformmaster.sSqlStr` of the 生产排程(Tree) form `sId 101251240115016221814783940` under module 生产计划管理 (`sId 19211681019715501158184690`) inside 生产管理. Loaded when the user opens the tree-view scheduling board. Customer overrides exist in `script/客户/远传/`, `script/客户/千彩/`, `script/客户/金宣发/` — verify which override is live.
