表头排序
This commit is contained in:
+15
-12
@@ -417,22 +417,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
||||||
String e1MasterDomain = StringUtils.isNotBlank(e1.getMasterDomain()) ? e1.getMasterDomain() : "";
|
String e1MasterDomain = StringUtils.isNotBlank(e1.getMasterDomain()) ? e1.getMasterDomain() : "";
|
||||||
String e2MasterDomain = StringUtils.isNotBlank(e2.getMasterDomain()) ? e2.getMasterDomain() : "";
|
String e2MasterDomain = StringUtils.isNotBlank(e2.getMasterDomain()) ? e2.getMasterDomain() : "";
|
||||||
return comparator.compare(e1MasterDomain,e2MasterDomain);
|
return comparator.compare(e2MasterDomain,e1MasterDomain);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//studio
|
//studio
|
||||||
if("studio".equals(otaManageApplyEO.getOrderByField())){
|
if("studioText".equals(otaManageApplyEO.getOrderByField())){
|
||||||
if(OrderEnum.POSITIVE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
if(OrderEnum.POSITIVE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
||||||
Collections.sort(otaManageApplyEOList,(e1, e2)->{
|
Collections.sort(otaManageApplyEOList,(e1, e2)->{
|
||||||
String e1Studio = StringUtils.isNotBlank(e1.getStudio()) ? e1.getStudio() : "";
|
String e1Studio = StringUtils.isNotBlank(e1.getStudioText()) ? e1.getStudioText() : "";
|
||||||
String e2Studio = StringUtils.isNotBlank(e2.getStudio()) ? e2.getStudio() : "";
|
String e2Studio = StringUtils.isNotBlank(e2.getStudioText()) ? e2.getStudioText() : "";
|
||||||
return comparator.compare(e1Studio,e2Studio);
|
return comparator.compare(e1Studio,e2Studio);
|
||||||
});
|
});
|
||||||
}else if(OrderEnum.REVERSE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
}else if(OrderEnum.REVERSE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
||||||
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
||||||
String e1Studio = StringUtils.isNotBlank(e1.getStudio()) ? e1.getStudio() : "";
|
String e1Studio = StringUtils.isNotBlank(e1.getStudioText()) ? e1.getStudioText() : "";
|
||||||
String e2Studio = StringUtils.isNotBlank(e2.getStudio()) ? e2.getStudio() : "";
|
String e2Studio = StringUtils.isNotBlank(e2.getStudioText()) ? e2.getStudioText() : "";
|
||||||
return comparator.compare(e2Studio,e1Studio);
|
return comparator.compare(e2Studio,e1Studio);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -520,17 +520,17 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//匹配状态
|
//匹配状态
|
||||||
if("matchStatus".equals(otaManageApplyEO.getOrderByField())){
|
if("matchStatusText".equals(otaManageApplyEO.getOrderByField())){
|
||||||
if(OrderEnum.POSITIVE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
if(OrderEnum.POSITIVE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
||||||
Collections.sort(otaManageApplyEOList,(e1, e2)->{
|
Collections.sort(otaManageApplyEOList,(e1, e2)->{
|
||||||
String e1MatchStatus = StringUtils.isNotBlank(e1.getMatchStatus()) ? e1.getMatchStatus() : "";
|
String e1MatchStatus = StringUtils.isNotBlank(e1.getMatchStatusText()) ? e1.getMatchStatusText() : "";
|
||||||
String e2MatchStatus = StringUtils.isNotBlank(e2.getMatchStatus()) ? e2.getMatchStatus() : "";
|
String e2MatchStatus = StringUtils.isNotBlank(e2.getMatchStatusText()) ? e2.getMatchStatusText() : "";
|
||||||
return comparator.compare(e1MatchStatus,e2MatchStatus);
|
return comparator.compare(e1MatchStatus,e2MatchStatus);
|
||||||
});
|
});
|
||||||
}else if(OrderEnum.REVERSE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
}else if(OrderEnum.REVERSE.getValue().equals(otaManageApplyEO.getOrderBy())){
|
||||||
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
Collections.sort(otaManageApplyEOList,(e1,e2)->{
|
||||||
String e1MatchStatus = StringUtils.isNotBlank(e1.getMatchStatus()) ? e1.getMatchStatus() : "";
|
String e1MatchStatus = StringUtils.isNotBlank(e1.getMatchStatusText()) ? e1.getMatchStatusText() : "";
|
||||||
String e2MatchStatus = StringUtils.isNotBlank(e2.getMatchStatus()) ? e2.getMatchStatus() : "";
|
String e2MatchStatus = StringUtils.isNotBlank(e2.getMatchStatusText()) ? e2.getMatchStatusText() : "";
|
||||||
return comparator.compare(e2MatchStatus,e1MatchStatus);
|
return comparator.compare(e2MatchStatus,e1MatchStatus);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -668,7 +668,10 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!list.isEmpty()) {
|
||||||
|
//表头排序
|
||||||
|
heartSort(otaManageApplyEO, list);
|
||||||
|
}
|
||||||
Page pages = PageUtil.getPages(pageNo, pageSize, list);
|
Page pages = PageUtil.getPages(pageNo, pageSize, list);
|
||||||
return pages;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user