// 排序 type升序排列 sort升序排列
public List<BusPrintFieldSetting> asc(List<BusPrintFieldSetting> list) {
Collections.sort(list, new Comparator<BusPrintFieldSetting>() {
@Override
public int compare(BusPrintFieldSetting o1, BusPrintFieldSetting o2) {
//return o1.getSort().compareTo(o2.getSort());
if (o1.getType() > o2.getType()) {
return 1;
} else if (o1.getType() < o2.getType()) {
return -1;
} else {
if (o1.getSort() < o2.getSort()) {
return -1;
} else {
return 1;
}
}
}
});
return list;
}