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

init

parent 3e88e890
...@@ -779,14 +779,10 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -779,14 +779,10 @@ public class ProductServiceImpl implements ProductService, Constant {
if (i < fundNavs.size() - 1) { if (i < fundNavs.size() - 1) {
FundNav pre = fundNavs.get(i + 1); FundNav pre = fundNavs.get(i + 1);
if (pre.getCumulativeNavWithdrawal() != null && f.getCumulativeNavWithdrawal() != null) { if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
if (pre.getCumulativeNavWithdrawal().compareTo(BigDecimal.ZERO) == 1) { BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP);
BigDecimal dailyIncrease = f.getCumulativeNavWithdrawal().subtract(pre.getCumulativeNavWithdrawal()).divide(pre.getCumulativeNavWithdrawal(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease)); vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
} }
} else {
vo.setDailyIncrease("--");
}
} }
} }
...@@ -1494,14 +1490,10 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1494,14 +1490,10 @@ public class ProductServiceImpl implements ProductService, Constant {
if (i < fundNavs.size() - 1) { if (i < fundNavs.size() - 1) {
IfaImportedFundNav pre = fundNavs.get(i + 1); IfaImportedFundNav pre = fundNavs.get(i + 1);
if (pre.getCumulativeNav() != null && f.getCumulativeNav() != null) { if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
if (pre.getCumulativeNav().compareTo(BigDecimal.ZERO) == 1) { BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP);
BigDecimal dailyIncrease = f.getCumulativeNav().subtract(pre.getCumulativeNav()).divide(pre.getCumulativeNav(), 4, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease)); vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease));
} }
} else {
vo.setDailyIncrease("--");
}
} }
} }
......
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