| | |
| | | } |
| | | for (Map<String, Object> m : carList) { |
| | | if (((String) m.get("stateCn")).contains("在线")) { |
| | | online = online + 1; |
| | | String carId = (String) m.get("carId"); |
| | | ArdSyCar ardSyCarQuery = new ArdSyCar(); |
| | | ardSyCarQuery.setCarId(carId); |
| | | List<ArdSyCar> ardSyCarList = ardSyCarMapper.selectArdSyCarList(ardSyCarQuery); |
| | | if(ardSyCarList.size() != 0){ |
| | | online = online + 1; |
| | | }else{ |
| | | continue; |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | |
| | | //对比把匹配到的数据添加到list中 |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String carId = list.get(i).get("carId"); |
| | | Boolean isCar = false; |
| | | for (int j = 0; j < carList.size(); j++) { |
| | | ArdSyCar ardSyCar = carList.get(j); |
| | | if (carId.equals(ardSyCar.getCarId())) { |
| | | /*String url = ""; |
| | | if (ardSyCar.getCarPicture() != null) { |
| | | if (!ardSyCar.getCarPicture().equals("")) { |
| | | url = ardSyCar.getCarPicture().split("sycar")[0]; |
| | | } |
| | | }*/ |
| | | list.get(i).put("carModel", this.minioEndpoint + "/" + ardSyCar.getCarModel());//zns |
| | | //m.put("carModel",ardSyCar.getCarModel()); |
| | | list.get(i).put("carTypeArd", ardSyCar.getCarType()); |
| | | list.get(i).put("carBrand", ardSyCar.getCarBrand()); |
| | | list.get(i).put("carPicture", ardSyCar.getCarPicture()); |
| | | isCar = true; |
| | | list.get(i).put("deptId", ardSyCar.getDeptId()); |
| | | break; |
| | | } |
| | | } |
| | | /*if(!isCar){ |
| | | list.remove(list.get(i)); |
| | | }*/ |
| | | } |
| | | list = list.stream().filter(map -> map.get("deptId") != null).collect(Collectors.toList()); |
| | | return list; |
| | | } |
| | | |