瀏覽代碼

已仲裁也会触发计算评卷员质量的定时任务

yin 9 月之前
父節點
當前提交
45120a8237

+ 2 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/dao/MarkLibraryDao.java

@@ -38,8 +38,8 @@ public interface MarkLibraryDao extends JpaRepository<MarkLibrary, Integer>, Jpa
 
     @Query("select l from MarkLibrary l where l.markerId=?1 and l.status not in (?2)")
     List<MarkLibrary> findByMarkerIdAndStatusNotIn(Integer markerId, LibraryStatus... status);
-
-    List<MarkLibrary> findByMarkerIdAndStatus(Integer markerId, LibraryStatus status, Pageable page);
+    @Query("select l from MarkLibrary l where l.markerId=?1 and l.status in (?2)")
+    List<MarkLibrary> findByMarkerIdAndStatus(Integer markerId,Set<LibraryStatus> statusSet, Pageable pag);
 
     @Query("select l from MarkLibrary l where l.studentId=?1 order by l.groupNumber ")
     List<MarkLibrary> findByStudentId(Integer studentId);

+ 4 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/MarkServiceImpl.java

@@ -1564,7 +1564,10 @@ public class MarkServiceImpl implements MarkService {
         query.setPageNumber(1);
         query.setPageSize(1);
         query.setSort(new Sort(Sort.Direction.DESC, "markerTime", "examNumber"));
-        List<MarkLibrary> list = libraryDao.findByMarkerIdAndStatus(marker.getId(), LibraryStatus.MARKED, query);
+        Set<LibraryStatus> statusSet = new HashSet<>();
+        statusSet.add(LibraryStatus.MARKED);
+        statusSet.add(LibraryStatus.ARBITRATED);
+        List<MarkLibrary> list = libraryDao.findByMarkerIdAndStatus(marker.getId(),statusSet, query);
         MarkLibrary library = list.isEmpty() ? null : list.get(0);
         if (library != null && library.getMarkerTime() != null) {
             long lastMarkTime = library.getMarkerTime().getTime();