Sp_Task_doSalesPlanImplementationMsg (procedure)
小ai保驾护航-销售任务达标分析报告
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | OUT | cardTitle |
varchar(255) |
| 2 | OUT | title |
varchar(255) |
| 3 | OUT | sAbstract |
varchar(255) |
| 4 | OUT | cardDate |
varchar(255) |
| 5 | OUT | itemMemo |
varchar(255) |
| 6 | OUT | sCode |
int |
| 7 | OUT | sReturn |
longtext |
| 8 | OUT | sUserList |
longtext |
| 9 | OUT | sUserData |
longtext |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpTask_doSalesPlanImplementationMsg'._
Narrative
Business context: 小ai保驾护航 — scheduled push of the 销售任务达标分析报告 (sales-target attainment digest). Member of the Sp_Task_* quartz-scheduled message family; companion to Sp_Task_doTestMsg (same skeleton, sales-plan-specific aggregation).
What it does: Defaults sBrId/sSuId/sCode, sets title='销售任务达标分析报告', runs a long sequence of Select Sum(A.dProductMoney)/10000 Into p_dProduct* queries from viw_salsalesorder join sissalesman + elecustomer to break the day / week / month / year sales by 新/老客户 (sCustomerProperty). Builds the day-vs-target ratio plus per-bucket card items in the Sp_Task_doTestMsg temp table for the message template to render.
Invocation: Dispatched by the Quartz scheduler — QuartzTask (xlyFlow) calls TaskServiceImpl.doProOne() which executes the procedure named in the scheduler-job config, then sendMsgDoNew(...) pipes the OUT params + result set to the configured sMestemplateId. Install script script/标版/30100101/Sp_Task_doSalesPlanImplementationMsg.sql; no gdsmodule/form-master binding.