|
@@ -129,7 +129,7 @@
|
|
|
and e.enable = 1
|
|
|
and (t.file_upload_status = 'WAITING_UPLOAD' or t.data_upload_status =
|
|
|
'WAITING_UPLOAD')
|
|
|
- limit #{pageSize}
|
|
|
+ limit #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<select id="findUploadError"
|
|
@@ -142,7 +142,7 @@
|
|
|
and e.enable_upload = 1
|
|
|
and e.enable = 1
|
|
|
and (t.file_upload_status = 'ERROR' or t.data_upload_status = 'ERROR')
|
|
|
- limit #{pageSize}
|
|
|
+ limit #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<select id="getPackageCountByExam" resultType="int">
|
|
@@ -183,6 +183,14 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="countStudent" resultType="cn.com.qmth.scancentral.vo.studentimport.StudentCountVo">
|
|
|
+ select stu.subject_code, sb.name as subjectName, count(stu.id) studentCount
|
|
|
+ from sc_student stu
|
|
|
+ left join sc_subject sb on sb.exam_id = stu.exam_id and sb.code = stu.subject_code
|
|
|
+ where stu.exam_id = #{examId}
|
|
|
+ group by stu.subject_code
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="listPageQuery"
|
|
|
resultType="cn.com.qmth.scancentral.vo.ImportStudentVo">
|
|
|
select
|
|
@@ -242,7 +250,7 @@
|
|
|
where e.enable = 1
|
|
|
and (e.image_transfer_mode = 'OW' or e.image_transfer_mode = 'CET')
|
|
|
and t.file_upload_status = 'WAITING_UPLOAD'
|
|
|
- limit #{pageSize}
|
|
|
+ limit #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<select id="getUploadedCount" resultType="int">
|
|
@@ -258,8 +266,8 @@
|
|
|
from sc_student t
|
|
|
where t.exam_id = #{examId}
|
|
|
and (
|
|
|
- t.file_upload_status in ('WAITING_UPLOAD', 'ERROR') or
|
|
|
- t.data_upload_status in ('WAITING_UPLOAD', 'ERROR')
|
|
|
+ t.file_upload_status in ('WAITING_UPLOAD', 'ERROR') or
|
|
|
+ t.data_upload_status in ('WAITING_UPLOAD', 'ERROR')
|
|
|
)
|
|
|
</select>
|
|
|
|
|
@@ -482,7 +490,7 @@
|
|
|
and t.assigned_check_count = #{checkCount}
|
|
|
and t.assigned = 1
|
|
|
order by t.id
|
|
|
- limit #{pageNumber}, #{pageSize}
|
|
|
+ limit #{pageNumber}, #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -502,7 +510,8 @@
|
|
|
where student_id = #{id}
|
|
|
and user_id = #{userId}
|
|
|
and exam_id = #{examId})
|
|
|
- order by h.id desc limit #{pageSize}
|
|
|
+ order by h.id desc
|
|
|
+ limit #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<update id="updateAssignedCheckCount">
|
|
@@ -513,22 +522,22 @@
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
<select id="scanProgress" resultType="cn.com.qmth.scancentral.vo.subject.SubjectScanProgressVo">
|
|
|
- select t.subject_code,t.subject_name,
|
|
|
- sum(case when t.status='UNEXIST' then 1 else 0 end) unexistCount,
|
|
|
- count(1) studentCount
|
|
|
- from sc_student t
|
|
|
- where t.exam_id=#{examId}
|
|
|
+ select t.subject_code,t.subject_name,
|
|
|
+ sum(case when t.status='UNEXIST' then 1 else 0 end) unexistCount,
|
|
|
+ count(1) studentCount
|
|
|
+ from sc_student t
|
|
|
+ where t.exam_id=#{examId}
|
|
|
<if test="subjectCode != null and subjectCode !=''">
|
|
|
and t.subject_code=#{subjectCode}
|
|
|
</if>
|
|
|
group by t.subject_code
|
|
|
</select>
|
|
|
<select id="examRoomScannedPage" resultType="cn.com.qmth.scancentral.vo.examroom.ExamRoomScannedVo">
|
|
|
- select tm.* from(
|
|
|
- select t.subject_code,s.name subjectName,t.campus_code,t.exam_site,t.exam_room,
|
|
|
- sum(case when t.status='SCANNED' then 1 else 0 end) scannedCount
|
|
|
- from sc_student t inner join sc_subject s on t.exam_id=s.exam_id and t.subject_code=s.code
|
|
|
- where t.exam_id=#{req.examId}
|
|
|
+ select tm.* from(
|
|
|
+ select t.subject_code,s.name subjectName,t.campus_code,t.exam_site,t.exam_room,
|
|
|
+ sum(case when t.status='SCANNED' then 1 else 0 end) scannedCount
|
|
|
+ from sc_student t inner join sc_subject s on t.exam_id=s.exam_id and t.subject_code=s.code
|
|
|
+ where t.exam_id=#{req.examId}
|
|
|
<if test="req.campusCode != null and req.campusCode !=''">
|
|
|
and t.campus_code=#{req.campusCode}
|
|
|
</if>
|
|
@@ -548,19 +557,19 @@
|
|
|
) tm
|
|
|
where 1=1
|
|
|
<if test="req.scanned != null">
|
|
|
- <if test="req.scanned">
|
|
|
- and tm.scannedCount>0
|
|
|
- </if>
|
|
|
- <if test="!req.scanned">
|
|
|
- and tm.scannedCount=0
|
|
|
- </if>
|
|
|
+ <if test="req.scanned">
|
|
|
+ and tm.scannedCount>0
|
|
|
+ </if>
|
|
|
+ <if test="!req.scanned">
|
|
|
+ and tm.scannedCount=0
|
|
|
+ </if>
|
|
|
</if>
|
|
|
order by tm.subject_code,tm.subjectName,tm.campus_code,tm.exam_site,tm.exam_room
|
|
|
</select>
|
|
|
<select id="studentPage" resultType="cn.com.qmth.scancentral.vo.student.StudentPageVo">
|
|
|
- select t.*
|
|
|
- from sc_student t
|
|
|
- where t.exam_id=#{req.examId}
|
|
|
+ select t.*
|
|
|
+ from sc_student t
|
|
|
+ where t.exam_id=#{req.examId}
|
|
|
<if test="req.campusCode != null and req.campusCode !=''">
|
|
|
and t.campus_code=#{req.campusCode}
|
|
|
</if>
|
|
@@ -608,5 +617,5 @@
|
|
|
) tm
|
|
|
order by tm.exam_site,tm.exam_room
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
</mapper>
|