【新增】专业/课程 点位判断
【修改】模板库复制修改试卷编号
This commit is contained in:
@@ -137,6 +137,14 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectSpecilayCounts" resultType="java.lang.String">
|
||||
SELECT ep.paper_id
|
||||
FROM exam_monitor em
|
||||
JOIN education_paper ep ON ep.num = em.paper_num
|
||||
WHERE em.exam_status = '1'
|
||||
AND em.tenant_id = #{loginTenantId}
|
||||
ORDER BY em.paper_num;
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEducationPaper" parameterType="EducationPaper">
|
||||
|
@@ -134,6 +134,65 @@
|
||||
LIMIT 1;
|
||||
</select>
|
||||
|
||||
<select id="selectPaperCounts" resultType="pc.exam.pp.module.exam.service.monitor.vo.CourseInVo">
|
||||
SELECT
|
||||
course.sp_id AS courseId,
|
||||
course.sp_name AS courseName,
|
||||
COUNT(*) AS counts
|
||||
FROM exam_question eq
|
||||
JOIN exam_specialty course ON eq.course_name = course.sp_name
|
||||
LEFT JOIN exam_specialty major ON course.parent_id = major.sp_id
|
||||
WHERE eq.qu_id IN (
|
||||
SELECT qu_id
|
||||
FROM education_paper_qu
|
||||
WHERE paper_id IN
|
||||
<foreach collection="allInPaperIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
and eq.tenant_id =#{loginTenantId}
|
||||
and course.deleted ='0'
|
||||
|
||||
GROUP BY course.sp_id, course.sp_name, major.sp_name
|
||||
</select>
|
||||
<select id="selectTaskCounts" resultType="pc.exam.pp.module.exam.service.monitor.vo.SpecialtyVo">
|
||||
SELECT
|
||||
s.sp_id AS specialtyId,
|
||||
s.sp_name AS specialtyName,
|
||||
COUNT(*) AS counts
|
||||
FROM exam_monitor em
|
||||
INNER JOIN education_paper_task ept
|
||||
ON em.task_id = ept.task_id AND ept.deleted = '0'
|
||||
INNER JOIN exam_specialty s
|
||||
ON ept.task_specialty = s.sp_name AND s.deleted = '0'
|
||||
WHERE em.exam_status = '1'
|
||||
AND em.deleted = '0'
|
||||
AND s.sp_name = (
|
||||
SELECT task_specialty
|
||||
FROM education_paper_task
|
||||
WHERE task_id = #{taskId}
|
||||
AND deleted = '0'
|
||||
LIMIT 1
|
||||
)
|
||||
and em.tenant_id =#{loginTenantId}
|
||||
GROUP BY s.sp_id, s.sp_name
|
||||
</select>
|
||||
<select id="selectPaperCountBypaperId" resultType="pc.exam.pp.module.exam.service.monitor.vo.CourseInVo">
|
||||
SELECT
|
||||
course.sp_id AS courseId,
|
||||
course.sp_name AS courseName
|
||||
FROM exam_question eq
|
||||
JOIN exam_specialty course ON eq.course_name = course.sp_name
|
||||
LEFT JOIN exam_specialty major ON course.parent_id = major.sp_id
|
||||
WHERE eq.qu_id IN (
|
||||
SELECT qu_id
|
||||
FROM education_paper_qu
|
||||
WHERE paper_id =#{paperId}
|
||||
)
|
||||
and course.deleted ='0'
|
||||
GROUP BY course.sp_id, course.sp_name, major.sp_name
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEducationPaperTask" parameterType="EducationPaperTask">
|
||||
insert into education_paper_task
|
||||
|
@@ -4,6 +4,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="pc.exam.pp.module.exam.dal.mysql.monitor.MonitorMapper">
|
||||
|
||||
<resultMap type="TentSpecialy" id="TentSpecialyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="specialtyId" column="specialty_id" />
|
||||
<result property="points" column="points" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
</resultMap>
|
||||
<update id="deleteByTaskIds">
|
||||
UPDATE exam_monitor
|
||||
SET deleted = '2'
|
||||
WHERE task_id IN
|
||||
<foreach item="taskId" collection="taskIds" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="deleteByTaskId">
|
||||
UPDATE exam_monitor
|
||||
SET deleted = '2'
|
||||
WHERE task_id =#{taskId}
|
||||
</update>
|
||||
|
||||
<select id="selectByStuIdAndTaskIdTop" resultType="java.lang.String">
|
||||
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY score DESC
|
||||
LIMIT 1
|
||||
@@ -18,4 +38,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectStuIdByTaskId" resultType="java.lang.String">
|
||||
select stu_id from exam_monitor where task_id =#{taskId} and deleted ='0' and exam_status ='0'
|
||||
</select>
|
||||
|
||||
<select id="selectTent" resultMap="TentSpecialyResult">
|
||||
SELECT
|
||||
ets.*,
|
||||
es.sp_name AS name
|
||||
FROM
|
||||
exam_tenant_specialty ets
|
||||
LEFT JOIN
|
||||
exam_specialty es
|
||||
ON
|
||||
ets.specialty_id = es.sp_id
|
||||
WHERE
|
||||
ets.tenant_id = #{loginTenantId}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@@ -137,6 +137,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND q3.deleted = '0'
|
||||
LIMIT 1;
|
||||
</select>
|
||||
<select id="selectAllSpecialtyRelations"
|
||||
resultType="pc.exam.pp.module.exam.service.monitor.vo.SpecialtyRelation">
|
||||
SELECT sp_id AS spId, parent_id AS parentId
|
||||
FROM exam_specialty
|
||||
|
||||
</select>
|
||||
<select id="selectAllIdToParent" resultType="pc.exam.pp.module.exam.service.monitor.vo.IdParentPair">
|
||||
SELECT sp_id AS spId, parent_id AS parentId
|
||||
FROM exam_specialty
|
||||
WHERE deleted = '0' and status ='0' and tenant_id =#{loginTenantId}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="deleteExamSpecialtyBySpId" parameterType="Long">
|
||||
|
Reference in New Issue
Block a user