aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource')
-rw-r--r--src/org/traccar/api/resource/ReportResource.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/org/traccar/api/resource/ReportResource.java b/src/org/traccar/api/resource/ReportResource.java
index e8e80fa2f..e37d6f01d 100644
--- a/src/org/traccar/api/resource/ReportResource.java
+++ b/src/org/traccar/api/resource/ReportResource.java
@@ -50,7 +50,8 @@ public class ReportResource extends BaseResource {
@QueryParam("deviceId") final List<Long> deviceIds, @QueryParam("groupId") final List<Long> groupIds,
@QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
- Route.getExcel(stream, getUserId(), deviceIds, groupIds, from, to);
+ Route.getExcel(stream, getUserId(), deviceIds, groupIds,
+ DateUtil.parseDateTime(from), DateUtil.parseDateTime(to));
return Response.ok(stream.toByteArray())
.header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build();
@@ -75,7 +76,8 @@ public class ReportResource extends BaseResource {
@QueryParam("type") final List<String> types,
@QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
- Events.getExcel(stream, getUserId(), deviceIds, groupIds, types, from, to);
+ Events.getExcel(stream, getUserId(), deviceIds, groupIds, types,
+ DateUtil.parseDateTime(from), DateUtil.parseDateTime(to));
return Response.ok(stream.toByteArray())
.header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build();
@@ -98,7 +100,8 @@ public class ReportResource extends BaseResource {
@QueryParam("deviceId") final List<Long> deviceIds, @QueryParam("groupId") final List<Long> groupIds,
@QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
- Summary.getExcel(stream, getUserId(), deviceIds, groupIds, from, to);
+ Summary.getExcel(stream, getUserId(), deviceIds, groupIds,
+ DateUtil.parseDateTime(from), DateUtil.parseDateTime(to));
return Response.ok(stream.toByteArray())
.header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build();
@@ -121,7 +124,8 @@ public class ReportResource extends BaseResource {
@QueryParam("deviceId") final List<Long> deviceIds, @QueryParam("groupId") final List<Long> groupIds,
@QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
- Trips.getExcel(stream, getUserId(), deviceIds, groupIds, from, to);
+ Trips.getExcel(stream, getUserId(), deviceIds, groupIds,
+ DateUtil.parseDateTime(from), DateUtil.parseDateTime(to));
return Response.ok(stream.toByteArray())
.header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build();