3
0

2 Ревизии 9bc03fb7ba ... 3c7bb85d5a

Автор SHA1 Съобщение Дата
  pengdi@zoniot.com 3c7bb85d5a Merge remote-tracking branch 'origin/20200908' into 20200908 преди 3 години
  pengdi@zoniot.com 0e626d2841 用水量精度调整 PengDi@2021/4/1 преди 3 години
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      meter-reading-common/src/main/java/com/huaxu/zoniot/service/impl/MeterReadRecordServiceImpl.java

+ 3 - 2
meter-reading-common/src/main/java/com/huaxu/zoniot/service/impl/MeterReadRecordServiceImpl.java

@@ -451,9 +451,10 @@ public class MeterReadRecordServiceImpl implements MeterReadRecordService {
                 throw new ServiceException(ResultStatus.READING_ERROR_4);
             }
             // 计算今日用水量
-            Double todayCost = calculateTodayCost(currentReading,
+            Double todayCost = new BigDecimal(calculateTodayCost(currentReading,
                     new Double(getMeterLastValid(waterMeter,readDay)),
-                    record);
+                    record)).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue();
+
             MeterReadRecord update = new MeterReadRecord();
             update.setId(record.getId());
             update.setLastCost(todayCost);