refactor: simplify jt808 daily mileage strategy
This commit is contained in:
@@ -337,23 +337,18 @@ Validation:
|
||||
|
||||
### Daily Mileage
|
||||
|
||||
Preferred:
|
||||
|
||||
```text
|
||||
dailyMileage = today.lastTotalMileage - previousDay.lastTotalMileage
|
||||
```
|
||||
|
||||
Fallback:
|
||||
JT808 daily mileage uses the GPS total mileage reported in location additional
|
||||
information. The first valid sample of the local day is the baseline and the
|
||||
latest valid total mileage rewrites the same metric row.
|
||||
|
||||
```text
|
||||
dailyMileage = today.lastTotalMileage - today.firstTotalMileage
|
||||
calculationMethod = JT808_TOTAL_MILEAGE_DIFF
|
||||
```
|
||||
|
||||
Quality:
|
||||
|
||||
- `PREVIOUS_DAY_BASELINE` when previous day baseline exists;
|
||||
- `INTRADAY_DELTA` when only same-day baseline exists;
|
||||
- `INSUFFICIENT_DATA` when neither is reliable.
|
||||
The result is stored in `vehicle_stat_metric` with
|
||||
`metric_key=daily_mileage_km`. There is no JT808-specific daily mileage table,
|
||||
no Redis mileage state, and no previous-day baseline calculation.
|
||||
|
||||
### Daily Power Consumption
|
||||
|
||||
|
||||
Reference in New Issue
Block a user