|
@@ -4,7 +4,6 @@ import com.ym.mec.web.dal.dto.HighClassGroup;
|
|
|
import com.ym.mec.web.dal.entity.*;
|
|
|
import com.ym.mec.web.dal.enums.ClassGroupStudentStatusEnum;
|
|
|
import com.ym.mec.web.dal.enums.ClassGroupTypeEnum;
|
|
|
-import com.ym.mec.web.dal.enums.TeachTypeEnum;
|
|
|
import com.ym.mec.web.service.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -14,6 +13,9 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.web.dal.dao.ClassGroupDao;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.time.DayOfWeek;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Service
|
|
@@ -139,8 +141,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public List<HighClassGroup> addHighClassGroup(List<HighClassGroup> highClassGroupList) throws Exception {
|
|
|
- Integer musicGroupId = highClassGroupList.get(0).getMusicGroupId();
|
|
|
- MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
for (HighClassGroup highClassGroup : highClassGroupList) {
|
|
|
//1、插入班级信息
|
|
|
Date date;
|
|
@@ -163,6 +164,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
classGroupTeacherMapperService.insert(classGroupTeacherMapper);
|
|
|
|
|
|
//3、插入班级排课信息
|
|
|
+ int i = 0;
|
|
|
+ while (true) {
|
|
|
+ int dayOfWeek = now.plusDays(1).getDayOfWeek().getValue();
|
|
|
+ if (highClassGroup.getDayOfWeek().equals(dayOfWeek)) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|