From 0bcfca6b2561d096a2ce26e2e7200cd0768b2b6d Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 12 五月 2026 09:27:03 +0800
Subject: [PATCH] Merge branch '1.0' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi into 1.0

---
 xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java
index 68ffc1f..ea628a4 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java
+++ b/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;

--
Gitblit v1.7.1