feat: 新增预算费控模型与报销审批流引擎

后端新增预算费控服务和报销单审批流模块,引入申请人费用画像
算法,优化知识库 RAG 运行时和同步逻辑,完善报销单工作流常
量和明细同步,更新差旅报销规则电子表格,前端新增预算分析
组件和数字员工模型,完善审批对话框和洞察面板交互,优化侧
边栏和顶栏样式,补充单元测试。
This commit is contained in:
caoxiaozhu
2026-05-27 17:31:27 +08:00
parent cbb98f4469
commit d4d5d40569
75 changed files with 5393 additions and 686 deletions

View File

@@ -602,7 +602,15 @@ class KnowledgeService:
status_payload = status_map.get(document_id) or {}
rag_status = str(status_payload.get("status") or "").strip().lower()
linked_run_status = resolve_linked_ingest_run_status(entry, db=self.db)
if linked_run_status == AgentRunStatus.FAILED.value and rag_status in {
if not status_payload:
if (
current_status == KNOWLEDGE_INGEST_STATUS_SYNCING
and linked_run_status == AgentRunStatus.FAILED.value
):
desired_status = KNOWLEDGE_INGEST_STATUS_FAILED
else:
continue
elif linked_run_status == AgentRunStatus.FAILED.value and rag_status in {
"pending",
"processing",
"preprocessed",