cjl
2023-07-28 eaea7058b5c7ea800cf9d4d0a4291471e6bb338b
screen-api/src/main/java/com/moral/api/controller/UAVController.java
@@ -86,24 +86,15 @@
        ArrayList<Double> flyLatList = new ArrayList<>();
        //经度
        ArrayList<Double> flyLonList = new ArrayList<>();
        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;
        //右上