Pārlūkot izejas kodu

空调加时订单分摊金额 fix

xiachuang 1 gadu atpakaļ
vecāks
revīzija
59d0aa0ca2

+ 1 - 1
src/main/java/com/palmnest/service/estateserve/airconditioner/impl/ConditionerAddTimeServiceImpl.java

@@ -641,7 +641,7 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
                 if (i == listRoomInfos.size() - 1) {
                     airConditionerAddTimeOrderAmountDetail.setAmount(remainingAmount);
                 } else {
-                    BigDecimal roomCost = roomArea.divide(totalArea, 2, RoundingMode.HALF_UP).multiply(totalAmount);
+                    BigDecimal roomCost = roomArea.divide(totalArea, 2, RoundingMode.HALF_UP).multiply(totalAmount).setScale(2, RoundingMode.HALF_UP);
                     airConditionerAddTimeOrderAmountDetail.setAmount(roomCost);
                     remainingAmount = remainingAmount.subtract(roomCost);
                 }