package com.goafanti.common.enums;

import java.util.HashMap;
import java.util.Map;

public enum OrgActivityCostFields {
	
	UID("uid", "用户id"),
	ACTIVITYNUMBER("activityNumber", "研发活动编号"),
	INTERNALLABORCOST("internalLaborCost", "内部人员人工费用（万元）"),
	INTERNALDIRECTCOST("internalDirectCost", "内部直接投入费用（万元）"),
	INTERNALDEPRECIATIONCOST("internalDepreciationCost", "内部折旧费用与长期待摊费用（万元）"),
	INTERNALAMORTIZATIONCOST("internalAmortizationCost", "内部无形资产摊销费用（万元）"),
	INTERNALDESIGNCOST("internalDesignCost", "内部设计费用(万元)"),
	INTERNALEQUIPMENTCOST("internalEquipmentCost", "内部装备调试费用与实验费用（万元）"),
	INTERNALOTHERCOST("internalOtherCost", "内部其他费用(万元)"),
	EXTERNALTOTALCOST("externalTotalCost", "委托外部研究开发总费用(万元)"),
	EXTERNALABROADCOST("externalAbroadCost", "委托外部境内的外部研发费用（万元）"),
	ENTERPRISEFILLER("enterpriseFiller", "企业填报人"),
	SIGNDATE("signDate", "企业填报人签字日期"),
	SORTNUMBER("sortNumber", "排序号"),
	ACCOUNTURL("accountUrl", "台帐URL)"),
	
	OTHER("", "未知参数");
	
	private String	code;
	private String	desc;
	
	private static Map<String, OrgActivityCostFields> status = new HashMap<String, OrgActivityCostFields>();
	
	private OrgActivityCostFields(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	static {
		for (OrgActivityCostFields value : OrgActivityCostFields.values()) {
			status.put(value.getCode(), value);
		}
	}
	
	public static OrgActivityCostFields getField(String code) {
		if (containsType(code)) {
			return status.get(code);
		}
		return OTHER;
	}
	
	public static String getFieldDesc(String code) {
		return getField(code).getDesc();
	}

	public static boolean containsType(String code) {
		return status.containsKey(code);
	}
	
	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}


}
