diff options
author | Anton Tananaev <anton@traccar.org> | 2023-06-11 08:10:16 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-06-11 08:10:16 -0700 |
commit | 7f2ded68ef015684f90bef59c055a1c980688069 (patch) | |
tree | 5cfc06788da1d5fbbc0a1175b42185d9043e7e38 /src | |
parent | df96f168eb4439beb044d301bcbf96502df62151 (diff) | |
download | trackermap-server-7f2ded68ef015684f90bef59c055a1c980688069.tar.gz trackermap-server-7f2ded68ef015684f90bef59c055a1c980688069.tar.bz2 trackermap-server-7f2ded68ef015684f90bef59c055a1c980688069.zip |
Clean up formatting
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/reports/RouteReportProvider.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/reports/RouteReportProvider.java b/src/main/java/org/traccar/reports/RouteReportProvider.java index a1d004dd1..5343652b7 100644 --- a/src/main/java/org/traccar/reports/RouteReportProvider.java +++ b/src/main/java/org/traccar/reports/RouteReportProvider.java @@ -50,6 +50,7 @@ public class RouteReportProvider { private final Config config; private final ReportUtils reportUtils; private final Storage storage; + private final Map<String, Integer> namesCount = new HashMap<>(); @Inject @@ -72,9 +73,10 @@ public class RouteReportProvider { private String getUniqueSheetName(String key) { - namesCount.compute(key, (k, value) -> (value == null) ? 1 : (value + 1)); - return (namesCount.get(key) > 1 ? key + "-" + namesCount.get(key) : key); + namesCount.compute(key, (k, value) -> value == null ? 1 : (value + 1)); + return namesCount.get(key) > 1 ? key + '-' + namesCount.get(key) : key; } + public void getExcel(OutputStream outputStream, long userId, Collection<Long> deviceIds, Collection<Long> groupIds, Date from, Date to) throws StorageException, IOException { |