feat: 报销审批流重构与管家计划全链路贯通
- 重构报销状态注册表、审批流路由与平台风险标记 - 完善管家意图规划器与模型计划构建器全链路 - 新增 OCR Worker 脚本、数据库会话管理与通知状态 - 优化文档中心、日志视图、预算中心与员工管理交互 - 增强工作台摘要、图标资源与全局主题样式 - 补充审批路由、状态注册、OCR 服务与管家规划器测试覆盖
This commit is contained in:
@@ -24,6 +24,7 @@ from app.services.document_numbering import (
|
||||
)
|
||||
from app.services.user_agent_application_dates import (
|
||||
expand_application_time_with_days,
|
||||
resolve_application_date_range,
|
||||
resolve_application_days_from_time_range,
|
||||
)
|
||||
from app.services.user_agent_application_locations import normalize_application_location
|
||||
@@ -1143,8 +1144,19 @@ class UserAgentApplicationMixin:
|
||||
facts: dict[str, str],
|
||||
occurred_at: datetime,
|
||||
) -> bool:
|
||||
current_range = resolve_application_date_range(facts.get("time", ""))
|
||||
current_time = cls._normalize_application_time_identity(facts.get("time"))
|
||||
existing_detail = cls._extract_application_detail_from_claim(claim)
|
||||
existing_range = resolve_application_date_range(existing_detail.get("time"))
|
||||
if existing_range is None and claim.occurred_at is not None:
|
||||
existing_day = claim.occurred_at.date()
|
||||
existing_range = (existing_day, existing_day)
|
||||
if current_range is None and occurred_at is not None:
|
||||
current_day = occurred_at.date()
|
||||
current_range = (current_day, current_day)
|
||||
if current_range is not None and existing_range is not None:
|
||||
return current_range[0] <= existing_range[1] and existing_range[0] <= current_range[1]
|
||||
|
||||
existing_time = cls._normalize_application_time_identity(existing_detail.get("time"))
|
||||
if current_time and existing_time:
|
||||
return current_time == existing_time
|
||||
|
||||
Reference in New Issue
Block a user