# `Sp_Manufacture_ProductionPlanInfo_detail` (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 | `p_sId` | `longtext` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Manufacture_ProductionPlanInfo_detail`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产排程 — header label 机台排程：排程从表(点击排程+号调取). Returns the child-row list (排程从表 / 从表分贴信息) for one parent 排程 master id when the user clicks the `+` expand control on the scheduler board. Drives every "expand" interaction on the 机台排程 view.

**What it does:** Takes a list of parent ids in `p_sId` (longtext, comma/dash-split client-side) and `CONCAT`s a dynamic `SELECT` over `mftproductionplanslave` projecting the full schedule child columns (`sWorkOrderId`, `sCustomerId`, `sProductId`, `sProcessId`, `sMachineId`, `sWorkCenterId`, `sTeamId`, qty fields `dProductQty/dProductionReportQty/dProcessQty`, time fields `dHour/dCalcHour1/dAdjustHour/tStartDate/tEndDate`, status flags `bCut/bMat/bPublish/bMakeup/bFrozen`, etc.) joined with related dimension tables; the SQL is prepared and executed via `EXECUTE`.

**Invocation:** Called from Java by `WorkOrderPlanServiceImpl.getProductionPlanInfoList()` — which builds `"call Sp_Manufacture_ProductionPlanInfo_detail(...)"` against `businessBaseDao.getByMap(...)` whenever the scheduler board needs to expand a master row. Also bound as data-source of 排程从表 / 从表分贴信息 forms via `gdsconfigformmaster.sSqlStr` — `gfm.sId` `101251240115016110217766930`, `101251240115016110217770120`, `101251240115016221814786810`, `2022042422052580722848452054923`, `2022042422070075250247809950228`, `15813919750004894187658775812000`. Install scripts: `xly-src/script/标版/30100101/schedule/` and `xly-src/script/客户/千彩/`.
