1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| package com.javaweb.geo.enums;
|
| import java.util.HashMap;
| import java.util.Map;
|
| public class CityConst {
|
| private static Map<Integer,String> cityMap = new HashMap<Integer, String>();
|
| static{
| cityMap.put(1, "东城区");
| cityMap.put(2, "西城区");
| cityMap.put(5, "朝阳区");
| cityMap.put(6, "丰台区");
| cityMap.put(7, "石景山");
|
| cityMap.put(8, "海淀区");
| cityMap.put(9, "门头沟区");
|
| cityMap.put(10, "房山区");
|
| cityMap.put(11, "通州区");
|
| cityMap.put(12, "顺义区");
|
| cityMap.put(13, "昌平区");
| cityMap.put(14, "大兴区");
| cityMap.put(15, "怀柔区");
| cityMap.put(16, "平谷区");
| cityMap.put(17, "密云县");
| cityMap.put(18, "延庆县");
| cityMap.put(99, "外埠");
|
| }
|
| public static String getCitName(Integer key){
|
| if(key != null && cityMap.containsKey(key)){
| return cityMap.get(key);
| }
| return null;
|
| }
| }
|
|