|
@@ -161,14 +161,14 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
- List<StudentApplyDetailDto> dataList = null;
|
|
|
+ List<StudentApplyDetailDto> dataList = new ArrayList<>();
|
|
|
int count = studentRegistrationDao.queryStudentDetailCount(params);
|
|
|
if (queryInfo.getIsExport() && count > 50000) {
|
|
|
throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
}
|
|
|
- if (count > 0) {
|
|
|
- pageInfo.setTotal(count);
|
|
|
- params.put("offset", pageInfo.getOffset());
|
|
|
+ pageInfo.setTotal(count);
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
+ if (queryInfo.getPage() <= pageInfo.getTotalPage()) {
|
|
|
dataList = studentRegistrationDao.queryStudentDetailPage(params);
|
|
|
Set<Integer> subjectIds = dataList.stream().map(e -> e.getActualSubjectId()).collect(Collectors.toSet());
|
|
|
Map<Integer, String> subjectMap = MapUtil.convertIntegerMap(musicGroupSubjectPlanDao.findSubjectMap(subjectIds, queryInfo.getMusicGroupId()));
|
|
@@ -183,9 +183,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if (count == 0) {
|
|
|
- dataList = new ArrayList<>();
|
|
|
- }
|
|
|
pageInfo.setRows(dataList);
|
|
|
return pageInfo;
|
|
|
}
|
|
@@ -331,26 +328,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentRegistration.setUpdateTime(date);
|
|
|
studentRegistration.setUserId(sysUser.getId());
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.APPLY);
|
|
|
-
|
|
|
- Organization organization = organizationDao.get(studentRegistration.getOrganId());
|
|
|
- if(organization.getGradeType().equals(GradeTypeEnum.SIX_PLUS)){
|
|
|
- for (SixPlusGradeEnum value : SixPlusGradeEnum.values()) {
|
|
|
- if(value.getCode().equals(studentRegistration.getCurrentGradeNum())){
|
|
|
- studentRegistration.setCurrentGrade(value.getDesc());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }else {
|
|
|
- for (FivePlusGradeEnum value : FivePlusGradeEnum.values()) {
|
|
|
- if(value.getCode().equals(studentRegistration.getCurrentGradeNum())){
|
|
|
- studentRegistration.setCurrentGrade(value.getDesc());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(hasReg != null){
|
|
|
- studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
|
+ if (hasReg != null) {
|
|
|
+ studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.APPLY);
|
|
|
studentRegistration.setId(hasReg.getId());
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
} else {
|
|
@@ -1641,34 +1620,35 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
@Override
|
|
|
public String checkRegOrPayStatus(String musicGroupId) {
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
- if (musicGroup.getStatus() == MusicGroupStatusEnum.PAY &&
|
|
|
- musicGroup.getStatus() == MusicGroupStatusEnum.PREPARE &&
|
|
|
+ if (musicGroup.getStatus() == MusicGroupStatusEnum.PAY ||
|
|
|
+ musicGroup.getStatus() == MusicGroupStatusEnum.PREPARE ||
|
|
|
musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS) {
|
|
|
Date now = new Date();
|
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroup.getId());
|
|
|
if (regCalender != null && regCalender.getDeadlinePaymentDate() != null) {
|
|
|
musicGroup.setPaymentExpireDate(regCalender.getDeadlinePaymentDate());
|
|
|
}
|
|
|
- if (musicGroup.getPaymentExpireDate() != null && DateUtil.daysBetween(musicGroup.getPaymentExpireDate(), now) > 1) {
|
|
|
+
|
|
|
+ if (musicGroup.getPaymentExpireDate() != null && now.compareTo(DateUtil.getLastTimeWithDay(musicGroup.getPaymentExpireDate())) > 0) {
|
|
|
return "乐团缴费时间已截止";
|
|
|
}
|
|
|
}
|
|
|
//储备中、进行中,乐团没有报名缴费项、有多批次缴费项不能缴费、有已上的课程不能缴费
|
|
|
- if (musicGroup.getStatus() == MusicGroupStatusEnum.PREPARE &&
|
|
|
+ if (musicGroup.getStatus() == MusicGroupStatusEnum.PREPARE ||
|
|
|
musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS) {
|
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroup.getId());
|
|
|
if (regCalender == null) {
|
|
|
return "乐团没有报名缴费项";
|
|
|
}
|
|
|
- List<Integer> musicGroupCalenderBatchNoTimes = musicGroupPaymentCalenderDao.getMusicGroupCalenderBatchNoTimes(musicGroup.getId());
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupCalenderBatchNoTimes = musicGroupPaymentCalenderDao.getMusicGroupCalenderBatchNoTimes(musicGroup.getId());
|
|
|
if (musicGroupCalenderBatchNoTimes.size() > 1) {
|
|
|
- return "乐团已建多批次缴费";
|
|
|
+ return "乐团已进入续费阶段";
|
|
|
}
|
|
|
|
|
|
- Integer hasStartCourseNum = courseScheduleDao.getMusicGroupHasStartCourseNum(musicGroup.getId());
|
|
|
- if (hasStartCourseNum != null && hasStartCourseNum > 0) {
|
|
|
- return "乐团已开课";
|
|
|
- }
|
|
|
+// Integer hasStartCourseNum = courseScheduleDao.getMusicGroupHasStartCourseNum(musicGroup.getId());
|
|
|
+// if (hasStartCourseNum != null && hasStartCourseNum > 0) {
|
|
|
+// return "乐团已开课";
|
|
|
+// }
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -1678,21 +1658,21 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
Map<String, Boolean> viewMap = new HashMap<>();
|
|
|
List<MusicGroupPaymentCalender> regCalenders = musicGroupPaymentCalenderDao.getMusicGroupRegCalenderByIds(ids);
|
|
|
for (MusicGroupPaymentCalender regCalender : regCalenders) {
|
|
|
- viewMap.put(regCalender.getMusicGroupId(),true);
|
|
|
+ viewMap.put(regCalender.getMusicGroupId(), true);
|
|
|
}
|
|
|
|
|
|
Map<String, List<MusicGroupPaymentCalender>> musicGroupBatchNoTimes = musicGroupPaymentCalenderDao.getMusicGroupCalenderBatchNoByIds(ids).stream().collect(Collectors.groupingBy(MusicGroupPaymentCalender::getMusicGroupId));
|
|
|
- musicGroupBatchNoTimes.forEach((musicGroupId,calenders)->{
|
|
|
- if(viewMap.containsKey(musicGroupId) && calenders.size() > 1){
|
|
|
+ musicGroupBatchNoTimes.forEach((musicGroupId, calenders) -> {
|
|
|
+ if (viewMap.containsKey(musicGroupId) && calenders.size() > 1) {
|
|
|
viewMap.remove(musicGroupId);
|
|
|
}
|
|
|
});
|
|
|
- List<CourseSchedule> musicGroupsHasStartCourseNums = courseScheduleDao.getMusicGroupsHasStartCourseNum(ids);
|
|
|
- for (CourseSchedule musicGroupsHasStartCourseNum : musicGroupsHasStartCourseNums) {
|
|
|
- if(viewMap.containsKey(musicGroupsHasStartCourseNum.getMusicGroupId())){
|
|
|
- viewMap.remove(musicGroupsHasStartCourseNum.getMusicGroupId());
|
|
|
- }
|
|
|
- }
|
|
|
+// List<CourseSchedule> musicGroupsHasStartCourseNums = courseScheduleDao.getMusicGroupsHasStartCourseNum(ids);
|
|
|
+// for (CourseSchedule musicGroupsHasStartCourseNum : musicGroupsHasStartCourseNums) {
|
|
|
+// if(viewMap.containsKey(musicGroupsHasStartCourseNum.getMusicGroupId())){
|
|
|
+// viewMap.remove(musicGroupsHasStartCourseNum.getMusicGroupId());
|
|
|
+// }
|
|
|
+// }
|
|
|
return viewMap;
|
|
|
}
|
|
|
}
|