# `Sp_Task_NetProfitSmallai` (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 PROCEDURE `Sp_Task_NetProfitSmallai`'`._

## Narrative

**Business context:** 小ai保驾护航 — scheduled push of the 企业净利分析报告 (enterprise net-profit digest). Member of the `Sp_Task_*` quartz-scheduled message family. Companion to `Sp_Task_PrintWorkshop3` which reuses the same body for a different scheduler slot.

**What it does:** Defaults `sBrId/sSuId/sCode`, sets `title='企业净利分析报告'`, reads `viw_corebusinessreport` for confirmed periods (`exists` on `accproductstore` where `sFormId='11811781131121915184849572550'` and `bConfirm=1`). Composes one row per `sConfirmMonth` with 利润总额, 主营业务收入, 主营外收入, 其他收益或损失, 制程/管理/销售/财务/研发 费用, 营业外支出, 税金及附加 — pushed into the shared `Sp_Task_doTestMsg` temp table for the message template.

**Invocation:** Dispatched by the Quartz scheduler — `QuartzTask` (xlyFlow) calls `TaskServiceImpl.doProOne()` which executes the procedure named in the scheduler-job config; `sendMsgDoNew(...)` then renders via the configured `sMestemplateId`. Install script `script/标版/30100101/Sp_Task_NetProfitSmallai.sql`; no `gdsmodule`/form-master binding.
