2 Revize 9bc03fb7ba ... 3c7bb85d5a

Autor SHA1 Zpráva Datum
  pengdi@zoniot.com 3c7bb85d5a Merge remote-tracking branch 'origin/20200908' into 20200908 před 3 roky
  pengdi@zoniot.com 0e626d2841 用水量精度调整 PengDi@2021/4/1 před 3 roky

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