|
@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -46,10 +47,6 @@ import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
|
|
|
import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
|
|
|
-import com.ym.mec.biz.service.ClassGroupService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
|
|
|
-import com.ym.mec.biz.service.SysConfigService;
|
|
|
-import com.ym.mec.biz.service.SysMessageService;
|
|
|
import com.ym.mec.common.constant.CommonConstants;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -124,6 +121,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
private CourseScheduleStudentPaymentServiceImpl courseScheduleStudentPaymentService;
|
|
|
@Autowired
|
|
|
private MusicGroupStudentClassAdjustDao musicGroupStudentClassAdjustDao;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPaymentCalenderDetailService musicGroupPaymentCalenderDetailService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
|
|
@@ -357,6 +356,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
musicGroupPaymentCalender.setBatchNo(batchNo);
|
|
|
musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
|
|
|
|
|
|
+
|
|
|
List<MusicGroupPaymentCalenderCourseSettings> currentMusicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalender
|
|
|
.getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
|
@@ -365,6 +365,12 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
addStudent(musicGroupPaymentCalender, currentMusicGroupPaymentCalenderCourseSettings);
|
|
|
}
|
|
|
+ if(StringUtils.isEmpty(musicGroupPaymentCalenderDto.getBatchNo())){
|
|
|
+ //缴费项目添加学员
|
|
|
+ int[] ints = Arrays.stream(musicGroupPaymentCalenderDto.getStudentIds().split(",")).mapToInt(Integer::parseInt).toArray();
|
|
|
+ List<Integer> list2 = Arrays.stream(ints).boxed().collect(Collectors.toList());
|
|
|
+ musicGroupPaymentCalenderDetailService.batchAdd(musicGroupPaymentCalender.getId(),list2);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
@@ -886,6 +892,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
List<ClassGroup4MixDto> classGroup4MixDtos = JSON.parseArray(musicGroupStudentClassAdjust.getNewClassGroupJson(), ClassGroup4MixDto.class);
|
|
|
//开始排课
|
|
|
ClassGroup4MixDto classGroup4MixDto = classGroup4MixDtos.get(0);
|
|
|
+ classGroup4MixDto.setMusicGroupStudentClassAdjustId(musicGroupStudentClassAdjust.getId());
|
|
|
classGroup4MixDto.setClassCourseMinute(musicGroupStudentClassAdjust.getClassCourseMinute());
|
|
|
List<CourseTimeDto> courseTimeDtoList = classGroup4MixDto.getCourseTimeDtoList();
|
|
|
List<CourseTimeDto> courseTimeDtoListBackup = Arrays.asList(new CourseTimeDto[courseTimeDtoList.size()]);
|
|
@@ -894,6 +901,14 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
} catch (Exception e) {
|
|
|
throw new BizException("拷贝课程信息异常");
|
|
|
}
|
|
|
+
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenders = musicGroupPaymentCalenderDao.findByBatchNo(batchNo);
|
|
|
+ for (MusicGroupPaymentCalender calender : musicGroupPaymentCalenders) {
|
|
|
+ //缴费项目添加学员
|
|
|
+ int[] ints = Arrays.stream(calender.getStudentIds().split(",")).mapToInt(Integer::parseInt).toArray();
|
|
|
+ List<Integer> list2 = Arrays.stream(ints).boxed().collect(Collectors.toList());
|
|
|
+ musicGroupPaymentCalenderDetailService.batchAdd(calender.getId(),list2);
|
|
|
+ }
|
|
|
//每种课程类型单独排课
|
|
|
for (CourseTimeDto courseTimeDto : courseTimeDtoListBackup) {
|
|
|
List<CourseTimeDto> courseTimeDtos = new ArrayList<>();
|