diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-23 11:41:11 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-23 11:41:11 +0500 |
commit | b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2 (patch) | |
tree | a82bf3699fc76a6a46da9835de846970db7722e3 /src/org/traccar/api | |
parent | 5f867c6077f79a2a1d3b8ec18f78c3a2657ba698 (diff) | |
download | trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.tar.gz trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.tar.bz2 trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.zip |
- Pass client timezone to excel template
- Templates: adjust timezone, use "https" in links
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r-- | src/org/traccar/api/resource/ReportResource.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/org/traccar/api/resource/ReportResource.java b/src/org/traccar/api/resource/ReportResource.java index 2717fe01e..e8e80fa2f 100644 --- a/src/org/traccar/api/resource/ReportResource.java +++ b/src/org/traccar/api/resource/ReportResource.java @@ -50,8 +50,7 @@ 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, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + Route.getExcel(stream, getUserId(), deviceIds, groupIds, from, to); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -76,8 +75,7 @@ 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, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + Events.getExcel(stream, getUserId(), deviceIds, groupIds, types, from, to); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -100,8 +98,7 @@ 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, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + Summary.getExcel(stream, getUserId(), deviceIds, groupIds, from, to); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -124,8 +121,7 @@ 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, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + Trips.getExcel(stream, getUserId(), deviceIds, groupIds, from, to); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); |