单体电池-按deviceId排序

This commit is contained in:
2025-07-15 13:37:58 +08:00
parent e6d6f806e4
commit 1e970c9d19

View File

@ -17,6 +17,7 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; 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;
} }
/** /**