PRO_ERPMERGEBASESISSALESMAN.md 1.28 KB

PRO_ERPMERGEBASESISSALESMAN (procedure)

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

Parameters

# Mode Name Type
1 IN sSisSalesManId varchar(100)

Body

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

Narrative

Business context: Base data — 业务员 (Salesman). When a salesman row in SISSALESMAN is renamed, this proc pushes the new sName onto every historical row of the work-order and sales-order merge-reporting tables that references this salesman, so commission and sales reports keep showing the current name.

What it does: reads sName from SISSALESMAN for the given id, then UPDATEs sSalesManName on ERPMERGEWORKORDER and ERPMERGESALSALESORDER rows whose sSalesManId = sSisSalesManId.

Invocation: member of the PRO_ERPMERGEBASE* denorm-merge family. Called by ProDao.proErpMergeBaseSisSalesMan(map) via MyBatis CALLABLE mapper ProMapper.xml, driven from ChangeSisSalesManServiceImpl.changeTableData() after the JMS CHANGE_GDS_MODULE consumer detects a SISSALESMAN row mutation. See Cache invalidation on metadata change.