aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/reports/EventsReportProvider.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/reports/EventsReportProvider.java b/src/main/java/org/traccar/reports/EventsReportProvider.java
index c4b0aad86..9b4a7df2b 100644
--- a/src/main/java/org/traccar/reports/EventsReportProvider.java
+++ b/src/main/java/org/traccar/reports/EventsReportProvider.java
@@ -38,11 +38,19 @@ import org.traccar.reports.model.DeviceReportSection;
import org.traccar.storage.Storage;
import org.traccar.storage.StorageException;
+import javax.inject.Inject;
+
public class EventsReportProvider {
+ private final Storage storage;
+
+ @Inject
+ public EventsReportProvider(Storage storage) {
+ this.storage = storage;
+ }
+
public Collection<Event> getObjects(
- Storage storage, long userId,
- Collection<Long> deviceIds, Collection<Long> groupIds,
+ long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Collection<String> types, Date from, Date to) throws StorageException {
ReportUtils.checkPeriodLimit(from, to);
ArrayList<Event> result = new ArrayList<>();
@@ -66,8 +74,7 @@ public class EventsReportProvider {
}
public void getExcel(
- OutputStream outputStream, Storage storage, long userId,
- Collection<Long> deviceIds, Collection<Long> groupIds,
+ OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Collection<String> types, Date from, Date to) throws StorageException, IOException {
ReportUtils.checkPeriodLimit(from, to);
ArrayList<DeviceReportSection> devicesEvents = new ArrayList<>();