yyy
2026-05-07 0075d421ff406d85f6a8df35a04b0e6979b81819
1.修改bug 场站、围栏、点位 、小程序
5个文件已修改
80 ■■■■■ 已修改文件
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpElectronicFenceManagementController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/XpStationService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/BootCommonService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpStationServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -1146,9 +1146,6 @@
            RouteAndFareDto copy = new RouteAndFareDto();
            copy.setOrigin(routeAndFareDto.getOrigin());
            copy.setDestination(routeAndFareDto.getDestination());
            copy.setOpenCityId(routeAndFareDto.getOpenCityId());
            copy.setUserCouponId(routeAndFareDto.getUserCouponId());
            copy.setVehicleId(routeAndFareDto.getVehicleId());
            copy.setRoutePlanRule(kind.getAmapStrategy());
            R<RouteVo> r = xpMapClient.getDistanceAndDuration(copy);
            if (r.getCode() != 200 || r.getData() == null || r.getData().getRouteID() == null) {
@@ -1355,12 +1352,11 @@
     * 用户偏好策略优先请求,其余策略仍请求以便合并去重。
     */
    private StrategyPlanningConfig buildStrategyKindsForPlanning(String userId, Long openCityId) {
        Set<String> enabled = parseEnabledPreferenceCodes();
        List<XpRoutePlan> xpRoutePlans = xpRoutePlanMapper.selectList(new LambdaQueryWrapper<XpRoutePlan>().eq(XpRoutePlan::getOpenCityId, openCityId));
        Map<RouteStrategyKind, String> displayNames = new LinkedHashMap<>();
        List<RouteStrategyKind> configuredKinds = new ArrayList<>();
        if (xpRoutePlans.isEmpty()) {
            configuredKinds.addAll(RouteStrategyKind.defaultPreferenceKinds());
            throw new ServiceException("未配置有效的导航策略", I18nKeyConstant.PATH_NOT_FOUND);
        } else {
            for (XpRoutePlan xpRoutePlan : xpRoutePlans) {
                Integer strategy = xpRoutePlan.getRoutePlanRule();
@@ -1375,31 +1371,7 @@
                });
            }
        }
        List<RouteStrategyKind> all = new ArrayList<>();
        for (RouteStrategyKind k : configuredKinds) {
            if (enabled.contains(k.name())) {
                addIfAbsent(all, k);
            }
        }
        if (all.isEmpty()) {
            all.add(resolveDefaultEnabledKind(enabled));
        }
        Optional<RouteStrategyKind> pref = resolveUserPreferredKind(userId);
        if (!pref.isPresent()) {
            return new StrategyPlanningConfig(all, displayNames);
        }
        RouteStrategyKind p = pref.get();
        if (!all.contains(p)) {
            return new StrategyPlanningConfig(all, displayNames);
        }
        List<RouteStrategyKind> ordered = new ArrayList<>();
        ordered.add(p);
        for (RouteStrategyKind k : all) {
            if (k != p) {
                ordered.add(k);
            }
        }
        return new StrategyPlanningConfig(ordered, displayNames);
        return new StrategyPlanningConfig(configuredKinds, displayNames);
    }
    private String resolveStrategyDisplayName(RouteStrategyKind kind, Map<RouteStrategyKind, String> displayNames) {
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpElectronicFenceManagementController.java
@@ -4,6 +4,7 @@
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -311,6 +312,25 @@
                disableCount++;
            }
        }
        List<XpStation> listByElectronicId = xpStationService.findListByElectronicId(dto.getId());
        if(CollUtil.isNotEmpty(listByElectronicId)){
            for (XpStation bean : listByElectronicId) {
                if (StrUtil.isBlank(bean.getEffectiveTimePeriod())) {
                    continue;
                }
                List<OperationStrategyIndex.TimeInterval> pointIntervals = OperationStrategyIndex.parsePointEffectiveTimePeriod(bean.getEffectiveTimePeriod());
                if (pointIntervals.isEmpty()) {
                    continue;
                }
                boolean shouldDisable = !newIndex.isPointScheduleWithin(pointIntervals);
                if (shouldDisable) {
                    disableCount++;
                }
            }
        }
        return R.ok(disableCount);
    }
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/XpStationService.java
@@ -23,6 +23,8 @@
public interface XpStationService extends IService<XpStation> {
    List<XpStation> findListByElectronicId(Long electronicId);
    List<XpStation> findList(XpStationQuery query);
    List<XpStation> findList(PageInfo<XpStation> pageInfo, XpStationQuery query);
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/BootCommonService.java
@@ -215,13 +215,15 @@
     */
    public boolean getPointOperation(LocalTime localTime, XpPoint xpPoint){
        if(xpPoint.getOperationStatus() == 2 && xpPoint.getVerificationStatus() == 5){
            if(xpPoint.getOperationType()==2){//运营类型 1=与运营区同步 2=自定义时间段
                return getPointOperation(localTime,xpPoint.getEffectivePeriod(),xpPoint.getEffectiveTimePeriod());
            }else {
                if (xpPoint.getStationId() == null) {//调用围栏运营策略
                    return getFenceOperation(localTime, xpPoint.getFenceOperationStrategy());
                } else {
                    return this.getStationOperation(localTime, xpPoint.getStationOperationType(), xpPoint.getStationEffectivePeriod(), xpPoint.getStationEffectiveTimePeriod(), xpPoint.getFenceOperationStrategy());
            if(xpPoint.getOperationType() != null){
                if(xpPoint.getOperationType()==2){//运营类型 1=与运营区同步 2=自定义时间段
                    return getPointOperation(localTime,xpPoint.getEffectivePeriod(),xpPoint.getEffectiveTimePeriod());
                }else {
                    if (xpPoint.getStationId() == null) {//调用围栏运营策略
                        return getFenceOperation(localTime, xpPoint.getFenceOperationStrategy());
                    } else {
                        return this.getStationOperation(localTime, xpPoint.getStationOperationType(), xpPoint.getStationEffectivePeriod(), xpPoint.getStationEffectiveTimePeriod(), xpPoint.getFenceOperationStrategy());
                    }
                }
            }
        }
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpStationServiceImpl.java
@@ -6,7 +6,6 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.model.map.XpGeoFencingPolygon;
import com.xiaopeng.api.model.operation.*;
import com.xiaopeng.api.query.operation.PointListQuery;
import com.xiaopeng.api.query.operation.PointPageListListQuery;
import com.xiaopeng.api.query.operation.XpStationQuery;
import com.xiaopeng.api.vo.account.LoginUser;
@@ -79,6 +78,15 @@
    @Resource
    private BootCommonService bootCommonService;
    @Override
    public List<XpStation> findListByElectronicId(Long electronicId) {
        LambdaQueryWrapper<XpStation> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(XpStation::getElectronicId, electronicId);
        queryWrapper.eq(XpStation::getOperationType, 2);
        queryWrapper.eq(XpStation::getDeleted, 0);
        return super.list(queryWrapper);
    }
    @Override
    public List<XpStation> findList(XpStationQuery query) {