|
|
|
@ -3,6 +3,7 @@ package com.ibeetl.jlw.entity;
|
|
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
|
|
|
|
import com.ibeetl.jlw.enums.QuestionLogAddTypeEnum;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
|
|
import org.beetl.sql.annotation.entity.Auto;
|
|
|
|
@ -36,6 +37,10 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
|
|
|
|
|
// 学生ID
|
|
|
|
|
private Long studentId;
|
|
|
|
|
|
|
|
|
|
// 题目提交类型
|
|
|
|
|
|
|
|
|
|
private QuestionLogAddTypeEnum questionAddType;
|
|
|
|
|
|
|
|
|
|
// @FetchOne("studentId")
|
|
|
|
|
// @DictDeep
|
|
|
|
@ -60,7 +65,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
|
|
|
|
|
@FetchSql("select sum( ifnull( t.student_score > 0 , 0)) from teacher_open_course_question_log t " +
|
|
|
|
|
"where 1 = 1 " +
|
|
|
|
|
"and t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' \n" +
|
|
|
|
|
"and t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = #questionLogAddType# \n" +
|
|
|
|
|
"@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
"and t.student_id = #studentId# \n" +
|
|
|
|
|
"@} \n" +
|
|
|
|
@ -70,7 +75,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
|
|
|
|
|
// 答错数量
|
|
|
|
|
@FetchSql("select sum( ifnull( t.student_score <= 0 , 0)) from teacher_open_course_question_log t " +
|
|
|
|
|
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' \n" +
|
|
|
|
|
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = #questionLogAddType# \n" +
|
|
|
|
|
"@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
"and t.student_id = #studentId# \n" +
|
|
|
|
|
"@} \n" +
|
|
|
|
@ -81,7 +86,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
// 总得分
|
|
|
|
|
@FetchSql("select sum( IFNULL(t.student_score, 0) ) as total_score " +
|
|
|
|
|
"from teacher_open_course_question_log t " +
|
|
|
|
|
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' \n" +
|
|
|
|
|
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = #questionLogAddType# \n" +
|
|
|
|
|
"@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
"and t.student_id = #studentId# \n" +
|
|
|
|
|
"@} \n" +
|
|
|
|
@ -99,6 +104,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
"@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
"and t.student_id = #studentId# \n" +
|
|
|
|
|
"@} \n" +
|
|
|
|
|
"and t.question_log_add_type = #questionLogAddType# " +
|
|
|
|
|
"and t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# "
|
|
|
|
|
)
|
|
|
|
|
private List<TeacherOpenCourseQuestionLog> questionLogList;
|
|
|
|
@ -108,7 +114,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
*/
|
|
|
|
|
@FetchSql(value = "SELECT max(TIMEDIFF( t.teacher_open_course_question_log_update_time , t.teacher_open_course_question_log_add_time )) as finish_time " +
|
|
|
|
|
"FROM teacher_open_course_question_log t " +
|
|
|
|
|
"WHERE t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' \n" +
|
|
|
|
|
"WHERE t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = #questionLogAddType# \n" +
|
|
|
|
|
"@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
"and t.student_id = #studentId# \n" +
|
|
|
|
|
"@} \n" +
|
|
|
|
@ -121,7 +127,7 @@ public class TeacherOpenCourseQuestionLogScoreInfo extends BaseEntity {
|
|
|
|
|
// */
|
|
|
|
|
// @FetchSql(value = "SELECT max(ifnull(t.teacher_open_course_question_log_finish_time , 0)) as finish_time " +
|
|
|
|
|
// "FROM teacher_open_course_question_log t " +
|
|
|
|
|
// "WHERE t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' \n" +
|
|
|
|
|
// "WHERE t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = #questionLogAddType# \n" +
|
|
|
|
|
// "@if(!isEmpty(studentId)) { \n" +
|
|
|
|
|
// "and t.student_id = #studentId# \n" +
|
|
|
|
|
// "@} \n" +
|
|
|
|
|