|
@@ -1,53 +1,39 @@
|
|
|
package com.sckw.core.model.enums;
|
|
package com.sckw.core.model.enums;
|
|
|
|
|
+
|
|
|
|
|
+import lombok.Getter;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
- * @Description 客户类型枚举
|
|
|
|
|
- * @Author zk
|
|
|
|
|
- * @Date 2019/4/16
|
|
|
|
|
|
|
+ * @author czh
|
|
|
|
|
+ * @desc 企业类型枚举
|
|
|
|
|
+ * @date 2023/6/15
|
|
|
*/
|
|
*/
|
|
|
|
|
+@Getter
|
|
|
public enum EntTypeEnum {
|
|
public enum EntTypeEnum {
|
|
|
- consignor("贸易", "1"),
|
|
|
|
|
- carrier("采购", "2"),
|
|
|
|
|
- personal("4P物流", "3"),
|
|
|
|
|
- special("3P物流", "4");
|
|
|
|
|
|
|
|
|
|
- private String name;
|
|
|
|
|
|
|
+ //供应商
|
|
|
|
|
+ SUPPLIER(1, "供应商"),
|
|
|
|
|
+ //采购商
|
|
|
|
|
+ PURCHASER(2, "采购商"),
|
|
|
|
|
+ //34PL物流
|
|
|
|
|
+ LOGISTICS34(3, "34PL物流"),
|
|
|
|
|
+ //43PL物流
|
|
|
|
|
+ LOGISTICS43(4, "43PL物流");
|
|
|
|
|
+
|
|
|
|
|
+ private final int code;
|
|
|
|
|
|
|
|
- private String value;
|
|
|
|
|
|
|
+ private final String name;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * @description 构造方法
|
|
|
|
|
- * @author zk
|
|
|
|
|
- * @date 2020/6/08 11:28
|
|
|
|
|
- * @param value 键 name 值
|
|
|
|
|
- * @return
|
|
|
|
|
- **/
|
|
|
|
|
- private EntTypeEnum(String name, String value){
|
|
|
|
|
|
|
+ EntTypeEnum(int code, String name){
|
|
|
|
|
+ this.code = code;
|
|
|
this.name = name;
|
|
this.name = name;
|
|
|
- this.value = value;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static String getNameByValue(String value) {
|
|
|
|
|
- for (EntTypeEnum entityEnum : EntTypeEnum.values()) {
|
|
|
|
|
- if (entityEnum.getValue() == value) {
|
|
|
|
|
- return entityEnum.getName();
|
|
|
|
|
|
|
+ public static EntTypeEnum getName(int code) {
|
|
|
|
|
+ for (EntTypeEnum entTypeEnum : values()) {
|
|
|
|
|
+ if (entTypeEnum.getCode() == code) {
|
|
|
|
|
+ return entTypeEnum;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- public String getName() {
|
|
|
|
|
- return name;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public void setName(String name) {
|
|
|
|
|
- this.name = name;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public String getValue() {
|
|
|
|
|
- return value;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public void setValue(String value) {
|
|
|
|
|
- this.value = value;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|