【修改】增加后台api接口注释,优化mysql判分,知识点改为存储id,试题已使用,学生除待考其它状态不可删除。。。
【新增】试卷任务参数,在已有的试卷里抽卷。。。
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<result property="examTime" column="exam_time" />
|
||||
<result property="directory" column="directory" />
|
||||
<result property="uploadTime" column="upload_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="isCopy" column="is_copy" />
|
||||
<result property="isRepeat" column="is_repeat" />
|
||||
<result property="isAnswer" column="is_answer" />
|
||||
<result property="isLook" column="is_look" />
|
||||
@@ -29,12 +29,14 @@
|
||||
<result property="isFile" column="is_file" />
|
||||
<result property="isNet" column="is_net" />
|
||||
<result property="isScreen" column="is_screen" />
|
||||
|
||||
<result property="isScore" column="is_score" />
|
||||
<result property="isScoreDetail" column="is_score_detail" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEducationPaperParamVo">
|
||||
select param_id, task_id, is_number,is_content,is_answer_id,is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_time,exam_time,is_del,is_repeat ,is_answer,is_look,is_connect,is_session,warn,is_file,is_net,is_screen from education_paper_param
|
||||
select param_id, task_id, is_number,is_content,is_answer_id,is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time,
|
||||
is_time,exam_time,is_copy,is_repeat ,is_answer,is_look,is_connect,is_session,warn,is_file,is_net,is_screen,is_score,is_score_detail from education_paper_param
|
||||
</sql>
|
||||
|
||||
<select id="selectEducationPaperParamList" parameterType="EducationPaperParam" resultMap="EducationPaperParamResult">
|
||||
@@ -48,7 +50,6 @@
|
||||
<if test="driver != null and driver != ''"> and driver = #{driver}</if>
|
||||
<if test="directory != null and directory != ''"> and directory = #{directory}</if>
|
||||
<if test="uploadTime != null and uploadTime != ''"> and upload_time = #{uploadTime}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -78,7 +79,7 @@
|
||||
<if test="uploadTime != null">upload_time,</if>
|
||||
<if test="isTime != null">is_time,</if>
|
||||
<if test="examTime != null">exam_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="isCopy != null">is_copy,</if>
|
||||
<if test="isRepeat != null">is_repeat,</if>
|
||||
<if test="isAnswer != null">is_answer,</if>
|
||||
<if test="isLook != null">is_look,</if>
|
||||
@@ -88,6 +89,10 @@
|
||||
<if test="isFile != null">is_file,</if>
|
||||
<if test="isNet != null">is_net,</if>
|
||||
<if test="isScreen != null">is_screen,</if>
|
||||
|
||||
<if test="isScore != null">is_score,</if>
|
||||
<if test="isScoreDetail != null">is_score_detail,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paramId != null">#{paramId},</if>
|
||||
@@ -104,7 +109,7 @@
|
||||
<if test="uploadTime != null">#{uploadTime},</if>
|
||||
<if test="isTime != null">#{isTime},</if>
|
||||
<if test="examTime != null">#{examTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="isCopy != null">#{isCopy},</if>
|
||||
<if test="isRepeat != null">#{isRepeat},</if>
|
||||
<if test="isAnswer != null">#{isAnswer},</if>
|
||||
<if test="isLook != null">#{isLook},</if>
|
||||
@@ -114,6 +119,8 @@
|
||||
<if test="isFile != null">#{isFile},</if>
|
||||
<if test="isNet != null">#{isNet},</if>
|
||||
<if test="isScreen != null">#{isScreen},</if>
|
||||
<if test="isScore != null">#{isScore},</if>
|
||||
<if test="isScoreDetail != null">#{isScoreDetail},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -133,7 +140,7 @@
|
||||
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||
<if test="isTime != null">is_time = #{isTime},</if>
|
||||
<if test="examTime != null">exam_time = #{examTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="isCopy != null">is_copy = #{isCopy},</if>
|
||||
<if test="isRepeat != null">is_repeat = #{isRepeat},</if>
|
||||
<if test="isAnswer != null">is_answer = #{isAnswer},</if>
|
||||
<if test="isLook != null">is_look = #{isLook},</if>
|
||||
@@ -143,6 +150,8 @@
|
||||
<if test="isFile != null">is_file = #{isFile},</if>
|
||||
<if test="isNet != null">is_net = #{isNet},</if>
|
||||
<if test="isScreen != null">is_screen = #{isScreen},</if>
|
||||
<if test="isScore != null">is_score = #{isScore},</if>
|
||||
<if test="isScoreDetail != null">is_score_detail = #{isScoreDetail},</if>
|
||||
|
||||
</trim>
|
||||
where param_id = #{paramId}
|
||||
|
@@ -39,6 +39,22 @@
|
||||
(select qu_id from education_paper_qu where paper_id =#{paperId})ORDER BY RAND()
|
||||
LIMIT 1;
|
||||
</select>
|
||||
<select id="selectUsedQuestionIds" resultType="java.lang.String">
|
||||
SELECT DISTINCT qu_id
|
||||
FROM education_paper_qu
|
||||
WHERE qu_id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectByPaperIdAndType" resultType="java.lang.String">
|
||||
SELECT epq.qu_id
|
||||
FROM education_paper_qu epq
|
||||
JOIN exam_question eq ON epq.qu_id = eq.qu_id
|
||||
WHERE epq.paper_id = #{paperId}
|
||||
AND eq.subject_name = #{spName}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEducationPaperQu" parameterType="EducationPaperQu">
|
||||
|
@@ -44,6 +44,9 @@
|
||||
<select id="selectEducationPaperTaskByTaskId" resultMap="EducationPaperSchemeResult">
|
||||
select * from education_paper_scheme where task_id =#{taskid} order by sort asc
|
||||
</select>
|
||||
<select id="selectEducationPaperSchemeCountsByTaskId" resultType="java.lang.Integer">
|
||||
select count(*) from education_paper_scheme where task_id =#{taskId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEducationPaperScheme" parameterType="EducationPaperScheme">
|
||||
insert into education_paper_scheme
|
||||
|
@@ -95,6 +95,14 @@
|
||||
<select id="selectAnswerFile" resultType="java.lang.String">
|
||||
select url from sys_file where qu_id =#{quId} and file_type ='2'
|
||||
</select>
|
||||
<select id="selectCountPointByQuId" resultType="java.lang.String">
|
||||
SELECT SUM(score_rate) AS totalKeyScore
|
||||
FROM exam_question_answer
|
||||
WHERE qu_id =#{quId};
|
||||
</select>
|
||||
<select id="selectExamQuestionAnswerScoreByAnswerId" resultType="java.lang.String">
|
||||
select score_rate from exam_question_answer where answer_id =#{answerId}
|
||||
</select>
|
||||
<insert id="insertExamQuestionAnswerList">
|
||||
insert into exam_question_answer
|
||||
(answer_id, qu_id, is_right, image, content,contentIn,score_rate,sort)
|
||||
|
Reference in New Issue
Block a user