|
|
package com.ibeetl.jlw.entity;
|
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.ibeetl.admin.core.annotation.Dict;
|
|
|
import com.ibeetl.admin.core.annotation.DictEnum;
|
|
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
|
|
import com.ibeetl.admin.core.util.ValidateConfig;
|
|
|
import com.ibeetl.jlw.entity.dto.QuestionSettingDTO;
|
|
|
import com.ibeetl.jlw.enums.GlobalPushStatusEnum;
|
|
|
import com.ibeetl.jlw.enums.QuestionBusinessTypeEnum;
|
|
|
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.beetl.sql.annotation.entity.AssignID;
|
|
|
import org.beetl.sql.annotation.entity.InsertIgnore;
|
|
|
import org.beetl.sql.annotation.entity.UpdateIgnore;
|
|
|
import org.beetl.sql.fetch.annotation.Fetch;
|
|
|
import org.beetl.sql.fetch.annotation.FetchSql;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/*
|
|
|
* 系统通用-题目-设置
|
|
|
* gen by Spring Boot2 Admin 2022-11-24
|
|
|
*/
|
|
|
@Fetch
|
|
|
@Data
|
|
|
@NoArgsConstructor
|
|
|
@AllArgsConstructor
|
|
|
@EqualsAndHashCode(callSuper=false)
|
|
|
public class GeneralQuestionSetting extends BaseEntity{
|
|
|
|
|
|
//通用题目设置ID
|
|
|
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
|
|
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
|
|
@AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.GeneralQuestionSetting")
|
|
|
|
|
|
private Long generalQuestionSettingId ;
|
|
|
|
|
|
//业务ID
|
|
|
|
|
|
private Long businessId ;
|
|
|
|
|
|
//业务类型
|
|
|
|
|
|
@DictEnum
|
|
|
private QuestionBusinessTypeEnum businessType ;
|
|
|
|
|
|
// 用于指定课程中拉取题目。暂时查询中不会用到
|
|
|
private String sourceCourseInfoIds;
|
|
|
|
|
|
//班级ID集合(逗号隔开)
|
|
|
|
|
|
private String generalQuestionSettingSchoolClassIds ;
|
|
|
|
|
|
@FetchSql(
|
|
|
"@if(strUtil.equalsIgnoreCase(generalQuestionSettingSchoolClassIds, 'ALL')) { \n" +
|
|
|
"select '所有班级' \n" +
|
|
|
"@} else { \n" +
|
|
|
" select group_concat(class_name) " +
|
|
|
"from school_class " +
|
|
|
"where 1 = 1 " +
|
|
|
"and find_in_set(class_id, #generalQuestionSettingSchoolClassIds#) " +
|
|
|
"and class_status = 1 " +
|
|
|
"order by class_id " +
|
|
|
"@}\n" )
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private String generalQuestionSettingSchoolClassIdsText;
|
|
|
|
|
|
//作答次数
|
|
|
|
|
|
private Integer generalQuestionSettingDoCount ;
|
|
|
|
|
|
//题目乱序(同一大题内)
|
|
|
|
|
|
private Integer generalQuestionSettingQuestionNoOrder ;
|
|
|
|
|
|
//选项乱序(限单选、多选)
|
|
|
|
|
|
private Integer generalQuestionSettingOptionNoOrder ;
|
|
|
|
|
|
//答卷后显示答案解析
|
|
|
|
|
|
private Integer generalQuestionSettingEndShowQa ;
|
|
|
|
|
|
//答卷后显示答案对错
|
|
|
|
|
|
private Integer generalQuestionSettingEndShowTrueFalse ;
|
|
|
|
|
|
//题目-名称
|
|
|
|
|
|
private String generalQuestionSettingName ;
|
|
|
|
|
|
//题目开始时间
|
|
|
|
|
|
private Date generalQuestionStartTime ;
|
|
|
|
|
|
//题目结束时间
|
|
|
|
|
|
private Date generalQuestionEndTime ;
|
|
|
|
|
|
//类型 枚举(ResourcesQuestionSnapshotFromTypeEnum)
|
|
|
@DictEnum
|
|
|
|
|
|
private ResourcesQuestionSnapshotFromTypeEnum generalQuestionSettingType ;
|
|
|
|
|
|
//题目要求
|
|
|
|
|
|
private String generalQuestionSettingRequire ;
|
|
|
|
|
|
//附件,老师上传附件(单文件)
|
|
|
|
|
|
private String generalQuestionSettingFile ;
|
|
|
|
|
|
//发布状态。 1发布,2未发布
|
|
|
|
|
|
// @Dict(type="global_push_status")
|
|
|
@DictEnum
|
|
|
|
|
|
private GlobalPushStatusEnum generalQuestionSettingPushStatus ;
|
|
|
|
|
|
//状态 (1正常 2删除)
|
|
|
@Dict(type="global_status")
|
|
|
|
|
|
private Integer generalQuestionSettingStatus ;
|
|
|
|
|
|
//创建时间
|
|
|
|
|
|
private Date generalQuestionSettingAddTime ;
|
|
|
|
|
|
//组织ID
|
|
|
|
|
|
private Long orgId ;
|
|
|
|
|
|
//用户ID
|
|
|
|
|
|
private Long userId ;
|
|
|
|
|
|
/**
|
|
|
* 根据题目类型动态配置题目。
|
|
|
*
|
|
|
*/
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private List<QuestionSettingDTO> questionSettingOptions;
|
|
|
|
|
|
public Long getGeneralQuestionSettingId() {
|
|
|
return generalQuestionSettingId;
|
|
|
}
|
|
|
|
|
|
public void setGeneralQuestionSettingId(Long generalQuestionSettingId) {
|
|
|
this.generalQuestionSettingId = generalQuestionSettingId;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
return JSONUtil.toJsonStr(this);
|
|
|
}
|
|
|
}
|