package com.qmth.jkserver.dto;

import java.util.Comparator;

/**
 * Created by gx on 2017/11/24.
 */
public class ExamStudenDetailDtoSorter implements Comparator<ExamStudenDetailDto> {

	@Override
	public int compare(ExamStudenDetailDto o1, ExamStudenDetailDto o2) {
		if(o1.getBatchId().compareTo(o2.getBatchId()) < 0){
			return -1;
		}
		else if(o1.getBatchId().compareTo(o2.getBatchId()) > 0){
			return 1;
		}
		else{
			if(o1.getTicketNo().compareTo(o2.getTicketNo()) < 0){
				return -1;
			}
			else if(o1.getTicketNo().compareTo(o2.getTicketNo()) > 0){
				return 1;
			}
			else{
				return 0;
			}
		}
		
	}

	
  
}
