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 = {