# `Sp_ProductionReport_BtnEventConfirm` (procedure)


- **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_ProductionReport_BtnEventConfirm`'`._

## Narrative

**Business context:** 移动端管理 → 现场 → 功能操作 → 内部报工 (and 发外报工) — "确认" (confirm) toolbar handler that signs off a production-report slave row. Stamps `bConfirm=1`, `tConfirmDate`, and `sConfirmPerson` on both the work-order process row and the matching production-plan slave row so downstream reports treat the data as supervisor-approved.

**What it does:** Walks `sProInParam.params[*].value[*].sSlaveId`. For each `p_sId`: `Update mftworkorderprocess P INNER JOIN mftproductionplanslave S ON P.sId=S.sSrcSlaveId SET P.bConfirm=1, P.tConfirmDate=NOW(), P.sConfirmPerson=sMakePerson, S.bConfirm=1, S.tConfirmDate=NOW(), S.sConfirmPerson=sMakePerson WHERE S.sId=p_sId AND tenant matches`, then a follow-up `Update mftproductionplanslave SET bConfirm=1, tConfirmDate=NOW(), sConfirmPerson=sMakePerson WHERE sId=p_sId` to cover the case where no `mftworkorderprocess` join row exists.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — 报工 form's "确认" button. No xly-src install file found. Companion: `Sp_ProductionReport_BtnEventComplete` (force-complete on the same form).
