puzhibing
2026-05-17 993a6e6ea8ae047b9e5fffd249ae7adfcd650d3a
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPointServiceImpl.java
@@ -28,16 +28,14 @@
import com.xiaopeng.operation.mapper.XpPointMapper;
import com.xiaopeng.operation.mapper.XpSystemSettingMapper;
import com.xiaopeng.operation.query.PointByNameQuery;
import com.xiaopeng.operation.service.IXpElectronicFenceAreaService;
import com.xiaopeng.operation.service.IXpElectronicFenceService;
import com.xiaopeng.operation.service.IXpTradingStrategyService;
import com.xiaopeng.operation.service.XpPointService;
import com.xiaopeng.operation.service.*;
import com.xiaopeng.operation.utils.TimeRangeChecker;
import com.xiaopeng.operation.utils.holiday.HolidayUtil;
import com.xiaopeng.operation.utils.map.FastDistanceCalculator;
import com.xiaopeng.api.vo.operation.NearestNextVo;
import com.xiaopeng.operation.vo.NearestVo;
import com.xiaopeng.operation.vo.OrderDistanceVo;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
@@ -88,6 +86,10 @@
    @Resource
    private IXpTradingStrategyService xpTradingStrategyService;
    @Resource
    @Lazy
    private XpStationService xpStationService;
    /**
     * 如果站点是挂在场站下的  需要返回一个场站id   stationId
@@ -389,7 +391,12 @@
                }
            }
            Integer parkingTimeLimit = xpPoint.getParkingTimeLimit();
            //如果点位位于场站内,则使用场站的限停时间
            if(null != xpPoint.getStationId()){
                XpStation xpStation = xpStationService.getById(xpPoint.getStationId());
                parkingTimeLimit = xpStation.getParkingTimeLimit();
            }
            XpHistoryStartPointsVo xpHistoryStartPointsVo = new XpHistoryStartPointsVo();
            xpHistoryStartPointsVo.setOperationStatus(1);
            xpHistoryStartPointsVo.setName(xpPoint.getPointName());
@@ -399,7 +406,7 @@
            xpHistoryStartPointsVo.setId(xpPoint.getId());
            double distanced = FastDistanceCalculator.distanceFast(historyStartPointsDto.getLat(), historyStartPointsDto.getLon(), xpPoint.getPointLat(), xpPoint.getPointLon());
            xpHistoryStartPointsVo.setDistance(distanced);
            xpHistoryStartPointsVo.setTime(xpPoint.getParkingTimeLimit());
            xpHistoryStartPointsVo.setTime(parkingTimeLimit);
            xpHistoryStartPointsVo.setElectronicAreaId(xpPoint.getElectronicAreaId());
            // 判断是否收藏
            if(pointIdsByUserId!=null && !pointIdsByUserId.getData().isEmpty()){
@@ -475,6 +482,12 @@
                    continue;
                }
            }
            Integer parkingTimeLimit = xpPoint.getParkingTimeLimit();
            //如果点位位于场站内,则使用场站的限停时间
            if(null != xpPoint.getStationId()){
                XpStation xpStation = xpStationService.getById(xpPoint.getStationId());
                parkingTimeLimit = xpStation.getParkingTimeLimit();
            }
            XpHistoryEndPointsVo xpHistoryEndPointsVo = new XpHistoryEndPointsVo();
            xpHistoryEndPointsVo.setOperationStatus(1);
            xpHistoryEndPointsVo.setName(xpPoint.getPointName());
@@ -484,7 +497,7 @@
            xpHistoryEndPointsVo.setId(xpPoint.getId());
            double distanced = FastDistanceCalculator.distanceFast(historyEndPointsDto.getLat(), historyEndPointsDto.getLon(), xpPoint.getPointLat(), xpPoint.getPointLon());
            xpHistoryEndPointsVo.setDistance(distanced);
            xpHistoryEndPointsVo.setTime(xpPoint.getParkingTimeLimit());
            xpHistoryEndPointsVo.setTime(parkingTimeLimit);
            xpHistoryEndPointsVo.setElectronicAreaId(xpPoint.getElectronicAreaId());
            // 判断是否收藏