|
@@ -406,5 +406,17 @@ public class TreeUtil {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static void eliminateCustomerRate(List<CustomerRateDto> list){
|
|
|
+ if (list != null && list.size()>0) {
|
|
|
+ for (CustomerRateDto customerRateDto : list) {
|
|
|
+ if (customerRateDto.getChildren() != null) {
|
|
|
+ customerRateDto.setChildren(customerRateDto.getChildren().stream().filter(p -> p.getDeviceCount() > 0).sorted(Comparator.comparingInt(CustomerRateDto::getDeviceCount).reversed()).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ eliminateCustomerRate(customerRateDto.getChildren());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|