|
@@ -1871,15 +1871,20 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
- public List<ExamTaskStudentObjectResult> findExamTaskStudentObject(ExamObjectType examObjectType, Long basicCourseId, SysUser requestUser) throws Exception {
|
|
|
|
|
|
+ public List<ExamTaskStudentObjectResult> findExamTaskStudentObject(ExamObjectType examObjectType, String courseCode, SysUser requestUser) throws Exception {
|
|
Long schoolId = requestUser.getSchoolId();
|
|
Long schoolId = requestUser.getSchoolId();
|
|
Long userId = requestUser.getId();
|
|
Long userId = requestUser.getId();
|
|
List<ExamTaskStudentObjectResult> result = new ArrayList<>();
|
|
List<ExamTaskStudentObjectResult> result = new ArrayList<>();
|
|
switch (examObjectType) {
|
|
switch (examObjectType) {
|
|
case TEACH_CLAZZ_STUDENT:
|
|
case TEACH_CLAZZ_STUDENT:
|
|
- if (!SystemConstant.longNotNull(basicCourseId)) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("缺少考试课程id");
|
|
|
|
|
|
+ if (!SystemConstant.strNotNull(courseCode)) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("缺少考试课程编号");
|
|
}
|
|
}
|
|
|
|
+ BasicCourse basicCourse = basicCourseService.getOne(new QueryWrapper<BasicCourse>().lambda().eq(BasicCourse::getSchoolId,schoolId).eq(BasicCourse::getCode,courseCode));
|
|
|
|
+ if (Objects.isNull(basicCourse)){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("找不到课程编号对应的课程");
|
|
|
|
+ }
|
|
|
|
+ Long basicCourseId = basicCourse.getId();
|
|
TeachCourse teachCourse = teachCourseService.getOne(new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getSchoolId, schoolId).eq(TeachCourse::getBasicCourseId, basicCourseId));
|
|
TeachCourse teachCourse = teachCourseService.getOne(new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getSchoolId, schoolId).eq(TeachCourse::getBasicCourseId, basicCourseId));
|
|
if (Objects.nonNull(teachCourse)) {
|
|
if (Objects.nonNull(teachCourse)) {
|
|
// 教学班对象
|
|
// 教学班对象
|