|
@@ -53,9 +53,6 @@ public class CourseTargetServiceImpl extends ServiceImpl<CourseTargetMapper, Cou
|
|
|
@Resource
|
|
|
private ExamTaskPaperDataService examTaskPaperDataService;
|
|
|
|
|
|
- @Resource
|
|
|
- private ExamTaskService examTaskService;
|
|
|
-
|
|
|
@Override
|
|
|
public List<CourseTargetResult> findCourseTargetList(Long teachCourseId) {
|
|
|
TeachCourse teachCourse = teachCourseService.getById(teachCourseId);
|
|
@@ -261,15 +258,13 @@ public class CourseTargetServiceImpl extends ServiceImpl<CourseTargetMapper, Cou
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PaperStructDimensionResult> findTikuPaperStruct(Long examId, String paperNumber, Long userId) {
|
|
|
- List<PaperStructDimensionResult> result = new ArrayList<>();
|
|
|
- ExamTask examTask = examTaskService.getOne(new QueryWrapper<ExamTask>().lambda().eq(ExamTask::getExamId, examId)
|
|
|
- .eq(ExamTask::getPaperNumber, paperNumber).last(SystemConstant.LIMIT1));
|
|
|
- if (Objects.isNull(examTask)) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("命题任务不存在");
|
|
|
+ public List<PaperStructDimensionResult> findTikuPaperStruct(Long teachCourseId, String paperNumber) {
|
|
|
+ TeachCourse teachCourse = teachCourseService.getById(teachCourseId);
|
|
|
+ if (Objects.isNull(teachCourse)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("教学课程不存在");
|
|
|
}
|
|
|
- String courseCode = examTask.getCourseCode();
|
|
|
- TeachCourse teachCourse = teachCourseService.findByExamIdCourseCodeAndUserId(examId, courseCode, userId);
|
|
|
+ List<PaperStructDimensionResult> result = new ArrayList<>();
|
|
|
+
|
|
|
List<CourseTarget> courseTargetList = this.list(
|
|
|
new QueryWrapper<CourseTarget>().lambda().eq(CourseTarget::getTeachCourseId, teachCourse.getId()));
|
|
|
List<CourseDimension> courseDimensionList = courseDimensionService.list(
|
|
@@ -279,7 +274,7 @@ public class CourseTargetServiceImpl extends ServiceImpl<CourseTargetMapper, Cou
|
|
|
.collect(Collectors.toMap(CourseDimension::getCode, e -> e));
|
|
|
|
|
|
ExamTaskPaperData examTaskPaperData = examTaskPaperDataService.getOne(
|
|
|
- new QueryWrapper<ExamTaskPaperData>().lambda().eq(ExamTaskPaperData::getExamId, examId)
|
|
|
+ new QueryWrapper<ExamTaskPaperData>().lambda().eq(ExamTaskPaperData::getExamId, teachCourse.getExamId())
|
|
|
.eq(ExamTaskPaperData::getPaperNumber, paperNumber).last(SystemConstant.LIMIT1));
|
|
|
if (Objects.nonNull(examTaskPaperData)) {
|
|
|
String paperStruct = examTaskPaperData.getPaperJson();
|
|
@@ -306,8 +301,8 @@ public class CourseTargetServiceImpl extends ServiceImpl<CourseTargetMapper, Cou
|
|
|
Double score = subQuestion.getDouble("score");
|
|
|
String property = subQuestion.getString("property");
|
|
|
if (SystemConstant.strNotNull(property)) {
|
|
|
- List<DimensionDto> dimensionList = JSON.parseArray(property,
|
|
|
- CourseDimensionDto.class).stream().filter(e -> courseDimensionMap.containsKey(e.getCode())).flatMap(e -> {
|
|
|
+ List<DimensionDto> dimensionList = JSON.parseArray(property, CourseDimensionDto.class).stream()
|
|
|
+ .filter(e -> courseDimensionMap.containsKey(e.getCode())).flatMap(e -> {
|
|
|
DimensionDto dimensionDto = new DimensionDto();
|
|
|
dimensionDto.setDimensionId(courseDimensionMap.get(e.getCode()).getId());
|
|
|
dimensionDto.setDimensionCode(e.getCode());
|
|
@@ -363,15 +358,6 @@ public class CourseTargetServiceImpl extends ServiceImpl<CourseTargetMapper, Cou
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<PaperStructDimensionResult> findTikuPaperStruct(Long teachCourseId) {
|
|
|
- TeachCourse teachCourse = teachCourseService.getById(teachCourseId);
|
|
|
- if (Objects.isNull(teachCourse)){
|
|
|
- throw ExceptionResultEnum.ERROR.exception("教学课程不存在");
|
|
|
- }
|
|
|
- return this.findTikuPaperStruct(teachCourse.getExamId(), teachCourse.getCourseCode(), teachCourse.getUserId());
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 构建知识点占用情况对象
|
|
|
*
|