|
|
@@ -89,6 +89,20 @@ public class MhUnitManage { |
|
|
|
return nodes; |
|
|
|
} |
|
|
|
|
|
|
|
public List<MhUnitTreeDTO> getMhUnitDashboardOption() { |
|
|
|
List<UnitDTO> allUnits = mhUnitCache.all(); |
|
|
|
List<MhUnitTreeDTO> nodes = allUnits.stream() |
|
|
|
.filter(w -> MhUnitTypeEnum.SASAC.equals(w.getType()) || |
|
|
|
((MhUnitTypeEnum.REGION.equals(w.getType()) || MhUnitTypeEnum.NODE.equals(w.getType())) |
|
|
|
&& (w.getName().endsWith("信创办") || "市级部门".equals(w.getName()) || "杭州市".equals(w.getName())))) |
|
|
|
.map(w -> BeanUtil.copyProperties(w, MhUnitTreeDTO.class)) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
Function<MhUnitTreeDTO, Integer> function = w -> w.getType().getStrip().getCode(); |
|
|
|
nodes.sort(Comparator.comparing(MhUnitTreeDTO::getName) |
|
|
|
.thenComparing(function, Comparator.reverseOrder())); |
|
|
|
return nodes; |
|
|
|
} |
|
|
|
|
|
|
|
public PageVo<MhUnitListVO> page(MhUnitListReq req) { |
|
|
|
LambdaQueryWrapper<MhUnit> query = Wrappers.lambdaQuery(MhUnit.class); |
|
|
|
if (StrUtils.isNotBlank(req.getName())) { |
|
|
|