# SvaSchedulePayCodeEnum.java

    package cloud.wconnect.workperformance.cons.sva;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    /**
     * @author zc
     * @date 2023/06/26
     */
    @Getter
    @AllArgsConstructor
    public enum SvaSchedulePayCodeEnum {

        /**
         * Sick
         */
        SICK("SICK", "S"),

        /**
         * Vacation
         */
        VACATION("VACATION", "V"),

        /**
         * PTO
         */
        PTO("PTO", "PTO"),

        /**
         * PTS
         */
        PTS("PTS", "PTS"),

        /**
         * RETRO
         */
        RETRO("RETRO", "RETRO"),

        /**
         * UNPD
         */
        UNPD("UNPD", "UNPD"),

        /**
         * BEREAV
         */
        BEREAV("BEREAV", "B"),

        /**
         * Float Holiday
         */
        FLOAT_HOLIDAY("FLOAT HOLIDAY", "FH"),

        /**
         * Holiday
         */
        HOLIDAY("HOLIDAY", "H"),

        /**
         * JURY
         */
        JURY("JURY", "J"),

        /**
         * ABSENT
         */
        ABSENT("ABSENT", "ABSENT"),

        /**
         * BIRTHDAY
         */
        BIRTHDAY("BIRTHDAY", "BIRTHDAY"),

        /**
         * REGULAR
         */
        REGULAR("REGULAR", "REGULAR");

        private final String fullName;

        private final String abbr;

        /**
         * 获取 SchedulePayCode 缩写
         *
         * @param schedulePayCode Schedule Pay Code
         * @return SchedulePayCode 缩写
         * @author zc
         * @date 2023/6/26
         */
        public static String getAbbr(String schedulePayCode) {
            for (SvaSchedulePayCodeEnum schedulePayCodeEnum : SvaSchedulePayCodeEnum.values()) {
                if (schedulePayCodeEnum.getFullName().equalsIgnoreCase(schedulePayCode)) {
                    return schedulePayCodeEnum.getAbbr();
                }
            }
            return "";
        }
    }