feat(adminfinance): 新增预计收入指标并优化明细查询性能
- 财务看板增加预计收入与待结算订单数统计 - 明细列表 COUNT 改为仅扫描 rental_orders 主表,避免 5-JOIN 子查询 - 统一前后端结算差异判定阈值为常量 5 分 - 修复日期选择器使用 UTC 日期导致东八区凌晨偏移前一天的问题
This commit is contained in:
@@ -41,7 +41,7 @@ func (r financeDetailRow) toDTO() FinanceDetailDTO {
|
||||
if status == "" {
|
||||
status = "normal"
|
||||
}
|
||||
if absCent(diff) < 5 && status == "settlement_diff" {
|
||||
if absCent(diff) < settlementDiffThresholdCent && status == "settlement_diff" {
|
||||
status = "normal"
|
||||
}
|
||||
return FinanceDetailDTO{
|
||||
|
||||
Reference in New Issue
Block a user