Commit 627c6c38 authored by licc's avatar licc

月度最大进步奖 实现3

parent 345c553c
......@@ -272,11 +272,10 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
//对集合进行排序
listVo.sort(Comparator.comparing(TeamPerformanceSortVo::getGrowthRate).reversed());
//计算前20的总业绩
double total = listVo.stream().mapToDouble(TeamPerformanceSortVo::getMonthPerformance).sum();
double number = Math.floor(totalMoney / 3980 / 12);
if (listVo.size() >= 20) {
//计算前20的总业绩
double total = listVo.stream().mapToDouble(TeamPerformanceSortVo::getMonthPerformance).sum();
double number = Math.floor(totalMoney / 3980 / 12);
//取排名前20的
listVo.subList(0, 20);
for (TeamPerformanceSortVo sortVo : listVo) {
......@@ -301,9 +300,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
return R.ok(0, true);
} else {
//计算总业绩
double total = listVo.stream().mapToDouble(TeamPerformanceSortVo::getMonthPerformance).sum();
double number = Math.floor(totalMoney / 3980 / 12);
for (TeamPerformanceSortVo sortVo : listVo) {
String userId = sortVo.getTeamPerformance().getUserId();
Integer userLevel = sortVo.getTeamPerformance().getUserLevel();
......
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