aee46f9c 张雷

奥体项目接口修改

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