# `Sp_Task_PrintWorkshop3` (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_PrintWorkshop3`'`._

## Narrative

**Business context:** 小ai保驾护航 — scheduled push of the 企业净利分析报告 (net-profit digest). Member of the `Sp_Task_*` quartz-scheduled message family. Body is essentially identical to `Sp_Task_NetProfitSmallai` (same `viw_corebusinessreport` aggregation) — the `PrintWorkshop3` name appears to be a misnamed/re-slotted copy used as a third workshop scheduler job; review for de-duplication.

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

**Invocation:** Dispatched by the Quartz scheduler — `QuartzTask`/`TaskServiceImpl.doProOne()` runs whichever `Sp_Task_*` the scheduler-job config names; `sendMsgDoNew(...)` renders via the configured `sMestemplateId`. No `gdsmodule`/form-master binding; not in xly-src 30100101 install scripts — DB-only.
