From 0b694d8f2079e46c254b1def41ca774ae8ec8b36 Mon Sep 17 00:00:00 2001 From: lzq Date: Fri, 29 Aug 2025 16:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=95=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml b/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml index e939e3a..2241ca5 100644 --- a/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml +++ b/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml @@ -142,7 +142,7 @@ SELECT MAX(IF(order_status = '已完成', order_count, 0)) completed, MAX(IF(order_status = '已取消', order_count, 0)) cancelled, MAX(IF(order_status = '已预约', order_count, 0)) waiting, - MAX(IF(order_status = '已完成', order_count, 0)) + MAX(IF(order_status = '已取消', order_count, 0)) + MAX(IF(order_status = '已预约', order_count, 0)) total + MAX(IF(order_status = '已完成', order_count, 0)) + MAX(IF(order_status = '已取消', order_count, 0)) + MAX(IF(order_status = '已预约', order_count, 0)) + MAX(IF(order_status = '待看料', order_count, 0)) + MAX(IF(order_status = '待出场', order_count, 0)) total FROM (SELECT order_status, COUNT(*) order_count FROM (SELECT IF(a.status = 1, '已完成', IF(a.status = 4, '已取消', IF(a.car_status = 0, '已预约', IF(a.car_status = 1 AND a.admin_status = 0, '待看料', '待出场')))) order_status FROM ba_order a