|
@ -111,15 +111,15 @@ public class BirBaseActivityServiceImpl extends ServiceImpl<BirBaseActivityMappe |
|
|
//日期占比
|
|
|
//日期占比
|
|
|
BigDecimal dayRate = new BigDecimal(splitDTO.getDays() + "") |
|
|
BigDecimal dayRate = new BigDecimal(splitDTO.getDays() + "") |
|
|
.divide(new BigDecimal(currentActDays + ""), 2, BigDecimal.ROUND_HALF_DOWN); |
|
|
.divide(new BigDecimal(currentActDays + ""), 2, BigDecimal.ROUND_HALF_DOWN); |
|
|
currentAmount = currentAmount.subtract(amount.multiply(dayRate)); |
|
|
currentAmount = currentAmount.subtract(amount.multiply(dayRate).setScale(2, RoundingMode.HALF_UP)); |
|
|
currentCheckAmount = currentCheckAmount.subtract(activity.getUsedAmount().multiply(dayRate)); |
|
|
currentCheckAmount = currentCheckAmount.subtract(activity.getUsedAmount().multiply(dayRate).setScale(2, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
//日期占比
|
|
|
//日期占比
|
|
|
BigDecimal dayRate = new BigDecimal(currDateSplit.getDays() + "") |
|
|
BigDecimal dayRate = new BigDecimal(currDateSplit.getDays() + "") |
|
|
.divide(new BigDecimal(currentActDays + ""), 2, BigDecimal.ROUND_HALF_DOWN); |
|
|
.divide(new BigDecimal(currentActDays + ""), 2, BigDecimal.ROUND_HALF_DOWN); |
|
|
currentAmount = amount.multiply(dayRate); |
|
|
currentAmount = amount.multiply(dayRate).setScale(2, RoundingMode.HALF_UP); |
|
|
currentCheckAmount = activity.getUsedAmount().multiply(dayRate); |
|
|
currentCheckAmount = activity.getUsedAmount().multiply(dayRate).setScale(2, RoundingMode.HALF_UP); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
baseActivity.setKeyNum(dto.getYearMonth()); |
|
|
baseActivity.setKeyNum(dto.getYearMonth()); |
|
|