|
@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
|
|
import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
|
|
import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
|
|
import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
|
|
import com.ym.mec.biz.dal.page.VipClassQueryInfo;
|
|
import com.ym.mec.biz.dal.page.VipClassQueryInfo;
|
|
|
|
+import com.ym.mec.biz.dal.page.queryMusicGroupCourseScheduleQueryInfo;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.entity.ImGroupModel;
|
|
import com.ym.mec.common.entity.ImGroupModel;
|
|
@@ -21,14 +22,12 @@ import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.format.datetime.DateFormatter;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
-import java.text.DateFormat;
|
|
|
|
import java.time.Instant;
|
|
import java.time.Instant;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
@@ -61,8 +60,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
@Autowired
|
|
@Autowired
|
|
private TeacherDefaultMusicGroupSalaryService teacherDefaultMusicGroupSalaryService;
|
|
private TeacherDefaultMusicGroupSalaryService teacherDefaultMusicGroupSalaryService;
|
|
@Autowired
|
|
@Autowired
|
|
- private CourseScheduleService courseScheduleService;
|
|
|
|
- @Autowired
|
|
|
|
private StudentRegistrationDao studentRegistrationDao;
|
|
private StudentRegistrationDao studentRegistrationDao;
|
|
@Autowired
|
|
@Autowired
|
|
private MusicGroupStudentFeeDao musicGroupStudentFeeDao;
|
|
private MusicGroupStudentFeeDao musicGroupStudentFeeDao;
|
|
@@ -110,8 +107,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<ClassGroup> findAllClassGroupByMusicGroup(String musicGroupId) {
|
|
public List<ClassGroup> findAllClassGroupByMusicGroup(String musicGroupId) {
|
|
- List<ClassGroup> allMixClassGroup = classGroupDao.findAllClassGroupByMusicGroup(musicGroupId);
|
|
|
|
- return allMixClassGroup;
|
|
|
|
|
|
+ return classGroupDao.findAllClassGroupByMusicGroup(musicGroupId);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -761,4 +757,44 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
classGroupTeacherMapperDao.classGroupTeachersInsert(classGroupTeacherMapperList);
|
|
classGroupTeacherMapperDao.classGroupTeachersInsert(classGroupTeacherMapperList);
|
|
return classGroup;
|
|
return classGroup;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public PageInfo<MusicGroupClassGroupDto> queryMusicGroupClassGroup(QueryInfo queryInfo) {
|
|
|
|
+ PageInfo<MusicGroupClassGroupDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
|
+ List<MusicGroupClassGroupDto> dataList = null;
|
|
|
|
+ int count = classGroupDao.countMusicGroupClassGroup(params);
|
|
|
|
+ if (count > 0) {
|
|
|
|
+ pageInfo.setTotal(count);
|
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
|
+ dataList = classGroupDao.queryMusicGroupClassGroup(params);
|
|
|
|
+ Set<Integer> classGroups = dataList.stream().map(e -> e.getClassGroupId()).collect(Collectors.toSet());
|
|
|
|
+ String join = StringUtils.join(classGroups, ",");
|
|
|
|
+ //获取主教老师
|
|
|
|
+ Map<Integer,String> masterTeachers = MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "BISHOP"));
|
|
|
|
+ //获取助教老师
|
|
|
|
+ Map<Integer,String> subTeachers = MapUtil.convertMybatisMap(classGroupDao.countStudentNum(join, "TEACHING"));
|
|
|
|
+ //获取在读人数
|
|
|
|
+ Map<Integer,String> studyNums = MapUtil.convertMybatisMap(classGroupDao.countStudyNum(join));
|
|
|
|
+ //获取退班人数
|
|
|
|
+ Map<Integer,String> quitNums = MapUtil.convertMybatisMap(classGroupDao.countQuitNum(join));
|
|
|
|
+ dataList.forEach(e->{
|
|
|
|
+ e.setMasterTeacher(masterTeachers.get(e.getClassGroupId()));
|
|
|
|
+ e.setSubTeacher(subTeachers.get(e.getClassGroupId()));
|
|
|
|
+ e.setStudyNum(studyNums.get(e.getClassGroupId()));
|
|
|
|
+ e.setQuitNum(quitNums.get(e.getClassGroupId()));
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ dataList = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
|
+ return pageInfo;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public PageInfo queryMusicGroupCourseSchedule(queryMusicGroupCourseScheduleQueryInfo queryInfo) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
}
|
|
}
|