diff options
author | Abyss777 <abyss@fox5.ru> | 2016-08-20 09:26:57 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-08-20 09:26:57 +0500 |
commit | 1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd (patch) | |
tree | 878541247d4d6369f97a01d16e36dec167a14203 /src/org/traccar/reports/ReportUtils.java | |
parent | 1c7437d6de01fffbe3f69853717808b1790413fd (diff) | |
download | trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.gz trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.bz2 trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.zip |
- Renamed calculateFuel
- Used int in BigDecimal constructor
- Added extra space
Diffstat (limited to 'src/org/traccar/reports/ReportUtils.java')
-rw-r--r-- | src/org/traccar/reports/ReportUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/reports/ReportUtils.java b/src/org/traccar/reports/ReportUtils.java index 03e23498a..baa799e90 100644 --- a/src/org/traccar/reports/ReportUtils.java +++ b/src/org/traccar/reports/ReportUtils.java @@ -49,7 +49,7 @@ public final class ReportUtils { && lastPosition.getAttributes().containsKey(Position.KEY_ODOMETER)) { distance = new BigDecimal(lastPosition.getAttributes().get(Position.KEY_ODOMETER).toString()) .subtract(new BigDecimal(firstPosition.getAttributes().get(Position.KEY_ODOMETER).toString())) - .multiply(new BigDecimal("1000")); + .multiply(new BigDecimal(1000)); } else if (firstPosition.getAttributes().containsKey(Position.KEY_TOTAL_DISTANCE) && lastPosition.getAttributes().containsKey(Position.KEY_TOTAL_DISTANCE)) { distance = new BigDecimal(lastPosition.getAttributes().get(Position.KEY_TOTAL_DISTANCE).toString()) @@ -59,7 +59,7 @@ public final class ReportUtils { return distance.setScale(2, RoundingMode.HALF_EVEN).doubleValue(); } - public static String calculateSpentFuel(Position firstPosition, Position lastPosition) { + public static String calculateFuel(Position firstPosition, Position lastPosition) { if (firstPosition.getAttributes().get(Position.KEY_FUEL) != null && lastPosition.getAttributes().get(Position.KEY_FUEL) != null) { |