aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-24 10:45:44 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-24 10:45:44 +0500
commit0bbf8f554638cdc89d5dd618c500839554602dee (patch)
tree86616330311bc5c46bab0733af70238f624196f6 /src/org/traccar/api/resource
parentb14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2 (diff)
downloadtrackermap-server-0bbf8f554638cdc89d5dd618c500839554602dee.tar.gz
trackermap-server-0bbf8f554638cdc89d5dd618c500839554602dee.tar.bz2
trackermap-server-0bbf8f554638cdc89d5dd618c500839554602dee.zip
- Use one parser
- Reverted passing variables way
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();