|
|
package com.ibeetl.jlw.entity;
|
|
|
|
|
|
import cn.hutool.core.util.EnumUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.ibeetl.admin.core.annotation.Dict;
|
|
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
|
|
import com.ibeetl.admin.core.util.ValidateConfig;
|
|
|
import com.ibeetl.jlw.enums.QuestionLogAddTypeEnum;
|
|
|
import com.ibeetl.jlw.enums.ResourcesQuestionTypeEnum;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.experimental.FieldNameConstants;
|
|
|
import org.beetl.sql.annotation.entity.AssignID;
|
|
|
import org.beetl.sql.fetch.annotation.Fetch;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
|
|
|
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
|
|
|
|
|
|
/*
|
|
|
* 我的课程-题库-做题日志
|
|
|
* gen by Spring Boot2 Admin 2022-10-05
|
|
|
*/
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper=false)
|
|
|
@Fetch
|
|
|
@FieldNameConstants
|
|
|
public class TeacherOpenCourseQuestionLog extends BaseEntity {
|
|
|
|
|
|
//学生做题日志ID
|
|
|
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
|
|
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
|
|
@AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLog")
|
|
|
|
|
|
private Long teacherOpenCourseQuestionLogId ;
|
|
|
|
|
|
//开课题目配置ID
|
|
|
@Dict(type="teacher_open_course_question_setting.teacher_open_course_question_setting_name.teacher_open_course_question_setting_status=1")
|
|
|
|
|
|
private Long teacherOpenCourseQuestionSettingId ;
|
|
|
|
|
|
//题目快照ID
|
|
|
// @Dict(type="resources_question_snapshot.question_stem.question_status=1")
|
|
|
|
|
|
private Long resourcesQuestionSnapshotId ;
|
|
|
|
|
|
//学生提交的答案
|
|
|
|
|
|
private String teacherOpenCourseQuestionLogAnswer ;
|
|
|
|
|
|
//附件,学生端上传附件(单文件)
|
|
|
|
|
|
private String teacherOpenCourseQuestionLogUploadFile ;
|
|
|
|
|
|
//创建时间
|
|
|
|
|
|
private Date teacherOpenCourseQuestionLogAddTime ;
|
|
|
|
|
|
//状态(1正常 2删除)
|
|
|
@Dict(type="global_status")
|
|
|
|
|
|
private Integer teacherOpenCourseQuestionLogStatus ;
|
|
|
|
|
|
// 题目提交类型
|
|
|
|
|
|
private QuestionLogAddTypeEnum questionLogAddType;
|
|
|
|
|
|
//学生ID
|
|
|
|
|
|
private Long studentId ;
|
|
|
|
|
|
//学生得分
|
|
|
|
|
|
private BigDecimal studentScore ;
|
|
|
|
|
|
//课程ID
|
|
|
|
|
|
private Long courseInfoId ;
|
|
|
|
|
|
//题型(1单选 2多选 3判断 4填空 5分析)
|
|
|
|
|
|
private Integer questionType ;
|
|
|
|
|
|
//分值
|
|
|
|
|
|
private BigDecimal questionScore ;
|
|
|
|
|
|
//题干
|
|
|
|
|
|
private String questionStem ;
|
|
|
|
|
|
//选项A
|
|
|
|
|
|
private String questionOptionA ;
|
|
|
|
|
|
//选项B
|
|
|
|
|
|
private String questionOptionB ;
|
|
|
|
|
|
//选项C
|
|
|
|
|
|
private String questionOptionC ;
|
|
|
|
|
|
//选项D
|
|
|
|
|
|
private String questionOptionD ;
|
|
|
|
|
|
//选项E
|
|
|
|
|
|
private String questionOptionE ;
|
|
|
|
|
|
//答案(单选是一个 多选是多个 判断是对错)
|
|
|
|
|
|
private String questionAnswer ;
|
|
|
|
|
|
//解析
|
|
|
|
|
|
private String questionAnalysis ;
|
|
|
|
|
|
//是否收藏
|
|
|
|
|
|
private Boolean isTuck ;
|
|
|
|
|
|
//是否收藏到错题库
|
|
|
|
|
|
private Boolean isErrorFavorite ;
|
|
|
|
|
|
//修改时间
|
|
|
|
|
|
private Date teacherOpenCourseQuestionLogUpdateTime ;
|
|
|
|
|
|
//用时(秒)
|
|
|
|
|
|
private Long teacherOpenCourseQuestionLogFinishTime ;
|
|
|
|
|
|
//评语
|
|
|
|
|
|
private String teacherOpenCourseQuestionLogReply ;
|
|
|
|
|
|
//组织ID
|
|
|
|
|
|
private Long orgId ;
|
|
|
|
|
|
//用户ID
|
|
|
|
|
|
private Long userId ;
|
|
|
|
|
|
public void setQuestionType(Integer questionType) {
|
|
|
this.questionType = questionType;
|
|
|
if (ObjectUtil.isNotEmpty(questionType)) {
|
|
|
this.set("questionTypeText", EnumUtil.likeValueOf(ResourcesQuestionTypeEnum.class, questionType).getText());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 格式成像题目快照一样的
|
|
|
*/
|
|
|
public void likeQuestionSnapshotInit() {
|
|
|
this.setTeacherOpenCourseQuestionLogId(null);
|
|
|
this.setStudentScore(null);
|
|
|
this.setIsTuck(null);
|
|
|
this.setIsErrorFavorite(null);
|
|
|
this.setTeacherOpenCourseQuestionLogUpdateTime(null);
|
|
|
this.setTeacherOpenCourseQuestionLogFinishTime(null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 功能描述: <br>
|
|
|
* 设置做对的正确数量
|
|
|
*
|
|
|
* @param successCount
|
|
|
* @Author: lx
|
|
|
* @Date: 2022/12/4 20:39
|
|
|
*/
|
|
|
public void setSuccessCount(Integer successCount) {
|
|
|
this.set("successCount", successCount);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 功能描述: <br>
|
|
|
* 正确的数量,有时候会有复杂的题目类型,这里暂时记录下正确数量
|
|
|
* @return {@link int}
|
|
|
* @Author: lx
|
|
|
* @Date: 2022/12/4 20:39
|
|
|
*/
|
|
|
public Integer getSuccessCount() {
|
|
|
return Integer.valueOf(defaultIfNull(this.get("successCount"), "0").toString());
|
|
|
}
|
|
|
/**
|
|
|
* 功能描述: <br>
|
|
|
* 设置错题数量
|
|
|
*
|
|
|
* @param errorCount
|
|
|
* @Author: lx
|
|
|
* @Date: 2022/12/4 20:39
|
|
|
*/
|
|
|
public void setErrorCount(Integer errorCount) {
|
|
|
this.set("errorCount", errorCount);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 功能描述: <br>
|
|
|
* 错题的数量,有时候会有复杂的题目类型,这里暂时记录下错题数量
|
|
|
* @return {@link int}
|
|
|
* @Author: lx
|
|
|
* @Date: 2022/12/4 20:39
|
|
|
*/
|
|
|
public Integer getErrorCount() {
|
|
|
return Integer.valueOf(defaultIfNull(this.get("errorCount"), "0").toString());
|
|
|
}
|
|
|
}
|