|  | @@ -27,7 +27,6 @@ import com.ym.mec.jiari.JiaRiFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateConvertor;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
	
		
			
				|  | @@ -51,16 +50,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private VipGroupDao vipGroupDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private VipGroupActivityDao vipGroupActivityDao;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private TeacherAttendanceDao teacherAttendanceDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private MusicGroupDao musicGroupDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private MusicGroupBuildLogDao musicGroupBuildLogDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private MusicGroupService musicGroupService;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private ClassGroupRelationService classGroupRelationService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private ClassGroupStudentMapperDao classGroupStudentMapperDao;
 | 
	
	
		
			
				|  | @@ -95,8 +90,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private JiaRiFeignService jiaRiFeignService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private SysConfigService sysConfigService;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private CourseScheduleService courseScheduleService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private CourseScheduleStudentPaymentService courseScheduleStudentPaymentService;
 | 
	
	
		
			
				|  | @@ -309,6 +302,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          List<ClassGroupTeacherMapper> classGroupTeacherMapperList = new ArrayList<>();
 | 
	
		
			
				|  |  |          List<ClassGroupImGroupDto> classGroupImGroupList = new ArrayList<>();
 | 
	
		
			
				|  |  |          Integer schoolId = musicGroup.getSchoolId();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          for (HighClassGroupDto highClassGroup : highClassGroupList) {
 | 
	
		
			
				|  |  |              if (highClassGroup.getDayOfWeek() < 1 || highClassGroup.getDayOfWeek() > 7) {
 | 
	
		
			
				|  |  |                  throw new BizException("上课星期错误,请核查");
 | 
	
	
		
			
				|  | @@ -338,15 +333,31 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              //3、插入班级排课信息
 | 
	
		
			
				|  |  |              int times = 0;
 | 
	
		
			
				|  |  | -            //LocalDateTime now = LocalDateTime.ofInstant(highClassGroup.getStartDate().toInstant(), ZoneId.systemDefault());
 | 
	
		
			
				|  |  |              LocalDateTime now = LocalDate.parse(highClassGroup.getStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd")).atStartOfDay();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              List<Subject> subjectList = subjectService.findBySubjectByIdList(highClassGroup.getSubjectIdList());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              String courseScheduleName = subjectList.stream().map(subject -> subject.getName()).collect(Collectors.joining("/"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            Map<String, Integer> holidayDays = new HashMap<>();
 | 
	
		
			
				|  |  | +            Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
 | 
	
		
			
				|  |  | +            if (highClassGroup.getHoliday()) {
 | 
	
		
			
				|  |  | +                holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +                holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            WhileNode:
 | 
	
		
			
				|  |  |              while (highClassGroup.getCourseTimes() > times) {
 | 
	
		
			
				|  |  | +                if(highClassGroup.getHoliday() && !holiday.containsKey(now.getYear())){
 | 
	
		
			
				|  |  | +                    holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +                    holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (highClassGroup.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
 | 
	
		
			
				|  |  | +                    now = now.plusDays(1);
 | 
	
		
			
				|  |  | +                    continue;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                  int dayOfWeek = now.getDayOfWeek().getValue();
 | 
	
		
			
				|  |  |                  if (highClassGroup.getDayOfWeek() == dayOfWeek) {
 | 
	
		
			
				|  |  |                      CourseSchedule courseSchedule = new CourseSchedule();
 | 
	
	
		
			
				|  | @@ -384,6 +395,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |              classGroupImGroupDto.setUserIds(userIdList);
 | 
	
		
			
				|  |  |              classGroupImGroupList.add(classGroupImGroupDto);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          //加入Im群组
 | 
	
		
			
				|  |  |          batchAddImGroup(classGroupImGroupList);
 | 
	
		
			
				|  |  |          classGroupTeacherMapperService.classGroupTeachersInsert(classGroupTeacherMapperList);
 | 
	
	
		
			
				|  | @@ -1091,14 +1104,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          int times = 0;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Map<String, Integer> holidayDays = new HashMap<>();
 | 
	
		
			
				|  |  | +        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
 | 
	
		
			
				|  |  |          if (classGroup4MixDto.getHoliday()) {
 | 
	
		
			
				|  |  | -            Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +            holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  |              holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          WhileNode:
 | 
	
		
			
				|  |  |          while (true) {
 | 
	
		
			
				|  |  | +            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
 | 
	
		
			
				|  |  | +                holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +                holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
 | 
	
		
			
				|  |  |                  now = now.plusDays(1);
 | 
	
		
			
				|  |  |                  continue;
 | 
	
	
		
			
				|  | @@ -1298,14 +1316,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          int times = 0;
 | 
	
		
			
				|  |  |          Map<String, Integer> holidayDays = new HashMap<>();
 | 
	
		
			
				|  |  | +        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
 | 
	
		
			
				|  |  |          if (classGroup4MixDto.getHoliday()) {
 | 
	
		
			
				|  |  | -            Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +            holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  |              holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          WhileNode:
 | 
	
		
			
				|  |  |          while (true) {
 | 
	
		
			
				|  |  | +            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
 | 
	
		
			
				|  |  | +                holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +                holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
 | 
	
		
			
				|  |  |                  now = now.plusDays(1);
 | 
	
		
			
				|  |  |                  continue;
 | 
	
	
		
			
				|  | @@ -1525,14 +1548,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          BigDecimal expectPrice = new BigDecimal("0");
 | 
	
		
			
				|  |  |          int times = 0;
 | 
	
		
			
				|  |  |          Map<String, Integer> holidayDays = new HashMap<>();
 | 
	
		
			
				|  |  | +        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
 | 
	
		
			
				|  |  |          if (classGroup4MixDto.getHoliday()) {
 | 
	
		
			
				|  |  | -            Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +            holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  |              holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          WhileNode:
 | 
	
		
			
				|  |  |          while (true) {
 | 
	
		
			
				|  |  | +            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
 | 
	
		
			
				|  |  | +                holiday = jiaRiFeignService.query(now.getYear());
 | 
	
		
			
				|  |  | +                holidayDays = holiday.get(now.getYear());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
 | 
	
		
			
				|  |  |                  now = now.plusDays(1);
 | 
	
		
			
				|  |  |                  continue;
 |