# `Sp_Calc_sSdfu` (procedure)

> 商机跟进


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `iFlag` | `int` |
| 2 | IN | `iTmpCheck` | `int` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sGuid` | `varchar(100)` |
| 5 | IN | `sLoginId` | `varchar(100)` |
| 6 | OUT | `sReturn` | `varchar(5000)` |
| 7 | IN | `sBrId` | `varchar(100)` |
| 8 | IN | `sSuId` | `varchar(100)` |
| 9 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 销售管理 → 开发跟进 / 印前任务跟进 (development follow-up / prepress task follow-up — `salsalesdevfollowupmaster`) audit / un-audit. The follow-up bill records progress against a development-plan slave (`salsalesdevplanslave`), and on audit writes the followed-up qty back to the plan and any linked sales-order slave.

**What it does:** Validates `sGuid`/`bInvalid`, then on `iFlag=1` sets `bCheck=1`, `sCheckPerson`, `tCheckDate` on `salsalesdevfollowupmaster`, and writes back: `UPDATE salsalesdevplanslave` (mark follow-up qty) and `UPDATE salsalesorderslave` when the plan slave references a sales-order line. `iFlag=0` rolls all of that back. Reads `salsalesdevplanmaster`/`salsalesorderslave` for context, no KPI / flow-check side-effects.

**Invocation:** Bound to `gdsmodule.sProcName` on:
- `开发跟进` (sId `101251240115016045486980270`) — 销售机会 / 开发管理
- `印前任务跟进` (sId `101251240115016054412953830`)

Dispatched by `BusinessBaseServiceImpl.getPrcName(sFormGuid, …)` on the 审核/反审核 button — the `Sp_Calc_s<Code>` slot.
