# AdjApprovalStatusEnum.java

    package cloud.wconnect.frontoffice.cons.adjustment;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.Arrays;
    import java.util.Optional;

    /**
     * 审批状态
     *
     * @author lichen
     * @date 2024/1/29
     */
    @AllArgsConstructor
    @Getter
    public enum AdjApprovalStatusEnum {

        /**
         * 未开始审批
         */
        NOT_START_APPROVAL(0, "approval-status.not-start-approval"),
        /**
         * 审批中
         */
        APPROVING(1, "approval-status.approving"),
        /**
         * 退回
         */
        RETURN(2, "approval-status.return"),
        /**
         * 审批通过
         */
        APPROVED(3, "approval-status.approved"),
        /**
         * 审批拒绝
         */
        REJECTED(4, "approval-status.rejected"),

        /**
         * 已跳过
         */
        SKIPPED(11, "approval-status.skipped");

        /**
         * 审批状态
         */
        private int status;
        /**
         * 国际化code
         */
        private String i18nCode;

        /**
         * 获取国际化code
         *
         * @param status 状态
         * @return java.lang.String
         * @author lichen
         * @date 2024/1/11
         */
        public static String getI18nCode(int status) {
            Optional<AdjApprovalStatusEnum> optional = Arrays.stream(AdjApprovalStatusEnum.values()).filter(item -> item.getStatus() == status).findFirst();
            return optional.isPresent() ? optional.get().getI18nCode() : "";
        }

    }