liurunyu
2023-11-27 478ae07891f64484d8a483e15821ce0bc920606f
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/Org.java
@@ -5,6 +5,9 @@
import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.EnumValue;
import java.util.HashMap;
import java.util.Map;
public enum Org {
    Ym("ym", "元谋"),
@@ -17,6 +20,14 @@
    Org(String tag, String name){
        this.tag = tag ;
        this.name = name ;
    }
    //用来转json
    public static Map<String, String> ObjMap = new HashMap<>();
    static {
        Org[] all = Org.values();
        for (Org one : all) {
            ObjMap.put(one.tag, one.name);
        }
    }
    public String getTag() {
@@ -35,6 +46,8 @@
        }
        return null ;
    }
    @JSONField
    public JSONObject toJson() {
        return JSONObject.of("tag", getTag(), "name", getName());