feat: 添加仪表板路由和响应数据脱敏功能

- 添加了仪表板模块路由并集成到主路由器中
- 实现了敏感数据响应脱敏配置和功能
- 增加了 Feishu 审批卡片操作处理功能
- 支持通过任务队列异步推送日常简报和项目周报
- 添加了风险事件生成的任务队列支持
- 在 smoke 测试中增加了相关功能验证

refactor: 格式化模型注册模块导入列表

- 将单行导入列表改为多行格式以提高可读性
```
This commit is contained in:
2026-07-07 18:33:07 +08:00
parent fbd0aaa9e4
commit 4d09d8e2e3
21 changed files with 641 additions and 25 deletions

View File

@@ -15,6 +15,7 @@ def attach_scheduler(app: FastAPI) -> None:
from apscheduler.schedulers.background import BackgroundScheduler
from app.core.database import SessionLocal
from app.core.task_queue import enqueue_daily_brief_push, enqueue_project_weekly_push
from app.modules.reports.service import ReportService
scheduler = BackgroundScheduler(timezone="Asia/Shanghai")
@@ -29,6 +30,13 @@ def attach_scheduler(app: FastAPI) -> None:
and settings.feishu_app_secret
and settings.feishu_default_chat_id
):
if settings.task_queue_enabled:
app.state.last_daily_brief_dispatch = enqueue_daily_brief_push(
receive_id=settings.feishu_default_chat_id,
receive_id_type=FeishuReceiveIdType.CHAT_ID,
actor=ActorValue.SCHEDULER,
)
return
ReportService(db).push_report(
report,
receive_id=settings.feishu_default_chat_id,
@@ -48,6 +56,13 @@ def attach_scheduler(app: FastAPI) -> None:
and settings.feishu_app_secret
and settings.feishu_default_chat_id
):
if settings.task_queue_enabled:
app.state.last_project_weekly_dispatch = enqueue_project_weekly_push(
receive_id=settings.feishu_default_chat_id,
receive_id_type=FeishuReceiveIdType.CHAT_ID,
actor=ActorValue.SCHEDULER,
)
return
ReportService(db).push_report(
report,
receive_id=settings.feishu_default_chat_id,