| | |
| | | ArrayList<Double> flyLatList = new ArrayList<>(); |
| | | //经度 |
| | | ArrayList<Double> flyLonList = new ArrayList<>(); |
| | | // String mac ="p5dnd7a0243591"; |
| | | // String time1 ="2023-07-19 14:14:08"; |
| | | // String time2 ="2023-07-19 14:35:29"; |
| | | // |
| | | //// List<UAVResultDTO> uavResultDTOS = historySecondUavMapper.reList(map); |
| | | // QueryWrapper<HistorySecondUav> queryWrapper = new QueryWrapper<>(); |
| | | // queryWrapper.select("value"); |
| | | // queryWrapper.eq("mac",mac); |
| | | // queryWrapper.between("time",time1,time2); |
| | | // List<HistorySecondUav> historySecondUavs = historySecondUavMapper.selectList(queryWrapper); |
| | | |
| | | List<HistorySecondUav> historySecondUavs = historySecondUavMapper.reList(params); |
| | | if (ObjectUtils.isEmpty(historySecondUavs)){ |
| | | return new ResultMessage(ResponseCodeEnum.TARGET_IS_NULL,"null"); |
| | | } |
| | | int ik=1; |
| | | for (HistorySecondUav historySecondUav : historySecondUavs) { |
| | | String value = historySecondUav.getValue(); |
| | | Map map1 = JSON.parseObject(value, Map.class); |
| | | flyLatList.add(Double.parseDouble(map1.get("flylat").toString())); |
| | | flyLonList.add(Double.parseDouble(map1.get("flylon").toString())); |
| | | historySecondUav.setId(ik++); |
| | | |
| | | } |
| | | Double maxLat = Collections.max(flyLatList); |
| | | Double maxLon = Collections.max(flyLonList); |
| | | Double minLat = Collections.min(flyLatList); |
| | | Double minLon = Collections.min(flyLonList); |
| | | |
| | | //大四边形右下 |
| | | String leftTop = minLat +";"+ maxLon; |
| | | //右上 |