puzhibing
2026-05-11 b7bb5daa5f4ffe1764a363a051a5d6f868168cf9
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -3,6 +3,7 @@
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -168,6 +169,7 @@
        if (xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) {
            return R.ok("in_prohibited_area");
        }
        xpPointService.validateAdd(pointAddDto);
        return R.ok(xpPointService.addPointWithGeneratedNumber(pointAddDto));
    }
@@ -210,6 +212,7 @@
        if (xpPoint == null) {
            throw new ServiceException("系统异常", I18nKeyConstant.SYSTEM_EXCEPTION);
        }
        xpPointService.validateUpdate(pointAddDto);
        pointAddDto.setStationSortNo(xpPoint.getStationSortNo());
        xpPointService.validatePointNameUnique(pointAddDto.getPointName(), pointAddDto.getId());
        BeanUtils.copyProperties(pointAddDto, xpPoint);
@@ -271,6 +274,7 @@
                .set(XpPoint::getCityName, xpPoint.getCityName())
                .set(XpPoint::getDistrictName, xpPoint.getDistrictName())
                .set(XpPoint::getDistrictCode, xpPoint.getDistrictCode())
                .set(XpPoint::getPointOnOff, xpPoint.getPointOnOff())
                .set(XpPoint::getStationId, stationId)
                .set(XpPoint::getStationSortNo, stationSortNo)
                .update();
@@ -283,10 +287,16 @@
    /**
     * 点位详情
     */
    @GetMapping("/api/v1/point/queryById")
    @GetMapping("/queryById")
    @ApiOperation(value = "点位详情")
    public R<XpPoint> queryById(@RequestParam Long id) {
        return R.ok(xpPointService.getById(id));
        PointListQuery query = new PointListQuery();
        query.setId(id);
        List<XpPoint> pointList = xpPointService.findList(query);
        if(CollUtil.isNotEmpty(pointList)){
            return R.ok(pointList.get(0));
        }
        return R.ok(new XpPoint());
    }
    /**