|
|
|
@ -484,7 +484,7 @@ public class TeacherOpenCourseHandsOnService extends CoreBaseService<TeacherOpen
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int schedule = NumberUtil.div(decimal, BigDecimal.valueOf(tasksList.size()), 2).multiply(BigDecimal.valueOf(100)).intValue();
|
|
|
|
|
int schedule = NumberUtil.div(decimal, BigDecimal.valueOf(tasks.size()), 2).multiply(BigDecimal.valueOf(100)).intValue();
|
|
|
|
|
studentHandsOnVO.setSchedule(schedule);
|
|
|
|
|
} else {
|
|
|
|
|
studentHandsOnVO.setSchedule(0);
|
|
|
|
@ -496,6 +496,46 @@ public class TeacherOpenCourseHandsOnService extends CoreBaseService<TeacherOpen
|
|
|
|
|
return JsonResult.success(studentHandsOnVOS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询课程实操-课程中心-不查成绩
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public JsonResult<List<StudentHandsOnVO>> getHandsListCenterByOpenCourseId(Long teacherOpenCourseId, CoreUser coreUser) {
|
|
|
|
|
|
|
|
|
|
//查询实操
|
|
|
|
|
TeacherOpenCourseHandsOnQuery handsOnQuery = new TeacherOpenCourseHandsOnQuery();
|
|
|
|
|
handsOnQuery.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
|
List<TeacherOpenCourseHandsOn> handsOnList = this.getValuesByQueryNotWithPermission(handsOnQuery);
|
|
|
|
|
|
|
|
|
|
List<TeacherOpenCourseHandsOnSimulationTasks> tasksList = new ArrayList<>();
|
|
|
|
|
if (CollectionUtils.isNotEmpty(handsOnList)) {
|
|
|
|
|
//查询实操任务
|
|
|
|
|
List<Long> handIds = handsOnList.stream().map(TeacherOpenCourseHandsOn::getHandsOnId).collect(Collectors.toList());
|
|
|
|
|
TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
|
|
|
|
|
tasksQuery.setHandsOnIdPlural(CollectionUtil.join(handIds, ","));
|
|
|
|
|
tasksList = teacherOpenCourseHandsOnSimulationTasksService.getValuesByQueryNotWithPermission(tasksQuery);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
List<StudentHandsOnVO> studentHandsOnVOS = new ArrayList<>();
|
|
|
|
|
for (TeacherOpenCourseHandsOn handsOn : handsOnList) {
|
|
|
|
|
StudentHandsOnVO studentHandsOnVO = new StudentHandsOnVO();
|
|
|
|
|
Long handsOnId = handsOn.getHandsOnId();
|
|
|
|
|
studentHandsOnVO.setChapterId(handsOn.getCourseChildNode());
|
|
|
|
|
studentHandsOnVO.setTeacherOpenCourseId(handsOn.getTeacherOpenCourseId());
|
|
|
|
|
List<TeacherOpenCourseHandsOnSimulationTasks> tasks = tasksList.stream().filter(v -> v.getHandsOnId().equals(handsOnId)).collect(Collectors.toList());
|
|
|
|
|
studentHandsOnVO.setHandsOnId(handsOnId);
|
|
|
|
|
studentHandsOnVO.setHandsOnName(handsOn.getHandsOnName());
|
|
|
|
|
studentHandsOnVO.setHandsOnTaskNum(tasks.size());
|
|
|
|
|
studentHandsOnVOS.add(studentHandsOnVO);
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success(studentHandsOnVOS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 复制开课实训到开课
|
|
|
|
|
*
|
|
|
|
|