diff options
Diffstat (limited to 'src/org/traccar/reports')
-rw-r--r-- | src/org/traccar/reports/Events.java | 5 | ||||
-rw-r--r-- | src/org/traccar/reports/Route.java | 5 | ||||
-rw-r--r-- | src/org/traccar/reports/Summary.java | 5 | ||||
-rw-r--r-- | src/org/traccar/reports/Trips.java | 5 |
4 files changed, 4 insertions, 16 deletions
diff --git a/src/org/traccar/reports/Events.java b/src/org/traccar/reports/Events.java index ada1580d9..33893aad0 100644 --- a/src/org/traccar/reports/Events.java +++ b/src/org/traccar/reports/Events.java @@ -37,7 +37,6 @@ import org.jxls.transform.Transformer; import org.jxls.transform.poi.PoiTransformer; import org.jxls.util.TransformerFactory; import org.traccar.Context; -import org.traccar.helper.DateUtil; import org.traccar.model.Device; import org.traccar.model.Event; import org.traccar.model.Geofence; @@ -70,11 +69,9 @@ public final class Events { public static void getExcel(OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds, - Collection<String> types, String fromString, String toString) throws SQLException, IOException { + Collection<String> types, DateTime from, DateTime to) throws SQLException, IOException { ArrayList<DeviceReport> devicesEvents = new ArrayList<>(); ArrayList<String> sheetNames = new ArrayList<>(); - DateTime from = DateUtil.parseDateTime(fromString); - DateTime to = DateUtil.parseDateTime(toString); HashMap<Long, String> geofenceNames = new HashMap<>(); for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); diff --git a/src/org/traccar/reports/Route.java b/src/org/traccar/reports/Route.java index f438c8f4d..468771a48 100644 --- a/src/org/traccar/reports/Route.java +++ b/src/org/traccar/reports/Route.java @@ -35,7 +35,6 @@ import org.jxls.transform.Transformer; import org.jxls.transform.poi.PoiTransformer; import org.jxls.util.TransformerFactory; import org.traccar.Context; -import org.traccar.helper.DateUtil; import org.traccar.model.Device; import org.traccar.model.Group; import org.traccar.model.Position; @@ -58,11 +57,9 @@ public final class Route { public static void getExcel(OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds, - String fromString, String toString) throws SQLException, IOException { + DateTime from, DateTime to) throws SQLException, IOException { ArrayList<DeviceReport> devicesRoutes = new ArrayList<>(); ArrayList<String> sheetNames = new ArrayList<>(); - DateTime from = DateUtil.parseDateTime(fromString); - DateTime to = DateUtil.parseDateTime(toString); for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); Collection<Position> positions = Context.getDataManager() diff --git a/src/org/traccar/reports/Summary.java b/src/org/traccar/reports/Summary.java index d7d8ab417..02791fb5e 100644 --- a/src/org/traccar/reports/Summary.java +++ b/src/org/traccar/reports/Summary.java @@ -29,7 +29,6 @@ import org.joda.time.DateTime; import org.jxls.transform.poi.PoiTransformer; import org.jxls.util.JxlsHelper; import org.traccar.Context; -import org.traccar.helper.DateUtil; import org.traccar.model.Position; import org.traccar.reports.model.SummaryReport; @@ -84,9 +83,7 @@ public final class Summary { public static void getExcel(OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds, - String fromString, String toString) throws SQLException, IOException { - DateTime from = DateUtil.parseDateTime(fromString); - DateTime to = DateUtil.parseDateTime(toString); + DateTime from, DateTime to) throws SQLException, IOException { Collection<SummaryReport> summaries = getObjects(userId, deviceIds, groupIds, from.toDate(), to.toDate()); String templatePath = Context.getConfig().getString("report.templatesPath", "templates/export/"); diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java index c31eaac83..1c2ba3fe3 100644 --- a/src/org/traccar/reports/Trips.java +++ b/src/org/traccar/reports/Trips.java @@ -35,7 +35,6 @@ import org.jxls.transform.Transformer; import org.jxls.transform.poi.PoiTransformer; import org.jxls.util.TransformerFactory; import org.traccar.Context; -import org.traccar.helper.DateUtil; import org.traccar.model.Device; import org.traccar.model.Group; import org.traccar.model.Position; @@ -177,11 +176,9 @@ public final class Trips { public static void getExcel(OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds, - String fromString, String toString) throws SQLException, IOException { + DateTime from, DateTime to) throws SQLException, IOException { ArrayList<DeviceReport> devicesTrips = new ArrayList<>(); ArrayList<String> sheetNames = new ArrayList<>(); - DateTime from = DateUtil.parseDateTime(fromString); - DateTime to = DateUtil.parseDateTime(toString); for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); Collection<TripReport> trips = detectTrips(deviceId, from.toDate(), to.toDate()); |