| | |
| | | // |
| | | ArrayList<SecondCruiserSort> list1 = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(result)){ |
| | | |
| | | for (HistorySecondCruiser historySecondCruiser : result) { |
| | | String mac = historySecondCruiser.getMac(); |
| | | Integer organizationId = historySecondCruiser.getOrganizationId(); |
| | | List<Integer> orgList = organizationMapper.orgIdSpecialDevList(organizationId, mac); |
| | | if(CollectionUtils.isEmpty(orgList)){ |
| | | return; |
| | | continue; |
| | | } |
| | | |
| | | HashMap<String, Object> params = new HashMap<>(); |
| | | params.put("mac",mac); |
| | | params.put("startTime",startTime); |
| | | params.put("endTime",endTime); |
| | | List<Map<String, Object>> dusts = historySecondCruiserMapper.getDusts(params); |
| | | if (ObjectUtils.isEmpty(dusts)){ |
| | | continue; |
| | | } |
| | | Map<String, List<DustldDTO>> collect = manageCoordinateDetailMapper.CompareTo(orgList.get(0)).stream().collect(Collectors.groupingBy(o -> o.getName())); |
| | | if (ObjectUtils.isEmpty(dusts) || ObjectUtils.isEmpty(collect)){ |
| | | return; |
| | | if (ObjectUtils.isEmpty(collect)){ |
| | | continue; |
| | | } |
| | | Set<String> strings = collect.keySet(); |
| | | int i = 1; |
| | | for (String string : strings) { |
| | | log.info("当前记录>>>>>>>>> "+i+"/"+strings.size()+" >>>>>>>> "+string+" >>>>>>"); |
| | | i++; |
| | | SecondCruiserSort secondCruiserSort = new SecondCruiserSort(); |
| | | ArrayList<Double> doubleArrayList = new ArrayList<>(); |
| | | List<DustldDTO> dustldDTOS = collect.get(string); |
| | |
| | | } |
| | | double latDouble1 = Double.parseDouble(flyLat); |
| | | double lonDouble1 = Double.parseDouble(flyLon); |
| | | for (Map<String, Object> dust : dusts) { |
| | | //for (Map<String, Object> dust : dusts) { |
| | | for( int ii=0;ii<dusts.size();ii++){ |
| | | Map<String, Object> dust = dusts.get(ii); |
| | | String flyLat1 = Objects.nonNull(dust.get("flyLat")) ? dust.get("flyLat").toString() :"0"; |
| | | String flyLon1 = Objects.nonNull(dust.get("flyLon")) ? dust.get("flyLon").toString() :"0"; |
| | | double latDouble = Double.parseDouble(flyLat1); |
| | |
| | | Double dustld = Objects.nonNull(dust.get("dustld"))?Double.parseDouble(dust.get("dustld").toString()):0d; |
| | | doubleArrayList.add(dustld); |
| | | // break; |
| | | dusts.remove(ii); |
| | | ii--; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(list1)){ |
| | | // log.info(list1.size()+""); |
| | | secondCruiserSortMapper.insertAll(list1); |
| | | log.info("新增路段排名>>>>>>>> "+list1.size()+" >>>>>>>>>条"); |
| | | } |
| | | |
| | | } |