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 лет назад

+ 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);