|  | @@ -472,7 +472,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |                  if(studentGroupNamesMap.containsKey(eduOrganStudentListDto.getStudentId())){
 |  |                  if(studentGroupNamesMap.containsKey(eduOrganStudentListDto.getStudentId())){
 | 
											
												
													
														|  |                      eduOrganStudentListDto.setMusicGroupNames(studentGroupNamesMap.get(eduOrganStudentListDto.getStudentId()));
 |  |                      eduOrganStudentListDto.setMusicGroupNames(studentGroupNamesMap.get(eduOrganStudentListDto.getStudentId()));
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  | -                if(hasVipCourseStudentIds.contains(eduOrganStudentListDto.getStudentId())){
 |  | 
 | 
											
												
													
														|  | 
 |  | +                if(hasVipCourseStudentIds.contains(eduOrganStudentListDto.getSubjectId())){
 | 
											
												
													
														|  |                      eduOrganStudentListDto.setHasVipGroup(1);
 |  |                      eduOrganStudentListDto.setHasVipGroup(1);
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |                  if(eduOrganStudentListDto.getCloudStudyUseNum()>0 && eduOrganStudentListDto.getCloudStudyUseTime()>0){
 |  |                  if(eduOrganStudentListDto.getCloudStudyUseNum()>0 && eduOrganStudentListDto.getCloudStudyUseTime()>0){
 | 
											
										
											
												
													
														|  | @@ -541,6 +541,15 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |          if(!CollectionUtils.isEmpty(organsNewCloudStudyNumMapList)){
 |  |          if(!CollectionUtils.isEmpty(organsNewCloudStudyNumMapList)){
 | 
											
												
													
														|  |              organsNewCloudStudyNumMap = MapUtil.convertIntegerMap(organsNewCloudStudyNumMapList);
 |  |              organsNewCloudStudyNumMap = MapUtil.convertIntegerMap(organsNewCloudStudyNumMapList);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +        //获取新增人数占比(已上乐团课小于等于4)
 | 
											
												
													
														|  | 
 |  | +        List<BaseMapDto<Integer, Long>> studentMusicCourseNum = studentDao.getOrganCloudNewStudentNum();
 | 
											
												
													
														|  | 
 |  | +        Map<String, Long> organsNewCloudNewStudentNumMap = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +        if(!CollectionUtils.isEmpty(studentMusicCourseNum)){
 | 
											
												
													
														|  | 
 |  | +            List<BaseMapDto<Integer, Long>> collect = studentMusicCourseNum.stream().filter(e -> e.getValue() < 5).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +            List<Integer> userIdList = collect.stream().map(e -> e.getKey()).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +            List<Map<Long, Long>> organsNewCloudNewStudentNumMapList = studentDao.groupOrganId(organIds,userIdList);
 | 
											
												
													
														|  | 
 |  | +            organsNewCloudNewStudentNumMap = MapUtil.convertIntegerMap(organsNewCloudNewStudentNumMapList);
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          List<EduOrganStudentDataDto> result = new ArrayList<>();
 |  |          List<EduOrganStudentDataDto> result = new ArrayList<>();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -572,6 +581,10 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |              if(organsNewCloudStudyNumMap.containsKey(organ.getId().toString())){
 |  |              if(organsNewCloudStudyNumMap.containsKey(organ.getId().toString())){
 | 
											
												
													
														|  |                  organStudentVipData.setNewCloudStudyStudentNum(organsNewCloudStudyNumMap.get(organ.getId().toString()).intValue());
 |  |                  organStudentVipData.setNewCloudStudyStudentNum(organsNewCloudStudyNumMap.get(organ.getId().toString()).intValue());
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | 
 |  | +            if(organsNewCloudNewStudentNumMap.containsKey(organ.getId().toString())){
 | 
											
												
													
														|  | 
 |  | +                organStudentVipData.setNewStudentNum(organsNewCloudNewStudentNumMap.get(organ.getId().toString()).intValue());
 | 
											
												
													
														|  | 
 |  | +                organStudentVipData.setNewStudentDuty(new BigDecimal(organStudentVipData.getNewStudentNum()).divide(new BigDecimal(organStudentVipData.getTotalStudentNum()), 4, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100)).floatValue());
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |              result.add(organStudentVipData);
 |  |              result.add(organStudentVipData);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          return result;
 |  |          return result;
 | 
											
										
											
												
													
														|  | @@ -623,6 +636,16 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |              organsNewCloudStudyNumMap = MapUtil.convertIntegerMap(organsNewCloudStudyNumMapList);
 |  |              organsNewCloudStudyNumMap = MapUtil.convertIntegerMap(organsNewCloudStudyNumMapList);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +        //获取新增人数占比(已上乐团课小于等于4)
 | 
											
												
													
														|  | 
 |  | +        List<BaseMapDto<Integer, Long>> studentMusicCourseNum = studentDao.getOrganCloudNewStudentNum();
 | 
											
												
													
														|  | 
 |  | +        Map<String, Long> organsNewCloudNewStudentNumMap = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +        if(!CollectionUtils.isEmpty(studentMusicCourseNum)){
 | 
											
												
													
														|  | 
 |  | +            List<BaseMapDto<Integer, Long>> collect = studentMusicCourseNum.stream().filter(e -> e.getValue() < 5).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +            List<Integer> userIdList = collect.stream().map(e -> e.getKey()).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +            List<Map<Long, Long>> organsNewCloudNewStudentNumMapList = studentDao.groupOrganId(organIds,userIdList);
 | 
											
												
													
														|  | 
 |  | +            organsNewCloudNewStudentNumMap = MapUtil.convertIntegerMap(organsNewCloudNewStudentNumMapList);
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          List<EduOrganStudentDataDto> result = new ArrayList<>();
 |  |          List<EduOrganStudentDataDto> result = new ArrayList<>();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          for (Organization organ : organs) {
 |  |          for (Organization organ : organs) {
 | 
											
										
											
												
													
														|  | @@ -653,6 +676,10 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |              if(organsNewCloudStudyNumMap.containsKey(organ.getId().toString())){
 |  |              if(organsNewCloudStudyNumMap.containsKey(organ.getId().toString())){
 | 
											
												
													
														|  |                  organStudentVipData.setNewCloudStudyStudentNum(organsNewCloudStudyNumMap.get(organ.getId().toString()).intValue());
 |  |                  organStudentVipData.setNewCloudStudyStudentNum(organsNewCloudStudyNumMap.get(organ.getId().toString()).intValue());
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | 
 |  | +            if(organsNewCloudNewStudentNumMap.containsKey(organ.getId().toString())){
 | 
											
												
													
														|  | 
 |  | +                organStudentVipData.setNewStudentNum(organsNewCloudNewStudentNumMap.get(organ.getId().toString()).intValue());
 | 
											
												
													
														|  | 
 |  | +                organStudentVipData.setNewStudentDuty(new BigDecimal(organStudentVipData.getNewStudentNum()).divide(new BigDecimal(organStudentVipData.getTotalStudentNum()), 4, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100)).floatValue());
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |              result.add(organStudentVipData);
 |  |              result.add(organStudentVipData);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          Comparator<EduOrganStudentDataDto> comparing = null;
 |  |          Comparator<EduOrganStudentDataDto> comparing = null;
 | 
											
										
											
												
													
														|  | @@ -712,12 +739,26 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 | 
											
												
													
														|  |                  comparing.thenComparing(EduOrganStudentDataDto::getCloudStudyLivelyStudentDuty, "ASC".equals(queryInfo.getCloudStudyLivelyStudentDuty())?Comparator.naturalOrder():Comparator.reverseOrder());
 |  |                  comparing.thenComparing(EduOrganStudentDataDto::getCloudStudyLivelyStudentDuty, "ASC".equals(queryInfo.getCloudStudyLivelyStudentDuty())?Comparator.naturalOrder():Comparator.reverseOrder());
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +        if(StringUtils.isNotBlank(queryInfo.getNewStudentNum())){
 | 
											
												
													
														|  | 
 |  | +            if(Objects.isNull(comparing)){
 | 
											
												
													
														|  | 
 |  | +                comparing = Comparator.comparing(EduOrganStudentDataDto::getNewStudentNum, "ASC".equals(queryInfo.getNewStudentNum())?Comparator.naturalOrder():Comparator.reverseOrder());
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                comparing.thenComparing(EduOrganStudentDataDto::getNewStudentNum, "ASC".equals(queryInfo.getNewStudentNum())?Comparator.naturalOrder():Comparator.reverseOrder());
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if(StringUtils.isNotBlank(queryInfo.getNewStudentDuty())){
 | 
											
												
													
														|  | 
 |  | +            if(Objects.isNull(comparing)){
 | 
											
												
													
														|  | 
 |  | +                comparing = Comparator.comparing(EduOrganStudentDataDto::getNewStudentDuty, "ASC".equals(queryInfo.getNewStudentDuty())?Comparator.naturalOrder():Comparator.reverseOrder());
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                comparing.thenComparing(EduOrganStudentDataDto::getNewStudentDuty, "ASC".equals(queryInfo.getNewStudentDuty())?Comparator.naturalOrder():Comparator.reverseOrder());
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          if(Objects.isNull(comparing)){
 |  |          if(Objects.isNull(comparing)){
 | 
											
												
													
														|  |              comparing = Comparator.comparing(EduOrganStudentDataDto::getOrganId);
 |  |              comparing = Comparator.comparing(EduOrganStudentDataDto::getOrganId);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        result = result.stream().sorted(comparing).skip(pageInfo.getOffset()).limit(pageInfo.getLimit()).collect(Collectors.toList());
 |  | 
 | 
											
												
													
														|  | 
 |  | +        result = result.stream().skip(pageInfo.getOffset()).limit(pageInfo.getLimit()).sorted(comparing).collect(Collectors.toList());
 | 
											
												
													
														|  |          pageInfo.setRows(result);
 |  |          pageInfo.setRows(result);
 | 
											
												
													
														|  |          return pageInfo;
 |  |          return pageInfo;
 | 
											
												
													
														|  |      }
 |  |      }
 |