feat: add vehicle mileage statistics

This commit is contained in:
lingniu
2026-07-14 13:18:52 +08:00
parent bb59303a4b
commit 6cddc0a43d
15 changed files with 522 additions and 1 deletions

View File

@@ -1064,6 +1064,36 @@ type MileageSummary struct {
AverageMileagePerVIN float64 `json:"averageMileagePerVin"`
}
type MileageTrendPoint struct {
Date string `json:"date"`
MileageKm float64 `json:"mileageKm"`
Vehicles int `json:"vehicles"`
}
type MileageVehicleRank struct {
VIN string `json:"vin"`
Plate string `json:"plate"`
MileageKm float64 `json:"mileageKm"`
LatestMileageKm float64 `json:"latestMileageKm"`
ActiveDays int `json:"activeDays"`
}
type MileageStatistics struct {
DateFrom string `json:"dateFrom"`
DateTo string `json:"dateTo"`
VehicleCount int `json:"vehicleCount"`
RecordCount int `json:"recordCount"`
SourceCount int `json:"sourceCount"`
PeriodMileageKm float64 `json:"periodMileageKm"`
FleetLatestMileageKm float64 `json:"fleetLatestMileageKm"`
AverageMileagePerVIN float64 `json:"averageMileagePerVin"`
AverageDailyMileageKm float64 `json:"averageDailyMileageKm"`
Trend []MileageTrendPoint `json:"trend"`
Ranking []MileageVehicleRank `json:"ranking"`
AsOf string `json:"asOf"`
Evidence string `json:"evidence"`
}
type OnlineStatisticsSummary struct {
VehicleCount int `json:"vehicleCount"`
OnlineVehicleCount int `json:"onlineVehicleCount"`