Commit e6caf7b3 authored by 张亚辉's avatar 张亚辉

init

parent 3e88e890
......@@ -779,13 +779,9 @@ public class ProductServiceImpl implements ProductService, Constant {
if (i < fundNavs.size() - 1) {
FundNav pre = fundNavs.get(i + 1);
if (pre.getCumulativeNavWithdrawal() != null && f.getCumulativeNavWithdrawal() != null) {
if (pre.getCumulativeNavWithdrawal().compareTo(BigDecimal.ZERO) == 1) {
BigDecimal dailyIncrease = f.getCumulativeNavWithdrawal().subtract(pre.getCumulativeNavWithdrawal()).divide(pre.getCumulativeNavWithdrawal(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
}
} else {
vo.setDailyIncrease("--");
if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
}
}
}
......@@ -1494,13 +1490,9 @@ public class ProductServiceImpl implements ProductService, Constant {
if (i < fundNavs.size() - 1) {
IfaImportedFundNav pre = fundNavs.get(i + 1);
if (pre.getCumulativeNav() != null && f.getCumulativeNav() != null) {
if (pre.getCumulativeNav().compareTo(BigDecimal.ZERO) == 1) {
BigDecimal dailyIncrease = f.getCumulativeNav().subtract(pre.getCumulativeNav()).divide(pre.getCumulativeNav(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
}
} else {
vo.setDailyIncrease("--");
if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment