diff options
author | Anton Tananaev <anton@traccar.org> | 2023-02-03 14:19:38 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-02-03 14:19:38 -0800 |
commit | 5e690d9b586c191bc620260a2b7551d52f8d28a2 (patch) | |
tree | ea5c09375e8a71b524565849212ae110fc70293d /src/main/java/org | |
parent | 47c9d9fb21e897733f7aaa29bb5797036ccc4476 (diff) | |
download | trackermap-server-5e690d9b586c191bc620260a2b7551d52f8d28a2.tar.gz trackermap-server-5e690d9b586c191bc620260a2b7551d52f8d28a2.tar.bz2 trackermap-server-5e690d9b586c191bc620260a2b7551d52f8d28a2.zip |
Filter no location events
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/reports/CombinedReportProvider.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/reports/CombinedReportProvider.java b/src/main/java/org/traccar/reports/CombinedReportProvider.java index d47a91bef..afe146e91 100644 --- a/src/main/java/org/traccar/reports/CombinedReportProvider.java +++ b/src/main/java/org/traccar/reports/CombinedReportProvider.java @@ -63,10 +63,11 @@ public class CombinedReportProvider { new Condition.Equals("deviceId", device.getId()), new Condition.Between("eventTime", "from", from, "to", to)), new Order("eventTime"))); - item.setEvents(events); + item.setEvents(events.stream() + .filter(p -> p.getPositionId() > 0) + .collect(Collectors.toList())); var eventPositions = events.stream() .map(Event::getPositionId) - .filter(positionId -> positionId > 0) .collect(Collectors.toSet()); item.setPositions(positions.stream() .filter(p -> eventPositions.contains(p.getId())) |