puzhibing
2026-03-11 c98d3f2fc620b3f5d699e2be34eaabc1033b42b2
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpTaskController.java
@@ -61,11 +61,13 @@
    private XpFleetOperationsClient xpFleetOperationsClient;
    @Resource
    private XpVehicleClient xpVehicleClient;
    @ApiOperation(value = "事故类型列表", response = XpErrorType.class, tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/errorTypeList")
    public R<List<XpErrorType>> errorTypeList() {
        return xpErrorTypeService.errorTypeList();
    }
    @ApiOperation(value = "任务中心列表", response = TaskPageListVO.class, tags = "运维APP-任务中心")
    @PostMapping("/api/v1/task/pageList")
    public R<PageInfo<TaskPageListVO>> pageList(@RequestBody TaskPageListQuery query) {
@@ -73,6 +75,7 @@
        PageInfo<TaskPageListVO> pageList = xpTaskService.pageList(query);
        return R.ok(pageList);
    }
    @ApiOperation(value = "事故任务确认到达", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/confirmArrive")
    @Transactional
@@ -80,6 +83,7 @@
        Long userId = tokenService.getLoginOperationUser().getXpOperationsUser().getId();
        return xpTaskService.confirmArrive(id,userId);
    }
    @ApiOperation(value = "查询车辆不分页列表", tags = "运维APP-任务中心")
    @PostMapping("/api/v1/task/listVehicle")
    public R<List<VehicleListVO>> listVehicle() {
@@ -118,6 +122,7 @@
        return R.ok(new ArrayList<>());
    }
    @ApiOperation(value = "上传车辆事故", tags = "运维APP-任务中心")
    @PostMapping("/api/v1/task/saveVehicleAccident")
    public R saveVehicleAccident(@RequestBody SaveVehicleAccidentDto dto) {
@@ -126,6 +131,7 @@
        xpTaskService.saveVehicleAccident(dto, xpOperationsUser);
        return R.ok();
    }
    @ApiOperation(value = "车辆事故任务详情", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/vehicleAccidentDetail")
    public R<TaskAccidentDetailVO> vehicleAccidentDetail(Long id) {
@@ -137,6 +143,7 @@
    public R<TaskRoutineDetailVO> vehicleRoutineDetail(Long id) {
        return xpTaskService.vehicleRoutineDetail(id);
    }
    @ApiOperation(value = "上传车辆其他常规任务详情", tags = "运维APP-任务中心")
    @PostMapping("/api/v1/task/saveRoutineDetail")
    public R saveRoutineDetail(@RequestBody SaveRoutineDetailDto dto) {
@@ -144,6 +151,7 @@
        Long id = loginOperationUser.getId();
        return xpTaskService.saveRoutineDetail(dto, id);
    }
    @ApiOperation(value = "车辆常规充电任务详情", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/chargingDetail")
    public R<TaskChargingDetailVO> chargingDetail(Long id) {
@@ -155,21 +163,25 @@
    public R<com.xiaopeng.maintenance.vo.TaskRepairDetailVO> repairDetail(Long id) {
        return xpTaskService.repairDetail(id);
    }
    @ApiOperation(value = "车辆常规整备任务详情", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/preparationDetail")
    public R<com.xiaopeng.maintenance.vo.TaskPreparationDetailVO> preparationDetail(Long id) {
        return xpTaskService.preparationDetail(id);
    }
    @ApiOperation(value = "车辆常规检测任务详情", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/detectionDetail")
    public R<com.xiaopeng.maintenance.vo.TaskDetectionDetailVO> detectionDetail(Long id) {
        return xpTaskService.detectionDetail(id);
    }
    @ApiOperation(value = "车辆常规洗车任务详情", tags = "运维APP-任务中心")
    @GetMapping("/api/v1/task/cleanDetail")
    public R<com.xiaopeng.maintenance.vo.TaskCleanDetailVO> cleanDetail(Long id) {
        return xpTaskService.cleanDetail(id);
    }
    @ApiOperation(value = "处理车辆事故", tags = "运维APP-任务中心")
    @PostMapping("/api/v1/task/handleVehicleAccident")
    @Transactional
@@ -181,6 +193,7 @@
    /**
     * 通过车辆id查询任务事故分页列表
     *
     * @return
     */
    @ApiOperation(value = "通过车辆id查询任务事故分页列表", tags = {"管理后台-车辆管理-运营车辆管理"})
@@ -191,6 +204,7 @@
    /**
     * 管理后台-车辆管理-运营车辆管理-删除任务/事故
     *
     * @param id
     * @return
     */
@@ -200,6 +214,7 @@
        xpTaskService.deleteTaskById(id);
        return R.ok();
    }
    @ApiOperation(value = "事故类型列表", response = XpErrorType.class, tags = "管理后台-车辆管理-运营车辆管理")
    @GetMapping("/api/v1/task/errorTypeTreeList")
    public R<List<XpErrorType>> errorTypeTreeList() {
@@ -208,6 +223,7 @@
    /**
     * 通过车辆id查询上一次保养记录
     *
     * @param vehicleId 车辆ID
     */
    @GetMapping("/inner/xpTask/queryInfoByVehicleId")
@@ -215,4 +231,7 @@
        XpTask xpTask = xpTaskService.queryInfoByVehicleId(vehicleId);
        return R.ok(xpTask);
    }
}