|
@@ -30,6 +30,7 @@ import java.util.TreeSet;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import org.apache.commons.collections.ListUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -144,17 +145,6 @@ import com.ym.mec.biz.dal.page.EndCourseScheduleQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
|
|
|
import com.ym.mec.biz.event.source.CourseEventSource;
|
|
|
-import com.ym.mec.biz.service.ClassGroupService;
|
|
|
-import com.ym.mec.biz.service.ClassGroupTeacherMapperService;
|
|
|
-import com.ym.mec.biz.service.CourseHomeworkService;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupService;
|
|
|
-import com.ym.mec.biz.service.PracticeGroupService;
|
|
|
-import com.ym.mec.biz.service.SysConfigService;
|
|
|
-import com.ym.mec.biz.service.SysMessageService;
|
|
|
-import com.ym.mec.biz.service.VipGroupService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.entity.ImGroupMember;
|
|
|
import com.ym.mec.common.entity.ImGroupModel;
|
|
@@ -252,6 +242,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
|
|
|
@Autowired
|
|
|
private CourseEventSource courseEventSource;
|
|
|
+ @Autowired
|
|
|
+ private StudentServeService studentServeService;
|
|
|
|
|
|
private final Logger LOGGER = LoggerFactory
|
|
|
.getLogger(this.getClass());
|
|
@@ -297,7 +289,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
currentCourseDetail.setOnlyNormal(YesOrNoEnum.NO);
|
|
|
}
|
|
|
|
|
|
- currentCourseDetail.setCurrentClassTimes(courseScheduleDao.countClassGroupOverCourseNum(currentCourseDetail.getClassId()));
|
|
|
+ Set<Long> teacherServeCourseIds = studentServeService.getTeacherServeCourseIds(user.getId());
|
|
|
+ if(teacherServeCourseIds.contains(courseID)){
|
|
|
+ currentCourseDetail.setEnableAssignHomework(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ currentCourseDetail.setCurrentClassTimes(courseScheduleDao.countClassGroupOverCourseNum(currentCourseDetail.getClassId()));
|
|
|
SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
|
|
|
SysConfig sysConfigVip = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP);
|
|
|
currentCourseDetail.setEnableStudentAttendanceTimeRange(sysConfig.getParanValue(Integer.class));
|