# `Sp_Task_PrintWorkshop1` (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` |
| 10 | OUT | `sUrl` | `varchar(255)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Task_PrintWorkshop1`'`._

## Narrative

**Business context:** 小ai任务自动派送 — scheduled push of the 印刷车间员工生产日报 (print-workshop daily production digest, by-employee angle). Member of the `Sp_Task_*` quartz-scheduled message family; the extra `sUrl` OUT param links to the 印刷车间分析 BI bigscreen.

**What it does:** Defaults `sBrId/sSuId/sCode`, sets `title='印刷车间员工生产日报'` and `sUrl` to the YSCJFX BI report URL. Computes yesterday's 07:30-to-today 07:30 shift window into `p_tStartDate/p_tEndDate`, builds `Tmp_Report` keyed by machine+team with 印版付数 (`dPlateQty`), 实际产量 (`dProcessQty`), 单付产出 (`dOutQty`), 单付小时产出 (`dOutHourQty`), 工单数, 开机/异常 小时 and 异常占比. Emits the rows through `Sp_Task_doTestMsg` for the template; resolves the recipient list dynamically via `sftlogininfo` `sUserName IN ('杨恒林','曹建英')` (note: hard-coded; this is the demo/客户-deploy seed).

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