aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-08-05 14:41:53 +0500
committerAbyss777 <abyss@fox5.ru>2016-08-05 14:41:53 +0500
commit5a6e7582a7978341f3a2de9a81cb63252bca0bb7 (patch)
tree585eab11bfd805b9de814324e5e892e854fc1c62 /src/org/traccar/api
parent933247b3d2ec24d65203fae39dcafbe2c9afb87e (diff)
downloadtrackermap-server-5a6e7582a7978341f3a2de9a81cb63252bca0bb7.tar.gz
trackermap-server-5a6e7582a7978341f3a2de9a81cb63252bca0bb7.tar.bz2
trackermap-server-5a6e7582a7978341f3a2de9a81cb63252bca0bb7.zip
- Moved GeneralReport to separate file
- Removed unnecessary getOut function - Added methods sorting
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/ReportResource.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/org/traccar/api/resource/ReportResource.java b/src/org/traccar/api/resource/ReportResource.java
index 0885a3638..6c5772584 100644
--- a/src/org/traccar/api/resource/ReportResource.java
+++ b/src/org/traccar/api/resource/ReportResource.java
@@ -13,7 +13,6 @@ import javax.ws.rs.core.Response.ResponseBuilder;
import org.traccar.api.BaseResource;
import org.traccar.reports.Events;
import org.traccar.reports.General;
-import org.traccar.reports.ReportUtils;
import org.traccar.reports.Route;
import org.traccar.web.JsonConverter;
@@ -26,8 +25,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 {
if (getAcceptHeader().equals("application/ms-excel")) {
- ResponseBuilder response = Response.ok(ReportUtils.getOut(Route.getCsv(getUserId(), deviceIds, groupIds,
- JsonConverter.parseDate(from), JsonConverter.parseDate(to))));
+ ResponseBuilder response = Response.ok(Route.getCsv(getUserId(), deviceIds, groupIds,
+ JsonConverter.parseDate(from), JsonConverter.parseDate(to)));
response.type("application/ms-excel");
return response.build();
}
@@ -44,8 +43,8 @@ public class ReportResource extends BaseResource {
@QueryParam("type") final List<String> types,
@QueryParam("from") String from, @QueryParam("to") String to) throws SQLException {
if (getAcceptHeader().equals("application/ms-excel")) {
- ResponseBuilder response = Response.ok(ReportUtils.getOut(Events.getCsv(getUserId(), deviceIds, groupIds,
- types, JsonConverter.parseDate(from), JsonConverter.parseDate(to))));
+ ResponseBuilder response = Response.ok(Events.getCsv(getUserId(), deviceIds, groupIds,
+ types, JsonConverter.parseDate(from), JsonConverter.parseDate(to)));
response.type("application/ms-excel");
return response.build();
}
@@ -61,8 +60,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 {
if (getAcceptHeader().equals("application/ms-excel")) {
- ResponseBuilder response = Response.ok(ReportUtils.getOut(General.getCsv(getUserId(), deviceIds, groupIds,
- JsonConverter.parseDate(from), JsonConverter.parseDate(to))));
+ ResponseBuilder response = Response.ok(General.getCsv(getUserId(), deviceIds, groupIds,
+ JsonConverter.parseDate(from), JsonConverter.parseDate(to)));
response.type("application/ms-excel");
return response.build();
}