diff options
author | Abyss777 <abyss@fox5.ru> | 2016-08-08 11:55:27 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-08-08 11:55:27 +0500 |
commit | 16771c045a3d6fdffad322e55b6d346c93a03f71 (patch) | |
tree | 0990e6387c8143e2da90cf3cc0e4b0184c9bc8b7 /src/org/traccar/reports/Route.java | |
parent | 24346c8afd219c607e18306aa509f6029d3e850c (diff) | |
download | trackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.tar.gz trackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.tar.bz2 trackermap-server-16771c045a3d6fdffad322e55b6d346c93a03f71.zip |
- Used @Consumes and @Produces instead of direct header access
- Renamed General to Summary
- Other changes
Diffstat (limited to 'src/org/traccar/reports/Route.java')
-rw-r--r-- | src/org/traccar/reports/Route.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/reports/Route.java b/src/org/traccar/reports/Route.java index a77e3c5ff..7abe5c194 100644 --- a/src/org/traccar/reports/Route.java +++ b/src/org/traccar/reports/Route.java @@ -20,7 +20,7 @@ public final class Route { public static String getJson(long userId, Collection<Long> deviceIds, Collection<Long> groupIds, Date from, Date to) throws SQLException { JsonObjectBuilder json = Json.createObjectBuilder(); - for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) { + for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); json.add(String.valueOf(deviceId), JsonConverter.arrayToJson(Context.getDataManager() .getPositions(deviceId, from, to))); @@ -32,10 +32,10 @@ public final class Route { Date from, Date to) throws SQLException { CsvBuilder csv = new CsvBuilder(); csv.addHeaderLine(new Position()); - for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) { + for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) { Context.getPermissionsManager().checkDevice(userId, deviceId); csv.addArray(Context.getDataManager().getPositions(deviceId, from, to)); } - return csv.get(); + return csv.build(); } } |