Commit 176a1ed9 authored by 张亚辉's avatar 张亚辉

私募

parent 908cdcf3
......@@ -933,7 +933,15 @@ public class ProductServiceImpl implements ProductService, Constant {
List<FundCount> fundCounts = this.fundCountMapper.selectByExample(example2);
if (CollectionUtils.isNotEmpty(fundCounts)) {
fundCounts.sort(Comparator.comparing(FundCount::getRetIncep).reversed());
fundCounts.sort(Comparator.comparing(FundCount::getRetIncep, (s1, s2) -> {
if (s1 == null) {
s1 = BigDecimal.ZERO;
}
if (s2 == null) {
s2 = BigDecimal.ZERO;
}
return s1.compareTo(s2);
}).reversed());
FundCount fundCount = fundCounts.get(0);
FundInfo info = mapFundInfo.get(fundCount.getFundId());
......@@ -943,11 +951,15 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setInceptionDate(info.getInceptionDate() == null ? null : info.getInceptionDate().getTime());
vo.setFundName(info.getFundShortName());
vo.setNet(new Net(fundCount.getEndDate().getTime(), BigDecimalUtil.toString(fundCount.getCumulativeNav(), 4)));
vo.setRetIncep(multiply100(fundCount.getRetIncep()));
String retIncep = multiply100(fundCount.getRetIncep());
vo.setRetIncep(retIncep == null ? "0" : retIncep);
vo.setFundInfoVOS(fundCounts.stream().map(f -> {
FundInfoVO vo1 = new FundInfoVO();
vo1.setRetIncep(multiply100(f.getRetIncep()));
vo1.setYearProfit(multiply100(f.getRetIncepA()));
String retIncepstr = multiply100(f.getRetIncep());
vo1.setRetIncep(retIncepstr == null ? "0" : retIncepstr);
String yearProfit = multiply100(f.getRetIncepA());
vo1.setYearProfit(yearProfit == null ? "0" : yearProfit);
vo1.setFundName(mapFundInfo.get(f.getFundId()).getFundShortName());
vo1.setFundId(f.getFundId());
vo1.setRatioId(info.getPrimaryBenchmarkId());
......
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