| | |
| | | for (TimeForm timeForm : tables) { |
| | | String start = timeForm.getStart(); |
| | | String end = timeForm.getEnd(); |
| | | List<Double> dust = historySecondCruiserMapper.getDust(start, end, mac); |
| | | List<String> dust = historySecondCruiserMapper.getDust(start, end, mac); |
| | | ArrayList<Double> rsDouble = new ArrayList<>(); |
| | | for (Double aDouble : dust) { |
| | | double v =0.0; |
| | | for (String s : dust) { |
| | | double aDouble = Double.parseDouble(s); |
| | | |
| | | if (aDouble>=0 && aDouble<40 ){ |
| | | v = aDouble + 170; |
| | | aDouble = aDouble + 170; |
| | | }else if (aDouble>=40 && aDouble<60){ |
| | | aDouble = aDouble + 130; |
| | | }else if (aDouble>=60 && aDouble<100 ){ |
| | | aDouble = aDouble + 110; |
| | | }else if (aDouble>=100 && aDouble<150){ |
| | | aDouble = aDouble + 70; |
| | | }else if (aDouble>=150 && aDouble<180){ |
| | | aDouble = aDouble + 30; |
| | | }else { |
| | | aDouble= aDouble+0; |
| | | } |
| | | if (aDouble>=40 && aDouble<60 ){ |
| | | v = aDouble + 130; |
| | | } |
| | | if (aDouble>=60 && aDouble<100 ){ |
| | | v = aDouble + 110; |
| | | } |
| | | if (aDouble>=100 && aDouble<150 ){ |
| | | v = aDouble + 70; |
| | | } |
| | | if (aDouble>=150 && aDouble<180 ){ |
| | | v = aDouble + 30; |
| | | } |
| | | if (aDouble>=180){ |
| | | v= aDouble; |
| | | } |
| | | rsDouble.add(v); |
| | | rsDouble.add(aDouble); |
| | | } |
| | | list.addAll(rsDouble); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Map<String, Object> dailyDustlds(List<MultipartFile> file,Map<String, Object> params) { |
| | | public Map<String, Object> dailyDustlds(Map<String, Object> params) { |
| | | |
| | | Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo(); |
| | | Map<String, Object> orgInfo = (Map<String, Object>) userInfo.get("organization"); |
| | |
| | | HashMap<String, Object> rsMap = new HashMap<>(); |
| | | List<Map<String, Object>> dusts = historySecondCruiserMapper.getDusts(params); |
| | | Map<String, List<DustldDTO>> collect = manageCoordinateMapper.CompareTo(orgId).stream().collect(Collectors.groupingBy(o -> o.getName())); |
| | | if (ObjectUtils.isEmpty(dusts) || ObjectUtils.isEmpty(collect)){ |
| | | return null; |
| | | } |
| | | Set<String> strings = collect.keySet(); |
| | | ArrayList<DustForm> list1 = new ArrayList<>(); |
| | | //所有的高值路段 |
| | |
| | | } |
| | | } |
| | | } |
| | | rsMap.put("data",builder); |
| | | rsMap.put("data",ObjectUtils.isEmpty(builder)?"暂无高值路段":builder); |
| | | rsMap.put("list3",list3); |
| | | rsMap.put("time",rsTime1+"-"+rsTime2); |
| | | rsMap.put("date1",dateString3.substring(5,10)); |