|
@@ -695,12 +695,25 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
List<IndexBaseMonthData> withDayAndDataType = indexBaseMonthDataDao.getWithDayAndDataType(LocalDate.now().toString(), CLOUD_NEW_STUDENT_NUM);
|
|
|
Map<Integer, Integer> organsNewCloudNewStudentNumMap = withDayAndDataType.stream().collect(Collectors.toMap(IndexBaseMonthData::getOrganId, e -> e.getActivateNum().intValue(), (e1, e2) -> e1));
|
|
|
|
|
|
+ //获取分部目标
|
|
|
+ String cloudTeacherActiveTarget = sysConfigDao.findConfigValue(SysConfigService.CLOUD_TEACHER_ACTIVE_TARGET);
|
|
|
+ if(StringUtils.isEmpty(cloudTeacherActiveTarget)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ List<CloudTeacherActiveTargetDto> targetDtoList = JSONArray.parseArray(cloudTeacherActiveTarget, CloudTeacherActiveTargetDto.class);
|
|
|
+ Map<Integer, List<CloudTeacherActiveTargetDto>> targetMap = targetDtoList.stream().collect(Collectors.groupingBy(e -> e.getOrganId()));
|
|
|
+
|
|
|
List<EduOrganStudentDataDto> result = new ArrayList<>();
|
|
|
|
|
|
for (Organization organ : organs) {
|
|
|
EduOrganStudentDataDto organStudentVipData = new EduOrganStudentDataDto();
|
|
|
organStudentVipData.setOrganId(organ.getId());
|
|
|
organStudentVipData.setOrganName(organ.getName());
|
|
|
+ List<CloudTeacherActiveTargetDto> targetDtos = targetMap.get(organ.getId());
|
|
|
+ if(targetDtos != null && targetDtos.size() > 0){
|
|
|
+ CloudTeacherActiveTargetDto target = targetDtos.get(0);
|
|
|
+ organStudentVipData.setTargetNum(target.getTargetNum());
|
|
|
+ }
|
|
|
if(organsStudentNumMap.containsKey(organ.getId().toString())){
|
|
|
organStudentVipData.setTotalStudentNum(organsStudentNumMap.get(organ.getId().toString()).intValue());
|
|
|
}
|
|
@@ -833,6 +846,13 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
result.add(organStudentVipData);
|
|
|
}
|
|
|
Comparator<EduOrganStudentDataDto> comparing = null;
|
|
|
+ if(StringUtils.isNotBlank(queryInfo.getTargetNum())){
|
|
|
+ if(Objects.isNull(comparing)){
|
|
|
+ comparing = Comparator.comparing(EduOrganStudentDataDto::getTargetNum, "ASC".equals(queryInfo.getTargetNum())?Comparator.naturalOrder():Comparator.reverseOrder());
|
|
|
+ }else{
|
|
|
+ comparing.thenComparing(EduOrganStudentDataDto::getTargetNum, "ASC".equals(queryInfo.getTargetNum())?Comparator.naturalOrder():Comparator.reverseOrder());
|
|
|
+ }
|
|
|
+ }
|
|
|
if(StringUtils.isNotBlank(queryInfo.getTotalStudentNum())){
|
|
|
if(Objects.isNull(comparing)){
|
|
|
comparing = Comparator.comparing(EduOrganStudentDataDto::getTotalStudentNum, "ASC".equals(queryInfo.getTotalStudentNum())?Comparator.naturalOrder():Comparator.reverseOrder());
|