| | |
| | | List<MonitorPointPosition> checkPoints = commonService.getCheckPoints3d(); |
| | | Long startTime = Long.parseLong(DateUtils.parseDateToStr(DateUtils.YYYYMMDDHH, DateUtils.getMonthStart())); |
| | | Long endTime = Long.parseLong(DateUtils.parseDateToStr(DateUtils.YYYYMMDDHH, DateUtils.getMonthEnd())); |
| | | //startTime = 2023040100L; |
| | | //endTime = 2023043023L; |
| | | |
| | | List<DictRecord> recordList = dictRecordMapper.selectByTimeDictRecordList(startTime, endTime); |
| | | |
| | | List<String> tableNames = new ArrayList<>(); |
| | |
| | | //map.put("name", commonService.select3dCheckPointById(suYuanId).getName()); |
| | | //map.remove("id"); |
| | | map.put("name", c.getName()); |
| | | } |
| | | result.add(map); |
| | | } |
| | | } |
| | | |
| | | return CalculateUtils.sort(result, "value", true).subList(0, 10); |
| | | } |
| | |
| | | package com.yssh.utils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | import com.yssh.entity.MonitorPointPosition; |
| | | |
| | |
| | | Collections.sort(list, new Comparator<Map<String, Object>>(){ |
| | | @Override |
| | | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| | | try { |
| | | Object oo1 = o1.get(property); |
| | | Object oo2 = o2.get(property); |
| | | if(oo1 == null || "null".equals(oo1.toString()) || "".equals(oo1.toString()) || oo1.toString().endsWith("999") ){ |
| | |
| | | if(Double.parseDouble(oo1.toString()) == Double.parseDouble(oo2.toString())){ |
| | | return 0; |
| | | } |
| | | }catch (Exception ex){ |
| | | System.out.println(ex.getMessage()); |
| | | } |
| | | return -1; |
| | | } |
| | | }); |