|  |  | 
 |  |  |             if (lon < 70 || lon > 150 || lat < 20 || lat > 60) { | 
 |  |  |                 return true; | 
 |  |  |             } | 
 |  |  |             if(type){ | 
 |  |  |                 o.putAll(value); | 
 |  |  |             }else { | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             o.putAll(value); | 
 |  |  |             return false; | 
 |  |  |         }); | 
 |  |  |         /*for (Map<String, Object> map:data) { | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<HistorySecondCruiserResultDTO> carTrajectoryNewAvg(Map<String, Object> params) { | 
 |  |  |         double range = Double.valueOf(params.get("range").toString()); | 
 |  |  |         params.put("dateFormat", "%Y-%m-%d %H:%i:%s"); | 
 |  |  |         Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo(); | 
 |  |  |         Map<String, Object> orgInfo = (Map<String, Object>) userInfo.get("organization"); | 
 |  |  | 
 |  |  |         if(CollectionUtils.isEmpty(data)){ | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |         return filterDataNew(data); | 
 |  |  |         return filterDataNew(data,range); | 
 |  |  |     } | 
 |  |  |     @Override | 
 |  |  |     public SpecialDevice getSpecialDeviceMapByMac(String mac) { | 
 |  |  | 
 |  |  |         String time2 = params.get("time2").toString(); | 
 |  |  |         String rsTime = getTime(time1, time2); | 
 |  |  |         list.add(rsTime); | 
 |  |  |         List<Map<String, Object>> maps = specialDeviceService.carTrajectory(params,false); | 
 |  |  | //        List<Map<String, Object>> maps = specialDeviceService.carTrajectory(params,false); | 
 |  |  | //        List<Map<String, Object>> maps = HistorySecondCruiserMapper.getCruiserData(params); | 
 |  |  |         List<Map<String, Object>> maps = HistorySecondCruiserMapper.getAllCruiserData(params); | 
 |  |  |  | 
 |  |  |         if (ObjectUtils.isEmpty(maps)){ | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  | 
 |  |  |             map.put("time1",time3); | 
 |  |  |             map.put("time2",time4); | 
 |  |  |             map.put("mac",mac); | 
 |  |  |             List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false); | 
 |  |  | //            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false); | 
 |  |  |             List<Map<String, Object>> maps1 = HistorySecondCruiserMapper.getAllCruiserData(params); | 
 |  |  |             if (ObjectUtils.isEmpty(maps1)){ | 
 |  |  |                 return null; | 
 |  |  |             } | 
 |  |  | 
 |  |  |             map.put("time1",time5); | 
 |  |  |             map.put("time2",time6); | 
 |  |  |             map.put("mac",mac); | 
 |  |  |             List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false); | 
 |  |  | //            List<Map<String, Object>> maps1 = specialDeviceService.carTrajectory(map,false); | 
 |  |  |             List<Map<String, Object>> maps1 = HistorySecondCruiserMapper.getAllCruiserData(params); | 
 |  |  |             if (ObjectUtils.isEmpty(maps1)){ | 
 |  |  |                 return null; | 
 |  |  |             } | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         for (Map<String, Object> map : maps) { | 
 |  |  | //            String flylon = map.get("flylon").toString(); | 
 |  |  | //            String flylat = map.get("flylat").toString(); | 
 |  |  | //            String s = flylon + "-" + flylat; | 
 |  |  | //            if (Double.parseDouble(map.get("a34004").toString())>200){ | 
 |  |  | // | 
 |  |  | //            } | 
 |  |  |             pm25List.add(Double.parseDouble(map.get("a34004").toString())); | 
 |  |  |             pm10List.add(Double.parseDouble(map.get("a34002").toString())); | 
 |  |  |             COList.add(Double.parseDouble(map.get("a21005").toString())); | 
 |  |  |             SO2List.add(Double.parseDouble(map.get("a21026").toString())); | 
 |  |  |             NO2List.add(Double.parseDouble(map.get("a21004").toString())); | 
 |  |  |             O3List.add(Double.parseDouble(map.get("a05024").toString())); | 
 |  |  |             VOCList.add(Double.parseDouble(map.get("a99054").toString())); | 
 |  |  |  | 
 |  |  |             Map value = JSON.parseObject(map.get("value").toString(), Map.class); | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a34004"))){ | 
 |  |  |                 pm25List.add(Double.parseDouble(value.get("a34004").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a34002"))){ | 
 |  |  |                 pm10List.add(Double.parseDouble(value.get("a34002").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a21005"))){ | 
 |  |  |                 COList.add(Double.parseDouble(value.get("a21005").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a21026"))){ | 
 |  |  |                 SO2List.add(Double.parseDouble(value.get("a21026").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a21004"))){ | 
 |  |  |                 NO2List.add(Double.parseDouble(value.get("a21004").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a05024"))){ | 
 |  |  |                 O3List.add(Double.parseDouble(value.get("a05024").toString())); | 
 |  |  |             } | 
 |  |  |             if (!ObjectUtils.isEmpty(value.get("a99054"))){ | 
 |  |  |                 VOCList.add(Double.parseDouble(value.get("a99054").toString())); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //获取平均值 | 
 |  |  | 
 |  |  |         return list; | 
 |  |  |     } | 
 |  |  |     //根据距离筛选数据 | 
 |  |  |     private List<HistorySecondCruiserResultDTO> filterDataNew(List<HistorySecondCruiserListDTO> data) { | 
 |  |  |     private List<HistorySecondCruiserResultDTO> filterDataNew(List<HistorySecondCruiserListDTO> data,double range) { | 
 |  |  |         List<HistorySecondCruiserListDTO> list = new ArrayList<>(); | 
 |  |  |         Map<Integer, HistorySecondCruiserResultCountDTO> map = new HashMap<>(); | 
 |  |  |         Map<String, BigDecimal> mapTest = new HashMap<>(); | 
 |  |  | 
 |  |  |             boolean flag = true; | 
 |  |  |             for (HistorySecondCruiserListDTO l : list) { | 
 |  |  |                 double distance = GeodesyUtils.getDistance(d.getFlyLat(), d.getFlyLon(), l.getFlyLat(), l.getFlyLon()); | 
 |  |  |                 if (distance < DIS_NEW) { | 
 |  |  |                 if (distance < range) { | 
 |  |  |                     flag = false; | 
 |  |  |                     if(integer.equals(list.size())&& !mapTest.containsKey(d.getFlyLon()+"_"+d.getFlyLat())){ | 
 |  |  |                         HistorySecondCruiserResultCountDTO countResultDTO = Objects.isNull(map.get(integer))?new HistorySecondCruiserResultCountDTO():map.get(integer); | 
 |  |  | 
 |  |  |                 if(!list.contains(d)){ | 
 |  |  |                     list.add(d); | 
 |  |  |                     integer++; | 
 |  |  |                     HistorySecondCruiserResultCountDTO countResultDTO = Objects.isNull(map.get(integer))?new HistorySecondCruiserResultCountDTO():map.get(integer); | 
 |  |  |                     countResultDTO.setSumNum(d.getNum()); | 
 |  |  |                     countResultDTO.setContNum(1); | 
 |  |  |                     map.put(integer,countResultDTO); | 
 |  |  |                     mapTest.put(d.getFlyLon()+"_"+d.getFlyLat(),d.getNum()); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private List<HistorySecondCruiserResultDTO> filterDataNew(List<HistorySecondCruiserListDTO> data, List<HistorySecondCruiserListDTO> list) { | 
 |  |  |     private List<HistorySecondCruiserResultDTO> filterDataNew(List<HistorySecondCruiserListDTO> data, List<HistorySecondCruiserListDTO> list,double range) { | 
 |  |  |         List<HistorySecondCruiserResultDTO> listResult = new ArrayList<>(); | 
 |  |  |         List<HistorySecondCruiserListDTO> filter = new ArrayList<>(); | 
 |  |  |         for (HistorySecondCruiserListDTO d : data) { | 
 |  |  | 
 |  |  |                 if (filter.contains(d)) { | 
 |  |  |                     break; | 
 |  |  |                 } | 
 |  |  |                 if (distance < DIS_NEW ) { | 
 |  |  |                 if (distance < range ) { | 
 |  |  |                     List<BigDecimal> numList = new ArrayList<>(CollectionUtils.isEmpty(l.getNumList()) ? Arrays.asList(l.getNum()) : l.getNumList()); | 
 |  |  |                     numList.add(d.getNum()); | 
 |  |  |                     l.setNumList(numList); |