|
|
@@ -107,12 +107,13 @@ public class MhUnitManage { |
|
|
|
String parentName = StrUtil.blankToDefault(parent.getShortName(), parent.getName()); |
|
|
|
String unitName = StrUtil.blankToDefault(unit.getShortName(), unit.getName()); |
|
|
|
unit.setShortName(parentName + unitName); |
|
|
|
unit.setName(unit.getShortName()); |
|
|
|
} |
|
|
|
} |
|
|
|
return unit; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
Function<MhUnitTreeDTO, Integer> function = w -> w.getType().getStrip().getCode(); |
|
|
|
nodes.sort(Comparator.comparing(MhUnitTreeDTO::getShortName) |
|
|
|
nodes.sort(Comparator.comparing(MhUnitTreeDTO::getName) |
|
|
|
.thenComparing(function, Comparator.reverseOrder())); |
|
|
|
return nodes; |
|
|
|
} |
|
|
|