Commit 5d59808a authored by 张亚辉's avatar 张亚辉

基金bug修复

parent 00b20a85
...@@ -1490,9 +1490,13 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1490,9 +1490,13 @@ 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.getNav().compareTo(BigDecimal.ZERO) == 1) { if (pre.getCumulativeNav() != null && f.getCumulativeNav() != null) {
BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 4, BigDecimal.ROUND_HALF_UP); if (pre.getCumulativeNav().compareTo(BigDecimal.ZERO) == 1) {
vo.setDailyIncrease(BigDecimalUtil.multiply100(dailyIncrease)); BigDecimal dailyIncrease = f.getCumulativeNav().subtract(pre.getCumulativeNav()).divide(pre.getCumulativeNav(), 4, BigDecimal.ROUND_HALF_UP);
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