package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 工作区域枚举
 */
@Getter
@AllArgsConstructor
public enum WorkAreaEnum {

    DEPARTMENT_LEADER("DEPARTMENT_LEADER", "部门领导"),
    MANAGEMENT_CADRE("MANAGEMENT_CADRE", "管理干部"),
    BUSINESS_TRAINING("BUSINESS_TRAINING", "业务培训"),
    ASSISTANT_MANAGER("ASSISTANT_MANAGER", "助理经理"),
    QUALITY_CONTROL("QUALITY_CONTROL", "质量控制"),
    PARTY_BUILDING("PARTY_BUILDING", "党建"),
    TRAVEL_INSPECTION("TRAVEL_INSPECTION", "旅检"),
    EQUIPMENT_MAINTENANCE("EQUIPMENT_MAINTENANCE", "设备维修"),
    BAGGAGE_INSPECTION("BAGGAGE_INSPECTION", "行检"),
    EMPLOYEE("EMPLOYEE", "员工"),
    ACCESS_GATE("ACCESS_GATE", "道口"),
    SUPERVISOR("SUPERVISOR", "主管"),
    DEPUTY_MANAGER_T2("DEPUTY_MANAGER_T2", "T2"),
    INTERNAL_STAFF("INTERNAL_STAFF", "内勤"),
    DEPUTY_MANAGER_T1("DEPUTY_MANAGER_T1", "T1"),
    FREIGHT("FREIGHT", "货运"),
    SENIOR_SUPERVISOR("SENIOR_SUPERVISOR", "资深主管"),
    PARTURIENT_WOMAN("PARTURIENT_WOMAN", "产妇"),
    BASIC("BASIC", "基础"),
    VIP("VIP", "贵宾"),
    PART_TIME_QUALITY_CONTROL("PART_TIME_QUALITY_CONTROL", "兼职品控"),
    OPERATION_DISPATCH("OPERATION_DISPATCH", "运调"),
    SUPERVISOR_BAGGAGE_INSPECTION_VIP_EMPLOYEE("SUPERVISOR_BAGGAGE_INSPECTION_VIP_EMPLOYEE", "主管（行检、贵宾、员工）"),
    DEPUTY_MANAGER("DEPUTY_MANAGER", "副经理"),
    SUPERVISOR_TRAVEL_INSPECTION("SUPERVISOR_TRAVEL_INSPECTION", "主管（旅检）"),
    MANAGER("MANAGER", "经理"),
    PREGNANT_WOMAN("PREGNANT_WOMAN", "孕妇"),
    FIRST_FLOOR_EMPLOYEE("FIRST_FLOOR_EMPLOYEE", "一楼员工"),
    BRIGADE_QUALITY_CONTROL("BRIGADE_QUALITY_CONTROL", "大队品控"),
    SUPERVISOR_BAGGAGE_INSPECTION_EMPLOYEE("SUPERVISOR_BAGGAGE_INSPECTION_EMPLOYEE", "主管（行检、员工）"),
    VIP_PREGNANT_WOMAN("VIP_PREGNANT_WOMAN", "贵宾（孕妇）"),
    EMPLOYEE_PREGNANT_WOMAN("EMPLOYEE_PREGNANT_WOMAN", "员工（孕妇）"),
    ABNORMAL_BEHAVIOR_SHOPPING_CART_INSPECTION("ABNORMAL_BEHAVIOR_SHOPPING_CART_INSPECTION", "异常行为（手推车检查）"),
    ABNORMAL("ABNORMAL", "异常"),
    QUALITY_INSPECTION("QUALITY_INSPECTION", "品控"),
    SUPERVISOR_INTERNATIONAL("SUPERVISOR_INTERNATIONAL", "主管（国际）"),
    VIP_CHANNEL("VIP_CHANNEL", "贵宾通道"),
    EMPLOYEE_CHANNEL("EMPLOYEE_CHANNEL", "员工通道"),
    SECONDMENT("SECONDMENT", "借调"),
    BASIC_POSITION("BASIC_POSITION", "基础岗"),
    OTHER_POSITIONS("OTHER_POSITIONS", "其他岗位");


    private final String code;
    private final String desc;

    public static WorkAreaEnum getByCode(String code) {
        for (WorkAreaEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

    public static WorkAreaEnum getByDesc(String desc) {
        for (WorkAreaEnum itemEnum : values()) {
            if (itemEnum.getDesc().equals(desc)) {
                return itemEnum;
            }
        }
        return null;
    }

}
