排序 仅排序数字 不排序文字
This commit is contained in:
+10
-1
@@ -292,6 +292,11 @@ public class SarStandardComplianceAssessResultController {
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
if(StringUtils.isNotBlank(eo.getOrder())){
|
||||
if(eo.getOrder().equals("desc")){
|
||||
iPage.getRecords().sort((m1,m2)-> m2.getSpecificItem().compareTo(m1.getSpecificItem()));
|
||||
}
|
||||
}
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
@@ -307,7 +312,11 @@ public class SarStandardComplianceAssessResultController {
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
if(StringUtils.isNotBlank(eo.getOrder())){
|
||||
if(eo.getOrder().equals("desc")){
|
||||
iPage.getRecords().sort((m1,m2)-> m2.getSpecificItem().compareTo(m1.getSpecificItem()));
|
||||
}
|
||||
}
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -51,4 +51,7 @@ public class InterpretationEO {
|
||||
@ApiModelProperty("页内数量")
|
||||
private Integer size=20;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private String order;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user