fuliqi
2024-06-17 e49d6551b73457f5dde2ea1d5e267028525ba05b
Merge remote-tracking branch 'origin/master'

# Conflicts:
# src/main/java/com/ycl/jxkg/service/impl/ExamPaperServiceImpl.java
8个文件已修改
33 ■■■■ 已修改文件
src/main/java/com/ycl/jxkg/domain/entity/Question.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/domain/vo/admin/paper/ExamPaperAnswerPageRequestVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/domain/vo/student/exampaper/ExamPaperAnswerPageResponseVO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/service/impl/ExamPaperServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ExamPaperAnswerMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/QuestionMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/domain/entity/Question.java
@@ -18,7 +18,7 @@
    /**
     *     1.单选题 2.多选题 3.判断题 4.填空题 5.简答题
     *     题目类型 1.单选题 2.多选题 3.判断题 4.填空题 5.简答题 6.语音题 7.计算题 8.分析题
     */
    @TableField("question_type")
    private Integer questionType;
src/main/java/com/ycl/jxkg/domain/vo/admin/paper/ExamPaperAnswerPageRequestVO.java
@@ -16,4 +16,6 @@
    private String userName;
    private String examName;
}
src/main/java/com/ycl/jxkg/domain/vo/student/exampaper/ExamPaperAnswerPageResponseVO.java
@@ -48,4 +48,9 @@
     */
    private Integer suggestTime;
    /**
     * 考试名称
     */
    private String examName;
}
src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java
@@ -10,7 +10,9 @@
    TrueFalse(3, "判断题"),
    GapFilling(4, "填空题"),
    ShortAnswer(5, "简答题"),
    Calculation(6,"计算题");
    Audio(6,"语音题"),
    Calculate(7,"计算题"),
    Analysis(8,"分析题");
    Integer code;
    String name;
src/main/java/com/ycl/jxkg/service/impl/ExamPaperServiceImpl.java
@@ -7,6 +7,8 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.jxkg.base.Result;
import com.ycl.jxkg.base.SystemCode;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ycl.jxkg.context.WebContext;
import com.ycl.jxkg.domain.entity.Question;
import com.ycl.jxkg.domain.exam.PaperFixQuestionDTO;
@@ -16,6 +18,9 @@
import com.ycl.jxkg.domain.question.QuestionItemObject;
import com.ycl.jxkg.domain.question.RandomQuestionDTO;
import com.ycl.jxkg.domain.vo.admin.exam.ExamResponseVO;
import com.ycl.jxkg.domain.vo.student.dashboard.PaperFilter;
import com.ycl.jxkg.domain.vo.student.dashboard.PaperInfo;
import com.ycl.jxkg.domain.vo.student.exam.ExamPaperPageVO;
import com.ycl.jxkg.enums.ExamPaperTypeEnum;
import com.ycl.jxkg.domain.other.KeyValue;
import com.ycl.jxkg.enums.QuestionTypeEnum;
src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java
@@ -105,6 +105,7 @@
        switch (questionTypeEnum) {
            case SingleChoice:
            case TrueFalse:
            case Audio:
                questionEditRequestVO.setCorrect(question.getCorrect());
                break;
            case MultipleChoice:
@@ -115,6 +116,8 @@
                questionEditRequestVO.setCorrectArray(correctContent);
                break;
            case ShortAnswer:
            case Calculate:
            case Analysis:
                questionEditRequestVO.setCorrect(questionObject.getCorrect());
                break;
            default:
src/main/resources/mapper/ExamPaperAnswerMapper.xml
@@ -92,7 +92,8 @@
        b.name AS subjectName,
        c.real_name AS userName,
        IFNULL(COUNT(d.id), 0) AS personAnswerNum,
        IFNULL(COUNT(f.id), 0) AS personTotalNum
        IFNULL(COUNT(f.id), 0) AS personTotalNum,
        t.exam_name
        FROM t_exam_paper a
        INNER JOIN t_exam t ON a.id = t.exam_paper_id AND t.status = 'finished' AND t.deleted = 0
        LEFT JOIN t_subject b ON a.subject_id = b.id
@@ -109,9 +110,12 @@
            <if test="name != null and name != ''">
                AND INSTR(a.name, #{name})
            </if>
            <if test="examName != null and examName != ''">
                AND INSTR(t.exam_name, #{examName})
            </if>
        </where>
        GROUP BY a.id
        ORDER BY a.id DESC
        GROUP BY t.id
        ORDER BY t.id DESC
    </select>
</mapper>
src/main/resources/mapper/QuestionMapper.xml
@@ -29,6 +29,8 @@
        WHEN tq.question_type = 4 THEN '填空题'
        WHEN tq.question_type = 5 THEN '简答题'
        WHEN tq.question_type = 6 THEN '语音题'
        WHEN tq.question_type = 7 THEN '计算题'
        WHEN tq.question_type = 8 THEN '分析题'
        END AS questionTypeName,
        ts.name AS subjectName,
        tu.real_name AS createUserName