【新增】试卷任务完整版后台接口
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
AND tenant_id =#{tId}
|
||||
and audit = 0
|
||||
and status = 0
|
||||
and deleted ='0'
|
||||
<if test="educationPaperScheme.quLevel != null and educationPaperScheme.quLevel != ''">
|
||||
AND qu_level = #{educationPaperScheme.quLevel}
|
||||
</if>
|
||||
@@ -93,17 +94,17 @@
|
||||
select task_id from education_paper where paper_id=#{paperId}
|
||||
</select>
|
||||
<select id="selectPaperByTaskId" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId}
|
||||
select paper_id from education_paper where task_id=#{taskId} and deleted ='0'
|
||||
</select>
|
||||
<select id="selectPaperRandomByTaskId" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId} and roll_up ='2'
|
||||
|
||||
</select>
|
||||
<select id="selectPaperByTaskIdAndRoll" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId}
|
||||
select paper_id from education_paper where task_id=#{taskId} and deleted ='0'
|
||||
</select>
|
||||
<select id="getPaperByTaskIdByType" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId} and status ='0' and roll_up IS NOT NULL
|
||||
select paper_id from education_paper where task_id=#{taskId} and status ='0' and deleted ='0' and roll_up IS NOT NULL
|
||||
|
||||
</select>
|
||||
<select id="getSelectPaperIdBySchemeIds" resultType="java.lang.String">
|
||||
@@ -112,7 +113,7 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
</select>
|
||||
<select id="selectPaperListByTaskId" resultMap="EducationPaperResult">
|
||||
<include refid="selectEducationPaperVo"/>
|
||||
where task_id =#{taskId}
|
||||
where task_id =#{taskId} and deleted ='0'
|
||||
</select>
|
||||
|
||||
|
||||
|
@@ -19,10 +19,11 @@
|
||||
<result property="isAnswer" column="is_answer" />
|
||||
<result property="isLook" column="is_look" />
|
||||
<result property="isConnect" column="is_connect" />
|
||||
<result property="isSession" column="is_session" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEducationPaperParamVo">
|
||||
select param_id, task_id, is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_del,is_repeat ,is_answer,is_look,is_connect from education_paper_param
|
||||
select param_id, task_id, is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_del,is_repeat ,is_answer,is_look,is_connect,is_session from education_paper_param
|
||||
</sql>
|
||||
|
||||
<select id="selectEducationPaperParamList" parameterType="EducationPaperParam" resultMap="EducationPaperParamResult">
|
||||
@@ -66,6 +67,7 @@
|
||||
<if test="isAnswer != null">is_answer,</if>
|
||||
<if test="isLook != null">is_look,</if>
|
||||
<if test="isConnect != null">is_connect,</if>
|
||||
<if test="isSession != null">is_session,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@@ -83,7 +85,7 @@
|
||||
<if test="isAnswer != null">#{isAnswer},</if>
|
||||
<if test="isLook != null">#{isLook},</if>
|
||||
<if test="isConnect != null">#{isConnect},</if>
|
||||
|
||||
<if test="isSession != null">#{isSession},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -104,7 +106,7 @@
|
||||
<if test="isAnswer != null">is_answer = #{isAnswer},</if>
|
||||
<if test="isLook != null">is_look = #{isLook},</if>
|
||||
<if test="isConnect != null">is_connect = #{isConnect},</if>
|
||||
|
||||
<if test="isSession != null">is_session = #{isSession},</if>
|
||||
|
||||
</trim>
|
||||
where param_id = #{paramId}
|
||||
|
@@ -8,10 +8,11 @@
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="personId" column="person_id" />
|
||||
<result property="sessionId" column="session_id" />
|
||||
<result property="batch" column="batch" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEducationPaperPersonVo">
|
||||
select task_id, person_id, session_id from education_paper_person
|
||||
select task_id, person_id, session_id,batch from education_paper_person
|
||||
</sql>
|
||||
|
||||
<select id="selectEducationPaperPersonList" parameterType="EducationPaperPerson" resultMap="EducationPaperPersonResult">
|
||||
@@ -20,6 +21,7 @@
|
||||
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
||||
<if test="personId != null and personId != ''"> and person_id = #{personId}</if>
|
||||
<if test="sessionId != null and sessionId != ''"> and session_id = #{sessionId}</if>
|
||||
<if test="batch != null and batch != ''"> and batch = #{batch}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -27,6 +29,85 @@
|
||||
<include refid="selectEducationPaperPersonVo"/>
|
||||
where task_id = #{taskId}
|
||||
</select>
|
||||
<select id="selectUserById" resultType="pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto">
|
||||
select * from system_users where id =#{personId}
|
||||
</select>
|
||||
<select id="selectUserClassName" resultType="java.lang.String">
|
||||
select name from exam_class where id =#{classId}
|
||||
</select>
|
||||
<select id="selectEducationPaperPersonBySessionId" parameterType="String" resultMap="EducationPaperPersonResult">
|
||||
|
||||
<include refid="selectEducationPaperPersonVo"/>
|
||||
where session_id = #{sessionId}
|
||||
</select>
|
||||
<select id="selectEducationPaperPersonByNotInSessionId"
|
||||
resultType="pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto">
|
||||
SELECT DISTINCT s.*
|
||||
FROM system_users s
|
||||
LEFT JOIN education_paper_person pp ON s.id = pp.person_id
|
||||
WHERE
|
||||
s.user_type = #{userType}
|
||||
AND s.id IN (
|
||||
SELECT person_id FROM education_paper_person WHERE
|
||||
session_id ='' and
|
||||
session_id !=#{sessionId} and task_id =#{taskId}
|
||||
)
|
||||
|
||||
<if test="username != null and username != ''">
|
||||
AND s.username LIKE CONCAT('%', #{username}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND s.status = #{status}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND s.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="classId != null and classId != ''">
|
||||
AND s.class_id = #{classId}
|
||||
</if>
|
||||
ORDER BY s.id DESC
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectUserClassIdByName" resultType="java.lang.Long">
|
||||
select id from exam_class where name =#{className} and deleted ='0'
|
||||
</select>
|
||||
<select id="selectByTaskIdAndPersonId" resultMap="EducationPaperPersonResult">
|
||||
<include refid="selectEducationPaperPersonVo"/>
|
||||
where task_id = #{taskId}
|
||||
and person_id =#{studentId}
|
||||
</select>
|
||||
<select id="selectEducationPaperPersonBySessionIdNotIn"
|
||||
resultType="pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto">
|
||||
|
||||
SELECT DISTINCT s.*
|
||||
FROM system_users s
|
||||
LEFT JOIN education_paper_person pp ON s.id = pp.person_id
|
||||
WHERE
|
||||
s.user_type = #{userType}
|
||||
AND s.id NOT IN (
|
||||
SELECT person_id FROM education_paper_person WHERE task_id =#{taskId}
|
||||
)
|
||||
|
||||
<if test="username != null and username != ''">
|
||||
AND s.username LIKE CONCAT('%', #{username}, '%')
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND s.status = #{status}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND s.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="classId != null and classId != ''">
|
||||
AND s.class_id = #{classId}
|
||||
</if>
|
||||
ORDER BY s.id DESC
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEducationPaperPerson" parameterType="EducationPaperPerson">
|
||||
insert into education_paper_person
|
||||
@@ -34,22 +115,38 @@
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="personId != null">person_id,</if>
|
||||
<if test="sessionId != null">session_id,</if>
|
||||
<if test="batch != null">batch,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="personId != null">#{personId},</if>
|
||||
<if test="sessionId != null">#{sessionId},</if>
|
||||
<if test="batch != null">#{batch},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertEducationPaperPersonList">
|
||||
insert into education_paper_person (task_id, person_id, session_id, batch) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.taskId}, #{item.personId}, #{item.sessionId}, #{item.batch}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<update id="updateEducationPaperPerson" parameterType="EducationPaperPerson">
|
||||
update education_paper_person
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="personId != null">person_id = #{personId},</if>
|
||||
<if test="sessionId != null">session_id = #{sessionId},</if>
|
||||
<if test="batch != null">batch = #{batch},</if>
|
||||
</trim>
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
<update id="updateByTaskIdAndStuId">
|
||||
update education_paper_person set session_id =#{sessionId},batch =#{batch}
|
||||
where task_id =#{taskId} and person_id=#{personId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEducationPaperPersonByTaskId" parameterType="String">
|
||||
delete from education_paper_person where task_id = #{taskId}
|
||||
@@ -61,4 +158,29 @@
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="removeSessionStu" >
|
||||
DELETE FROM education_paper_person
|
||||
WHERE session_id = #{sessionId}
|
||||
AND task_id = #{taskId}
|
||||
AND batch = #{batch}
|
||||
AND person_id IN
|
||||
<foreach collection="studentIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteEducationPaperPersonBySessionkIds">
|
||||
delete from education_paper_person where education_paper_person.session_id in
|
||||
<foreach item="sessionId" collection="array" open="(" separator="," close=")">
|
||||
#{sessionId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="removeTaskStu">
|
||||
DELETE FROM education_paper_person
|
||||
WHERE task_id = #{taskId}
|
||||
AND person_id IN
|
||||
<foreach collection="studentIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@@ -18,15 +18,13 @@
|
||||
<result property="deleted" column="deleted" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
</resultMap>
|
||||
<resultMap type="ExamKnowledgePoints" id="ExamSpecialtyResult">
|
||||
<resultMap type="ExamPaperKnowledgePoints" id="ExamSpecialtyResult">
|
||||
<result property="spId" column="sp_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="spName" column="sp_name" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="deleted" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="unite" column="unite" />
|
||||
<result property="treeNum" column="tree_num" />
|
||||
</resultMap>
|
||||
@@ -39,18 +37,19 @@
|
||||
<select id="selectEducationPaperTaskByTaskId" parameterType="String" resultMap="EducationPaperTaskResult">
|
||||
<include refid="selectEducationPaperTaskVo"/>
|
||||
where task_id = #{taskId}
|
||||
and deleted='0'
|
||||
</select>
|
||||
<select id="getSpecialityList" resultType="java.lang.String">
|
||||
select sp_name from exam_specialty
|
||||
where parent_id =0
|
||||
and del_flag='0'
|
||||
and deleted='0'
|
||||
|
||||
</select>
|
||||
<select id="getCourseList" resultType="java.lang.String">
|
||||
SELECT sp_name
|
||||
FROM exam_specialty
|
||||
WHERE ancestors REGEXP '^[0-9]+,[0-9]+,[0-9]+$'
|
||||
and del_flag='0'
|
||||
and deleted='0'
|
||||
|
||||
</select>
|
||||
<select id="getKeywords" resultType="java.lang.String">
|
||||
|
Reference in New Issue
Block a user