|
|
|
@ -593,41 +593,47 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
StudentHandsOnTaskLogQuery logQuery = new StudentHandsOnTaskLogQuery();
|
|
|
|
|
logQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
logQuery.setStudentId(studentId);
|
|
|
|
|
logQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskLog> handsOnTaskLogs = null;
|
|
|
|
|
|
|
|
|
|
if (HandsOnTaskEnum.TASK_VIDEO.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskVideoQuery videoQuery = new StudentHandsOnTaskVideoQuery();
|
|
|
|
|
videoQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
videoQuery.setStudentId(studentId);
|
|
|
|
|
videoQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskVideo> videoList = studentHandsOnTaskVideoService.getValuesByQueryNotWithPermission(videoQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(videoList)) {
|
|
|
|
|
StudentHandsOnTaskVideo studentHandsOnTaskVideo = videoList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskVideo.getVideoScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
// handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_PPT.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskPptQuery pptQuery = new StudentHandsOnTaskPptQuery();
|
|
|
|
|
pptQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
pptQuery.setStudentId(studentId);
|
|
|
|
|
pptQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskPpt> pptList = studentHandsOnTaskPptService.getValuesByQueryNotWithPermission(pptQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(pptList)) {
|
|
|
|
|
StudentHandsOnTaskPpt studentHandsOnTaskPpt = pptList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskPpt.getPptScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
// handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_THEORY.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskTheoryQuery theoryQuery = new StudentHandsOnTaskTheoryQuery();
|
|
|
|
|
theoryQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
theoryQuery.setStudentId(studentId);
|
|
|
|
|
theoryQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskTheory> taskTheoryList = studentHandsOnTaskTheoryService.getValuesByQueryNotWithPermission(theoryQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(taskTheoryList)) {
|
|
|
|
|
BigDecimal videoScore = taskTheoryList.stream().map(StudentHandsOnTaskTheory::getTheoryScore).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
@ -640,6 +646,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
StudentHandsOnTaskStepQuery stepQuery = new StudentHandsOnTaskStepQuery();
|
|
|
|
|
stepQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
stepQuery.setStudentId(studentId);
|
|
|
|
|
stepQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskStep> stepList = studentHandsOnTaskStepService.getValuesByQueryNotWithPermission(stepQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(stepList)) {
|
|
|
|
|
StudentHandsOnTaskStep taskTheory = stepList.get(0);
|
|
|
|
@ -653,6 +660,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
StudentHandsOnTaskReportQuery reportQuery = new StudentHandsOnTaskReportQuery();
|
|
|
|
|
reportQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
reportQuery.setStudentId(studentId);
|
|
|
|
|
reportQuery.setIsCourseCentre(1);
|
|
|
|
|
List<StudentHandsOnTaskReport> reportList = studentHandsOnTaskReportService.getValuesByQueryNotWithPermission(reportQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(reportList)) {
|
|
|
|
|
StudentHandsOnTaskReport taskTheory = reportList.get(0);
|
|
|
|
@ -714,6 +722,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
logQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
logQuery.setCourseType(courseType);
|
|
|
|
|
logQuery.setStudentId(studentId);
|
|
|
|
|
logQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskLog> handsOnTaskLogs = null;
|
|
|
|
|
|
|
|
|
|
if (HandsOnTaskEnum.TASK_VIDEO.status.equals(task.getTaskType())) {
|
|
|
|
@ -721,37 +730,40 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
videoQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
videoQuery.setCourseType(courseType);
|
|
|
|
|
videoQuery.setStudentId(studentId);
|
|
|
|
|
videoQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskVideo> videoList = studentHandsOnTaskVideoService.getValuesByQueryNotWithPermission(videoQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(videoList)) {
|
|
|
|
|
StudentHandsOnTaskVideo studentHandsOnTaskVideo = videoList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskVideo.getVideoScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_PPT.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskPptQuery pptQuery = new StudentHandsOnTaskPptQuery();
|
|
|
|
|
pptQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
pptQuery.setCourseType(courseType);
|
|
|
|
|
pptQuery.setStudentId(studentId);
|
|
|
|
|
pptQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskPpt> pptList = studentHandsOnTaskPptService.getValuesByQueryNotWithPermission(pptQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(pptList)) {
|
|
|
|
|
StudentHandsOnTaskPpt studentHandsOnTaskPpt = pptList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskPpt.getPptScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_THEORY.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskTheoryQuery theoryQuery = new StudentHandsOnTaskTheoryQuery();
|
|
|
|
|
theoryQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
theoryQuery.setCourseType(courseType);
|
|
|
|
|
theoryQuery.setStudentId(studentId);
|
|
|
|
|
theoryQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskTheory> taskTheoryList = studentHandsOnTaskTheoryService.getValuesByQueryNotWithPermission(theoryQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(taskTheoryList)) {
|
|
|
|
|
BigDecimal videoScore = taskTheoryList.stream().map(StudentHandsOnTaskTheory::getTheoryScore).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
@ -765,6 +777,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
stepQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
stepQuery.setCourseType(courseType);
|
|
|
|
|
stepQuery.setStudentId(studentId);
|
|
|
|
|
stepQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskStep> stepList = studentHandsOnTaskStepService.getValuesByQueryNotWithPermission(stepQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(stepList)) {
|
|
|
|
|
StudentHandsOnTaskStep taskTheory = stepList.get(0);
|
|
|
|
@ -779,6 +792,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
reportQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
reportQuery.setCourseType(courseType);
|
|
|
|
|
reportQuery.setStudentId(studentId);
|
|
|
|
|
reportQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskReport> reportList = studentHandsOnTaskReportService.getValuesByQueryNotWithPermission(reportQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(reportList)) {
|
|
|
|
|
StudentHandsOnTaskReport taskTheory = reportList.get(0);
|
|
|
|
@ -823,6 +837,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
logQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
logQuery.setCourseType(courseType);
|
|
|
|
|
logQuery.setStudentId(studentId);
|
|
|
|
|
logQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskLog> handsOnTaskLogs = null;
|
|
|
|
|
|
|
|
|
|
if (HandsOnTaskEnum.TASK_VIDEO.status.equals(task.getTaskType())) {
|
|
|
|
@ -830,37 +845,40 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
videoQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
videoQuery.setCourseType(courseType);
|
|
|
|
|
videoQuery.setStudentId(studentId);
|
|
|
|
|
videoQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskVideo> videoList = studentHandsOnTaskVideoService.getValuesByQueryNotWithPermission(videoQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(videoList)) {
|
|
|
|
|
StudentHandsOnTaskVideo studentHandsOnTaskVideo = videoList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskVideo.getVideoScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_PPT.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskPptQuery pptQuery = new StudentHandsOnTaskPptQuery();
|
|
|
|
|
pptQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
pptQuery.setCourseType(courseType);
|
|
|
|
|
pptQuery.setStudentId(studentId);
|
|
|
|
|
pptQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskPpt> pptList = studentHandsOnTaskPptService.getValuesByQueryNotWithPermission(pptQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(pptList)) {
|
|
|
|
|
StudentHandsOnTaskPpt studentHandsOnTaskPpt = pptList.get(0);
|
|
|
|
|
BigDecimal videoScore = studentHandsOnTaskPpt.getPptScore();
|
|
|
|
|
handsOnTaskScoreVO.setScore(videoScore == null ? 0 : videoScore.doubleValue());
|
|
|
|
|
bigDecimal = bigDecimal.add(videoScore == null ? BigDecimal.ZERO : videoScore);
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else {
|
|
|
|
|
handsOnTaskScoreVO.setScore(0D);
|
|
|
|
|
}
|
|
|
|
|
handsOnTaskLogs = logService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
} else if (HandsOnTaskEnum.TASK_THEORY.status.equals(task.getTaskType())) {
|
|
|
|
|
StudentHandsOnTaskTheoryQuery theoryQuery = new StudentHandsOnTaskTheoryQuery();
|
|
|
|
|
theoryQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
theoryQuery.setCourseType(courseType);
|
|
|
|
|
theoryQuery.setStudentId(studentId);
|
|
|
|
|
theoryQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskTheory> taskTheoryList = studentHandsOnTaskTheoryService.getValuesByQueryNotWithPermission(theoryQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(taskTheoryList)) {
|
|
|
|
|
BigDecimal videoScore = taskTheoryList.stream().map(StudentHandsOnTaskTheory::getTheoryScore).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
@ -874,6 +892,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
stepQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
stepQuery.setCourseType(courseType);
|
|
|
|
|
stepQuery.setStudentId(studentId);
|
|
|
|
|
stepQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskStep> stepList = studentHandsOnTaskStepService.getValuesByQueryNotWithPermission(stepQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(stepList)) {
|
|
|
|
|
StudentHandsOnTaskStep taskTheory = stepList.get(0);
|
|
|
|
@ -888,6 +907,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
|
|
|
|
|
reportQuery.setHandsOnTaskId(taskId);
|
|
|
|
|
reportQuery.setCourseType(courseType);
|
|
|
|
|
reportQuery.setStudentId(studentId);
|
|
|
|
|
reportQuery.setIsCourseCentre(2);
|
|
|
|
|
List<StudentHandsOnTaskReport> reportList = studentHandsOnTaskReportService.getValuesByQueryNotWithPermission(reportQuery);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(reportList)) {
|
|
|
|
|
StudentHandsOnTaskReport taskTheory = reportList.get(0);
|
|
|
|
|