package com.prolog.eis.enums.base;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum BaseWorkTypeEnum {



    //    STATUS_INIT("0", "未开始"),
//    INBOUND_TYPE("10", "正常入库/回告"),
    MOVE_TYPE(30, 3, "移库类型/指定托盘出库"),
    INVENTORY_TYPE(40, 3, "盘点类型/指定托盘出库"),
    OUTBOUND_TYPE(10, 2, "销售出库/按订单出库"),

//    UPDATE_PRIORITY("30","提升优先级"),
//    EMPTY_OUTBOUND("40","空托出库"),
//    TASK_CONFIRM("50","作业确认"),
//    TASK_CANCEL("60","作业任务取消接口"),
//    TASK_APR("70","盘点审核信息推送"),
    ;

    private Integer wmsType;
    private Integer eisType;
    private String msg;

    public static int containerType = 3;
    public static int orderType = 2;
    public static int wareType = 1;
    public static BaseWorkTypeEnum getByWmsType(Integer wmsCode) {
        BaseWorkTypeEnum workType = null;

        for (BaseWorkTypeEnum value : values()) {
            if (value.getWmsType().equals(wmsCode)) {
                workType = value;
            }
        }
        return workType;
    }

    public static BaseWorkTypeEnum getByEisType(Integer eisCode) {
        BaseWorkTypeEnum workType = null;

        for (BaseWorkTypeEnum value : values()) {
            if (value.getWmsType().equals(eisCode)) {
                workType = value;
            }
        }
        return workType;
    }
}
