package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 岗位枚举
 */
@Getter
@AllArgsConstructor
public enum PostEnum {

    SECRETARY("SECRETARY", "书记"),
    GENERAL_MANAGER("GENERAL_MANAGER", "总经理"),
    DEPUTY_GENERAL_MANAGER("DEPUTY_GENERAL_MANAGER", "副总经理"),
    GENERAL_MANAGER_ASSISTANT("GENERAL_MANAGER_ASSISTANT", "总经理助理"),
    MANAGER("MANAGER", "经理"),
    TRAINING_MANAGEMENT_SENIOR_SUPERVISOR("TRAINING_MANAGEMENT_SENIOR_SUPERVISOR", "培训管理资深主管"),
    SECURITY_CHECK_ASSISTANT_MANAGER("SECURITY_CHECK_ASSISTANT_MANAGER", "安检助理经理"),
    QUALITY_CONTROL_SENIOR_SUPERVISOR("QUALITY_CONTROL_SENIOR_SUPERVISOR", "品质控制资深主管"),
    QUALITY_CONTROL_ASSISTANT_MANAGER("QUALITY_CONTROL_ASSISTANT_MANAGER", "品质控制助理经理"),
    PARTY_AND_MASSES_SENIOR_SUPERVISOR("PARTY_AND_MASSES_SENIOR_SUPERVISOR", "党群资深主管"),
    SECURITY_CHECK_SUPERVISOR("SECURITY_CHECK_SUPERVISOR", "安检主管"),
    QUALITY_CONTROL_ASSISTANT("QUALITY_CONTROL_ASSISTANT", "品质控制助理"),
    COMPREHENSIVE_SERVICE_SUPERVISOR("COMPREHENSIVE_SERVICE_SUPERVISOR", "综合服务主管"),
    HR_BP_SENIOR_SUPERVISOR("HR_BP_SENIOR_SUPERVISOR", "人资BP资深主管"),
    HR_BP_ASSISTANT_MANAGER("HR_BP_ASSISTANT_MANAGER", "人资BP助理经理"),
    EQUIPMENT_MAINTENANCE_SUPERVISOR("EQUIPMENT_MAINTENANCE_SUPERVISOR", "设备维修主管"),
    EQUIPMENT_MAINTENANCE_TECHNICIAN("EQUIPMENT_MAINTENANCE_TECHNICIAN", "设备维修员"),
    EQUIPMENT_MAINTENANCE_SENIOR_SUPERVISOR("EQUIPMENT_MAINTENANCE_SENIOR_SUPERVISOR", "设备维修资深主管"),
    SECURITY_CHECK_OFFICER("SECURITY_CHECK_OFFICER", "安检员"),
    PROFESSIONAL_MANAGER("PROFESSIONAL_MANAGER", "专业经理"),
    SECURITY_CHECK_OFFICER_AND_X_RAY_MACHINE_OPERATOR("SECURITY_CHECK_OFFICER_AND_X_RAY_MACHINE_OPERATOR", "安检员兼X光机操作员"),
    SECURITY_CHECK_SENIOR_SUPERVISOR("SECURITY_CHECK_SENIOR_SUPERVISOR", "安检资深主管"),
    DEPUTY_MANAGER("DEPUTY_MANAGER", "副经理"),
    TRAINING_MANAGEMENT_SUPERVISOR("TRAINING_MANAGEMENT_SUPERVISOR", "培训管理主管"),
    TRAINING_MANAGEMENT_LEVEL_1_SPECIALIST("TRAINING_MANAGEMENT_LEVEL_1_SPECIALIST", "培训管理一级专员"),
    OPERATION_DISPATCHER("OPERATION_DISPATCHER", "运行调度员"),
    QUALITY_CONTROL_LEVEL_2_SPECIALIST("QUALITY_CONTROL_LEVEL_2_SPECIALIST", "品质控制二级专员"),
    TRAINING_BP_SENIOR_SUPERVISOR("TRAINING_BP_SENIOR_SUPERVISOR", "培训BP资深主管"),
    SERVICE_MANAGEMENT_LEVEL_1_SPECIALIST("SERVICE_MANAGEMENT_LEVEL_1_SPECIALIST", "服务管理一级专员"),
    BASIC_SECURITY_CHECK_OFFICER("BASIC_SECURITY_CHECK_OFFICER", "基础安检员");

    private final String code;
    private final String desc;

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

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

}
