Sp_Calc_sBis (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 PROCEDURESpCalc_sBis'._
Narrative
Business context: 工艺变更单 — alternative check / uncheck handler on mftprocesschangemaster. Same master table as Sp_Calc_sBgd but posts the change cost back into 报价单 and 质量事故 totals (dSReserve3) rather than into the work-order BOM.
What it does: Validates sGuid. With iFlag=1: refuses if already checked; sets master bCheck=1, sStatus=1, sCheckPerson=sLoginId, tCheckDate=tCheckTime. Then sums mftprocesschangematerials.dMaterialsMoney and mftprocesschangeprocess.dProcessMoney grouped by sSrcId, joining onto quoquotationslave A (matched by sParentId=sSrcId) to bump A.dSReserve3 by the change cost. Body fragment then continues to update mftqualityaccidentMaster similarly. Uncheck path (iFlag=0) reverses.
Invocation: Status: appears orphaned. No gdsmodule hook, no form-master, no other procedure caller, no xly-src reference. Sibling proc Sp_Calc_sBgd is bound to the 工艺变更单 module; this Sp_Calc_sBis variant exists alongside it but is unwired. Candidate for maintainer audit — likely a quotation-flavoured fork of the same audit kept for legacy/future toggle.