From 607b15cde6515d18de64a40e17c5aef7fcf24bcb Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期三, 12 六月 2024 17:51:30 +0800 Subject: [PATCH] fix:成绩管理 --- src/main/resources/mapper/ExamPaperMapper.xml | 93 ++++++++++++++++++++++++++++------------------ 1 files changed, 56 insertions(+), 37 deletions(-) diff --git a/src/main/resources/mapper/ExamPaperMapper.xml b/src/main/resources/mapper/ExamPaperMapper.xml index 8e25c94..2e279f0 100644 --- a/src/main/resources/mapper/ExamPaperMapper.xml +++ b/src/main/resources/mapper/ExamPaperMapper.xml @@ -1,74 +1,93 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ycl.jxkg.mapper.ExamPaperMapper"> - <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.ExamPaper"> - <id column="id" jdbcType="INTEGER" property="id"/> - <result column="name" jdbcType="VARCHAR" property="name"/> - <result column="subject_id" jdbcType="INTEGER" property="subjectId"/> - <result column="paper_type" jdbcType="INTEGER" property="paperType"/> - <result column="grade_level" jdbcType="INTEGER" property="gradeLevel"/> - <result column="score" jdbcType="INTEGER" property="score"/> - <result column="question_count" jdbcType="INTEGER" property="questionCount"/> - <result column="suggest_time" jdbcType="INTEGER" property="suggestTime"/> - <result column="limit_start_time" jdbcType="TIMESTAMP" property="limitStartTime"/> - <result column="limit_end_time" jdbcType="TIMESTAMP" property="limitEndTime"/> - <result column="frame_text_content_id" jdbcType="INTEGER" property="frameTextContentId"/> - <result column="create_user" jdbcType="INTEGER" property="createUser"/> - <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> - <result column="deleted" jdbcType="BIT" property="deleted"/> - <result column="task_exam_id" jdbcType="INTEGER" property="taskExamId"/> + <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.exam.ExamPaperTempDTO"> + <id column="id" property="id"/> + <result column="name" property="name"/> + <result column="subject_id" property="subjectId"/> + <result column="paper_type" property="paperType"/> + <result column="score" property="score"/> + <result column="question_count" property="questionCount"/> + <result column="suggest_time" property="suggestTime"/> + <result column="visibility" property="visibility"/> + <result column="deduct_type" property="deductType"/> + <result column="deduct_type_score" property="deductTypeScore"/> + <result column="create_user" property="createUser"/> + <result column="create_time" property="createTime"/> + <result column="deleted" property="deleted"/> + <association property="examTemplate" javaType="com.ycl.jxkg.domain.entity.ExamTemplate"> + <result column="single_choice" property="singleChoice" /> + <result column="single_score" property="singleScore" /> + <result column="multiple_choice" property="multipleChoice" /> + <result column="multiple_score" property="multipleScore" /> + <result column="gap_filling" property="gapFilling" /> + <result column="gap_score" property="gapScore" /> + <result column="true_false" property="trueFalse" /> + <result column="true_false_score" property="trueFalseScore" /> + <result column="short_answer" property="shortAnswer" /> + <result column="short_answer_score" property="shortAnswerScore" /> + <result column="calculation" property="calculation" /> + <result column="calculation_score" property="calculationScore" /> + </association> </resultMap> <sql id="Base_Column_List"> - id - , name, subject_id, paper_type, grade_level, score, question_count, suggest_time, - limit_start_time, limit_end_time, frame_text_content_id, create_user, create_time, - deleted, task_exam_id + id, name, subject_id, paper_type, score, question_count, suggest_time,visibility + ,deduct_type,deduct_type_score,create_user, create_time,deleted </sql> - <resultMap id="PaperInfoResultMap" type="com.ycl.jxkg.vo.student.dashboard.PaperInfo"> + <resultMap id="PaperInfoResultMap" type="com.ycl.jxkg.domain.vo.student.dashboard.PaperInfo"> <id column="id" jdbcType="INTEGER" property="id"/> <result column="name" jdbcType="VARCHAR" property="name"/> - <result column="limit_start_time" jdbcType="TIMESTAMP" property="limitStartTime"/> - <result column="limit_end_time" jdbcType="TIMESTAMP" property="limitEndTime"/> + </resultMap> - <select id="page" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.vo.admin.exam.ExamPaperPageRequestVO"> + <select id="page" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.domain.vo.admin.exam.ExamPaperPageRequestVO"> SELECT - <include refid="Base_Column_List"/> - FROM t_exam_paper + tep.*, + tet.single_choice, + tet.multiple_choice, + tet.gap_filling, + tet.true_false, + tet.short_answer, + tet.calculation, + tet.single_score, + tet.multiple_score, + tet.gap_score, + tet.true_false_score, + tet.short_answer_score, + tet.calculation_score + FROM t_exam_paper tep left join t_exam_template tet on tep.id =tet.exam_paper_id <where> - and deleted=0 + and tep.deleted=0 <if test="id != null "> - and id= #{id} + and tep.id= #{id} </if> - <if test="level != null "> - and grade_level= #{level} + <if test="name != null and name != ''"> + and tep.name like concat('%',#{name},'%') </if> <if test="subjectId != null "> - and subject_id= #{subjectId} + and tep.subject_id= #{subjectId} </if> <if test="paperType != null "> - and paper_type= #{paperType} + and tep.paper_type= #{paperType} </if> </where> </select> <select id="taskExamPage" resultMap="BaseResultMap" - parameterType="com.ycl.jxkg.vo.admin.exam.ExamPaperPageRequestVO"> + parameterType="com.ycl.jxkg.domain.vo.admin.exam.ExamPaperPageRequestVO"> SELECT <include refid="Base_Column_List"/> FROM t_exam_paper <where> and deleted=0 - and task_exam_id is null - and grade_level= #{level} and paper_type=#{paperType} </where> </select> - <select id="studentPage" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.vo.student.exam.ExamPaperPageVO"> + <select id="studentPage" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.domain.vo.student.exam.ExamPaperPageVO"> SELECT <include refid="Base_Column_List"/> FROM t_exam_paper @@ -85,7 +104,7 @@ </select> <select id="indexPaper" resultMap="PaperInfoResultMap" - parameterType="com.ycl.jxkg.vo.student.dashboard.PaperFilter"> + parameterType="com.ycl.jxkg.domain.vo.student.dashboard.PaperFilter"> SELECT id,name,limit_start_time,limit_end_time FROM t_exam_paper <where> -- Gitblit v1.8.0