单体电池-按deviceId排序
This commit is contained in:
@ -17,6 +17,7 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 单点监控 服务层实现
|
||||
@ -372,7 +373,11 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
}
|
||||
}
|
||||
}
|
||||
return batteryDataStatsListVo;
|
||||
// 排序
|
||||
List<BatteryDataStatsListVo> sortedList = batteryDataStatsListVo.stream()
|
||||
.sorted((u1, u2) -> Integer.parseInt(u1.getDeviceId()) - Integer.parseInt(u2.getDeviceId()))
|
||||
.collect(Collectors.toList());
|
||||
return sortedList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user