From 0a84b3a40611f1b9bba7bcba5b374eab2d39bed8 Mon Sep 17 00:00:00 2001 From: wgf <121463602@qq.com> Date: Sun, 13 Aug 2023 23:44:32 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=88=91=E7=9A=84=E8=AF=BE=E7=A8=8B-?= =?UTF-8?q?=E5=AE=9E=E6=93=8D-=E7=90=86=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/entity/vo/ResourcesQuestionVO.java | 21 ++ .../StudentHandsOnTaskTheoryService.java | 355 +++++++++++------- .../com/ibeetl/jlw/web/HandsOnController.java | 7 +- .../StudentHandsOnTaskTheoryController.java | 10 +- 4 files changed, 249 insertions(+), 144 deletions(-) create mode 100644 web/src/main/java/com/ibeetl/jlw/entity/vo/ResourcesQuestionVO.java diff --git a/web/src/main/java/com/ibeetl/jlw/entity/vo/ResourcesQuestionVO.java b/web/src/main/java/com/ibeetl/jlw/entity/vo/ResourcesQuestionVO.java new file mode 100644 index 00000000..bf484db3 --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/entity/vo/ResourcesQuestionVO.java @@ -0,0 +1,21 @@ +package com.ibeetl.jlw.entity.vo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.ibeetl.jlw.entity.ResourcesQuestion; +import lombok.Data; + +/** + * 类功能说明 + * + * @Version 0.0.1 + * @Author 许良彤 + * @Date 2022/12/7 21:42 + */ +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class ResourcesQuestionVO extends ResourcesQuestion { + + private String myOptions; + private String taskId; + +} \ No newline at end of file diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java index 8d794900..23fa3279 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java @@ -19,6 +19,7 @@ import com.ibeetl.jlw.dao.HandsOnDao; import com.ibeetl.jlw.dao.StudentHandsOnTaskTheoryDao; import com.ibeetl.jlw.entity.*; import com.ibeetl.jlw.entity.dto.FillAndAnalysisScoreDTO; +import com.ibeetl.jlw.entity.vo.ResourcesQuestionVO; import com.ibeetl.jlw.entity.vo.TeacherOpenCourseMergeResourcesQuestionVO; import com.ibeetl.jlw.enums.HandsOnTaskEnum; import com.ibeetl.jlw.service.handson.HandsOnTaskQueue; @@ -966,154 +967,226 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService taskTheoryList = new ArrayList<>(); - //1 教师开课 2 系统授权 - if (ObjectUtil.equals(courseType, 2)) { - HandsOnSimulationTasksQuery simulationTasksQuery = new HandsOnSimulationTasksQuery(); - simulationTasksQuery.setTaskId(taskId); - List handsOnSimulationTasksList = handsOnSimulationTasksService.getValuesByQueryNotPermission(simulationTasksQuery); - if (CollectionUtils.isEmpty(handsOnSimulationTasksList)) { - return JsonResult.fail(); - } - HandsOnSimulationTasks handsOnSimulationTasks = handsOnSimulationTasksList.get(0); - - handsOnId = handsOnSimulationTasks.getHandsOnId(); - - String taskList = handsOnSimulationTasks.getTaskList(); - ResourcesQuestionQuery questionQuery = new ResourcesQuestionQuery(); - questionQuery.setResourcesQuestionIds(taskList); - List resourcesQuestionList = resourcesQuestionService.getValuesByQueryNotWithPermission(questionQuery); - - - for (TeacherOpenCourseMergeResourcesQuestionVO resourcesQuestion : teacherOpenCourseMergeResourcesQuestionQueries) { - //根据实操id 获取课程id - List handsOns = ObjectUtil.isEmpty(handsOnSimulationTasks.getHandsOnId()) ? new ArrayList<>() : handsOnDao.getByIds(handsOnSimulationTasks.getHandsOnId().toString()); - StudentHandsOnTaskTheory taskTheory = new StudentHandsOnTaskTheory(); - taskTheory.setCourseType(courseType); - taskTheory.setTeacherOpenCourseId(CollectionUtils.isEmpty(handsOns) ? null : handsOns.get(0).getCourseInfoId()); - taskTheory.setHandsOnId(handsOnSimulationTasks.getHandsOnId()); - taskTheory.setHandsOnTaskId(handsOnSimulationTasks.getTaskId()); - taskTheory.setStem(resourcesQuestion.getQuestionStem()); - Integer questionType = resourcesQuestion.getQuestionType(); - taskTheory.setQuestionType(questionType); - String myOptions = ObjectUtil.defaultIfBlank(resourcesQuestion.getMyOptions(), ""); - taskTheory.setMyOptions(myOptions); - ResourcesQuestion resourcesQuestionItem = resourcesQuestionList.stream().filter(v -> v.getResourcesQuestionId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())).findFirst().orElse(new ResourcesQuestion()); - String questionAnswer = ObjectUtil.defaultIfBlank(resourcesQuestionItem.getQuestionAnswer(), ""); - taskTheory.setRightKey(questionAnswer); - if (questionType.equals(1)) { - if (questionAnswer.contains(myOptions)) { - taskTheory.setTheoryScore(handsOnSimulationTasks.getSingleScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(2)) { - String[] split = Arrays.stream(questionAnswer.split(",")).sorted().toArray(String[]::new); - String[] split1 = Arrays.stream(myOptions.split(",")).sorted().toArray(String[]::new); - ; - if (ArrayUtil.equals(split, split1)) { - taskTheory.setTheoryScore(handsOnSimulationTasks.getMultipleScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(3)) { - if (questionAnswer.contains(myOptions)) { - taskTheory.setTheoryScore(handsOnSimulationTasks.getJudgeScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(4)) { - if (questionAnswer.equals(myOptions)) { - taskTheory.setTheoryScore(handsOnSimulationTasks.getFillScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(5)) { - if (questionAnswer.equals(myOptions)) { - taskTheory.setTheoryScore(handsOnSimulationTasks.getAnalysisScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } + TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery(); + tasksQuery.setTaskId(taskId); + List tasksList = teacherOpenCourseHandsOnSimulationTasksService.getValuesByQueryNotWithPermission(tasksQuery); + if (CollectionUtils.isEmpty(tasksList)) { + return JsonResult.fail(); + } + TeacherOpenCourseHandsOnSimulationTasks tasks = tasksList.get(0); + handsOnId = tasks.getHandsOnId(); + String taskList = tasks.getTaskList(); + TeacherOpenCourseMergeResourcesQuestionQuery questionQuery = new TeacherOpenCourseMergeResourcesQuestionQuery(); + questionQuery.setTeacherOpenCourseMergeResourcesQuestionIdPlural(taskList); + List resourcesQuestions = teacherOpenCourseMergeResourcesQuestionService.getValuesByQueryNotWithPermission(questionQuery); + + + for (TeacherOpenCourseMergeResourcesQuestionVO resourcesQuestion : teacherOpenCourseMergeResourcesQuestionQueries) { + StudentHandsOnTaskTheory taskTheory = new StudentHandsOnTaskTheory(); + taskTheory.setCourseType(courseType); + taskTheory.setTeacherOpenCourseId(tasks.getTeacherOpenCourseId()); + taskTheory.setHandsOnId(tasks.getHandsOnId()); + taskTheory.setHandsOnTaskId(tasks.getTaskId()); + taskTheory.setStem(resourcesQuestion.getQuestionStem()); + Integer questionType = resourcesQuestion.getQuestionType(); + taskTheory.setQuestionType(questionType); + String myOptions = ObjectUtil.defaultIfBlank(resourcesQuestion.getMyOptions(), ""); + taskTheory.setMyOptions(myOptions); + TeacherOpenCourseMergeResourcesQuestion teacherOpenCourseMergeResourcesQuestion = resourcesQuestions.stream().filter(v -> v.getTeacherOpenCourseMergeResourcesQuestionId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())).findFirst().orElse(new TeacherOpenCourseMergeResourcesQuestion()); + String questionAnswer = ObjectUtil.defaultIfBlank(teacherOpenCourseMergeResourcesQuestion.getQuestionAnswer(), ""); + taskTheory.setRightKey(questionAnswer); + if (questionType.equals(1)) { + if (questionAnswer.contains(myOptions)) { + taskTheory.setTheoryScore(tasks.getSingleScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(2)) { + String[] split = Arrays.stream(questionAnswer.split(",")).sorted().toArray(String[]::new); + String[] split1 = Arrays.stream(myOptions.split(",")).sorted().toArray(String[]::new); + ; + if (ArrayUtil.equals(split, split1)) { + taskTheory.setTheoryScore(tasks.getMultipleScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(3)) { + if (questionAnswer.contains(myOptions)) { + taskTheory.setTheoryScore(tasks.getJudgeScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(4)) { + if (questionAnswer.equals(myOptions)) { + taskTheory.setTheoryScore(tasks.getFillScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(5)) { + if (questionAnswer.equals(myOptions)) { + taskTheory.setTheoryScore(tasks.getAnalysisScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); } - taskTheory.setIsCourseCentre(2); - taskTheory.setCreateTime(new Date()); - taskTheory.setStudentId(student.getStudentId()); - taskTheory.setUserId(coreUser.getId()); - taskTheory.setOrgId(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()); - taskTheoryList.add(taskTheory); } + taskTheory.setIsCourseCentre(2); + taskTheory.setCreateTime(new Date()); + taskTheory.setStudentId(student.getStudentId()); + taskTheory.setUserId(coreUser.getId()); + taskTheory.setOrgId(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()); + taskTheoryList.add(taskTheory); + } - } else { - TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery(); - tasksQuery.setTaskId(taskId); - List tasksList = teacherOpenCourseHandsOnSimulationTasksService.getValuesByQueryNotWithPermission(tasksQuery); - if (CollectionUtils.isEmpty(tasksList)) { - return JsonResult.fail(); + //更新成绩 + if (CollUtil.isNotEmpty(taskTheoryList)) { + BigDecimal totalScore = new BigDecimal(0); + for (StudentHandsOnTaskTheory studentHandsOnTaskTheory : taskTheoryList) { + BigDecimal theoryScore = studentHandsOnTaskTheory.getTheoryScore(); + totalScore = totalScore.add(ObjectUtil.defaultIfNull(theoryScore, BigDecimal.ZERO)); } - TeacherOpenCourseHandsOnSimulationTasks tasks = tasksList.get(0); - handsOnId = tasks.getHandsOnId(); - String taskList = tasks.getTaskList(); - TeacherOpenCourseMergeResourcesQuestionQuery questionQuery = new TeacherOpenCourseMergeResourcesQuestionQuery(); - questionQuery.setTeacherOpenCourseMergeResourcesQuestionIdPlural(taskList); - List resourcesQuestions = teacherOpenCourseMergeResourcesQuestionService.getValuesByQueryNotWithPermission(questionQuery); - - - for (TeacherOpenCourseMergeResourcesQuestionVO resourcesQuestion : teacherOpenCourseMergeResourcesQuestionQueries) { - StudentHandsOnTaskTheory taskTheory = new StudentHandsOnTaskTheory(); - taskTheory.setCourseType(courseType); - taskTheory.setTeacherOpenCourseId(tasks.getTeacherOpenCourseId()); - taskTheory.setHandsOnId(tasks.getHandsOnId()); - taskTheory.setHandsOnTaskId(tasks.getTaskId()); - taskTheory.setStem(resourcesQuestion.getQuestionStem()); - Integer questionType = resourcesQuestion.getQuestionType(); - taskTheory.setQuestionType(questionType); - String myOptions = ObjectUtil.defaultIfBlank(resourcesQuestion.getMyOptions(), ""); - taskTheory.setMyOptions(myOptions); - TeacherOpenCourseMergeResourcesQuestion teacherOpenCourseMergeResourcesQuestion = resourcesQuestions.stream().filter(v -> v.getTeacherOpenCourseMergeResourcesQuestionId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())).findFirst().orElse(new TeacherOpenCourseMergeResourcesQuestion()); - String questionAnswer = ObjectUtil.defaultIfBlank(teacherOpenCourseMergeResourcesQuestion.getQuestionAnswer(), ""); - taskTheory.setRightKey(questionAnswer); - if (questionType.equals(1)) { - if (questionAnswer.contains(myOptions)) { - taskTheory.setTheoryScore(tasks.getSingleScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(2)) { - String[] split = Arrays.stream(questionAnswer.split(",")).sorted().toArray(String[]::new); - String[] split1 = Arrays.stream(myOptions.split(",")).sorted().toArray(String[]::new); - ; - if (ArrayUtil.equals(split, split1)) { - taskTheory.setTheoryScore(tasks.getMultipleScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(3)) { - if (questionAnswer.contains(myOptions)) { - taskTheory.setTheoryScore(tasks.getJudgeScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(4)) { - if (questionAnswer.equals(myOptions)) { - taskTheory.setTheoryScore(tasks.getFillScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } else if (questionType.equals(5)) { - if (questionAnswer.equals(myOptions)) { - taskTheory.setTheoryScore(tasks.getAnalysisScore()); - } else { - taskTheory.setTheoryScore(BigDecimal.ZERO); - } - } - taskTheory.setIsCourseCentre(2); - taskTheory.setCreateTime(new Date()); - taskTheory.setStudentId(student.getStudentId()); - taskTheory.setUserId(coreUser.getId()); - taskTheory.setOrgId(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()); - taskTheoryList.add(taskTheory); + + HandsOnAchievement build = HandsOnAchievement.builder() + .handOnId(handsOnId) + .studentId(student.getStudentId()) + .classId(student.getClassId()) + .theoryScore(totalScore.toPlainString()) + .courseType(courseType) + .isCourseCentre(2) + .orgId(student.getOrgId()) + .userId(student.getUserId()).build(); + handsOnAchievementService.setHandsOnAchievement(build, HandsOnTaskEnum.TASK_THEORY); + } + + this.insertBatch(taskTheoryList); + questions.remove(s); + return JsonResult.success("提交成功"); + } + + + /** + * 课程中心添加(授权课程) 添加任务 理论测评 + * + * @param + * @param coreUser + * @param i 1强制提交 2临时提交 + * @param courseType 1 教师开课 2 系统授权 + * @return + */ + public JsonResult addSystemTheoreticalEvaluation(List resourcesQuestionQueries, CoreUser coreUser, int i, int courseType) { + //查询登录用的学生id + if (!coreUser.isStudent()) { + return null; + } + if (CollectionUtils.isEmpty(resourcesQuestionQueries)) { + return JsonResult.fail(); + } + Long taskId = Long.parseLong(resourcesQuestionQueries.get(0).getTaskId() + ""); + Student student = studentService.getByUserId(coreUser.getId()); + String s = student.getStudentId() + "&" + taskId; + //如果==2 说明是临时保存 + if (i == 2) { + Map map = questions.get(s); + Record record = MapUtil.get(map, "record", Record.class); + Map map1 = new HashMap<>(); + map1.put("resourcesQuestions", resourcesQuestionQueries); + if (record == null) { + record = new Record(); + record.setStudentId(student.getStudentId()); + record.setTaskId(taskId); + Date date = new Date(); + record.setStartTime(date); + record.setEndTime(DateUtil.offsetHour(date, 3)); } + map1.put("record", record); + questions.put(s, map1); + return JsonResult.success("临时保存成功"); + } + + List theoryList = this.sqlManager.lambdaQuery(StudentHandsOnTaskTheory.class).andEq(StudentHandsOnTaskTheory::getHandsOnTaskId, taskId) + .andEq(StudentHandsOnTaskTheory::getCourseType, courseType) + .andEq(StudentHandsOnTaskTheory::getIsCourseCentre,2) + .andEq(StudentHandsOnTaskTheory::getStudentId, student.getStudentId()).select(); + if (CollectionUtils.isNotEmpty(theoryList)) { + return JsonResult.fail("已提交,重复提交"); + } + + Long handsOnId = null; + + List taskTheoryList = new ArrayList<>(); + HandsOnSimulationTasksQuery simulationTasksQuery = new HandsOnSimulationTasksQuery(); + simulationTasksQuery.setTaskId(taskId); + List handsOnSimulationTasksList = handsOnSimulationTasksService.getValuesByQueryNotPermission(simulationTasksQuery); + if (CollectionUtils.isEmpty(handsOnSimulationTasksList)) { + return JsonResult.fail(); + } + HandsOnSimulationTasks handsOnSimulationTasks = handsOnSimulationTasksList.get(0); + + handsOnId = handsOnSimulationTasks.getHandsOnId(); + + String taskList = handsOnSimulationTasks.getTaskList(); + ResourcesQuestionQuery questionQuery = new ResourcesQuestionQuery(); + questionQuery.setResourcesQuestionIds(taskList); + List resourcesQuestionList = resourcesQuestionService.getValuesByQueryNotWithPermission(questionQuery); + + + for (ResourcesQuestionVO resourcesQuestion : resourcesQuestionQueries) { + //根据实操id 获取课程id + List handsOns = ObjectUtil.isEmpty(handsOnSimulationTasks.getHandsOnId()) ? new ArrayList<>() : handsOnDao.getByIds(handsOnSimulationTasks.getHandsOnId().toString()); + StudentHandsOnTaskTheory taskTheory = new StudentHandsOnTaskTheory(); + taskTheory.setCourseType(courseType); + taskTheory.setTeacherOpenCourseId(CollectionUtils.isEmpty(handsOns) ? null : handsOns.get(0).getCourseInfoId()); + taskTheory.setHandsOnId(handsOnSimulationTasks.getHandsOnId()); + taskTheory.setHandsOnTaskId(handsOnSimulationTasks.getTaskId()); + taskTheory.setStem(resourcesQuestion.getQuestionStem()); + Integer questionType = resourcesQuestion.getQuestionType(); + taskTheory.setQuestionType(questionType); + String myOptions = ObjectUtil.defaultIfBlank(resourcesQuestion.getMyOptions(), ""); + taskTheory.setMyOptions(myOptions); + ResourcesQuestion resourcesQuestionItem = resourcesQuestionList.stream().filter(v -> v.getResourcesQuestionId().equals(resourcesQuestion.getResourcesQuestionId())).findFirst().orElse(new ResourcesQuestion()); + String questionAnswer = ObjectUtil.defaultIfBlank(resourcesQuestionItem.getQuestionAnswer(), ""); + taskTheory.setRightKey(questionAnswer); + if (questionType.equals(1)) { + if (questionAnswer.contains(myOptions)) { + taskTheory.setTheoryScore(handsOnSimulationTasks.getSingleScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(2)) { + String[] split = Arrays.stream(questionAnswer.split(",")).sorted().toArray(String[]::new); + String[] split1 = Arrays.stream(myOptions.split(",")).sorted().toArray(String[]::new); + ; + if (ArrayUtil.equals(split, split1)) { + taskTheory.setTheoryScore(handsOnSimulationTasks.getMultipleScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(3)) { + if (questionAnswer.contains(myOptions)) { + taskTheory.setTheoryScore(handsOnSimulationTasks.getJudgeScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(4)) { + if (questionAnswer.equals(myOptions)) { + taskTheory.setTheoryScore(handsOnSimulationTasks.getFillScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } else if (questionType.equals(5)) { + if (questionAnswer.equals(myOptions)) { + taskTheory.setTheoryScore(handsOnSimulationTasks.getAnalysisScore()); + } else { + taskTheory.setTheoryScore(BigDecimal.ZERO); + } + } + taskTheory.setIsCourseCentre(2); + taskTheory.setCreateTime(new Date()); + taskTheory.setStudentId(student.getStudentId()); + taskTheory.setUserId(coreUser.getId()); + taskTheory.setOrgId(resourcesQuestion.getOrgId()); + taskTheoryList.add(taskTheory); } diff --git a/web/src/main/java/com/ibeetl/jlw/web/HandsOnController.java b/web/src/main/java/com/ibeetl/jlw/web/HandsOnController.java index de1367ef..9433e90d 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/HandsOnController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/HandsOnController.java @@ -431,6 +431,11 @@ public class HandsOnController{ */ @GetMapping(API + "/getCourseCentreHandsListCenterByOpenCourseId.do") public JsonResult getCourseCentreHandsListCenterByOpenCourseId(Long courseInfoId,@SCoreUser CoreUser coreUser) { - return handsOnService.getCourseCentreHandsListByOpenCourseIdAndStudent(courseInfoId,coreUser); + if (coreUser.isTeacher()){ + List handsListCenterByOpenCourseId = handsOnService.getHandsListCenterByOpenCourseId(courseInfoId); + return JsonResult.success(handsListCenterByOpenCourseId); + }else { + return handsOnService.getCourseCentreHandsListByOpenCourseIdAndStudent(courseInfoId,coreUser); + } } } diff --git a/web/src/main/java/com/ibeetl/jlw/web/StudentHandsOnTaskTheoryController.java b/web/src/main/java/com/ibeetl/jlw/web/StudentHandsOnTaskTheoryController.java index 00a1598f..0d24580e 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/StudentHandsOnTaskTheoryController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/StudentHandsOnTaskTheoryController.java @@ -20,6 +20,7 @@ import com.ibeetl.jlw.entity.ResourcesQuestion; import com.ibeetl.jlw.entity.StudentHandsOnTaskTheory; import com.ibeetl.jlw.entity.TeacherOpenCourseMergeResourcesQuestion; import com.ibeetl.jlw.entity.dto.FillAndAnalysisScoreDTO; +import com.ibeetl.jlw.entity.vo.ResourcesQuestionVO; import com.ibeetl.jlw.entity.vo.TeacherOpenCourseMergeResourcesQuestionVO; import com.ibeetl.jlw.enums.ResourcesQuestionTypeEnum; import com.ibeetl.jlw.service.StudentHandsOnTaskTheoryService; @@ -715,9 +716,14 @@ public class StudentHandsOnTaskTheoryController { if (ObjectUtil.isEmpty(courseType)){ return JsonResult.failMessage("缺少课程类型" ); } - List teacherOpenCourseMergeResourcesQuestionVOS = JSONObject.parseArray(teacherOpenCourseMergeResourcesQuestionQuery,TeacherOpenCourseMergeResourcesQuestionVO.class); + if (ObjectUtil.equals(courseType,2)){ + List teacherOpenCourseMergeResourcesQuestionVOS = JSONObject.parseArray(teacherOpenCourseMergeResourcesQuestionQuery,ResourcesQuestionVO.class); + return studentHandsOnTaskTheoryService.addSystemTheoreticalEvaluation(teacherOpenCourseMergeResourcesQuestionVOS, coreUser, temporarily,courseType); + }else { + List teacherOpenCourseMergeResourcesQuestionVOS = JSONObject.parseArray(teacherOpenCourseMergeResourcesQuestionQuery,TeacherOpenCourseMergeResourcesQuestionVO.class); - return studentHandsOnTaskTheoryService.addTheoreticalEvaluation(teacherOpenCourseMergeResourcesQuestionVOS, coreUser, temporarily,courseType); + return studentHandsOnTaskTheoryService.addTheoreticalEvaluation(teacherOpenCourseMergeResourcesQuestionVOS, coreUser, temporarily,courseType); + } } }