diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-07-18 09:26:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 09:26:27 -0700 |
commit | 509d26db7efafe965f5cc6e1a1fba6b30e9556cf (patch) | |
tree | a24039c2610bcb59f0af18b6e534787828185abd /src/main/java/org/traccar/reports | |
parent | bba38f9078a1c1455730daf80d76587cf21228cc (diff) | |
parent | f4bef0008fc6b2562a29017e6eb4272734943311 (diff) | |
download | traccar-server-509d26db7efafe965f5cc6e1a1fba6b30e9556cf.tar.gz traccar-server-509d26db7efafe965f5cc6e1a1fba6b30e9556cf.tar.bz2 traccar-server-509d26db7efafe965f5cc6e1a1fba6b30e9556cf.zip |
Merge pull request #4357 from edvalley/proposed2
Make optional server attributes lookup
Diffstat (limited to 'src/main/java/org/traccar/reports')
-rw-r--r-- | src/main/java/org/traccar/reports/Stops.java | 2 | ||||
-rw-r--r-- | src/main/java/org/traccar/reports/Summary.java | 2 | ||||
-rw-r--r-- | src/main/java/org/traccar/reports/Trips.java | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/reports/Stops.java b/src/main/java/org/traccar/reports/Stops.java index 98c9cef00..2036b0641 100644 --- a/src/main/java/org/traccar/reports/Stops.java +++ b/src/main/java/org/traccar/reports/Stops.java @@ -43,7 +43,7 @@ public final class Stops { private static Collection<StopReport> detectStops(long deviceId, Date from, Date to) throws SQLException { boolean ignoreOdometer = Context.getDeviceManager() - .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true); + .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, false, true); IdentityManager identityManager = Main.getInjector().getInstance(IdentityManager.class); DeviceManager deviceManager = Main.getInjector().getInstance(DeviceManager.class); diff --git a/src/main/java/org/traccar/reports/Summary.java b/src/main/java/org/traccar/reports/Summary.java index 9810424d8..6d179a873 100644 --- a/src/main/java/org/traccar/reports/Summary.java +++ b/src/main/java/org/traccar/reports/Summary.java @@ -61,7 +61,7 @@ public final class Summary { result.setMaxSpeed(position.getSpeed()); } boolean ignoreOdometer = Context.getDeviceManager() - .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true); + .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, false, true); result.setDistance(ReportUtils.calculateDistance(firstPosition, previousPosition, !ignoreOdometer)); result.setAverageSpeed(speedSum / positions.size()); result.setSpentFuel(ReportUtils.calculateFuel(firstPosition, previousPosition)); diff --git a/src/main/java/org/traccar/reports/Trips.java b/src/main/java/org/traccar/reports/Trips.java index 3cda65553..7c0cd6921 100644 --- a/src/main/java/org/traccar/reports/Trips.java +++ b/src/main/java/org/traccar/reports/Trips.java @@ -42,7 +42,7 @@ public final class Trips { private static Collection<TripReport> detectTrips(long deviceId, Date from, Date to) throws SQLException { boolean ignoreOdometer = Context.getDeviceManager() - .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true); + .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, false, true); IdentityManager identityManager = Main.getInjector().getInstance(IdentityManager.class); DeviceManager deviceManager = Main.getInjector().getInstance(DeviceManager.class); |