package com.unis.crk.basic.entity.Enum;

/**
 * 编码规则，规则类型.
* <p>Title: CodeRuleType</p>
* <p>Description: </p>
* @author yaoyabin
* @date 2017年12月15日 下午5:06:15
 */
public enum CodeRuleType {
    plan("计划申请", "plan", 5467),
    contract("合同申请", "contract", 5468),
    contractChange("合同变更申请", "contractChange", 5468),
    storageNotice("入库通知单申请", "storageNotice", 5469),
    deliveryNotice("出库通知单申请", "deliveryNotice", 5470),
    acceptance("验收申请", "acceptance", 6992),

    customer("客户管理", "customer", 6891),
    
    fumigationProgram("熏蒸方案申请", "fumigationProgram", 6881),
    storageAeration("通风作业申请", "storageAeration", 6882),
    areationPlan("通风计划申请", "areationPlan", 6990),
    drugInfo("药剂信息维护", "drugInfo", 6883),
    drugPurchase("药剂采购申请", "drugPurchase", 6884),
    drugUseApply("药剂领用申请", "drugUseApply", 6886),
    drugCheck("药剂盘点", "drugCheck", 6885),
	transferNotice("中转入站通知单申请", "transferNotice", 6914),
	lading("提货单申请", "lading", 6915),
	busineNo("倒仓申请单号", "busineNo", 6993),
	workNo("倒仓作业单号", "workNo", 6994),
	applyNo("架空期申请单号", "applyNo", 7222);

	

	private String name;
	private String type;
    private Integer enumId;
    
    public String getName() {
        return name;
    }
    public Integer getEnumId() {
        return enumId;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void setEnumId(Integer enumId) {
        this.enumId = enumId;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    private CodeRuleType(String name, String type, Integer enumId) {
        this.name = name;
        this.type = type;
        this.enumId = enumId;
    }
    
    public static Integer getEnumIdByType(String type) {
        Integer enumId = null;
        for(CodeRuleType crt : CodeRuleType.values()) {
            if (crt.getType().equals(type)) {
                enumId = crt.getEnumId();
            }
        }
        return enumId;
    }
	
}
