Преглед изворни кода

空调加时 - 均摊金额精度问题fix

xiachuang пре 9 месеци
родитељ
комит
7fd481225b

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

@@ -620,7 +620,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).setScale(2, RoundingMode.HALF_UP);
+                    BigDecimal roomCost = roomArea.divide(totalArea, 10, RoundingMode.HALF_UP).multiply(totalAmount).setScale(2, RoundingMode.HALF_UP);
                     airConditionerAddTimeOrderAmountDetail.setAmount(roomCost);
                     remainingAmount = remainingAmount.subtract(roomCost);
                 }