Explorar o código

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

xiachuang hai 9 meses
pai
achega
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);
                 }