|
@@ -183,12 +183,23 @@ public class PaperDetailUnit implements Serializable, Comparable<PaperDetailUnit
|
|
|
|
|
|
@Override
|
|
|
public int compareTo(PaperDetailUnit unit) {
|
|
|
- if (unit != null) {
|
|
|
+ /*if (unit != null) {
|
|
|
if (this.getQuestionType().getId() > unit.getQuestionType().getId()) {
|
|
|
return 1;
|
|
|
} else if (this.getQuestionType().getId() == unit.getQuestionType().getId()) {
|
|
|
return 0;
|
|
|
}
|
|
|
+ }*/
|
|
|
+ if (unit != null) {
|
|
|
+ if(this.getNumber() == null)return -1;
|
|
|
+ if(unit.getNumber() == null)return 1;
|
|
|
+ if (this.getNumber() > unit.getNumber()) {
|
|
|
+ return 1;
|
|
|
+ } else if (this.getNumber() < unit.getNumber()) {
|
|
|
+ return -1;
|
|
|
+ }else{
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
}
|
|
|
return -1;
|
|
|
}
|