# `Sp_PlanList_BtnEventMouldFinished` (procedure)

> @author:zhucx 
		     @date: 
				 @describe:


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProInParam` | `varchar(10000)` |
| 2 | IN | `sMakePerson` | `varchar(100)` |
| 3 | IN | `sBrId` | `varchar(100)` |
| 4 | IN | `sSuId` | `varchar(100)` |
| 5 | OUT | `sReturn` | `varchar(1000)` |
| 6 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 生产管理 → 计划、排程 → 计划列表 — toolbar button on the production-plan slave grid that flags 模具/覆膜 (mould / lamination) completion for the selected plan rows. Sister handlers: `Sp_PlanList_BtnEventInkingFinished` (印油), `Sp_PlanListCTP_BtnEventFinished` (出版), `Sp_PlanListMakeup_BtnEventFinished` (拼版).

**What it does:** Parses `$.params[*].value[*].sId` from `sProInParam` for the selected `mftproductionplanslave` rows and `UPDATE mftproductionplanslave SET bMould=1, tMouldDate=SYSDATE(), sMouldPerson=sMakePerson` for each. Validates `sProInParam` length; on bad input emits `sCode=-1` with the `paramsErro` message from `Sp_Sis_GetConst`. No accompanying cost/qty math — purely the mould-finished flag.

**Invocation:** Dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — the 模具完工 toolbar button on the 计划列表 grid names this proc. Install script: `script/标版/30100101/Sp_PlanList_BtnEventMouldFinished.sql`.
