|
@@ -542,6 +542,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<>();
|
|
|
|
|
|
|
@@ -573,6 +582,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;
|
|
@@ -624,6 +637,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) {
|
|
@@ -654,6 +677,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;
|
|
@@ -713,6 +740,20 @@ 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);
|