diff options
author | Anton Tananaev <anton@traccar.org> | 2023-02-03 14:50:02 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-02-03 14:50:02 -0800 |
commit | 74008e1053d49b407eb8eb44d7d60537bdf22047 (patch) | |
tree | d695bd7bf132a33f14ca2e3ba1c52afde6af1459 /src/main/java | |
parent | 7f7e5a5d479e58e83c8f0f5b81e230f1ed460478 (diff) | |
download | trackermap-server-74008e1053d49b407eb8eb44d7d60537bdf22047.tar.gz trackermap-server-74008e1053d49b407eb8eb44d7d60537bdf22047.tar.bz2 trackermap-server-74008e1053d49b407eb8eb44d7d60537bdf22047.zip |
Exclude event types
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/reports/CombinedReportProvider.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/reports/CombinedReportProvider.java b/src/main/java/org/traccar/reports/CombinedReportProvider.java index afe146e91..923fd12b4 100644 --- a/src/main/java/org/traccar/reports/CombinedReportProvider.java +++ b/src/main/java/org/traccar/reports/CombinedReportProvider.java @@ -31,10 +31,13 @@ import javax.inject.Inject; import java.util.ArrayList; import java.util.Collection; import java.util.Date; +import java.util.Set; import java.util.stream.Collectors; public class CombinedReportProvider { + private static final Set<String> EXCLUDE_TYPES = Set.of(Event.TYPE_DEVICE_MOVING); + private final ReportUtils reportUtils; private final Storage storage; @@ -64,7 +67,7 @@ public class CombinedReportProvider { new Condition.Between("eventTime", "from", from, "to", to)), new Order("eventTime"))); item.setEvents(events.stream() - .filter(p -> p.getPositionId() > 0) + .filter(e -> e.getPositionId() > 0 && !EXCLUDE_TYPES.contains(e.getType())) .collect(Collectors.toList())); var eventPositions = events.stream() .map(Event::getPositionId) |