package com.bcxin.risk.report.enums;

import java.util.ArrayList;
import java.util.List;

public enum City {

	GUOWUYUAN{
		public String getValue(){return "0";}
		public String getName(){return "国务院";}
	},
	BEIJING{
		public String getValue(){return "1";}
		public String getName(){return "北京市";}
	},
	ANHUI{
		public String getValue(){return "2";}
		public String getName(){return "安徽省";}
	},
	XIAMEN{
		public String getValue(){return "3";}
		public String getName(){return "福建省";}
	},GUANGDONG{
		public String getValue(){return "4";}
		public String getName(){return "广东省";}
	},HEBEI{
		public String getValue(){return "5";}
		public String getName(){return "河北省";}
	},HUBEI{
		public String getValue(){return "6";}
		public String getName(){return "湖北省";}
	},JIANGSU{
		public String getValue(){return "7";}
		public String getName(){return "江苏省";}
	},JIANGXI{
		public String getValue(){return "8";}
		public String getName(){return "江西省";}
	},SHANXI{
		public String getValue(){return "9";}
		public String getName(){return "山西省";}
	},SANXI{
		public String getValue(){return "10";}
		public String getName(){return "陕西省";}
	},SHANGHAI{
		public String getValue(){return "11";}
		public String getName(){return "上海市";}
	},SHENZHEN{
		public String getValue(){return "12";}
		public String getName(){return "深圳市";}
	},SICHUANG{
		public String getValue(){return "13";}
		public String getName(){return "四川省";}
	},TIANJIN{
		public String getValue(){return "14";}
		public String getName(){return "天津市";}
	},ZHENGJIA{
		public String getValue(){return "15";}
		public String getName(){return "浙江省";}
	},CHONGQING{
		public String getValue(){return "16";}
		public String getName(){return "重庆市";}
	};
	
	public abstract String getValue();
	public abstract String getName();
	
	public static City convert(String value){
    	if ( "GUOWUYUAN".equals(value) ) {
    		return City.GUOWUYUAN;
    	} else if ("BEIJING".equals(value)) {
    		return City.BEIJING;
    	}else if ("ANHUI".equals(value)) {
    		return City.ANHUI;
    	}else if ("XIAMEN".equals(value)) {
    		return City.XIAMEN;
    	}
    	return null;
    }
    
    public static City convertValue(String value){
    	if ( "0"==value ) {
    		return City.GUOWUYUAN;
    	}else if ( "1"==value ) {
    		return City.BEIJING;
    	} else if ("2"==value ) {
    		return City.ANHUI;
    	}else if ("3"==value ) {
    		return City.XIAMEN;
    	}
    	return null;
    }
    public static List<City> list(){
    	List<City> list = new ArrayList<City>();
    	//list.add(City.GUOWUYUAN);
      	list.add(City.BEIJING);
    	list.add(City.ANHUI);
      	list.add(City.XIAMEN);  
      	list.add(City.HEBEI);
      	list.add(City.CHONGQING);
      	list.add(City.GUANGDONG);
      	list.add(City.HUBEI);
      	list.add(City.JIANGSU);
      	list.add(City.JIANGXI);
      	list.add(City.SANXI);
      	list.add(City.SHANGHAI);
      	list.add(City.SHANXI);
      	list.add(City.SHENZHEN);
      	list.add(City.SICHUANG);
      	list.add(City.TIANJIN);
      	list.add(City.ZHENGJIA);
  
    	return list;
    }
}
