ting.yin hai 1 ano
pai
achega
df9d3708f5

+ 6 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/ArbitrateHistoryServiceImpl.java

@@ -11,6 +11,7 @@ import javax.persistence.criteria.Root;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -69,6 +70,11 @@ public class ArbitrateHistoryServiceImpl extends BaseQueryService<ArbitrateHisto
     @Override
     @Override
     public ArbitrateHistorySearchQuery findByQuery(final ArbitrateHistorySearchQuery query) {
     public ArbitrateHistorySearchQuery findByQuery(final ArbitrateHistorySearchQuery query) {
         checkQuery(query);
         checkQuery(query);
+        if (query.getSort() == null) {
+            query.setSort(new Sort("id"));
+        } else {
+            query.setSort(query.getSort().and(new Sort("id")));
+        }
         Page<ArbitrateHistory> result = historyDao.findAll(buildSpecification(query), query);
         Page<ArbitrateHistory> result = historyDao.findAll(buildSpecification(query), query);
         fillResult(result, query);
         fillResult(result, query);
         return query;
         return query;

+ 3 - 3
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ArbitrateController.java

@@ -265,9 +265,9 @@ public class ArbitrateController extends BaseExamController {
             d = Direction.ASC;
             d = Direction.ASC;
         }
         }
         if (order.equals("markerTime")) {
         if (order.equals("markerTime")) {
-            querySort = new Sort(d, "updateTime");
+            querySort = new Sort(d, "updateTime", "id");
         } else if (order.equals("markerScore")) {
         } else if (order.equals("markerScore")) {
-            querySort = new Sort(d, "totalScore");
+            querySort = new Sort(d, "totalScore", "id");
         }
         }
         MarkGroup group = groupService.findOne(examId, subjectCode, groupNumber);
         MarkGroup group = groupService.findOne(examId, subjectCode, groupNumber);
         List<Task> list = new LinkedList<Task>();
         List<Task> list = new LinkedList<Task>();
@@ -364,7 +364,7 @@ public class ArbitrateController extends BaseExamController {
                 result.accumulate("success", false);
                 result.accumulate("success", false);
                 result.accumulate("message", "评卷任务提交失败");
                 result.accumulate("message", "评卷任务提交失败");
             } finally {
             } finally {
-            	lockService.unlock(LockType.STUDENT, markResult.getStudentId());
+                lockService.unlock(LockType.STUDENT, markResult.getStudentId());
                 lockService.unwatch(LockType.GROUP, history.getExamId(), history.getSubjectCode(),
                 lockService.unwatch(LockType.GROUP, history.getExamId(), history.getSubjectCode(),
                         history.getGroupNumber());
                         history.getGroupNumber());
                 lockService.unwatch(LockType.EXAM_SUBJECT, history.getExamId(), history.getSubjectCode());
                 lockService.unwatch(LockType.EXAM_SUBJECT, history.getExamId(), history.getSubjectCode());