|
@@ -91,7 +91,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
|
|
|
BigDecimal totalRatioAmount = BigDecimal.ZERO;
|
|
|
if(studentPaymentOrder.getExpectAmount().compareTo(BigDecimal.ZERO) > 0){
|
|
|
- totalRatioAmount = detailTotalPrice.divide(studentPaymentOrder.getExpectAmount(), 16, RoundingMode.DOWN);
|
|
|
+ totalRatioAmount = detailTotalPrice.divide(studentPaymentOrder.getExpectAmount(), 32, RoundingMode.DOWN);
|
|
|
}
|
|
|
|
|
|
BigDecimal balancePaymentAmount = studentPaymentOrder.getBalancePaymentAmount().multiply(totalRatioAmount).setScale(2, RoundingMode.DOWN);
|
|
@@ -112,12 +112,12 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
|
|
|
BigDecimal ratioAmount = BigDecimal.ZERO;
|
|
|
if(detailTotalPrice.compareTo(BigDecimal.ZERO) > 0){
|
|
|
- ratioAmount = orderDetail.getPrice().divide(detailTotalPrice, 16, RoundingMode.DOWN);
|
|
|
+ ratioAmount = orderDetail.getPrice().divide(detailTotalPrice, 32, RoundingMode.DOWN);
|
|
|
}
|
|
|
BigDecimal ratioCouponAmount = BigDecimal.ZERO;
|
|
|
if (detailTotalRemitPrice.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
|
- ratioCouponAmount = orderDetail.getRemitFee().divide(detailTotalRemitPrice, 16, RoundingMode.DOWN);
|
|
|
+ ratioCouponAmount = orderDetail.getRemitFee().divide(detailTotalRemitPrice, 32, RoundingMode.DOWN);
|
|
|
}
|
|
|
|
|
|
BigDecimal detailBalance;
|
|
@@ -437,7 +437,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
|
|
|
if (goodsTotalPrice.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
goodsRatioAmount = order.getGroupType() == MUSIC ?nowGoods.getGroupPurchasePrice():nowGoods.getDiscountPrice()
|
|
|
- .divide(goodsTotalPrice, 16, RoundingMode.DOWN);
|
|
|
+ .divide(goodsTotalPrice, 32, RoundingMode.DOWN);
|
|
|
}
|
|
|
if(i == goodies.size() - 1){
|
|
|
expectAmount = subExpectTotalAmount;
|
|
@@ -451,7 +451,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
subTotalBalance = subTotalBalance.subtract(goodsBalance);
|
|
|
remitAmount = goodsRatioAmount.multiply(couponRemitAmount).setScale(2, RoundingMode.DOWN);
|
|
|
subCouponRemitAmount = subCouponRemitAmount.subtract(remitAmount);
|
|
|
- actualAmount = goodsRatioAmount.multiply(actualTotalAmount).setScale(2, RoundingMode.DOWN);
|
|
|
+ actualAmount = expectAmount.subtract(goodsBalance).subtract(remitAmount);
|
|
|
subTotalActualAmount = subTotalActualAmount.subtract(actualAmount);
|
|
|
}
|
|
|
|