|
@@ -380,13 +380,13 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
pageInfo.setTotal(count);
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
|
dataList = vipGroupDao.getTeacherVipClass(params);
|
|
|
- Set<Integer> activityIds = dataList.stream().map(e -> e.getActivityId()).collect(Collectors.toSet());
|
|
|
- List<Map<Integer, String>> names = vipGroupActivityDao.queryNamesById(StringUtils.join(activityIds, ","));
|
|
|
- Map<Integer, String> nameMap = MapUtil.convertMybatisMap(names);
|
|
|
+// Set<Integer> activityIds = dataList.stream().map(e -> e.getActivityId()).collect(Collectors.toSet());
|
|
|
+// List<Map<Integer, String>> names = vipGroupActivityDao.queryNamesById(StringUtils.join(activityIds, ","));
|
|
|
+// Map<Integer, String> nameMap = MapUtil.convertMybatisMap(names);
|
|
|
//计算月度平均消耗值(已上课时 / 消耗月份)
|
|
|
List<Long> vipGroupIds = dataList.stream().map(vipGroup -> vipGroup.getVipClassId()).collect(Collectors.toList());
|
|
|
List<Map<Long, Integer>> vipGroupOverCourses = vipGroupDao.countVipGroupOverCourse(vipGroupIds);
|
|
|
- Map<Long, Integer> vipGroupOverCourseMaps = MapUtil.convertMybatisMap(vipGroupOverCourses);
|
|
|
+ Map<Long, Integer> vipGroupOverCourseMaps = MapUtil.convertIntegerMap(vipGroupOverCourses);
|
|
|
dataList.forEach(vipGroup -> {
|
|
|
Integer overCourses = vipGroupOverCourseMaps.get(vipGroup.getVipClassId());
|
|
|
if (Objects.isNull(overCourses)) {
|
|
@@ -423,7 +423,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.findClassGroupTeachers(classGroupAndTeachersList);
|
|
|
//获取当前乐团的合奏班id列表map
|
|
|
- HashMap<Integer, Integer> idMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupRelationDao.queryClassRelationIdMap(musicGroupId))), HashMap.class);
|
|
|
+ HashMap<Integer, Integer> idMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupRelationDao.queryClassRelationIdMap(musicGroupId))), HashMap.class);
|
|
|
HashMap<Integer, String> nameMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupRelationDao.queryClassRelationNameMap(musicGroupId))), HashMap.class);
|
|
|
|
|
|
for (ClassGroupTeachersDto classGroupAndTeachers : classGroupAndTeachersList) {
|
|
@@ -495,7 +495,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
courseListDtos.addAll(vipCourses);
|
|
|
//检测对应乐团是否已申请退费
|
|
|
List<Map<String, Integer>> isApplyMaps = studentApplyRefundsDao.checkIsApplyRefund(musicGroupIds, userId);
|
|
|
- Map<String, Integer> isApplyMap = MapUtil.convertMybatisMap(isApplyMaps);
|
|
|
+ Map<String, Integer> isApplyMap = MapUtil.convertIntegerMap(isApplyMaps);
|
|
|
//获取所有教学点名称列表
|
|
|
Set<Integer> schoolIds = courseListDtos.stream().map(CourseListDto::getTeacherSchoolId).collect(Collectors.toSet());
|
|
|
Map<Integer, String> schoolNames = MapUtil.convertMybatisMap(schoolDao.queryNameByIds(StringUtils.join(schoolIds, ",")));
|
|
@@ -559,10 +559,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
Set<String> classGroupIds = imGroupModels.stream().map(e -> e.getId()).collect(Collectors.toSet());
|
|
|
//获取班级老师总数map
|
|
|
List<Map<Integer, Long>> nums = classGroupDao.countTeacherNums(StringUtils.join(classGroupIds, ","));
|
|
|
- Map<Integer, Long> numsMap = MapUtil.convertMybatisMap(nums);
|
|
|
+ Map<Integer, Integer> numsMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(nums)),HashMap.class);
|
|
|
imGroupModels.forEach(e -> {
|
|
|
- Long num = numsMap.get(Integer.parseInt(e.getId()));
|
|
|
- e.setCount((int) (num == null ? 0L : num) + e.getCount());
|
|
|
+ Integer num = numsMap.get(e.getId());
|
|
|
+ e.setCount((num == null ? 0 : num) + e.getCount());
|
|
|
});
|
|
|
}
|
|
|
return imGroupModels;
|
|
@@ -731,10 +731,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
List<Long> musicGroupIds = teacherMusicClassGroup.stream().map(teacherClassGroupDto -> teacherClassGroupDto.getMusicGroupId()).collect(Collectors.toList());
|
|
|
List<Map<Long, Integer>> musicGroupIdAndNumList = musicGroupStudentFeeDao.countContinuosAbsenteeismStudentNum(musicGroupIds);
|
|
|
- Map<Long, Integer> musicGroupIdAndNum = MapUtil.convertMybatisMap(musicGroupIdAndNumList);
|
|
|
+ Map<Long, Integer> musicGroupIdAndNum = MapUtil.convertIntegerMap(musicGroupIdAndNumList);
|
|
|
|
|
|
List<Map<Long, Integer>> vipGroupOverCourses = vipGroupDao.countVipGroupOverCourse(musicGroupIds);
|
|
|
- Map<Long, Integer> vipGroupOverCourseMaps = MapUtil.convertMybatisMap(vipGroupOverCourses);
|
|
|
+ Map<Long, Integer> vipGroupOverCourseMaps = MapUtil.convertIntegerMap(vipGroupOverCourses);
|
|
|
|
|
|
teacherMusicClassGroup.forEach(teacherClassGroupDto -> {
|
|
|
|
|
@@ -1503,9 +1503,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
//获取助教老师
|
|
|
Map<Integer, String> subTeachers = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "TEACHING"))), HashMap.class);
|
|
|
//获取在读人数
|
|
|
- Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countStudyNum(join))), HashMap.class);
|
|
|
+ Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(join))), HashMap.class);
|
|
|
//获取退班人数
|
|
|
- Map<Integer, Integer> quitNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(classGroupDao.countQuitNum(join))), HashMap.class);
|
|
|
+ Map<Integer, Integer> quitNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countQuitNum(join))), HashMap.class);
|
|
|
dataList.forEach(e -> {
|
|
|
e.setMasterTeacher(masterTeachers.get(e.getClassGroupId()));
|
|
|
e.setSubTeacher(subTeachers.get(e.getClassGroupId()));
|
|
@@ -1636,7 +1636,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
@Override
|
|
|
public int batchUpdateClassCourseTimes(List<Integer> classGroupIds) {
|
|
|
List<Map<Integer, Integer>> classGroupCourseTimesMaps = courseScheduleDao.countClassGroupCourseTimes(classGroupIds);
|
|
|
- Map<Integer, Integer> classGroupCourseTimesMap = MapUtil.convertMybatisMap(classGroupCourseTimesMaps);
|
|
|
+ Map<Integer, Integer> classGroupCourseTimesMap = MapUtil.convertIntegerMap(classGroupCourseTimesMaps);
|
|
|
return classGroupDao.batchUpdateClassGroupCourseTimes(classGroupCourseTimesMap);
|
|
|
}
|
|
|
}
|