package com.goafanti.order.enums;

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

/**
 * 订单阶段
 * @author Administrator
 *
 */
public enum OrderChangeProcess {

	YXY(0,"营销员"),
	YXJL(1,"营销经理"),
	YXGLY(2,"营销管理员"),
	JSY(3,"技术员"),
	JSJL(4, "技术经理"),
	JSZJ(5, "技术总监"),
	CWZY(6, "财务专员"),
	CWZJ(7, "财务总监 "),
	YYBZ(8, "运营保障"),
	TPSH(9, "特批审核"),//修改总裁为特殊审核
	DSZ(10, "董事长"),
	FZC(11, "副总裁"),//已经去掉副总裁
	INVALID(99, "无效");

	private OrderChangeProcess(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	private static Map<Integer, OrderChangeProcess> status = new HashMap<Integer, OrderChangeProcess>();

	static {
		for (OrderChangeProcess value : OrderChangeProcess.values()) {
			status.put(value.getCode(), value);
		}
	}
	public static OrderChangeProcess getStatus(Integer code) {
		if (containsType(code)) {
			return status.get(code);
		}
		return INVALID;
	}
	public static boolean containsType(Integer code) {
		return status.containsKey(code);
	}
	private Integer	code;
	private String	desc;
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
}
