| | |
| | | nearestNextVo.setTime(xpPoint.getParkingTimeLimit()); |
| | | nearestNextVo.setElectronicAreaId(xpPoint.getElectronicAreaId()); |
| | | nearestNextVo.setStationId(xpPoint.getStationId()==null?null:xpPoint.getStationId().toString()); |
| | | nearestNextVo.setIsCollect(2); |
| | | |
| | | // 判断是否收藏 |
| | | if(pointIdsByUserId.getData()!=null && !pointIdsByUserId.getData().isEmpty()){ |
| | |
| | | nearestNextVos.add(nearestNextVo); |
| | | } |
| | | } |
| | | List<NearestNextVo> objects = new ArrayList<NearestNextVo>(); |
| | | if (!nearestNextVos.isEmpty()) { |
| | | nearestNextVos = nearestNextVos.stream().sorted(Comparator.comparing(NearestNextVo::getDistance)).collect(Collectors.toList()); |
| | | //收藏的数据 |
| | | List<NearestNextVo> collect = nearestNextVos.stream().filter(s -> s.getIsCollect() == 1) |
| | | .sorted(Comparator.comparing(NearestNextVo::getDistance)).collect(Collectors.toList()); |
| | | objects.addAll(collect); |
| | | //非收藏的数据 |
| | | List<NearestNextVo> collect1 = nearestNextVos.stream().filter(s -> s.getIsCollect() == 2) |
| | | .sorted(Comparator.comparing(NearestNextVo::getDistance)).collect(Collectors.toList()); |
| | | objects.addAll(collect1); |
| | | |
| | | } |
| | | nearestVo.setPoints(nearestNextVos); |
| | | nearestVo.setTotal(nearestNextVos.size()); |
| | | nearestVo.setPoints(objects); |
| | | nearestVo.setTotal(objects.size()); |
| | | return nearestVo; |
| | | |
| | | } |
| | |
| | | @Override |
| | | public List<XpHistoryStartPointsVo> getHistoryStartPoints(HistoryStartPointsDto historyStartPointsDto) { |
| | | List<XpPoint> xpPoints = this.baseMapper.selectBatchIds(historyStartPointsDto.getPointIds()); |
| | | if(xpPoints.isEmpty()){ |
| | | return new ArrayList<>(); |
| | | } |
| | | ArrayList<XpHistoryStartPointsVo> resultList = new ArrayList<>(10); |
| | | |
| | | LocalTime now = LocalTime.now(); |
| | |
| | | @Override |
| | | public List<XpHistoryEndPointsVo> getHistoryEndPoints(HistoryEndPointsDto historyEndPointsDto) { |
| | | List<XpPoint> xpPoints = this.baseMapper.selectBatchIds(historyEndPointsDto.getPointIds()); |
| | | if(xpPoints.isEmpty()){ |
| | | return new ArrayList<XpHistoryEndPointsVo>(); |
| | | } |
| | | ArrayList<XpHistoryEndPointsVo> resultList = new ArrayList<>(10); |
| | | |
| | | LocalTime now = LocalTime.now(); |
| | |
| | | orderDistanceVo.setAdsorptionDistance(xpSystemSetting.getAdsorptionDistance()); |
| | | orderDistanceVo.setNearPointDistance(xpSystemSetting.getNearPointDistance()); |
| | | orderDistanceVo.setTemperatureUnit(xpSystemSetting.getTemperatureUnit()); |
| | | |
| | | orderDistanceVo.setXczSyDistance(xpSystemSetting.getXczSyDistance()); |
| | | orderDistanceVo.setXczSyTime(xpSystemSetting.getXczSyTime()); |
| | | orderDistanceVo.setXczCaCount(xpSystemSetting.getXczCaCount()); |
| | | orderDistanceVo.setXczHmSpeedPerHour(xpSystemSetting.getXczHmSpeedPerHour()); |
| | | orderDistanceVo.setXczHmDuration(xpSystemSetting.getXczHmDuration()); |
| | | return orderDistanceVo; |
| | | } |
| | | return orderDistanceVo; |