From 609d91e1e62b1e8932b34b15b09baf02e7f09a93 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 09 十二月 2024 10:36:47 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng --- ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java new file mode 100644 index 0000000..6d079b5 --- /dev/null +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ApproveConfigEnum.java @@ -0,0 +1,47 @@ +package com.ruoyi.common.core.enums; + +import lombok.Getter; + +/** + * @Description + * @Author xiaochen + * @Date 2023/6/8 16:42 + */ +public enum ApproveConfigEnum { + + /*审批类型 1=交车审批、2=续约审批、3=退车审批*/ + + DELIVERY_APPROVAL(1, "交车审批"), + RENEWAL_APPROVAL(2, "续约审批"), + RETURN_APPROVAL(3, "退车审批"); + + @Getter + private String desc; + + + @Getter + private int code; + + + ApproveConfigEnum(int code, String desc) { + this.code = code; + this.desc = desc; + } + + /** + * 通过code获取枚举 + * + * @param code + * @return + */ + public static ApproveConfigEnum fromCode(Integer code) { + ApproveConfigEnum[] resultTypes = ApproveConfigEnum.values(); + for (ApproveConfigEnum resultType : resultTypes) { + if (code.equals(resultType.getCode())) { + return resultType; + } + } + return null; + } + +} -- Gitblit v1.7.1