Ver Fonte

美术阅卷11月新增需求-修复BUG

wangliang há 5 anos atrás
pai
commit
ed2327ff2d

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

@@ -39,7 +39,7 @@ public interface PaperRepo extends JpaRepository<Paper, Long>, JpaSpecificationE
 
     Page<Paper> findByQuestionId(Long questionId, Pageable pageable);
 
-    Paper findTopByLevelAndIsSampleAndIsMissingAndSubjectAndTestAndAreaCodeOrderByUpdatedOnDesc(String level, boolean isSample, boolean isMissing, Subject subject, int test, String areaCode);
+    Paper findTopByLevelAndIsSampleAndIsMissingAndSubjectAndTestAndAreaCodeAndWorkIdOrderByUpdatedOnDesc(String level, boolean isSample, boolean isMissing, Subject subject, int test, String areaCode, Long workId);
 
     /**
      * 统计各省各科试卷数量[areaCode,areaName,questionName,count]
@@ -104,7 +104,7 @@ public interface PaperRepo extends JpaRepository<Paper, Long>, JpaSpecificationE
             "WHERE p.`question_id` = ? and p.is_missing = false " +
             "AND p.batch_no = (select max(batch_no) from paper where question_id = ?) " +
             " AND p.level is null  " +
-            " GROUP BY p.`level`  union  "+
+            " GROUP BY p.`level`  union  " +
             "SELECT p.`level`,COUNT(*)," +
             "SUM(IF(p.`is_rejected` = 1, 1, 0))," +
             "SUM(IF(p.`is_arbitrated` = 1, 1, 0))" +

+ 1 - 1
stmms-ms-marking/src/main/java/cn/com/qmth/stmms/ms/marking/api/MarkTaskApi.java

@@ -101,7 +101,7 @@ public class MarkTaskApi {
             if (Objects.nonNull(isSample) && isSample) {
                 ExamQuestion examQuestion = examQuestionRepo.findOne(questionId);
                 if (examQuestion.getTest() == TrialEnum.DEFAULT.getId()) {
-                    Paper paper = paperRepo.findTopByLevelAndIsSampleAndIsMissingAndSubjectAndTestAndAreaCodeOrderByUpdatedOnDesc(level, isSample, false, examQuestion.getSubject(), TrialEnum.START_FORMAL.getId(), examQuestion.getAreaCode());
+                    Paper paper = paperRepo.findTopByLevelAndIsSampleAndIsMissingAndSubjectAndTestAndAreaCodeAndWorkIdOrderByUpdatedOnDesc(level, isSample, false, examQuestion.getSubject(), TrialEnum.START_FORMAL.getId(), examQuestion.getAreaCode(), examQuestion.getWorkId());
                     if (Objects.nonNull(paper)) {
                         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
                         HttpServletRequest request = attributes.getRequest();