Sp_costFrame_BtnEventDepartInto.md 1.68 KB

Sp_costFrame_BtnEventDepartInto (procedure)

导入部门费用分摊到工作中心单据

  • Type: PROCEDURE
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

# Mode Name Type
1 IN sProInParam varchar(10000)
2 IN sMakePerson varchar(100)
3 IN sBrId varchar(100)
4 IN sSuId varchar(100)
5 OUT sReturn varchar(1000)
6 OUT sCode int

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpcostFrame_BtnEventDepartInto'._

Narrative

Business context: 成本管理 → 部门费用分摊到工作中心单据 — "导入" (import) button-event handler. Pulls already-recorded department expense allocations into the work-centre cost-frame bill so the user can finish the second leg of the allocation chain (department → work-centre).

What it does: Validates the sProInParam JSON envelope (refuses with paramsErro when malformed), then walks the selected slave-ids. For each sId looks up its mftworkorder master/billno and the matching cost-period freeze flag (p_bFrozen)/work-order check flag, and INSERT INTO the work-centre cost-frame slave table by copying from the department-side allocation rows, incrementing p_iMaxiorder per row.

Invocation: Status: appears orphaned. No gdsmodule hook, gdsconfigformmaster reference, other-routine caller, or xly-src hit. Naming and signature match the sp_btn_action* dispatcher contract — intended as the "导入部门费用" button on the work-centre cost-frame screen — but the binding row is absent. Candidate for maintainer audit.