puzhibing
2026-05-12 08cc6d5cf7e93b75cfabe7dcc2aeaa9afa1117eb
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpTestPlanController.java
@@ -9,7 +9,9 @@
import com.xiaopeng.api.model.operation.XpTestPlanVehicle;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.operation.dto.XpTestPlanAddDTO;
import com.xiaopeng.common.log.annotation.AdminOperationLog;
import com.xiaopeng.common.log.enums.AdminBusinessType;
import com.xiaopeng.common.log.enums.AdminOperationType;
import com.xiaopeng.operation.dto.XpTestPlanEditDTO;
import com.xiaopeng.operation.query.TestPlanQuery;
import com.xiaopeng.operation.service.IXpTestPlanPointService;
@@ -54,6 +56,12 @@
    @ApiOperation(value = "新增测试计划", tags = {"管理后台-测试计划"})
    @PostMapping(value = {"/api/v1/xp-test-plan/add"})
    @AdminOperationLog(
            businessType = AdminBusinessType.TEST_PLAN,
            operationType = AdminOperationType.ADD,
            content = "新增测试计划",
            appendRequestData = true
    )
    public R<Long> add() {
        XpTestPlan plan = new XpTestPlan();
        xpTestPlanService.save(plan);
@@ -62,6 +70,12 @@
    @ApiOperation(value = "编辑测试计划", tags = {"管理后台-测试计划"})
    @PostMapping(value = {"/api/v1/xp-test-plan/edit"})
    @AdminOperationLog(
            businessType = AdminBusinessType.TEST_PLAN,
            operationType = AdminOperationType.EDIT,
            content = "编辑测试计划",
            appendRequestData = true
    )
    public R<?> edit(@Valid @RequestBody XpTestPlanEditDTO dto) {
        xpTestPlanService.edit(dto);
        return R.ok();
@@ -69,6 +83,12 @@
    @ApiOperation(value = "删除测试计划", tags = {"管理后台-测试计划"})
    @DeleteMapping(value = {"/api/v1/xp-test-plan/deleteById/{id}"})
    @AdminOperationLog(
            businessType = AdminBusinessType.TEST_PLAN,
            operationType = AdminOperationType.DELETE,
            content = "删除测试计划",
            appendRequestData = true
    )
    public R<?> deleteById(@ApiParam(name = "id", value = "测试计划ID") @PathVariable Long id) {
        xpTestPlanService.deleteById(id);
        return R.ok();
@@ -86,7 +106,7 @@
     * @param id
     * @return
     */
    @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanById")
    @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanById")
    public R<XpTestPlan> getXpTestPlanById(@RequestParam Long id){
        XpTestPlan xpTestPlan = xpTestPlanService.getById(id);
        return R.ok(xpTestPlan);
@@ -99,7 +119,7 @@
     * @param id
     * @return
     */
    @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanPointById")
    @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanPointById")
    public R<XpTestPlanPoint> getXpTestPlanPointById(@RequestParam Long id){
        XpTestPlanPoint xpTestPlanPoint = xpTestPlanPointService.getById(id);
        return R.ok(xpTestPlanPoint);
@@ -107,13 +127,24 @@
    /**
     * 根据id获取测试计划点位
     * @param id
     * @return
     */
    @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPointById")
    public R<XpTestPoint> getXpTestPointById(@RequestParam Long id){
        XpTestPoint xpTestPoint = xpTestPointService.queryById(id).getData();
        return R.ok(xpTestPoint);
    }
    /**
     * 根据测试计划获取车辆信息
     * @param testPlanId
     * @return
     */
    @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanVehicleByTestPlanId")
    @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanVehicleByTestPlanId")
    public R<List<XpTestPlanVehicle>> getXpTestPlanVehicleByTestPlanId(@RequestParam Long testPlanId){
        List<XpTestPlanVehicle> xpTestPlanVehicleList = xpTestPlanVehicleService.lambdaQuery()
                .eq(XpTestPlanVehicle::getTestPlanId, testPlanId)