fix: 库存统计口径统一包含Inventory+Abnormal
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
inventory-stats端点只过滤status=Inventory,但/list的category=Inventory 包含Inventory+Abnormal,导致统计数和下钻列表不一致。统一为两者都包含。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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<string, string> = {
|
||||
t4_5: '4.5T普货',
|
||||
|
||||
Reference in New Issue
Block a user