Sp_Calc_sMsy (procedure)
@author:zhucx @date:2021.12.12 @describe: 1.PC端-采购管理-采购询价-保存自动调用本过程,当系统设定中本单据为自动审核时
- 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(4000) |
| 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_sMsy'._
Narrative
Business context: 采购管理 → 采购单据 → 采购询价单 — purchase RFQ (price-inquiry) audit / un-audit. Per the proc header, this runs automatically on save when the form is configured for auto-audit. Auditing an RFQ promotes the negotiated supplier prices into the live material-supply pricing on elematerialssupply, so downstream PO creation picks them up.
What it does: Defaults the IN params, branches on iFlag. The only data touch is Update elematerialssupply — back-writing the RFQ-line prices/lead-times onto the per-supplier material-supply rows. iFlag=0 reverses the same column writes.
Invocation: Bound to gdsmodule.sProcName on 采购询价单 (sId 19211681019715693170550680) under 采购管理 → 采购单据. Dispatched by Java BusinessBaseServiceImpl.getPrcName(sFormGuid, …) either on the 审核 button or — per the header — automatically by the save handler when 系统设定 marks 采购询价单 as auto-audit. xly-src ships script/标版/30100101/Sp_Calc_sMsy.sql and script/标版/optimize/Sp_Calc_sMsy.sql.