From 2626bf2aa795281d5aa7a3ac5be90c544b658f13 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Sat, 28 Mar 2026 23:11:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=93=E5=AD=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8F=A3=E5=BE=84=E7=BB=9F=E4=B8=80=E5=8C=85=E5=90=ABInventory?= =?UTF-8?q?+Abnormal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit inventory-stats端点只过滤status=Inventory,但/list的category=Inventory 包含Inventory+Abnormal,导致统计数和下钻列表不一致。统一为两者都包含。 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/server/routes/vehicles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/routes/vehicles.ts b/src/server/routes/vehicles.ts index b64b969..36a3a00 100644 --- a/src/server/routes/vehicles.ts +++ b/src/server/routes/vehicles.ts @@ -951,7 +951,7 @@ app.get('/list', async (c) => { // GET /api/vehicles/inventory-stats — grouped inventory stats for the inventory statistics section app.get('/inventory-stats', async (c) => { const vehicles = await getVehicles(); - const inventory = vehicles.filter((v) => v.status === 'Inventory'); + const inventory = vehicles.filter((v) => v.status === 'Inventory' || v.status === 'Abnormal'); const TYPE_NAME_MAP: Record = { t4_5: '4.5T普货',