aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Stops.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/Stops.java')
-rw-r--r--src/org/traccar/reports/Stops.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/org/traccar/reports/Stops.java b/src/org/traccar/reports/Stops.java
index 886fd7915..ee6746e4e 100644
--- a/src/org/traccar/reports/Stops.java
+++ b/src/org/traccar/reports/Stops.java
@@ -55,8 +55,10 @@ public final class Stops {
return (Collection<StopReport>) result;
}
- public static Collection<StopReport> getObjects(long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
+ public static Collection<StopReport> getObjects(
+ long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Date from, Date to) throws SQLException {
+ ReportUtils.checkPeriodLimit(from, to);
ArrayList<StopReport> result = new ArrayList<>();
for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
@@ -65,9 +67,10 @@ public final class Stops {
return result;
}
- public static void getExcel(OutputStream outputStream,
- long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
+ public static void getExcel(
+ OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Date from, Date to) throws SQLException, IOException {
+ ReportUtils.checkPeriodLimit(from, to);
ArrayList<DeviceReport> devicesStops = new ArrayList<>();
ArrayList<String> sheetNames = new ArrayList<>();
for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {