|
@@ -10,6 +10,7 @@ import com.ym.mec.biz.dal.enums.CourseStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
|
|
|
|
|
|
+import com.ym.mec.common.page.QueryInfo;
|
|
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.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -68,7 +69,7 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
@Autowired
|
|
@Autowired
|
|
private StudentManageDao studentManageDao;
|
|
private StudentManageDao studentManageDao;
|
|
@Autowired
|
|
@Autowired
|
|
- private OrganizationDao organizationDao;
|
|
|
|
|
|
+ private MusicGroupPaymentStudentCourseDetailDao musicGroupPaymentStudentCourseDetailDao;
|
|
@Autowired
|
|
@Autowired
|
|
private CourseScheduleStudentPaymentDao scheduleStudentPaymentDao;
|
|
private CourseScheduleStudentPaymentDao scheduleStudentPaymentDao;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -416,18 +417,8 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
PageInfo<MusicGroupStudentsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
PageInfo<MusicGroupStudentsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
MapUtil.populateMap(params, queryInfo);
|
|
MapUtil.populateMap(params, queryInfo);
|
|
-// if(StringUtils.isNotEmpty(queryInfo.getPaymentStatus())){
|
|
|
|
-// List<Integer> userIds;
|
|
|
|
-// if("NON_PAYMENT".equals(queryInfo.getPaymentStatus())){
|
|
|
|
-// userIds = musicGroupPaymentCalenderDao.queryUserByNoPayment(queryInfo.getClassGroupId());
|
|
|
|
-// }else {
|
|
|
|
-// userIds = musicGroupPaymentCalenderDao.queryUserByPayment(queryInfo.getClassGroupId());
|
|
|
|
-// }
|
|
|
|
-// if(userIds != null && userIds.size() > 0){
|
|
|
|
-// params.put("userIds",userIds);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
List<MusicGroupStudentsDto> dataList = null;
|
|
List<MusicGroupStudentsDto> dataList = null;
|
|
|
|
+ String musicGroupId = queryInfo.getMusicGroupId();
|
|
int count = studentManageDao.countMusicGroupStudent(params);
|
|
int count = studentManageDao.countMusicGroupStudent(params);
|
|
if (queryInfo.getIsExport() && count > 50000) {
|
|
if (queryInfo.getIsExport() && count > 50000) {
|
|
throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
@@ -438,6 +429,8 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
dataList = studentManageDao.queryMusicGroupStudent(params);
|
|
dataList = studentManageDao.queryMusicGroupStudent(params);
|
|
//退团的学生
|
|
//退团的学生
|
|
List<Integer> quitUserIds = dataList.stream().filter(e -> e.getStudentStatus().equals("QUIT")).map(MusicGroupStudentsDto::getUserId).collect(Collectors.toList());
|
|
List<Integer> quitUserIds = dataList.stream().filter(e -> e.getStudentStatus().equals("QUIT")).map(MusicGroupStudentsDto::getUserId).collect(Collectors.toList());
|
|
|
|
+ Set<Integer> studentIds = dataList.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
|
|
+ List<Map<Integer,Integer>> subTotalCourseTimeMap = musicGroupPaymentStudentCourseDetailDao.queryStudentSubTotalCourseTime(studentIds,musicGroupId);
|
|
|
|
|
|
if (quitUserIds.size() > 0) {
|
|
if (quitUserIds.size() > 0) {
|
|
List<MusicGroupQuit> quits = musicGroupQuitDao.getQuits(queryInfo.getMusicGroupId(), quitUserIds);
|
|
List<MusicGroupQuit> quits = musicGroupQuitDao.getQuits(queryInfo.getMusicGroupId(), quitUserIds);
|
|
@@ -448,15 +441,6 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-// Map<Integer,String> maps = MapUtil.convertIntegerMap(musicGroupStudentFeeDao.findPaymentStatusMap(queryInfo.getMusicGroupId()));
|
|
|
|
-// dataList.forEach(e->{
|
|
|
|
-// e.setPaymentStatus(maps.get(e.getUserId()));
|
|
|
|
-// Set<Integer> collect = dataList.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
|
|
-// Map<Integer,String> paymentStatusMap = MapUtil.convertIntegerMap(
|
|
|
|
-// musicGroupPaymentCalenderDao.queryUserCoursePaymentStatus(collect,queryInfo.getMusicGroupId()));
|
|
|
|
-// dataList.forEach(e -> {
|
|
|
|
-// e.setPaymentStatus(paymentStatusMap.get(e.getUserId()));
|
|
|
|
-// });
|
|
|
|
}
|
|
}
|
|
if (count == 0) {
|
|
if (count == 0) {
|
|
dataList = new ArrayList<>();
|
|
dataList = new ArrayList<>();
|
|
@@ -689,12 +673,12 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<BasicUserDto> queryGroupStudents(String groupType) {
|
|
|
|
|
|
+ public List<BasicUserDto> queryGroupStudents(QueryInfo queryInfo) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
if(sysUser == null || sysUser.getId() == null){
|
|
if(sysUser == null || sysUser.getId() == null){
|
|
throw new BizException("用户信息获取失败");
|
|
throw new BizException("用户信息获取失败");
|
|
}
|
|
}
|
|
- if("VIP".equals(groupType)){
|
|
|
|
|
|
+ if("VIP".equals(queryInfo.getSearch())){
|
|
return studentManageDao.queryVipGroupStudents(sysUser.getId());
|
|
return studentManageDao.queryVipGroupStudents(sysUser.getId());
|
|
}else {
|
|
}else {
|
|
return studentManageDao.queryPracticeGroupStudents(sysUser.getId());
|
|
return studentManageDao.queryPracticeGroupStudents(sysUser.getId());
|