puzhibing
2026-05-11 b7bb5daa5f4ffe1764a363a051a5d6f868168cf9
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java
@@ -189,6 +189,7 @@
                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()){
@@ -200,11 +201,20 @@
                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;
    }
@@ -323,6 +333,9 @@
    @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();
@@ -404,6 +417,9 @@
    @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();
@@ -747,6 +763,12 @@
            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;