|
|
|
@ -134,10 +134,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
// 添加父级元素
|
|
|
|
|
List<DepartmentListDTO> compListDTOS = DepartmentBO.buildDeptDTOList(allList, filterDeptPOs, orderType.toString());
|
|
|
|
|
if ("asc".equalsIgnoreCase(orderType.toString())) {
|
|
|
|
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
|
|
|
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
|
|
|
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
|
|
|
|
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
|
|
|
|