|
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.qmth.teachcloud.common.entity.BasicCourse;
|
|
import com.qmth.teachcloud.common.entity.BasicCourse;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
-import com.qmth.teachcloud.report.business.bean.result.SurveyTeacherExamCourseResult;
|
|
|
|
|
|
+import com.qmth.teachcloud.report.business.bean.result.TBExamCourseResult;
|
|
import com.qmth.teachcloud.report.business.entity.TBExamCourse;
|
|
import com.qmth.teachcloud.report.business.entity.TBExamCourse;
|
|
import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
|
|
import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
|
|
import com.qmth.teachcloud.report.business.enums.TestStatusEnum;
|
|
import com.qmth.teachcloud.report.business.enums.TestStatusEnum;
|
|
@@ -63,26 +63,26 @@ public class TBExamCourseServiceImpl extends ServiceImpl<TBExamCourseMapper, TBE
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<String> findEffectiveByExamId(Long examId,String courseCode) {
|
|
|
|
|
|
+ public List<String> findEffectiveByExamId(Long examId, String courseCode) {
|
|
List<PublishStatusEnum> publishStatusEnumList = new ArrayList<>();
|
|
List<PublishStatusEnum> publishStatusEnumList = new ArrayList<>();
|
|
publishStatusEnumList.add(PublishStatusEnum.UN_COMPUTE);
|
|
publishStatusEnumList.add(PublishStatusEnum.UN_COMPUTE);
|
|
publishStatusEnumList.add(PublishStatusEnum.UN_PUBLISH);
|
|
publishStatusEnumList.add(PublishStatusEnum.UN_PUBLISH);
|
|
|
|
|
|
List<TBExamCourse> effectiveCourseList = this.list(new QueryWrapper<TBExamCourse>().lambda()
|
|
List<TBExamCourse> effectiveCourseList = this.list(new QueryWrapper<TBExamCourse>().lambda()
|
|
- .eq(TBExamCourse::getExamId,examId)
|
|
|
|
- .eq(TBExamCourse::getTestStatus,TestStatusEnum.UN_TEST)
|
|
|
|
- .in(TBExamCourse::getPublishStatus,publishStatusEnumList));
|
|
|
|
|
|
+ .eq(TBExamCourse::getExamId, examId)
|
|
|
|
+ .eq(TBExamCourse::getTestStatus, TestStatusEnum.UN_TEST)
|
|
|
|
+ .in(TBExamCourse::getPublishStatus, publishStatusEnumList));
|
|
|
|
|
|
- if (effectiveCourseList.size() == 0){
|
|
|
|
|
|
+ if (effectiveCourseList.size() == 0) {
|
|
throw ExceptionResultEnum.ERROR.exception("该考试目前没有任何课程可以分析");
|
|
throw ExceptionResultEnum.ERROR.exception("该考试目前没有任何课程可以分析");
|
|
}
|
|
}
|
|
List<String> effectCourseCodeList = new ArrayList<>();
|
|
List<String> effectCourseCodeList = new ArrayList<>();
|
|
- if (courseCode != null && courseCode.length() > 0){
|
|
|
|
- if (!effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList()).contains(courseCode)){
|
|
|
|
|
|
+ if (courseCode != null && courseCode.length() > 0) {
|
|
|
|
+ if (!effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList()).contains(courseCode)) {
|
|
throw ExceptionResultEnum.ERROR.exception("课程【" + courseCode + "】无法进行分析");
|
|
throw ExceptionResultEnum.ERROR.exception("课程【" + courseCode + "】无法进行分析");
|
|
}
|
|
}
|
|
effectCourseCodeList.add(courseCode);
|
|
effectCourseCodeList.add(courseCode);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
effectCourseCodeList = effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList());
|
|
effectCourseCodeList = effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList());
|
|
}
|
|
}
|
|
return effectCourseCodeList;
|
|
return effectCourseCodeList;
|
|
@@ -97,7 +97,7 @@ public class TBExamCourseServiceImpl extends ServiceImpl<TBExamCourseMapper, TBE
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<SurveyTeacherExamCourseResult> findCourseList(Long schoolId, Long examId, boolean inspect) {
|
|
|
|
|
|
+ public List<TBExamCourseResult> findCourseList(Long schoolId, Long examId, boolean inspect) {
|
|
return tbExamCourseMapper.findCourseList(schoolId, examId, inspect);
|
|
return tbExamCourseMapper.findCourseList(schoolId, examId, inspect);
|
|
}
|
|
}
|
|
}
|
|
}
|