fix(scheduling): only suggest replacements for rented/operated vehicles
Filter enriched vehicles to only include rent_status = '租赁' or '自营'. Inventory candidates already filtered by truck_rent_status = 0 (在库). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,11 @@ app.get('/', async (c) => {
|
|||||||
|
|
||||||
const plate = row.plate_number as string;
|
const plate = row.plate_number as string;
|
||||||
const info = vehicleInfoMap.get(plate);
|
const info = vehicleInfoMap.get(plate);
|
||||||
|
|
||||||
|
// Only include vehicles that are actively rented/operated (租赁 or 自营)
|
||||||
|
const rentStatus = info?.rent_status || '';
|
||||||
|
if (rentStatus !== '租赁' && rentStatus !== '自营') continue;
|
||||||
|
|
||||||
const loc = locationMap.get(plate);
|
const loc = locationMap.get(plate);
|
||||||
const truckType = truckTypeMap.get(plate);
|
const truckType = truckTypeMap.get(plate);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user