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

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程 — `1`-suffixed near-duplicate of `sp_manufacture_productionplaninfotrace`. Same comment (`点击机台获取排程数据(树形结构带不固定查询)`) and identical parameter list. Treated as a working-copy variant.

**What it does:** Same shape as `sp_manufacture_productionplaninfotrace` — builds the `Table_MftProductionPlanSlave_Tmp` / `p_MftProductionPlanSlave_Tmp_OUT` / `MftProductionPlanSlave_Tmp_reportDiv` scratch tables off `mftproductionplanslavelock` and `mftproductionreportslave`, refines them with conditional `DELETE`/`UPDATE` per-machine, and delegates final paging/grouping to the outstanding-query helper. Body is ~42K — see `mysql … SHOW CREATE PROCEDURE`.

**Invocation:** No form-master binding, no `gdsmodule` hook, no other-routine caller in `information_schema.ROUTINES`, no xly-src reference. Status: appears orphaned — a `1`-suffix sandbox copy of `sp_manufacture_productionplaninfotrace`. Candidate for maintainer audit / cleanup; the standard convention is that `Sp_Manufacture_ProductionPlanInfoTree*` is the production lookup.
