| | |
| | | import com.xiaopeng.api.vo.automaticPilot.proto.down.cloudCreateOrder.TaskType; |
| | | import com.xiaopeng.automaticPilot.util.XPUUtil; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.utils.SnowFlake; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | task.setTask_id(System.currentTimeMillis()+ ""); |
| | | task.setTask_type(TaskType.ROBOTAXI); |
| | | task.setStatus(TaskStatus.PENDING); |
| | | |
| | | ResponseMessage responseMessage = xpuUtil.cloudCreateOrder(task); |
| | | SnowFlake snowFlake = new SnowFlake(0, 0); |
| | | snowFlake.withStartTimestamp(1420041600000L); |
| | | long sequence = snowFlake.nextId(); |
| | | ResponseMessage responseMessage = xpuUtil.cloudCreateOrder(task,sequence); |
| | | if (responseMessage.getCode()== StatusCode.OK) { |
| | | return R.ok(true); |
| | | } |