# `Sp_Manufacture_ProductionArrangePro` (procedure)

> 生产计划看板


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sCustomerName` | `varchar(255)` |
| 2 | IN | `tStartDate` | `datetime` |
| 3 | IN | `tEndDate` | `datetime` |
| 4 | IN | `sWorkOrderNos` | `varchar(255)` |
| 5 | IN | `sLoginId` | `varchar(4000)` |
| 6 | IN | `sBrId` | `varchar(100)` |
| 7 | IN | `sSuId` | `varchar(100)` |
| 8 | IN | `bFilter` | `varchar(5000)` |
| 9 | IN | `pageNum` | `int` |
| 10 | IN | `pageSize` | `int` |
| 11 | OUT | `totalCount` | `int` |
| 12 | IN | `countCloumn` | `varchar(5000)` |
| 13 | OUT | `countMapJson` | `longtext` |
| 14 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 15 | IN | `sGroupby_select_sql` | `varchar(5000)` |
| 16 | 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_ProductionArrangePro`'`._

## Narrative

**Business context:** 生产管理 → 生产计划管理 → 生产计划看板 — "Pro" variant of `Sp_Manufacture_ProductionArrange`. Same calling signature (`sCustomerName`, date window, `sWorkOrderNos`, paging block) and same business header (生产计划看板); the implementation is a leaner rebuild — fewer joins, smaller body — likely an attempt at a faster look-up board.

**What it does:** Builds temp `p_TempTable` from `MftWorkOrderSlave` joined with `viw_mftworkorderprocess` and `mftproductionreportslave`, filtered by `sCustomerName`, `tStartDate..tEndDate`, `sWorkOrderNos`, `sLoginId`, `sBrId`, `sSuId`. Updates per-工单 progress columns, then `CALL Sp_Do_UpdateByPageSizeBefore` to apply standard paging and emits results via `bFilter` / `pageNum` / `pageSize` / `countMapJson` / `sGroupby_*`.

**Invocation:** No `gdsconfigformmaster.sSqlStr` row in the live snapshot references `Sp_Manufacture_ProductionArrangePro`, no `gdsmodule` hook binds it, and no other routine in `xlyweberp_saas_ai` calls it. No xly-src install script either. Status: appears orphaned — looks like a "Pro" rewrite that never replaced the canonical `Sp_Manufacture_ProductionArrange` in any form binding; candidate for maintainer audit (promote-to-canonical or drop).
