package cn.iocoder.yudao.module.system.controller.admin.robot.task;

import cn.iocoder.yudao.module.system.enums.path.PathTaskTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * PP分配的任务
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TaskAssignDTO {
    @Schema(description = "robot_task_detail/robot_charge_log 的 id")
    private Long orderId;

    @Schema(description = "任务类型(TAKE_RELEASE、CHARGE、MOVE、TAKE、RELEASE、AUTO_CHARGE)")
    private String orderType;

    @Schema(description = "AGV编号")
    private String robotNo;

    @Schema(description = "等待点id")
    private String waitId;

    /**
     * 获取机器人要做的任务描述
     * @return
     */
    public String getRobotActionMsg() {
        if (PathTaskTypeEnum.TAKE_RELEASE.getType().equals(orderType)) {
            return "机器人分配到取放货任务 ";
        }if (PathTaskTypeEnum.CHARGE.getType().equals(orderType)) {
            return "机器人分配到充电任务 ";
        }if (PathTaskTypeEnum.MOVE.getType().equals(orderType)) {
            return "机器人分配到移动任务 ";
        }if (PathTaskTypeEnum.MOVE_TO_WAIT.getType().equals(orderType)) {
            return "机器人分配移动到等待点的任务 ";
        }if (PathTaskTypeEnum.MOVE_TO_WAIT_STOP.getType().equals(orderType)) {
            return "机器人分配停车任务 ";
        }if (PathTaskTypeEnum.TAKE.getType().equals(orderType)) {
            return "机器人分配到仅取货任务 ";
        }if (PathTaskTypeEnum.RELEASE.getType().equals(orderType)) {
            return "机器人分配到仅放货任务 ";
        }if (PathTaskTypeEnum.AUTO_CHARGE.getType().equals(orderType)) {
            return "机器人分配到自动充电任务 ";
        }if (PathTaskTypeEnum.MOVE_TO_POINT.getType().equals(orderType)) {
            return "机器人分配到移动到点位任务 ";
        }if (PathTaskTypeEnum.MOVE_TO_PP_POINT.getType().equals(orderType)) {
            return "路径规划分配机器人移动到点位任务 ";
        }
        return "未知任务";
    }
}
