@
feat: shadcn主题 + 文件关系追踪 + 处理流程修复 前端: - 全站应用 shadcn/ui 主题 (zinc灰调, Inter字体, 1px细边框, 无硬阴影) - 重写 global.css / Dashboard.vue / Login.vue / Layout.vue 样式 - 新增文件处理子页面: 采购单(Orders), 表格处理(Tables), 图片处理(Images) - 侧边栏使用 el-sub-menu 组织文件处理导航 后端: - 新增 file_relations 表追踪 input→output→result 链路 - 新增 /files/relations, /files/stats/detailed 等关系查询API - 新增 ocr-single, excel-single, pipeline-single, merge-batch 端点 - 处理流程增加跳过逻辑 (已处理文件自动跳过) - 全流程不再自动合并, 合并仅在采购单页面手动触发 Bug修复: - TaskManager: asyncio.create_task 在线程池中无事件循环 → 改用 _schedule() 调度 - PurchaseOrderMerger 缺少 config 参数 → 传入 ConfigManager() - FastAPI regex= 弃用 → 改为 pattern= - merger.process() 接收 Path 对象 → 转为字符串 @
This commit is contained in:
+4
-1
@@ -42,10 +42,13 @@ async def lifespan(app: FastAPI):
|
||||
ConfigManager()
|
||||
|
||||
# Initialize DB and cleanup old records
|
||||
from .services.db_schema import init_db, cleanup_old_records
|
||||
from .services.db_schema import init_db, cleanup_old_records, sync_file_relations
|
||||
init_db()
|
||||
cleanup_old_records()
|
||||
|
||||
# Sync file relations from existing files
|
||||
sync_file_relations()
|
||||
|
||||
# Wire up DB pool to task manager
|
||||
task_manager.set_db_pool(db_pool)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user