机构
This commit is contained in:
parent
2ecb3e50fa
commit
d370f1d9b4
@ -180,13 +180,7 @@ public class AgencyServiceImpl implements IAgencyService {
|
|||||||
agency.setValue(agency.getId().toString());
|
agency.setValue(agency.getId().toString());
|
||||||
}
|
}
|
||||||
List<AgencyVO> agenciesTree = buildDeptTree(agencies);
|
List<AgencyVO> agenciesTree = buildDeptTree(agencies);
|
||||||
//排序
|
return agenciesTree.stream().map(AgencyTreeVO::new).collect(Collectors.toList());
|
||||||
List<AgencyVO> sortedAgenciesTree = agenciesTree.stream().sorted(Comparator.comparing(AgencyVO::getAgencySort)).collect(Collectors.toList());
|
|
||||||
for (AgencyVO agencyVO : sortedAgenciesTree) {
|
|
||||||
List<AgencyVO> collect = agencyVO.getChildren().stream().sorted(Comparator.comparing(AgencyVO::getAgencySort)).collect(Collectors.toList());
|
|
||||||
agencyVO.setChildren(collect);
|
|
||||||
}
|
|
||||||
return sortedAgenciesTree.stream().map(AgencyTreeVO::new).collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user