# `Sp_mftworkorder_Btncustomerconfirm` (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_mftworkorder_Btncustomerconfirm`'`._

## Narrative

**Business context:** 生产管理 → 生产工单 — toolbar 客户确认 (customer-confirm) action on a single work-order line. Used in flows where the customer must sign off proof rows after the 业务确认 (`Sp_mftworkorder_BtnServiceconfirm`) step has completed. Marks the master complete when the last line is confirmed.

**What it does:** Parses `$.params[*].value[*].sSlaveId` from `sProInParam`. For each line id, `UPDATE mftworkorderslave a JOIN mftworkordermaster b ON a.sParentId=b.sId SET a.bCustomerStatus = 1, a.tCustomerStatus = SYSDATE(), a.sCustomerStatus = sMakePerson, b.bCustomerSureComplete = 1 WHERE a.sId = p_sId AND a.sBrandsId = sBrId AND a.sSubsidiaryId = sSuId`. Note: the master's `bCustomerSureComplete` is set to 1 on every line click — a latching summary flag.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — the 客户确认 button on the 生产工单 line grid names `Sp_mftworkorder_Btncustomerconfirm` as the action. Inverse: `Sp_mftworkorder_BtnReturncustomerconfirm`. Companion: `Sp_mftworkorder_BtnServiceconfirm` (业务确认).
