From c9c63baa6aca084be7a9302f240c080c9ab1454b Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 24 一月 2025 16:46:50 +0800
Subject: [PATCH] 修改bug
---
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