修复跨月差额筛选重复计算导致页面缓慢 #508

Merged
yueyang merged 2 commits from fix/yueyang-performance-cross-month-fast-path into main 2026-10-24 17:49:30 +08:00
Collaborator

变更

  • 当“差额异常备注”只选择「差额=跨月收款(合并已对平)」时,直接使用 cross_month_balanced = 1,不再为每一行执行完整原因 CASE。
  • 该组合下“有/无差额”也直接使用默认差额,保证与跨月第一优先级口径等价。
  • 指标卡、筛选联动和导出共用同一快路径。

验证

  • 相关单元/页面测试:3 passed,13 assertions。
  • 本地同一页面首次汇总从约 49 秒降到约 11 秒。
  • 跨月核心汇总 SQL 约 2 秒(含 PHP 启动),259 条、差额合计 7,143.39。
  • 页面实际显示「业绩明细 → 费用明细 → 账单明细」。
## 变更 - 当“差额异常备注”只选择「差额=跨月收款(合并已对平)」时,直接使用 `cross_month_balanced = 1`,不再为每一行执行完整原因 CASE。 - 该组合下“有/无差额”也直接使用默认差额,保证与跨月第一优先级口径等价。 - 指标卡、筛选联动和导出共用同一快路径。 ## 验证 - 相关单元/页面测试:3 passed,13 assertions。 - 本地同一页面首次汇总从约 49 秒降到约 11 秒。 - 跨月核心汇总 SQL 约 2 秒(含 PHP 启动),259 条、差额合计 7,143.39。 - 页面实际显示「业绩明细 → 费用明细 → 账单明细」。
yueyang added 2 commits 2026-10-24 17:49:07 +08:00
yueyang merged commit c0287e0e26 into main 2026-10-24 17:49:30 +08:00
yueyang deleted branch fix/yueyang-performance-cross-month-fast-path 2026-10-24 17:49:30 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#508
No description provided.