|
@@ -95,12 +95,12 @@ public class DataAnalysisDeptFacade {
|
|
|
page.setSize(size);
|
|
|
page.setTotal(getEntryDefectImproveDeptDTOList.size());
|
|
|
page.setCurrent(current);
|
|
|
+ //排序操作
|
|
|
+ if (ListUtil.isNotEmpty(getEntryDefectImproveDeptDTOList)) {
|
|
|
+ getEntryDefectImproveDeptDTOList = sortEntryDefectListByDdept(getEntryDefectImproveDeptDTOList, getEntryDefectImproveDeptVO);
|
|
|
+ }
|
|
|
//分页操作
|
|
|
List<GetEntryDefectImproveDeptDTO> getEntryDefectImproveDeptDTOS = DataAnalysisFacade.page(getEntryDefectImproveDeptDTOList, size, current);
|
|
|
- if (ListUtil.isNotEmpty(getEntryDefectImproveDeptDTOS)) {
|
|
|
- //排序操作
|
|
|
- getEntryDefectImproveDeptDTOS = sortEntryDefectListByDdept( getEntryDefectImproveDeptDTOS ,getEntryDefectImproveDeptVO); }
|
|
|
- ;
|
|
|
page.setRecords(getEntryDefectImproveDeptDTOS);
|
|
|
return page;
|
|
|
}
|
|
@@ -150,31 +150,32 @@ public class DataAnalysisDeptFacade {
|
|
|
}
|
|
|
getEntryDefectImproveDeptVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
|
|
|
}
|
|
|
- public List<GetEntryDefectImproveDeptDTO> sortEntryDefectListByDdept(List<GetEntryDefectImproveDeptDTO> getEntryDefectImproveDeptDTOS, GetEntryDefectImproveDeptVO getEntryDefectImproveDeptVO) {
|
|
|
- if(StringUtils.isNotBlank(getEntryDefectImproveDeptVO.getAsc())){
|
|
|
- if("totalNum".equals(getEntryDefectImproveDeptVO.getAsc())){
|
|
|
+
|
|
|
+ public List<GetEntryDefectImproveDeptDTO> sortEntryDefectListByDdept(List<GetEntryDefectImproveDeptDTO> getEntryDefectImproveDeptDTOS, GetEntryDefectImproveDeptVO getEntryDefectImproveDeptVO) {
|
|
|
+ if (StringUtils.isNotBlank(getEntryDefectImproveDeptVO.getAsc())) {
|
|
|
+ if ("totalNum".equals(getEntryDefectImproveDeptVO.getAsc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getTotalNum)).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
- if("handleNum".equals(getEntryDefectImproveDeptVO.getAsc())){
|
|
|
+ if ("handleNum".equals(getEntryDefectImproveDeptVO.getAsc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getHandleNum)).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
- if("improveleNum".equals(getEntryDefectImproveDeptVO.getAsc())){
|
|
|
+ if ("improveleNum".equals(getEntryDefectImproveDeptVO.getAsc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getImproveleNum)).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(StringUtils.isNotBlank(getEntryDefectImproveDeptVO.getDesc())){
|
|
|
- if("totalNum".equals(getEntryDefectImproveDeptVO.getDesc())){
|
|
|
+ if (StringUtils.isNotBlank(getEntryDefectImproveDeptVO.getDesc())) {
|
|
|
+ if ("totalNum".equals(getEntryDefectImproveDeptVO.getDesc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getTotalNum).reversed()).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
- if("handleNum".equals(getEntryDefectImproveDeptVO.getDesc())){
|
|
|
+ if ("handleNum".equals(getEntryDefectImproveDeptVO.getDesc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getHandleNum).reversed()).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
- if("improveleNum".equals(getEntryDefectImproveDeptVO.getDesc())){
|
|
|
+ if ("improveleNum".equals(getEntryDefectImproveDeptVO.getDesc())) {
|
|
|
getEntryDefectImproveDeptDTOS = getEntryDefectImproveDeptDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDeptDTO::getImproveleNum).reversed()).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|