# `Sp_UpdateAdd_Check_NEW` (procedure)

> 修改,删除校验


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sGuids` | `varchar(255)` |
| 2 | IN | `sTableName` | `varchar(255)` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sLoginId` | `varchar(255)` |
| 5 | IN | `sBrId` | `varchar(255)` |
| 6 | IN | `sSuId` | `varchar(255)` |
| 7 | IN | `sType` | `varchar(255)` |
| 8 | IN | `iFlag` | `int` |
| 9 | OUT | `sCode` | `int` |
| 10 | OUT | `sReturn` | `varchar(255)` |

## Body

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

## Narrative

**Business context:** Newer/development variant of `Sp_UpdateAdd_Check` (修改,删除校验). Same signature and intent — the BACK-side save/delete pre-check — but the default `sType` is `'check'` rather than `'SaleTrial'`, the whitelist-form short-circuits are gone, and the `sysmsg` branch is the only non-`gds` early-out before delegating to `Sp_GetMasterSlave`.

**What it does:** Mirror of `Sp_UpdateAdd_Check` — resolves master/slave table names via `Sp_GetMasterSlave`, sets `sCode=1`/`sReturn=''` on success or `sCode=-1` with a localised message from `Sp_Sis_GetConst('paramsErro', …)` when inputs are missing. Designed to call the same downstream check routines but with the trimmed pre-conditions.

**Invocation:** Status: appears orphaned. No caller found in any channel — not in `BusinessCheckServiceImpl`/`BusinessBaseServiceImpl` (which both call the unsuffixed name), no form-master, no gdsmodule hook, no other proc references it, no xly-src grep hit. The `_NEW` suffix and reduced whitelist suggest this is a half-finished refactor of `Sp_UpdateAdd_Check`. Candidate for maintainer audit.
