Sp_saleschanceToSop_BtnEventDevelopBack.md 1.98 KB

Sp_saleschanceToSop_BtnEventDevelopBack (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 PROCEDURESpsaleschanceToSop_BtnEventDevelopBack'._

Narrative

Business context: 销售单据 / 商机机会 → 开发跟进 — toolbar-button handler that rolls a 商机机会产品 (sales-opportunity product line) back from "已开发" (developed) to the pre-development state, capturing a 退回原因 / 备注 in the process. Inverse of Sp_saleschanceToSop_BtnEventTodevelop.

What it does: Validates sProInParam (rejects with paramsErro via Sp_Sis_GetConst if too short). Parses $.changeValue.sDevelopBackMemo and the $.params[*].value[*].sSlaveId JSON array. For each slave id, UPDATE salsaleschanceproduct SET tDevelopDate=NULL, sDevelopPerson='', bDevelop=0, sDevelopMemo='', sDevelopBackMemo=<memo> WHERE sId=<sSlaveId> AND sBrandsId=sBrId AND sSubsidiaryId=sSuId — clearing the develop flag and timestamp, blanking the develop person and memo, and writing the user-supplied roll-back reason into sDevelopBackMemo.

Invocation: Dispatched dynamically by GenericProcedureCallServiceImpl.doGenericProcedureCall() (POST /procedureCall/doGenericProcedureCall) — the 退回开发 toolbar button on the 商机机会 / 开发跟进 grid names Sp_saleschanceToSop_BtnEventDevelopBack as the action. Companion procs: Sp_saleschanceToSop_BtnEventTodevelop (forward action, sets bDevelop=1), Sp_saleschanceToSop_BtnEventDistribution (assigns 业务类型). Install script: script/标版/30100101/Sp_saleschanceToSop_BtnEventDevelopBack.sql.