package com.yeejoin.amos.boot.module.ugp.api.Enum;

import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;

@Getter
@AllArgsConstructor
public enum OrgEnum {
    公司("COMPANY", "244", "公司",1,"studio_normalapp_4403119",""),
    部门("DEPARTMENT", "245", "部门",2,"studio_normalapp_4403119",""),
    普通人员("PERSON", "246", "普通人员",3,"studio_normalapp_4403119",""),
    焊工("WELDER","247","焊工",3,"studio_normalapp_4403119",""),
    管理员("USER","945","管理员",3,"ddd",""),
    建设单位负责人("CHARGE","254","建设单位负责人",3,"studio_normalapp_4403119",""),
    企业管理员("ADMIN","248","企业管理员",3,"studio_normalapp_4403119",""),
    建设单位("CONSTRUCTION","249","建设单位",1,"studio_normalapp_4403119,studio_normalapp_4461729","1232"),
    安装单位("INSTALL","250","安装单位",1,"studio_normalapp_4403119,studio_normalapp_4461729","1234"),
    设计单位("DESIGN","251","设计单位",1,"studio_normalapp_4403119,studio_normalapp_4461729","1235"),
    监察部门("SUPERVISION","252","监察部门",1,"studio_normalapp_4403119,studio_normalapp_4461729",""),
    监检机构("MONITORING","253","监检机构",1,"studio_normalapp_4403119,studio_normalapp_4461729","1233"),
    监理单位("SUPERVISOR","254","监理单位",1,"","1237");

    private String key;
    private String code;
    private String name;
    /**
     * 1 公司 2 部门 3 人员
     */
    private Integer type;
    private String appCode;
    /**
     * tzs服务字典对应code
     */
    private String dictionaryCode;

    public static HashMap<String,String>  map= new HashMap();
    public static HashMap<String, String> codeMap = new HashMap();
    public static HashMap<String, String> dictionaryCodeMap = new HashMap();

    static {
        for(OrgEnum orgPersonEnum:OrgEnum.values()){
            map.put(orgPersonEnum.getKey(),orgPersonEnum.getName());
            codeMap.put(orgPersonEnum.getKey(),orgPersonEnum.getAppCode());
            dictionaryCodeMap.put(orgPersonEnum.getDictionaryCode(),orgPersonEnum.getKey());
        }
    }
}
