| | |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.evi.oss.service.AliOssService; |
| | | import com.xiaopeng.maintenance.dto.HandleVehicleAccidentDto; |
| | | import com.xiaopeng.maintenance.dto.SaveRemoteDrivingAccidentDto; |
| | | import com.xiaopeng.maintenance.dto.SaveRoutineDetailDto; |
| | | import com.xiaopeng.maintenance.dto.SaveVehicleAccidentDto; |
| | | import com.xiaopeng.maintenance.job.AccidentTaskQuartzScheduler; |
| | |
| | | import com.xiaopeng.maintenance.vo.*; |
| | | import com.xiaopeng.maintenance.vo.TaskCleanDetailVO; |
| | | import com.xiaopeng.maintenance.vo.TaskDetectionDetailVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | */ |
| | | @RestController |
| | | @Slf4j |
| | | @Api(tags = "任务管理") |
| | | public class XpTaskController { |
| | | @Resource |
| | | private XpTaskService xpTaskService; |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "车辆事故任务详情", tags = "运维APP-任务中心") |
| | | @GetMapping("/maintenance-app/api/v1/task/vehicleAccidentDetail") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "创建远程代驾事故任务", tags = "远程代驾") |
| | | @PostMapping("/logan/assistance/v1/task/saveRemoteDrivingAccident") |
| | | public R<?> saveRemoteDrivingAccident(@RequestBody SaveRemoteDrivingAccidentDto dto) { |
| | | XpTask task = xpTaskService.saveRemoteDrivingAccident(dto); |
| | | try { |
| | | XpTaskRule taskRule = xpTaskRuleMapper.selectOne(null); |
| | | Integer processingTimeLimit = taskRule == null ? null : taskRule.getProcessingTimeLimit(); |
| | | accidentTaskQuartzScheduler.scheduleAccidentTimeoutJobs(task.getId(), task.getEndTime(), processingTimeLimit); |
| | | } catch (Exception e) { |
| | | log.error("远程代驾事故任务Quartz调度失败,taskId={}", task == null ? null : task.getId(), e); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "事故类型列表", response = XpErrorType.class, tags = "远程代驾") |
| | | @GetMapping("/logan/assistance/v1/taskManagement/errorTypeList") |
| | | public R<List<XpErrorType>> getErrorTypeList() { |
| | | return xpErrorTypeService.errorTypeList(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "运营后台改派工单", tags = {"管理后台-运维执行-任务工单-待改派工单"}) |
| | | @PostMapping("/api/v1/task/reassign/taskReassignment") |
| | | @AdminOperationLog( |