Sp_Check_sOis (procedure)
工序发外确认单据保存之前数据校验
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | sTableName |
varchar(100) |
| 2 | IN | sGuid |
varchar(100) |
| 3 | IN | sFormGuid |
varchar(100) |
| 4 | IN | sLoginId |
varchar(100) |
| 5 | IN | sBrId |
varchar(100) |
| 6 | IN | sSuId |
varchar(100) |
| 7 | IN | iFlag |
int |
| 8 | OUT | sCode |
int |
| 9 | OUT | sReturn |
varchar(4000) |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpCheck_sOis'._
Narrative
Business context: KPI流程操作菜单 → 发外加工流程 → 工序发外确认, 质量管理单据 → 工序发外确认单据 (mobile), and 移动端管理 → 现场 → 功能操作 → 发外报工(mobile单据) — post-save validator on opsoutsideinstoreslave. Recomputes per-line money/qty/tax fields against the chosen tax rate and the material's 正算/反算 formula so the slave totals match dMaterialsQty × dMaterialsPrice after price/quantity edits.
What it does: Reads NetMoney/NetPrice precision from SysSystemSettings, then opens a cursor over opsoutsideinstoreslave joined to elematerials (for bInverse, sReComputeId, sComputeId, sMaterialsName) and sistax (for dRate). For each row recomputes dMaterialsMoney/dMaterialsNoTaxMoney/dMaterialsTaxMoney/dAuxiliaryQty via the material's compute formula (forward or inverse), updates the slave with the rounded values, then aggregates the slave totals into the master.
Invocation: Bound to gdsmodule.sSaveProName (post-save) on 发外报工(mobile单据) (101251240115015952158106410, under 移动端管理 → 现场 → 功能操作), 工序发外确认 (192116810113315234275562360, under KPI流程操作菜单 → 发外加工流程), and 工序发外确认单据 (101251240115016182844497490, under 移动端管理 → 现场 → 功能操作). Dispatched by BusinessBaseServiceImpl.checkUpdate(..., "sSaveProName") after the save batch commits. xly-src ships script/标版/30100101/Sp_Check_sOis.sql as the install body.