修改一键起飞

This commit is contained in:
孙小云 2026-03-10 15:08:51 +08:00
parent fb387aaa1e
commit 6da33d3d9c
1 changed files with 5 additions and 0 deletions

View File

@ -45,14 +45,19 @@ public class FlightServiceImpl implements FlightService
public Long createClickTakeOffTask(String sn, String routeUrl){
TaskDTO taskDTO = new TaskDTO();
taskDTO.setTaskName("一键起飞");
taskDTO.setActualStartTime(new Date());
taskDTO.setStartTime(new Date());
taskDTO.setExecuteType(ExecuteTypeEnum.ONCE);
taskDTO.setTaskCategory(TaskCategoryEnum.MANUAL_FLIGHT);
taskDTO.setRouteId(-1L);
taskDTO.setUavId(sn);
taskDTO.setStatus(StatusEnum.PENDING);
taskDTO.setRouteUrl(routeUrl);
R<Long> taskId = remoteTaskService.createTaskWithoutPlan(taskDTO,SecurityConstants.INNER);
return taskId.getData();