zyg преди 1 година
родител
ревизия
eb741f63bb
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      hz-business/src/main/java/com/hz/business/service/impl/BatteryServiceImpl.java

+ 1 - 1
hz-business/src/main/java/com/hz/business/service/impl/BatteryServiceImpl.java

@@ -2533,7 +2533,7 @@ public class BatteryServiceImpl extends ServiceImpl<BatteryMapper, Battery> impl
             if (i > 1) {
                 BigDecimal b1 = BigDecimal.valueOf(singleList.get(i).getOdo() - singleList.get(i - 1).getOdo());
                 BigDecimal b2 = BigDecimal.valueOf(Double.parseDouble(String.valueOf(singleList.get(i).getTimeSt().getTime() / (1000 * 60 * 60 * 24) - singleList.get(i - 1).getTimeSt().getTime() / (1000 * 60 * 60 * 24))));
-                if (b1.compareTo(new BigDecimal(0)) != 0 || b2.compareTo(new BigDecimal(0)) != 0) {
+                if (b1.compareTo(new BigDecimal(0)) != 0 && b2.compareTo(new BigDecimal(0)) != 0) {
                     if (b1.divide(b2, 1, RoundingMode.UP).compareTo(new BigDecimal("400.0")) > 0) {
                         singleList.remove(i);
                         i--;