From 39f89c30a2df1bc2b21d6946ec452d1973438071 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Thu, 2 Apr 2026 18:15:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=93=E5=AD=98=E7=BB=9F=E8=AE=A1(inv?= =?UTF-8?q?entory-stats/inventory-analysis)=E4=B8=8D=E8=AE=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90=EF=BC=8C=E5=AF=B9=E6=89=80=E6=9C=89?= =?UTF-8?q?=E4=BA=BA=E5=BC=80=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/server/routes/vehicles.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/routes/vehicles.ts b/src/server/routes/vehicles.ts index 73f8ae4..30d02d9 100644 --- a/src/server/routes/vehicles.ts +++ b/src/server/routes/vehicles.ts @@ -612,9 +612,9 @@ app.get('/by-batch', async (c) => { return c.json(result); }); -// GET /api/vehicles/inventory-analysis +// GET /api/vehicles/inventory-analysis — 库存分析,不设数据权限,对所有人开放 app.get('/inventory-analysis', async (c) => { - const vehicles = await getVehiclesForUser(c); + const vehicles = await getVehicles(); const typeFilters = [ { name: '4.5T普货', filter: (v: Vehicle) => v.type === '4.5T' && !v.model.includes('冷链') }, @@ -952,9 +952,9 @@ app.get('/list', async (c) => { ); }); -// GET /api/vehicles/inventory-stats — grouped inventory stats for the inventory statistics section +// GET /api/vehicles/inventory-stats — 库存统计,不设数据权限,对所有人开放 app.get('/inventory-stats', async (c) => { - const vehicles = await getVehiclesForUser(c); + const vehicles = await getVehicles(); const inventory = vehicles.filter((v) => v.status === 'Inventory' || v.status === 'Abnormal'); const TYPE_NAME_MAP: Record = {