This commit is contained in:
xman 2025-07-09 16:07:46 +08:00
parent 58160b8f8c
commit 5d8d615302

View File

@ -143,7 +143,7 @@ class Dispatcher extends Backend
"IFNULL(SUM(CASE WHEN status = 60 THEN performance END), 0) AS performance", //业绩
"IFNULL(SUM(CASE WHEN status = 60 THEN (cost + material_cost) END), 0) AS cost_total", //总成本
"IFNULL(SUM(CASE WHEN status = 60 THEN (refund_amount + worker_refund_amount) END), 0) AS refund_total", //退款总数
"IFNULL(COUNT(CASE WHEN refund_amount > 0 OR worker_refund_amount > 0 THEN 1 END), 0) AS refund_count", //退款订单数量
"IFNULL(COUNT(CASE WHEN status = 60 AND (refund_amount > 0 OR worker_refund_amount > 0) THEN 1 END), 0) AS refund_count", //退款订单数量
"IFNULL(AVG(CASE WHEN status = 60 THEN UNIX_TIMESTAMP(dispatch_time) - UNIX_TIMESTAMP(create_time) END), 0) AS avg_time_diff", //派单时效
// "SUM(CASE WHEN status = 60 THEN (field1 + field2) END) AS performance",
];