liujie
2026-03-27 54760fb417be457f532596b8d3b3ceed87414418
修改bug
1个文件已添加
4个文件已修改
69 ■■■■■ 已修改文件
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpTestPointManagementController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/utils/ImageTagProcessor.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/utils/TaskOrderUtil.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpTestPointManagementController.java
@@ -218,7 +218,7 @@
    /**
     * 点位详情
     */
    @GetMapping("/api/v1/testPoint/queryPointById")
    @GetMapping("/api/v1/testPoint/queryPointById1")
    public R<List<XpTestPoint>> queryByIds(@RequestParam List<Long> ids){
        List<XpTestPoint> xpTestPoints = xpTestPointService.listByIds(ids);
        return R.ok(xpTestPoints);
xp-robotaxi-operation-boot/pom.xml
@@ -16,6 +16,11 @@
    <dependencies>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.18.1</version>
        </dependency>
        <!--mongodb-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java
@@ -17,6 +17,7 @@
import com.xiaopeng.operation.dto.*;
import com.xiaopeng.operation.query.PricingPageListQuery;
import com.xiaopeng.operation.service.*;
import com.xiaopeng.operation.utils.ImageTagProcessor;
import com.xiaopeng.operation.vo.PricingPageListVO;
import com.xiaopeng.operation.vo.SaveOrderVo;
import com.xiaopeng.unifiedverification.interceptor.XpClientCheck;
@@ -49,13 +50,15 @@
    private final UserResourcesClient userResourcesClient;
    private final IXpWhitelistService xpWhitelistService;
    private final XpOpenCityService xpOpenCityService;
    private final ImageTagProcessor imageTagProcessor;
    public XpPricingController(XpPricingService xpPricingService, IXpGeoQueryEntityService xpGeoQueryEntityService, UserResourcesClient userResourcesClient, IXpWhitelistService xpWhitelistService, XpRegionService xpRegionService, XpOpenCityService xpOpenCityService) {
    public XpPricingController(XpPricingService xpPricingService, IXpGeoQueryEntityService xpGeoQueryEntityService, UserResourcesClient userResourcesClient, IXpWhitelistService xpWhitelistService, XpRegionService xpRegionService, XpOpenCityService xpOpenCityService, ImageTagProcessor imageTagProcessor) {
        this.xpPricingService = xpPricingService;
        this.xpGeoQueryEntityService = xpGeoQueryEntityService;
        this.userResourcesClient = userResourcesClient;
        this.xpWhitelistService = xpWhitelistService;
        this.xpOpenCityService = xpOpenCityService;
        this.imageTagProcessor = imageTagProcessor;
    }
@@ -177,6 +180,13 @@
        //获取城市信息
        String cityName = xpOpenCityService.getNameWithCityName(pricing.getCityId());
        pricing.setCityName(cityName);
        String priceRule = pricing.getPriceRule();
        if (priceRule != null && priceRule.contains("<img")) {
            priceRule = imageTagProcessor.replaceImgSrcWithDownloadUrl(priceRule);
            pricing.setPriceRule(priceRule);
        }
        return R.ok(pricing);
    }
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/utils/ImageTagProcessor.java
New file
@@ -0,0 +1,49 @@
package com.xiaopeng.operation.utils;
import com.xiaopeng.evi.oss.service.AliOssService;
import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.io.UnsupportedEncodingException;
@Slf4j
@Component
public class ImageTagProcessor {
    private final AliOssService aliOssService;
    public ImageTagProcessor(AliOssService aliOssService) {
        this.aliOssService = aliOssService;
    }
    public String replaceImgSrcWithDownloadUrl(String html) {
        if (!StringUtils.hasText(html)) {
            return html;
        }
        Document document = Jsoup.parse(html);
        Elements imgTags = document.select("img");
        for (Element imgTag : imgTags) {
            String dataId = imgTag.attr("data-id");
            String dataName = imgTag.attr("data-name");
            if (!StringUtils.hasText(dataId) || !StringUtils.hasText(dataName)) {
                continue;
            }
            try {
                String downloadUrl = aliOssService.getDownloadUrl(dataId, dataName, true);
                if (StringUtils.hasText(downloadUrl)) {
                    imgTag.attr("src", downloadUrl);
                }
            } catch (UnsupportedEncodingException e) {
                log.warn("replace image src failed, dataId={}, dataName={}", dataId, dataName, e);
            }
        }
        return document.body().html();
    }
}
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/utils/TaskOrderUtil.java
@@ -867,7 +867,6 @@
                        }
                        XpVehicle vehiclePosition = vehiclePositionR.getData();
                        log.info("符合条件的车辆 {} ,直接推单XPU。单号 {}", vehiclePosition.getPlateNumber(), orderNo);
                        System.err.println("符合条件的车辆!!!!!!!!!!!!"+vehiclePosition.getPlateNumber());
                        log.info("当前车辆状态 {} 单号 {}", vehiclePosition.getStatus(), orderNo);
                        if (vehiclePosition.getOperatingStatus() != 1 || vehiclePosition.getState() != 0 || vehiclePosition.getVehicleType() == 1) {
                            continue;