# `GetPriorPlate` (function) > 得到模具或蓝纸准备情况 - **Type:** FUNCTION - **Returns:** `text` - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sPlanId` | `varchar(100)` | | 2 | IN | `uGuid` | `varchar(100)` | | 3 | IN | `uProcessGuid` | `varchar(100)` | | 4 | IN | `sControlId` | `varchar(100)` | | 5 | IN | `sBrId` | `varchar(100)` | | 6 | IN | `sSuId` | `varchar(100)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `GetPriorPlate`'`._ ## Narrative **Business context:** 得到模具或蓝纸准备情况 — for an APS gantt row (a `MftProductionPlanSlave`), returns a one-line preparation-status string for the **prior** plate/mould/proof step. Examples: `"模切刀(外)发外"`, `"调墨OK 12号08:30(3)"`, `"组 专色待调"`, `" 待发外"`. Drives the "状态" column on APS scheduling boards so planners see whether the mould / blueprint / ink is ready before letting the current job start. **What it does:** reads the current `MftWorkOrderProcess` row to get `sType` and process name. Branches on process name keyword (`模切`/`凹凸`/`烫金` → look up the prior `刀版`/`模具` step in `mftworkorderprocess`; otherwise → look up the prior `蓝纸`/`制版` step). For each candidate prior step, joins to `opsoutsideprocessmaster`/`opsoutsideinstoreslave` to check outsourcing-receipt status, and to `mftproductionplanslave` to check `tMakeup` (ink-mixing done time). Composes a Chinese status fragment depending on what's missing. For the special `sType='1'` ink-prep case, formats `调墨OK(组)` or `组 专色待调`. **Invocation:** referenced by `Sp_Manufacture_GetAPSState` (the APS state-column builder used by 排产 gantt). Also referenced in xly-src `schedule/Sp_Manufacture_GetAPSstate.sql`. Companion of `GetPriorProcess`, `GetPriorProcessPlan`, and `GetNextMachine` — the family of upstream/downstream context functions for APS rows.