【修改】mysql判分分析,mysql出题增加数据库名,试卷换题增加关键字搜索

This commit is contained in:
YOHO\20373
2025-06-16 22:18:02 +08:00
parent 70ad20151a
commit 2669397cd6
11 changed files with 154 additions and 13 deletions

View File

@@ -31,4 +31,6 @@ public class QuestionVo extends PageParam {
private String quNum;
private String keywords;
}

View File

@@ -49,11 +49,11 @@ public class EducationPaperTask extends TenantBaseDO
/** 是否为模板 */
//@Excel(name = "是否为模板")
private String isTemplate;
private Integer isTemplate;
/** 是否启用0:启用1:停用) */
//@Excel(name = "是否启用", readConverterExp = "0=:启用1:停用")
private String status;
private Integer status;
@TableField(exist = false)
private String count;

View File

@@ -99,6 +99,8 @@ public class ExamQuestion extends TenantBaseDO {
/** 专业分类 */
// @Excel(name = "专业分类")
private String specialtyName;
/** 数据库名 */
private String tname;
/** 试题答案 */
// @Excel(name = "试题答案")

View File

@@ -42,6 +42,7 @@ public interface ExamQuestionMapper extends BaseMapperX<ExamQuestion>
return selectPage(questionVo, new LambdaQueryWrapperX<ExamQuestion>()
.likeIfPresent(ExamQuestion::getQuNum, questionVo.getQuNum())
.likeIfPresent(ExamQuestion::getQuId,questionVo.getQuId())
.likeIfPresent(ExamQuestion::getKeywords,questionVo.getKeywords())
.likeIfPresent(ExamQuestion::getQuLevel, questionVo.getQuLevel())
.likeIfPresent(ExamQuestion::getCourseName , questionVo.getCourseName())
.likeIfPresent(ExamQuestion::getPointNames , questionVo.getPointNames())

View File

@@ -52,7 +52,7 @@ public class MonitorTaskServiceImpl implements MonitorTaskService{
monitorTaskDO.setTaskType(educationPaperTask.getTaskType());
monitorTaskDO.setTaskName(educationPaperTask.getTaskName());
monitorTaskDO.setTaskNum(educationPaperTask.getTaskNum());
monitorTaskDO.setStatus(educationPaperTask.getStatus());
monitorTaskDO.setStatus(String.valueOf(educationPaperTask.getStatus()));
monitorTaskDO.setTaskSpecialty(educationPaperTask.getTaskSpecialty());
List<EducationPaper> educationPapers = educationPaperMapper.selectPaperListByTaskId(educationPaperTask.getTaskId());

View File

@@ -323,7 +323,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
String timeString = now.format(formatter);
educationPaperTask.setTaskName(educationPaperTask.getTaskName()+timeString);
educationPaperTask.setIsTemplate("1");
educationPaperTask.setIsTemplate(1);
educationPaperTaskMapper.insertEducationPaperTask(educationPaperTask);
if (options.contains("1")) {

View File

@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deleted" column="deleted" />
<result property="status" column="status" />
<result property="audit" column="audit" />
<result property="tname" column="tname" />
<result property="courseName" column="course_name" />
<result property="specialtyName" column="specialty_name" />
<result property="tenantId" column="tenant_id" />
@@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectExamQuestionVo">
select qu_id, qu_bank_id, qu_num,qu_bank_name, chapterId_dict_text,subject_name, qu_level,
content, content_text, analysis,answer, point_names, keywords, manual, create_time, creator, update_time, updater, deleted ,status,audit ,course_name, specialty_name from exam_question
content, content_text, analysis,answer, point_names, keywords, manual, create_time, creator, update_time, updater, deleted ,status,audit ,course_name, specialty_name , tname from exam_question
</sql>
@@ -153,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subjectName != null">subject_name,</if>
<if test="quLevel != null">qu_level,</if>
<if test="answer != null">answer,</if>
<if test="tname != null">tname,</if>
<if test="content != null">content,</if>
<if test="contentText != null">content_text,</if>
<if test="analysis != null">analysis,</if>
@@ -179,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subjectName != null">#{subjectName},</if>
<if test="quLevel != null">#{quLevel},</if>
<if test="answer != null">#{answer},</if>
<if test="tname != null">#{tname},</if>
<if test="content != null">#{content},</if>
<if test="contentText != null">#{contentText},</if>
<if test="analysis != null">#{analysis},</if>
@@ -200,14 +203,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<insert id="insertOrUpdateList">
INSERT INTO exam_question (qu_id, qu_bank_id, qu_num,chapterId_dict_text, subject_name,specialty_name, course_name, qu_level, content, audit, status, content_text, analysis, point_names, keywords, manual)
INSERT INTO exam_question (qu_id, qu_bank_id,tname, qu_num,chapterId_dict_text, subject_name,specialty_name, course_name, qu_level, content, audit, status, content_text, analysis, point_names, keywords, manual)
VALUES
<foreach collection="collection" item="item" separator=",">
(#{item.quId}, #{item.quBankId},#{item.quNum}, #{item.chapteridDictText}, #{item.subjectName},
(#{item.quId}, #{item.quBankId},#{item.tname},#{item.quNum}, #{item.chapteridDictText}, #{item.subjectName},
#{item.specialtyName}, #{item.courseName}, #{item.quLevel}, #{item.content}, #{item.audit}
, #{item.status}, #{item.contentText}, #{item.analysis}, #{item.pointNames}, #{item.keywords}, #{item.manual})
</foreach>
ON DUPLICATE KEY UPDATE
tname== VALUES(tname),
chapterId_dict_text = VALUES(chapterId_dict_text),
subject_name = VALUES(subject_name),
specialty_name = VALUES(specialty_name),
@@ -234,6 +238,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quLevel != null">qu_level = #{quLevel},</if>
<if test="content != null">content = #{content},</if>
<if test="answer != null">answer = #{answer},</if>
<if test="tname != null">tname = #{tname},</if>
<if test="contentText != null">content_text = #{contentText},</if>
<if test="analysis != null">analysis = #{analysis},</if>
<if test="pointNames != null">point_names = #{pointNames},</if>