puzhibing
2026-03-24 faae742fccc00d629ede627819cdc9d8a4ec25d3
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpTestPointManagementController.java
@@ -37,7 +37,7 @@
@Slf4j
@RestController
@RequestMapping("/api/v1/testPoint")
@RequestMapping("")
@Api(tags = "测试demo-点位管理")
public class XpTestPointManagementController extends BaseController {
@@ -50,7 +50,7 @@
    @ApiOperation(value = "获取所有运营中的区域", response = XpElectronicFenceArea.class)
    @PostMapping("/listElectronicFenceArea")
    @PostMapping("/api/v1/testPoint/listElectronicFenceArea")
    public R<List<XpElectronicFenceArea>> listElectronicFenceArea() {
        // 获取所有启用的电子围栏
        List<XpElectronicFence> electronicFences = xpElectronicFenceService.lambdaQuery().eq(XpElectronicFence::getStatus, 2).list();
@@ -65,20 +65,20 @@
    }
    @ApiOperation(value = "点位管理列表", response = XpTestPoint.class)
    @PostMapping("/listPoint")
    @PostMapping("/api/v1/testPoint/listPoint")
    public R<List<XpTestPoint>> list(@RequestBody PointListQuery query) {
        List<XpTestPoint> pageList = xpTestPointService.listAll(query);
        return R.ok(pageList);
    }
    @ApiOperation(value = "点位管理分页列表", response = XpTestPoint.class)
    @PostMapping("/pageList")
    @PostMapping("/api/v1/testPoint/pageList")
    public R<PageInfo<XpTestPoint>> pageList(@RequestBody PointPageListListQuery query) {
        PageInfo<XpTestPoint> pageList = xpTestPointService.pageList(query);
        return R.ok(pageList);
    }
    @PostMapping("/getByIds")
    @PostMapping("/api/v1/testPoint/getByIds")
    public R<List<XpTestPoint>> getByIds(@RequestBody XpPointExportExcelQuery query) {
        List<XpTestPoint> list = xpTestPointService.lambdaQuery().in(XpTestPoint::getId, query.getPointIds()).list();
        return R.ok(list);
@@ -87,7 +87,7 @@
    /**
     * 新增点位
     */
    @PostMapping("/addPoint")
    @PostMapping("/api/v1/testPoint/addPoint")
    @ResponseBody
    @ApiOperation(value = "新增点位")
    public R add(@Validated @RequestBody PointAddDto pointAddDto) {
@@ -101,7 +101,7 @@
    /**
     * 批量删除点位
     */
    @GetMapping("/deletePoint")
    @GetMapping("/api/v1/testPoint/deletePoint")
    @ResponseBody
    @ApiOperation(value = "删除点位")
    public R deletePoint(@RequestParam("ids") String ids) {
@@ -113,7 +113,7 @@
    /**
     * 编辑点位
     */
    @PostMapping("/editPoint")
    @PostMapping("/api/v1/testPoint/editPoint")
    @ApiOperation(value = "编辑点位")
    public R edit(@Validated @RequestBody PointUpdateDto pointAddDto) {
        XpTestPoint xpPoint = new XpTestPoint();
@@ -126,7 +126,7 @@
    /**
     * 点位详情
     */
    @GetMapping("/queryPointById")
    @GetMapping("/api/v1/testPoint/queryPointById")
    @ApiOperation(value = "点位详情")
    public R<XpTestPoint> queryById(@RequestParam Long id) {
        return R.ok(xpTestPointService.getById(id));
@@ -135,7 +135,7 @@
    /**
     * 启用/禁用
     */
    @PostMapping("/enableDisablePoint")
    @PostMapping("/api/v1/testPoint/enableDisablePoint")
    @ApiOperation(value = "启用/禁用")
    public R enableDisable(@RequestBody XpPointEnableDisableDto dto) {
        XpTestPoint xpPoint = xpTestPointService.getById(dto.getId());
@@ -149,7 +149,7 @@
    /**
     * 设置特殊点位
     */
    @PostMapping("/setSpecialPoint")
    @PostMapping("/api/v1/testPoint/setSpecialPoint")
    @ApiOperation(value = "设置特殊点位", tags = "后台管理-特殊点位")
    public R setSpecialPoint(@RequestBody XpPointSpecialDto dto) {
        xpTestPointService.update(new LambdaUpdateWrapper<XpTestPoint>().set(XpTestPoint::getChargePoint, 0)
@@ -172,7 +172,7 @@
    }
    @GetMapping("/listSpecialPoint")
    @GetMapping("/api/v1/testPoint/listSpecialPoint")
    @ApiOperation(value = "获取特殊点位", tags = "后台管理-特殊点位")
    public R<SpecialPointVo> getSpecialPoint() {
        List<XpTestPoint> chargePoints = xpTestPointService.list(new LambdaQueryWrapper<XpTestPoint>().eq(XpTestPoint::getChargePoint, 1));
@@ -202,4 +202,15 @@
        return R.ok(specialPointVo);
    }
    /**
     * 判断点位是在有效期内
     * @param pointId
     * @return
     */
    @GetMapping("/inner/v1/testPoint/nowInTimePoint")
    public R<Boolean> nowInTimePoint(@RequestParam Long pointId){
        return R.ok(xpTestPointService.nowInTimePoint(pointId));
    }
}