xiaofei 11 luni în urmă
părinte
comite
ae584bc397

+ 1 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/ScanOmrTaskMapper.java

@@ -8,6 +8,7 @@ import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import org.apache.ibatis.annotations.Param;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import com.qmth.teachcloud.mark.dto.ScanStudentDto;
 import com.qmth.teachcloud.mark.entity.ScanOmrTask;
 import com.qmth.teachcloud.mark.enums.OmrTaskStatus;

+ 2 - 2
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/ScanBatchServiceImpl.java

@@ -172,8 +172,8 @@ public class ScanBatchServiceImpl extends ServiceImpl<ScanBatchMapper, ScanBatch
             studentPaperList.add(new ScanStudentPaper(student.getId(), paperNumber, paper.getId()));
         }
         // 更新批次统计数量
-        updateAssignedCount(scanBatch.getId());
-        updateScanCount(scanBatch.getId());
+//        updateAssignedCount(scanBatch.getId());
+//        updateScanCount(scanBatch.getId());
         //直接更新考生扫描状态
         concurrentService.getReadWriteLock(LockType.STUDENT + "-" + student.getId()).writeLock().lock();
         try {

+ 6 - 4
teachcloud-mark/src/main/resources/mapper/ScanOmrTaskMapper.xml

@@ -33,7 +33,7 @@
 	</select>
 	
 	<select id="listByExamIdAndStatusAndUserId" resultType="com.qmth.teachcloud.mark.dto.ScanStudentDto">
-		select 
+		select
 			s.id studentId,
 			bes.student_name,
 			s.student_code
@@ -56,9 +56,10 @@
 					and exists (select 1 from mark_paper mp where s.exam_id = mp.exam_id and s.course_paper_id = mp.course_paper_id and s.paper_type = mp.paper_type and mp.status = #{markPaperStatus})
 					and exists(select 1
 						from scan_omr_task t
-						where s.id = t.student_id
+						where t.exam_id = #{examId}
 						and t.status=#{status}
-						<if test="dpr != null">
+						and s.id = t.student_id
+				<if test="dpr != null">
 							<if test="dpr.requestUserId != null">
 								AND s.create_id = #{dpr.requestUserId}
 							</if>
@@ -90,8 +91,9 @@
 			and exists (select 1 from mark_paper mp where s.exam_id = mp.exam_id and s.course_paper_id = mp.course_paper_id and s.paper_type = mp.paper_type and mp.status = #{markPaperStatus})
 			and exists(select 1
 			from scan_omr_task t
-			where s.id = t.student_id
+			where t.exam_id = #{examId}
 			and t.status=#{status}
+			and s.id = t.student_id
 			<if test="dpr != null">
 				<if test="dpr.requestUserId != null">
 					AND s.create_id = #{dpr.requestUserId}