package org.wcs.constant.enums.business;

import lombok.Getter;

@Getter
public enum SimpleTaskEnum {

    UNKNOWN(0, "未知任务"),
    STACKER(1, "堆垛机任务"),
    CONVEY(2, "输送任务"),
    TRAY_CONVEY(3, "托盘输送任务"),
    AGV(4, "AGV任务"),
    SHUTTLE(5, "穿梭车任务");

    private final Integer taskType;
    private final String taskName;

    SimpleTaskEnum(Integer taskType, String taskName) {
        this.taskType = taskType;
        this.taskName = taskName;
    }

    public static SimpleTaskEnum getSimpleTaskEnum(LocationTypeEnum locationType) {
        return switch (locationType) {
            case LocationTypeEnum.STACKER -> STACKER;
            case LocationTypeEnum.CONVEY -> CONVEY;
            case LocationTypeEnum.TRAY_CONVEY -> TRAY_CONVEY;
            case LocationTypeEnum.AGV -> AGV;
            case LocationTypeEnum.SHUTTLE -> SHUTTLE;
            default -> UNKNOWN;
        };
    }
}
