# `Sp_Task_TodayWorkRateProgressSmallai` (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_TodayWorkRateProgressSmallai`'`._

## Narrative

**Business context:** 小ai保驾护航 — scheduled push of the 各部门当日工作执行情况 (per-department daily KPI-backlog digest). Member of the `Sp_Task_*` quartz-scheduled message family.

**What it does:** Defaults `sBrId/sSuId/sCode`, sets `title='各部门当日工作执行情况'`. Reads `kpimodule` for `Sum(sToDayNum)` (today未处理) and `Sum(sTobeDone)` (未清总数), composes `cardTitle` ("截止今日有 X 件事未处理,未清总数：Y"). Then joins `kpimodule A` to `gdsmodule B` on `A.sModelId=B.sId`, groups by `sChineseDepart`, inserts per-department rows into `Sp_Task_doTestMsg`.

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