From 0ab9dfd8f122195e4e9f09bd50c59e0a47450bec Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 19 三月 2025 15:50:03 +0800 Subject: [PATCH] fix: resolve merge conflicts in .gitignore --- ruoyi-common/src/main/java/com/ruoyi/common/enums/ProcessCategoryEnum.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/ProcessCategoryEnum.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/ProcessCategoryEnum.java new file mode 100644 index 0000000..5aef891 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/ProcessCategoryEnum.java @@ -0,0 +1,51 @@ +package com.ruoyi.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 1. 入户调查 + * 2. 价格评估 + * 3. 协议签订 + * 固定对应表 state_process_module + */ +@Getter +@AllArgsConstructor +public enum ProcessCategoryEnum { + CATEGORY0(0, "错误分类"), + CATEGORY1(1, "合同新增审批"), + CATEGORY2(2, "合同签订审批"), + CATEGORY3(3, "合同提前终止审批"), + ; + + + private final Integer value; + private final String text; + + public static Integer getValue(String text) { + for (ProcessCategoryEnum v : ProcessCategoryEnum.values()) { + if (v.text.equals(text)) { + return v.value; + } + } + return 0; + } + + public static String getValueByKey(Integer key) { + for (ProcessCategoryEnum v : ProcessCategoryEnum.values()) { + if (v.getValue().equals(key)) { + return v.getText(); + } + } + return ""; + } + + public static ProcessCategoryEnum getEnumByKey(Integer key) { + for (ProcessCategoryEnum v : ProcessCategoryEnum.values()) { + if (v.getValue().equals(key)) { + return v; + } + } + return CATEGORY0; + } +} -- Gitblit v1.7.1