deason 1 éve
szülő
commit
67341f2650

+ 12 - 1
src/main/java/com/qmth/exam/reserve/bean/apply/ApplyVO.java

@@ -8,7 +8,7 @@ import lombok.Setter;
 
 @Getter
 @Setter
-public class ApplyVO implements IModel {
+public class ApplyVO implements IModel, Comparable<ApplyVO> {
 
     private static final long serialVersionUID = 2804383719693396546L;
 
@@ -52,4 +52,15 @@ public class ApplyVO implements IModel {
     @ApiModelProperty(value = "准考证号", hidden = true)
     private String ticketNumber;
 
+    @Override
+    public int compareTo(ApplyVO obj) {
+        if (this.getTimePeriodStart() > obj.getTimePeriodStart()) {
+            return -1;
+        } else if (this.getTimePeriodStart() < obj.getTimePeriodStart()) {
+            return 1;
+        } else {
+            return 0;
+        }
+    }
+
 }

+ 2 - 0
src/main/java/com/qmth/exam/reserve/service/impl/ExamReserveServiceImpl.java

@@ -354,6 +354,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
             }
         }
 
+        Collections.sort(list);
         return list;
     }
 
@@ -417,6 +418,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
             list.add(vo);
         }
 
+        Collections.sort(list);
         return list;
     }