瀏覽代碼

联考版-v3.1.0-测试bug修复。

xiaof 2 年之前
父節點
當前提交
551aa29c8a

+ 2 - 0
stmms-ms-core/src/main/java/cn/com/qmth/stmms/ms/core/repository/ChangeLevelRepo.java

@@ -28,4 +28,6 @@ public interface ChangeLevelRepo extends JpaRepository<ChangeLevel, Long>, JpaSp
 
 
     @Query("select s from ChangeLevel s where s.workId = ?1 and s.subject = ?2 and s.stage = ?3 and s.paperId = ?4 and s.auditStatus = 0")
     @Query("select s from ChangeLevel s where s.workId = ?1 and s.subject = ?2 and s.stage = ?3 and s.paperId = ?4 and s.auditStatus = 0")
     ChangeLevel findByWorkIdAndSubjectAndStageAndPaperId(Long workId, String subject, MarkStage stage, Long paperId);
     ChangeLevel findByWorkIdAndSubjectAndStageAndPaperId(Long workId, String subject, MarkStage stage, Long paperId);
+
+    List<ChangeLevel> findByWorkIdAndSubjectAndAuditStatusAndStage(Long workId, String subject, int auditStatus, MarkStage stage);
 }
 }

+ 15 - 1
stmms-ms-core/src/main/java/cn/com/qmth/stmms/ms/core/repository/MarkTaskLevelRepo.java

@@ -77,6 +77,20 @@ public interface MarkTaskLevelRepo extends JpaRepository<MarkTaskLevel, Long>, J
             "t.`marker_id` = ? and t.stage = ? and p.is_missing = false and p.is_test = ?  GROUP BY t.`question_id` ORDER BY q.`id`", nativeQuery = true)
             "t.`marker_id` = ? and t.stage = ? and p.is_missing = false and p.is_test = ?  GROUP BY t.`question_id` ORDER BY q.`id`", nativeQuery = true)
     List<Object[]> countGroupByQuestion(Long markerId, Integer stageId, int test);
     List<Object[]> countGroupByQuestion(Long markerId, Integer stageId, int test);
 
 
+    /**
+     * 统计各评卷员各试题已评数及总数(分档阶段)
+     *
+     * @param workId  工作ID
+     * @param subject 科目
+     * @param stageId 阶段
+     * @param test    试评状态
+     * @param markers 评卷员ID集合
+     */
+    @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
+            "FROM mark_task_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
+            "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.batch_no is not null and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
+    List<Object[]> listGroupByQuestionAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("markers") List<Long> markers);
+
     /**
     /**
      * 统计各评卷员各试题已评数及总数(分档阶段)
      * 统计各评卷员各试题已评数及总数(分档阶段)
      *
      *
@@ -90,7 +104,7 @@ public interface MarkTaskLevelRepo extends JpaRepository<MarkTaskLevel, Long>, J
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
             "FROM mark_task_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "FROM mark_task_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.batch_no = :batchNo and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.batch_no = :batchNo and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
-    List<Object[]> listGroupByQuestionAndMarkerAndBatchNoAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
+    List<Object[]> listGroupByQuestionAndBatchNoAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
 
 
     /**
     /**
      * 考区已评数及总数(分档阶段)
      * 考区已评数及总数(分档阶段)

+ 15 - 1
stmms-ms-core/src/main/java/cn/com/qmth/stmms/ms/core/repository/MarkTaskRoughLevelRepo.java

@@ -57,6 +57,20 @@ public interface MarkTaskRoughLevelRepo extends JpaRepository<MarkTaskRoughLevel
     @Query(value = "select mt from MarkTaskRoughLevel mt left outer join fetch mt.paper where mt.markerId = ?1 and mt.stage = ?2")
     @Query(value = "select mt from MarkTaskRoughLevel mt left outer join fetch mt.paper where mt.markerId = ?1 and mt.stage = ?2")
     List<MarkTaskRoughLevel> findByMarkerIdAndStage(Long markerId, MarkStage stage);
     List<MarkTaskRoughLevel> findByMarkerIdAndStage(Long markerId, MarkStage stage);
 
 
+    /**
+     * 统计各评卷员各试题已评数及总数(分档阶段)
+     *
+     * @param workId  工作ID
+     * @param subject 科目
+     * @param stageId 阶段
+     * @param test    试评状态
+     * @param markers 评卷员ID集合
+     */
+    @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
+            "FROM mark_task_rough_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
+            "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.rough_batch_no is not null and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
+    List<Object[]> listGroupByQuestionAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("markers") List<Long> markers);
+
     /**
     /**
      * 统计各评卷员各试题已评数及总数(分档阶段)
      * 统计各评卷员各试题已评数及总数(分档阶段)
      *
      *
@@ -70,7 +84,7 @@ public interface MarkTaskRoughLevelRepo extends JpaRepository<MarkTaskRoughLevel
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount, SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
             "FROM mark_task_rough_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "FROM mark_task_rough_level t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.rough_batch_no = :batchNo and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.is_missing = false and p.is_test = :test and p.rough_batch_no = :batchNo and t.marker_id in (:markers) GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`,t.marker_id", nativeQuery = true)
-    List<Object[]> listGroupByQuestionAndMarkerAndBatchNoAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
+    List<Object[]> listGroupByQuestionAndBatchNoAndMarkerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("test") int test, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
 
 
     /**
     /**
      * 考区已评数及总数(分档阶段)
      * 考区已评数及总数(分档阶段)

+ 15 - 1
stmms-ms-core/src/main/java/cn/com/qmth/stmms/ms/core/repository/MarkTaskScoreRepo.java

@@ -75,6 +75,19 @@ public interface MarkTaskScoreRepo extends JpaRepository<MarkTaskScore, Long>, J
             "t.`marker_id` = ? and t.stage = ? and p.is_missing = false GROUP BY t.`question_id` ORDER BY q.`id`", nativeQuery = true)
             "t.`marker_id` = ? and t.stage = ? and p.is_missing = false GROUP BY t.`question_id` ORDER BY q.`id`", nativeQuery = true)
     List<Object[]> countGroupByQuestion(Long markerId, Integer stageId);
     List<Object[]> countGroupByQuestion(Long markerId, Integer stageId);
 
 
+    /**
+     * 统计各评卷员各试题已评数及总数(分档阶段)
+     *
+     * @param workId  工作ID
+     * @param subject 科目
+     * @param stageId 阶段
+     * @param markers 评卷员ID集合
+     */
+    @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount,SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
+            "FROM mark_task_score t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
+            "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.score_batch_no is not null and t.`marker_id` in (:markers) and p.is_missing = false GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`, t.`marker_id`", nativeQuery = true)
+    List<Object[]> listGroupByQuestionAndMakerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("markers") List<Long> markers);
+
     /**
     /**
      * 统计各评卷员各试题已评数及总数(分档阶段)
      * 统计各评卷员各试题已评数及总数(分档阶段)
      *
      *
@@ -87,7 +100,7 @@ public interface MarkTaskScoreRepo extends JpaRepository<MarkTaskScore, Long>, J
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount,SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
     @Query(value = "SELECT q.`id`,t.`marker_id` markerId,mu.login_name loginName,t.`marker_name` markerName,q.`name`,SUM(IF(t.`result` IS NULL,1,0)) leftCount,COUNT(t.question_id) totalCount,SUM(t.is_rejected) rejectedCount, q.area_code areaCode " +
             "FROM mark_task_score t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "FROM mark_task_score t LEFT JOIN mark_user mu on t.marker_id = mu.id LEFT OUTER JOIN exam_question q ON t.`question_id` = q.`id` LEFT  JOIN paper p ON t.paper_id = p.id WHERE " +
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.score_batch_no = :batchNo and t.`marker_id` in (:markers) and p.is_missing = false GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`, t.`marker_id`", nativeQuery = true)
             "t.work_id = :workId and t.subject = :subject and t.stage = :stageId and p.score_batch_no = :batchNo and t.`marker_id` in (:markers) and p.is_missing = false GROUP BY t.marker_id,mu.login_name, t.`marker_name` ORDER BY q.`id`, t.`marker_id`", nativeQuery = true)
-    List<Object[]> listGroupByQuestionAndMarkerAndScoreBatchNoAndMakerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
+    List<Object[]> listGroupByQuestionAndScoreBatchNoAndMakerId(@Param("workId") Long workId, @Param("subject") String subject, @Param("stageId") Integer stageId, @Param("batchNo") Long batchNo, @Param("markers") List<Long> markers);
 
 
     /**
     /**
      * 统计指定试卷的所有任务数量
      * 统计指定试卷的所有任务数量
@@ -144,4 +157,5 @@ public interface MarkTaskScoreRepo extends JpaRepository<MarkTaskScore, Long>, J
 
 
     @Query("select m.paper.id from MarkTaskScore m where m.workId = ?1 and m.questionId = ?2 and m.markerId = ?3 and m.stage = ?4 and m.batchNo = ?5 and m.isMark = true")
     @Query("select m.paper.id from MarkTaskScore m where m.workId = ?1 and m.questionId = ?2 and m.markerId = ?3 and m.stage = ?4 and m.batchNo = ?5 and m.isMark = true")
     List<Long> findByWorkIdAndQuestionIdAndMarkerIdAndStageAndBatchNoAndPaperIsMark(Long workId, Long questionId, Long id, MarkStage stage, Long batchNo);
     List<Long> findByWorkIdAndQuestionIdAndMarkerIdAndStageAndBatchNoAndPaperIsMark(Long workId, Long questionId, Long id, MarkStage stage, Long batchNo);
+
 }
 }

+ 15 - 0
stmms-ms-marking/src/main/java/cn/com/qmth/stmms/ms/marking/api/MarkSubjectApi.java

@@ -80,6 +80,9 @@ public class MarkSubjectApi {
     @Resource
     @Resource
     MarkerGroupStudentRepo markerGroupStudentRepo;
     MarkerGroupStudentRepo markerGroupStudentRepo;
 
 
+    @Resource
+    ChangeLevelRepo changeLevelRepo;
+
     @Autowired
     @Autowired
     MarkerGroupLeaderService markerGroupLeaderService;
     MarkerGroupLeaderService markerGroupLeaderService;
 
 
@@ -105,6 +108,18 @@ public class MarkSubjectApi {
                             @RequestParam Subject subject) {
                             @RequestParam Subject subject) {
         MarkSubject markSubject = markSubjectRepo.findOne(workId + "-" + subject.name());
         MarkSubject markSubject = markSubjectRepo.findOne(workId + "-" + subject.name());
         MarkStage initStage = markSubject.getStage();
         MarkStage initStage = markSubject.getStage();
+
+        // 所有改档未审核的数据。默认审核不通过
+        List<ChangeLevel> changeLevelList = changeLevelRepo.findByWorkIdAndSubjectAndAuditStatusAndStage(workId, subject.name(), 0, initStage);
+        if (!changeLevelList.isEmpty()) {
+            List<ChangeLevel> list = new ArrayList<>();
+            for (ChangeLevel m : changeLevelList) {
+                m.setAuditStatus(2);
+                list.add(m);
+            }
+            changeLevelRepo.save(list);
+        }
+
         if (MarkStage.INIT.equals(markSubject.getStage())) {
         if (MarkStage.INIT.equals(markSubject.getStage())) {
             if (ParamCache.levelConfigMap.get(String.valueOf(workId)).getRoughLevelEnable() == 1) {
             if (ParamCache.levelConfigMap.get(String.valueOf(workId)).getRoughLevelEnable() == 1) {
                 markSubject.setStage(MarkStage.ROUGH_LEVEL);
                 markSubject.setStage(MarkStage.ROUGH_LEVEL);

+ 7 - 4
stmms-ms-marking/src/main/java/cn/com/qmth/stmms/ms/marking/assembler/QuestionStatAssembler.java

@@ -69,16 +69,19 @@ public class QuestionStatAssembler {
         int shift = 0;
         int shift = 0;
         int shiftScore = 0;
         int shiftScore = 0;
         int rejectCount = Integer.parseInt(qStats[7].toString());
         int rejectCount = Integer.parseInt(qStats[7].toString());
-        if (MarkStage.LEVEL.equals(stage)) {
+        if (MarkStage.ROUGH_LEVEL.equals(stage)) {
+            //所有打回
+            rejectCount = markTaskRoughLevelRepo.findByWorkIdAndSubjectAndMarkerIdAndStageReject(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.ROUGH_LEVEL.ordinal());
+        } else if (MarkStage.LEVEL.equals(stage)) {
+            // 改粗档,打细档
             shift = markTaskRoughLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.ROUGH_LEVEL.ordinal());
             shift = markTaskRoughLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.ROUGH_LEVEL.ordinal());
             shiftScore = markTaskLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftScoreAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
             shiftScore = markTaskLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftScoreAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
             //所有打回
             //所有打回
-//            rejectCount = markTaskRoughLevelRepo.findByWorkIdAndSubjectAndMarkerIdAndStageReject(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.ROUGH_LEVEL.ordinal());
+            rejectCount = markTaskLevelRepo.findByWorkIdAndSubjectAndMarkerIdAndStageReject(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
         } else if (MarkStage.SCORE.equals(stage)) {
         } else if (MarkStage.SCORE.equals(stage)) {
+            // 打细档,打分
             shift = markTaskLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
             shift = markTaskLevelRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
             shiftScore = markTaskScoreRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftScoreAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.SCORE.ordinal());
             shiftScore = markTaskScoreRepo.countByWorkIdAndSubjectAndMarkerIdAndStageAndShiftScoreAndResult(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.SCORE.ordinal());
-            //所有打回
-//            rejectCount = markTaskLevelRepo.findByWorkIdAndSubjectAndMarkerIdAndStageReject(workId, subject.name(), Long.valueOf(qStats[1].toString()), MarkStage.LEVEL.ordinal());
         }
         }
 
 
         MarkQuestionStatDTO qpDTO = null;
         MarkQuestionStatDTO qpDTO = null;

+ 23 - 16
stmms-ms-marking/src/main/java/cn/com/qmth/stmms/ms/marking/service/GroupingService.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.stmms.ms.marking.service;
 package cn.com.qmth.stmms.ms.marking.service;
 
 
+import cn.com.qmth.stmms.ms.core.cache.ParamCache;
 import cn.com.qmth.stmms.ms.core.domain.MarkStage;
 import cn.com.qmth.stmms.ms.core.domain.MarkStage;
 import cn.com.qmth.stmms.ms.core.domain.MarkSubject;
 import cn.com.qmth.stmms.ms.core.domain.MarkSubject;
 import cn.com.qmth.stmms.ms.core.domain.Paper;
 import cn.com.qmth.stmms.ms.core.domain.Paper;
@@ -7,7 +8,6 @@ import cn.com.qmth.stmms.ms.core.domain.user.MarkUser;
 import cn.com.qmth.stmms.ms.core.domain.user.MarkerGroup;
 import cn.com.qmth.stmms.ms.core.domain.user.MarkerGroup;
 import cn.com.qmth.stmms.ms.core.domain.user.Role;
 import cn.com.qmth.stmms.ms.core.domain.user.Role;
 import cn.com.qmth.stmms.ms.core.repository.*;
 import cn.com.qmth.stmms.ms.core.repository.*;
-import cn.com.qmth.stmms.ms.core.vo.Subject;
 import cn.com.qmth.stmms.ms.marking.assembler.QuestionStatAssembler;
 import cn.com.qmth.stmms.ms.marking.assembler.QuestionStatAssembler;
 import cn.com.qmth.stmms.ms.marking.dto.LevleProgressDTO;
 import cn.com.qmth.stmms.ms.marking.dto.LevleProgressDTO;
 import cn.com.qmth.stmms.ms.marking.dto.MarkQuestionStatDTO;
 import cn.com.qmth.stmms.ms.marking.dto.MarkQuestionStatDTO;
@@ -156,14 +156,6 @@ public class GroupingService {
             groupLeaderAndMarkers = groupLeaderAndMarkers.stream().filter(m -> m.get("markLeaders").contains(markerId)).collect(Collectors.toList());
             groupLeaderAndMarkers = groupLeaderAndMarkers.stream().filter(m -> m.get("markLeaders").contains(markerId)).collect(Collectors.toList());
         }
         }
         if (!CollectionUtils.isEmpty(groupLeaderAndMarkers)) {
         if (!CollectionUtils.isEmpty(groupLeaderAndMarkers)) {
-            Long batchNo = null;
-            if (markSubject.getStage().equals(MarkStage.ROUGH_LEVEL)) {
-                batchNo = paperRepo.findMaxRoughBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
-            } else if (markSubject.getStage().equals(MarkStage.LEVEL)) {
-                batchNo = paperRepo.findMaxBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
-            } else if (markSubject.getStage().equals(MarkStage.SCORE)) {
-                batchNo = paperRepo.findMaxScoreBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
-            }
             for (Map<String, List<Long>> groupLeaderAndMarker : groupLeaderAndMarkers) {
             for (Map<String, List<Long>> groupLeaderAndMarker : groupLeaderAndMarkers) {
                 Map<String, Object> tempMap = new HashMap<>();
                 Map<String, Object> tempMap = new HashMap<>();
                 List<Long> markerLeaders = groupLeaderAndMarker.get("markLeaders");
                 List<Long> markerLeaders = groupLeaderAndMarker.get("markLeaders");
@@ -190,13 +182,28 @@ public class GroupingService {
                 // 评卷员
                 // 评卷员
                 //各评卷员评卷进度
                 //各评卷员评卷进度
                 List<Object[]> qStats = null;
                 List<Object[]> qStats = null;
+                Long batchNo = null;
                 if (MarkStage.ROUGH_LEVEL.equals(markSubject.getStage())) {
                 if (MarkStage.ROUGH_LEVEL.equals(markSubject.getStage())) {
-                    qStats = markTaskRoughLevelRepo.listGroupByQuestionAndMarkerAndBatchNoAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), batchNo, markers);
+                    if (ParamCache.roughLevelConfigMap.get(String.valueOf(workId)).getLevelShowAllPaper() == 1) {
+                        qStats = markTaskRoughLevelRepo.listGroupByQuestionAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), markers);
+                    } else {
+                        batchNo = paperRepo.findMaxRoughBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
+                        qStats = markTaskRoughLevelRepo.listGroupByQuestionAndBatchNoAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), batchNo, markers);
+                    }
                 } else if (MarkStage.LEVEL.equals(markSubject.getStage())) {
                 } else if (MarkStage.LEVEL.equals(markSubject.getStage())) {
-                    qStats = markTaskLevelRepo.listGroupByQuestionAndMarkerAndBatchNoAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), batchNo, markers);
+                    if (ParamCache.levelConfigMap.get(String.valueOf(workId)).getLevelShowAllPaper() == 1) {
+                        qStats = markTaskLevelRepo.listGroupByQuestionAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), markers);
+                    } else {
+                        batchNo = paperRepo.findMaxBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
+                        qStats = markTaskLevelRepo.listGroupByQuestionAndBatchNoAndMarkerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markSubject.getTest(), batchNo, markers);
+                    }
                 } else if (MarkStage.SCORE.equals(markSubject.getStage())) {
                 } else if (MarkStage.SCORE.equals(markSubject.getStage())) {
-                    qStats = markTaskScoreRepo.listGroupByQuestionAndMarkerAndScoreBatchNoAndMakerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), batchNo, markers);
-
+                    if (ParamCache.scoreConfigMap.get(String.valueOf(workId)).getScoreShowAllPaper() == 1) {
+                        qStats = markTaskScoreRepo.listGroupByQuestionAndMakerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), markers);
+                    } else {
+                        batchNo = paperRepo.findMaxScoreBatchNoByWorkIdAndSubject(workId, markSubject.getSubject());
+                        qStats = markTaskScoreRepo.listGroupByQuestionAndScoreBatchNoAndMakerId(workId, markSubject.getSubject().name(), markSubject.getStage().ordinal(), batchNo, markers);
+                    }
                 }
                 }
                 if (qStats != null) {
                 if (qStats != null) {
                     List<MarkQuestionStatDTO> questionStatDTOs = new ArrayList<>();
                     List<MarkQuestionStatDTO> questionStatDTOs = new ArrayList<>();
@@ -215,10 +222,10 @@ public class GroupingService {
     /**
     /**
      * 总科组长进度
      * 总科组长进度
      *
      *
-     * @param workId 工作ID
-     * @param markSubject 科目
+     * @param workId          工作ID
+     * @param markSubject     科目
      * @param userMarkLeaders 乘组长
      * @param userMarkLeaders 乘组长
-     * @param objectMap 返回对象
+     * @param objectMap       返回对象
      */
      */
     public void getMakerLeaderProgress(Long workId, MarkSubject markSubject, List<Long> userMarkLeaders, Map<String, Object> objectMap) {
     public void getMakerLeaderProgress(Long workId, MarkSubject markSubject, List<Long> userMarkLeaders, Map<String, Object> objectMap) {
         List<MarkUser> markUsers = markUserRepo.findByWorkIdAndSubjectAndRoleAndIdNotIn(workId, markSubject.getSubject(), Role.MARK_LEADER, userMarkLeaders);
         List<MarkUser> markUsers = markUserRepo.findByWorkIdAndSubjectAndRoleAndIdNotIn(workId, markSubject.getSubject(), Role.MARK_LEADER, userMarkLeaders);