Bläddra i källkod

产品管理相关

yzc 2 år sedan
förälder
incheckning
3074191e71

+ 14 - 39
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictTypeEnum.java

@@ -1,49 +1,24 @@
 package com.sckw.core.common.enums.enums;
 
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
 /**
  * @author lfdc
- * @description 物流服务-枚举字典
+ * @description 枚举字典
  * @date 2023-07-07 14:07:23
  */
+@Getter
+@AllArgsConstructor
 public enum DictTypeEnum {
-    PRICE_TYPE_0("0", "元/吨",  "运价方式","price_type"),
-    PRICE_TYPE_1("1", "元/车",  "运价方式","price_type"),
-    UNIT_TYPE_0("0", "吨",  "单位","unit"),
-    UNIT_TYPE_1("1", "方", "单位","unit"),
-    UNIT_TYPE_2("2", "箱",  "单位","unit"),
-    UNIT_TYPE_3("3", "件",  "单位","unit");
-    private final String code;
+    PRICE_TYPE_0("price_type", "0", "元/吨"),
+    PRICE_TYPE_1("price_type", "1", "元/车"),
+    UNIT_TYPE_0("unit", "0", "吨"),
+    UNIT_TYPE_1("unit", "1", "方"),
+    UNIT_TYPE_2("unit", "2", "箱"),
+    UNIT_TYPE_3("unit", "3", "件");
+    private final String type;
     private final String value;
-    private final String destination;
-    private final String dict;
-    public String getCode() {
-        return code;
-    }
-    public String getValue() {
-        return value;
-    }
-
-    public String getDict() {
-        return dict;
-    }
-
-    public String getDestination() {
-        return destination;
-    }
-
-    DictTypeEnum(String code, String value ,String destination,String dict) {
-        this.code = code;
-        this.value = value;
-        this.destination = destination;
-        this.dict = dict;
-    }
+    private final String label;
 
-    public static String getLogisticsOrderValue(String code) {
-        for (DictTypeEnum logisticsOrderEnum : DictTypeEnum.values()) {
-            if (logisticsOrderEnum.getCode().equals(code)) {
-                return logisticsOrderEnum.getValue();
-            }
-        }
-        return null;
-    }
 }