修改UAT,项目状态详情列表默认按数量排序
This commit is contained in:
+3
-3
@@ -2055,7 +2055,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
private void projectDetailsStatisticsGroupByTerritoryHearSort(List<Map<String, Object>> dataList,Map<String,Object> params) {
|
||||
String orderByField = (String) params.get("orderByField");
|
||||
String orderBy = (String) params.get("orderBy");
|
||||
if(CollectionUtils.isNotEmpty(dataList) && StringUtils.isNotEmpty(orderByField) && StringUtils.isNotEmpty(orderBy)){
|
||||
if(CollectionUtils.isNotEmpty(dataList)){
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
Collections.sort(dataList,(data1,data2)->{
|
||||
String param1 = "";
|
||||
@@ -2071,10 +2071,10 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
}
|
||||
}
|
||||
// 数量
|
||||
if("amount".equals(orderByField)){
|
||||
if(StringUtils.isEmpty(orderByField) || "amount".equals(orderByField)){
|
||||
double p1 = data1.get("amount") != null ? (double) data1.get("amount") : 0;
|
||||
double p2 = data2.get("amount") != null ? (double) data2.get("amount") : 0;
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
if(StringUtils.isEmpty(orderBy) || OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
return (int)(p1 - p2);
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
return (int)(p2 - p1);
|
||||
|
||||
Reference in New Issue
Block a user