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:
kkfluous
2026-04-16 20:52:16 +08:00
parent 033af15814
commit ec3b079311

View File

@@ -179,6 +179,11 @@ app.get('/', async (c) => {
const plate = row.plate_number as string;
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 truckType = truckTypeMap.get(plate);