aee46f9c 张雷

奥体项目接口修改

1 个父辈 31ce05c6
......@@ -1617,6 +1617,16 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
String start = dataDate + " 00:00:00";
String end = dataDate + " 23:59:59";
List<Map<String, Object>> dataList = factoryInfoService.queryReportData(AT_ID, pgField, start, end,"hour");
// 使用Comparator和Collections.sort()对列表进行排序
Collections.sort(dataList, new Comparator<Map<String, Object>>() {
@Override
public int compare(Map<String, Object> map1, Map<String, Object> map2) {
// 根据"time"键的值进行升序排序
String time1 = (String) map1.get("time");
String time2 = (String) map2.get("time");
return time1.compareTo(time2);
}
});
for (Map<String, Object> map : dataList) {
Map<String, Object> newMap = new HashMap<>();
for (Map.Entry<String, Object> entry : map.entrySet()) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!