CSDN博客

img flyying

TradeConstant行业代码转换

发表于2004/10/18 11:28:00  1707人阅读

分类: struts

package jsswt.until;

import java.util.Vector;
import java.util.HashMap;
import java.io.File;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.FileOutputStream;

public class TradeConstant extends Constants {
  private static String[] array2 ={"农业","种植业","其他农业","育苗业","砍伐业", "林业"  ,    "畜牧业" ,"牲畜饲养放牧业","家禽饲养业","狩猎业","其他畜牧业","渔业" ,"海洋渔业","淡水渔业","农、林、牧、渔服务业","农业服务业","林业服务业","畜牧兽医服务业","渔业服务业","其他农、林、牧、渔服务业","煤炭采选业","煤炭开采业","煤炭洗选业", "石油和天然气开采业","天然原油开采业","天然气开采业","油页岩开采业","黑色金属矿采选业","铁矿采选业","其他黑色金属矿采选业", "有色金属矿采选业","重有色金属矿采选业","轻有色金属矿采选业","贵金属矿采选业","稀有稀土金属矿采选业", "非金属矿采选业","土砂石开采业","化学矿采选业","采盐业","其他非金属矿采选业","其他矿采选业","木材及竹材采运业","木材采运业","竹材采运业","食品加工业","粮食及饲料加工业","植物油加工业","制糖业","屠宰及肉类蛋类加工业","水产品加工业","盐加工业","其他食品加工业","食品制造业","糕点、糖果制造业","乳制品制造业","罐头食品制造业","发酵制品业","调味品制造业","其他食品制造业","饮料制造业","酒精及饮料酒制造业","软饮料制造业","制茶业","其他饮料制造业","烟草加工业","烟叶复烤业","卷烟制造业","其他烟草加工业","纺织业","纤维原料初步加工业","棉纺织业","毛纺织业","麻纺织业","丝绢纺织业","针织品业","其他纺织业","服装及其他纤维制品制造业","服装制造业","制帽业","制鞋业","其他纤维制品制造业","皮革、毛皮、羽绒及其制品业","制革业","皮革制品制造业","毛皮鞣制及制品业","羽毛(绒)及制品业","木材加工及竹、藤、棕、草制品业","锯材、木片加工业","人造板制造业","木制品业","竹、藤、棕、草制品业","家具制造业","木制家具制造业","竹、藤家具制造业","金属家具制造业","塑料家具制造业","其他家具制造业","造纸及纸制品业","纸浆制造业","造纸业","纸制品业","印刷业, 记录媒介的复制","印刷业","记录媒介的复制","文教体育用品制造业","文化用品制造业","体育用品制造业","乐器及其他文娱用品制造","玩具制造业","游艺器材制造业","其他类未包括的文教体育用品制造","石油加工及炼焦业","人造原油生产业","原油加工业","石油制品业","炼焦业","化学原料及化学制品制造业","基本化学原料制造业","化学肥料制造业","化学农药制造业","有机化学产品制造业","合成材料制造业","专用化学产品","日用化学产品制造业",       "医药制造业","化学药品原药制造业","化学药品制剂制造业","中药材及中成药加工业","动物药品制造业","生物制品业","化学纤维制造业","纤维素纤维制造业","合成纤维制造业","渔具及渔具材料制造业","橡胶制品业","轮胎制造业","力车胎制造业","橡胶板、管、带制造业","橡胶零件制品业","再生橡胶制造业","橡胶靴鞋制造业","日用橡胶制品业","橡胶制品翻修业","其他橡胶制品业","塑料制品业","塑料薄膜制造业","塑料板、管、棒材制造业","塑料丝、绳及编织品制造业","泡沫塑料及人造革、合成革制造业","塑料包装箱及容器制造业","塑料鞋制造业","日用塑料杂品制造业","塑料零件制造业","其他塑料制品业","非金属矿物制品业","水泥制造业","水泥制品和石棉水泥制品业","砖瓦、石灰和轻质建筑材料制造业","玻璃及玻璃制品业","陶瓷制品业","耐火材料制品业","石墨及碳素制品业","矿物纤维及其制品业","其他类未包括的非金属矿物制品业","黑色金属冶炼及压延加工业","炼铁业","炼钢业","钢压延加工业","铁合金冶炼业","有色金属冶炼及压延加工业","重有色金属冶炼业","轻有色金属冶炼业","贵金属冶炼业","稀有稀土金属冶炼业","有色金属合金业","有色金属压延加工业","金属制品业","金属结构制造业","铸铁管制造业","工具制造业","集装箱和金属包装物品制造业","金属丝绳及其制品业","建筑用金属制品业","金属表面处理及热处理业","日用金属制品业","其他金属制品业","普通机械制造业","锅炉及原动机制造业","金属加工机械制造业","通用设备制造业","轴承、阀门制造业","其他通用零部件制造业","铸锻件制造业","普通机械修理业","其他普通机械制造业","专用设备制造业","冶金、矿山、机电工业专用设备制","石化及其他工业专用设备制造业","轻纺工业专用设备制造业","农、林、牧、渔、水利业机械制造","医疗器械制造业","其他专用设备制造业","专用机械设备修理业","交通运输设备制造业","铁路运输设备制造业","汽车制造业","摩托车制造业","自行车制造业","电车制造业","船舶制造业","航空航天器制造业","交通运输设备修理业","其他交通运输设备制造业","武器弹药制造业","电气机械及器材制造业","电机制造业","输配电及控制设备制造业","电工器材制造业","日用电器制造业","照明器具制造业","电气机械修理业","其他电气机械制造业","电子及通信设备制造业","通信设备制造业","雷达制造业","广播电视设备制造业","电子计算机制造业","电子器件制造业","电子元件制造业","日用电子器具制造业","电子设备及通信设备修理业","其他电子设备制造业","仪器仪表及文化、办公用机械制造业","通用仪器仪表制造业","专用仪器仪表制造业","电子测量仪器制造业","计量器具制造业","文化、办公用机械制造业","钟表制造业","仪器仪表及文化、办公用机械修理","其他仪器仪表制造业","其他制造业","工艺美术品制造业","日用杂品制造业","其他生产、生活用品制造业", "电力、蒸汽、热水的生产和供应业","电力生产业","电力供应业","蒸汽、热水生产和供应业","煤气生产和供应业","煤气生产业","煤气供应业","自来水的生产和供应业","自来水生产业","自来水供应业","土木工程建筑业","房屋建筑业","矿山建筑业","铁路、公路、遂道、桥梁建筑业","堤坝、电站、码头建筑业","其他土木工程建筑业","线路、管道和设备安装业","线路、管道安装业","设备安装业","装修装饰业","地质勘查业","区域地质勘查业","海洋地质勘查业","矿产地质勘查业","工程地质勘查业","环境地质勘查业","地球物理和地球化学勘查业","地质工程技术及其他技术服务业","水利管理业","铁路运输业","公路运输业","汽车运输业","其他公路运输业","管道运输业","水上运输业","远洋运输业","沿海运输业","内河、内湖运输业","其他水上运输业","航空运输业","航空客货运输业","通用航空业","交通运输辅助业","公路管理及养护业","港口业","水运辅助业","机场及航空运输辅助业","装卸搬运业","其他类未包括的交通运输辅助业","其他交通运输业","仓储业", "邮电通信业","邮政业","电信业","邮电业","食品、饮料、烟草和家庭用品批发业", " 食品、饮料、烟草批发业"," 棉、麻、土畜产品批发业","纺织品、服装和鞋帽批发业","日用百货批发业","日用杂品批发业","五金、交电、化工批发业","药品及医疗器械批发业","能源、材料和机械电子设备批发业","能源批发业","化工材料批发业","木材批发业","建筑材料批发业"," 矿产品批发业","金属材料批发业","机械、电子设备批发业","汽车、摩托车及零配件批发业","再生物资回收批发业","其他批发业","工艺美术品批发业"," 图书报刊批发业","农业生产资料批发业","其他类未包括的批发业","零售业","食品、饮料和烟草零售业"," 日用百货零售业","纺织品、服装和鞋帽零售业","日用杂品零售业","五金、交电、化工零售业","药品及医疗器械零售业","图书报刊零售业","其他零售业","商业经纪与代理业","餐饮业","正餐"," 快餐","其他餐饮业","金融业","中央银行","商业银行","其他银行","信用合作社","信托投资业"," 证券经纪与交易业","其他非银行金融业", "保险业","房地产开发与经营业","房地产管理业","房地产代理与经纪业","公共服务业"," 市内公共交通业","园林绿化业","自然保护区管理业","环境卫生业","市政工程管理业","风景名胜区管理业","其他公共服务业","居民服务业","理发及美容化妆业","沐浴业","洗染业","摄影及扩印业"," 托儿所","日用品修理业"," 家务服务业","殡葬业","其他居民服务业","旅馆业","租赁服务业","旅游业","娱乐服务业","信息、咨询服务业","广告业","咨询服务业","其他类未包括的信息咨询服务业", "计算机应用服务业", "软件开发咨询业", "数据处理业", "数据库服务业", "计算机设备维护咨询业", "其他社会服务业","市场管理服务业","其他类未包括的社会服务业", "卫生 ","医院","疗养院","专科防治所(站)","卫生防疫站","妇幼保健所(站)","药品检验所(室)","其他卫生","体育","社会福利保障业","社会福利业","社会保险和救济业","其他类未包括的社会福利保障业","教育","高等教育","中等教育","初等教育","学前教育"," 特殊教育","其他教育", "文化艺术业","艺术","出版","文物保护","图书馆","档案馆","群众文化","新闻","文化艺术经纪与代理业","其他文化艺术业","广播电影电视业","广播","电影","电视","科学研究业","自然科学研究","社会科学研究","其他科学研究","综合技术服务业","气象","地震","测绘","技术监督","海洋环境","环境保护","技术推广和科技交流服务业","工程设计业","其他综合技术服务业", "国家机关","政党机关" ,"社会团体","基层群众自治组织","居民委员会","村民委员会","其他行业","企业管理机构","其他类未包括的行业"};
   private static String[] str2 ={"0100" ,  "0110", "0190", "0120", "0130", "0200" ,      "0300" ,"0310",          "0320",   "0330",     "0390", "0400",  "0410",   "0420",       "0500",            "0510" ,  "0520"   ,"0530",         "0540" ,     "0590",                "0600","0610",       "0620",        "0700",          "0710",      "0720",            "0730",    "0800",      "0810",      "0820",                  "0900",         "0910",         "0930",            "0950",        "0960",            "1000",             "1010", "1020",     "1030",      "1090",             "1100",          "1200",   "1210" , "1220"  ,     "1300" ,  "1310" ,         "1320",      "1330",     "1340",          "1350",      "1360",       "1390",     "1400",   "1410",          "1420" ,    "1430",        "1440",      "1450",      "1490" ,       "1500" ,    "1510",           "1520" ,    "1550", "1590",           "1600",      "1610",    "1620",      "1690",    "1700",    "1710",         "1720", "1740",   "1760",      "1770",  "1780",       "1790",       "1800",              "1810", "1820","1830",  "1890",             "1900",                "1910",      "1920",         "1930",          "1950",        "2000",                     "2010",            "2020",     "2030","2040",                  "2100",    "2110",        "2120",             "2130",      "2140",          "2190",        "2200",    "2210",   "2220",  "2230",               "2300", "2310",    "2320",          "2400",           "2410",        "2420",          "2430",           "2440",      "2450",                "2490",              "2500",            "2510",    "2520",    "2530",  "2570",    "2600",                   "2610",              "2620",       "2630",         "2650",         "2660",   "2670",       "2680",                  "2700",            "2710",         "2720",          "2730",         "2740",         "2750",       "2800",      "2810",           "2820",         "2850",          "2900",     "2910",         "2920",    "2930",            "2940",           "2950",         "2960",    "2970",           "2980",          "2990", "3000",         "3010",        "3020",               "3030",               "3040",                    "3050",                 "3060",    "3070",           "3080",            "3090",      "3100",           "3110",               "3120",           "3130",                    "3140",       "3150","3160",         "3170",           "3180",          "3190",                         "3200",              "3210", "3220",      "3240", "3260",         "3300",                  "3310",          "3320",     "3330",         "3340",         "3360",         "3380",             "3400",      "3410",        "3420","3430",        "3440",                  "3450",             "3460",          "3470",                "3480",         "3490",      "3500",          "3510",             "3520",          "3530",       "3540",         "3560",              "3570",       "3580",  "3590",              "3600",             "3610",                    "3620",                   "3630",                "3640",                  "3650",           "3670",             "3680",         "3700",                "3710",    "3720",     "3730",        "3740",      "3750",      "3760",        "3770",        "3780",          "3790",                 "3900",            "4000",      "4010",      "4020",               "4040",         "4060",     "4070",       "4080",        "4090",          "4100",               "4110",         "4120",       "4130",              "4140",       "4150",        "4160",         "4170",         "4180",                  "4190",           "4200",                    "4210",              "4220",           "4230",         "4240",         "4250",               "4260",               "4280",              "4290",         "4300",          "4310",        "4350",      "4390",                  "4400",                   "4410",     "4420",     "4430",             "4500",           "4510",      "4520",    "4600",           "4610",          "4620",        "4700",     "4710",    "4720",      "4730",                "4740",                 "4790",          "4800",                "4810",          "4820" ,"4900",          "5000",    "5010",     "5020",          "5030",         "5040",        "5050",        "5060",             "5090",                       "5100",     "5200",   "5300",      "5310",      "5390", "5400",          "5500",  "5510",   "5520",     "5530" ,           "5590",         "5600",    "5610",         "5620","5700",            "5710",       "5720",     "5730",  "5740",           "5750",    "5790",                          "5800",   "5900",     "6000",  "6010",  "6020","6030",           "6100",                          "6110",               "6120",              "6130",             "6140",        "6150", "6160",                    "6170",              "6200",                 "6210",            "6220", "6230",           "6240",      "6250",      "6260",          "6270",             "6280",              "6290",              "6300",    "6310",        "6320",             "6330",       "6390",             "6400",    "6410",               "6420",           "6430",                 "6440",          "6450",              "6470",             "6480",    "6490",          "6500",  "6700", "6710", "6720",  "6790",  "6800",  "6810",   "6820",  "6830","6840",        "6850",    "6860",          "6870",          "7000",          "7200",        "7300",      "7400",           "7500",     "7510",         "7520",  "7530",           "7540","7550",          "7560",        "7590",             "7600",        "7610",  "7620",   "7630", "7640",     "7650",    "7660",    "7670",      "7680",     "7690",   "7800",     "7900",  "8000",     "8100",    "8200",     "8210",     "8220",    "8290",                      "8300",            "8310",       "8320",       "8330",      "8340",               "8400",            "8410",         "8490",        "8500", "8510","8520","8530 ",           "8540",   "8550",         "8560",        "8590", "8600","8700",            "8710",      "8720",     "8790",                  "8900",    "8910","8920",    "8930",    "8940",  "8950",  "8990",      "9000",  "9010","9020","9030",   "9040", "9050","9060",  "9070",     "9080",          "9090",        "9100",       "9110","9120", "9130", "9200", "9210",        "9220",          "9230",       "9300",  "9310","9320","9330","9340", "9350",    "9360",       "9370",                "9380",       "9390",       "9400","9500",        "9600",  "9700",        "9710",       "9720",    "9900",     "9910",       "9990"};


 public TradeConstant() {}// 构造 //"1400","1410","1420" , "1430","1440","1450","1490" ,

 public static void main(String[] args) {
 System.out.println("fffff/n" + getTradeCode("家禽饲养业"));
 System.out.println("");


}
 public static String getTradeCode(String tradeName) {
   String retTradeCode = "";
  for (int i = 0; i < array2.length; i++) {
    if (tradeName.equals(array2[i])) {
      retTradeCode = str2[i];
    }
  }
  return retTradeCode;

 }
 public static String getTradeName(String tradeCode){
   String retTradeName="";
   for(int i=0;i<str2.length;i++){
     if(tradeCode.equals(str2[i])){
       retTradeName=array2[i];
     }
   }
   return retTradeName;
 }
 public static String getTrade (int tradeNumber,String trade){
   switch(tradeNumber){
     case 1:
       trade = "农、林、牧渔业"+"-"+"农业";
       break;
     case 2:
       trade="农、林、牧渔业"+"-"+"林业";
       break;
     case 3:
       trade="农、林、牧渔业"+"-"+"畜牧业";
       break;

     case 4:
        trade="农、林、牧渔业"+"-"+"渔业";
        break;
     case 5:
        trade="农、林、牧渔业"+"-"+"农、林、牧、渔服务业";
        break;

      case 6:
        trade="采掘业"+"-"+"煤炭采选业";
        break;

      case 7:
        trade="采掘业"+"-"+"石油和天然气开采业";
        break;

      case 8:
        trade="采掘业"+"-"+"黑色金属矿采选业";
        break;

      case 9:
        trade="采掘业"+"-"+"有色金属矿采选业";
        break;

      case 10:
        trade="采掘业"+"-"+"非金属矿采选业";
        break;

      case 11:
        trade="采掘业"+"-"+"其他矿采选业";
        break;

      case 12:
        trade="采掘业"+"-"+"木材及竹材采运业";
        break;

      case 13:
        trade="制造业"+"-"+"食品加工业";
        break;

      case 14:
        trade="制造业"+"-"+"食品制造业";
        break;

      case 15:
        trade="制造业"+"-"+"饮料制造业";
        break;
      case 16:
        trade="制造业"+"-"+"烟草加工业";
        break;

      case 17:
         trade="制造业"+"-"+"纺织业";
         break;

      case 18:
          trade="制造业"+"-"+"服装及其他纤维制品制造业";
          break;
      case 19:
          trade="制造业"+"-"+"皮革、毛皮、羽绒及其制品业";
          break;

      case 20:
         trade="制造业"+"-"+"木材加工及竹、藤、棕、草制品业";
         break;

      case 21:
          trade="制造业"+"-"+"家具制造业";
          break;

      case 22:
        trade="制造业"+"-"+"造纸及纸制品业";
        break;

      case 23:
        trade="制造业"+"-"+"印刷业, 记录媒介的复制";
        break;

      case 24:
             trade="制造业"+"-"+"文教体育用品制造业";
             break;

      case 25:
        trade="制造业"+"-"+"石油加工及炼焦业";
        break;

      case 26:
        trade="制造业"+"-"+"化学原料及化学制品制造业";
        break;

      case 27:
        trade="制造业"+"-"+"医药制造业";
        break;

      case 28:
        trade="制造业"+"-"+"化学纤维制造业";
        break;

      case 29:
        trade="制造业"+"-"+"橡胶制品业";
        break;
      case 30:
        trade="制造业"+"-"+"塑料制品业";
        break;

      case 31:
           trade="制造业"+"-"+"非金属矿物制品业";
           break;

      case 32:
           trade="制造业"+"-"+"黑色金属冶炼及压延加工业";
           break;

      case 33:
          trade="制造业"+"-"+"有色金属冶炼及压延加工业";
        break;

      case 34:
          trade="制造业"+"-"+"金属制品业";
          break;
      case 35:
        trade="制造业"+"-"+"普通机械制造业";
        break;

      case 36:
        trade="制造业"+"-"+"专用设备制造业";
        break;

      case 37:
        trade="制造业"+"-"+"交通运输设备制造业";
        break;

      case 38:
        trade="制造业"+"-"+"食品加工业";
        break;
      case 39:
        trade="制造业"+"-"+"武器弹药制造业";
        break;

      case 40:
        trade="制造业"+"-"+"电气机械及器材制造业";
        break;
      case 41:
        trade="制造业"+"-"+"电子及通信设备制造业";
        break;

      case 42:
        trade="制造业"+"-"+"仪器仪表及文化、办公用机械制造业";
        break;

      case 43:
        trade="制造业"+"-"+"其他制造业";
        break;

      case 44:
        trade="电力、蒸汽及水的生产和供应业"+"-"+"电力、蒸汽、热水的生产和供应业";
        break;

      case 45:
        trade="电力、蒸汽及水的生产和供应业"+"-"+"煤气生产和供应业";
        break;
      case 46:
        trade="电力、蒸汽及水的生产和供应业"+"-"+"自来水的生产和供应业";
        break;

      case 47:
        trade="建筑业"+"-"+"土木工程建筑业";
        break;

      case 48:
        trade="建筑业"+"-"+"线路、管道和设备安装业";
        break;

      case 49:
        trade="建筑业"+"-"+"装修装饰业";
        break;
      case 50:
        trade = "地质勘探业、水利管理业"+"-"+"地质勘查业";
        break;
      case 51:
        trade= "地质勘探业、水利管理业"+"-"+"水利管理业";
        break;
     case 52:
        trade="交通运输、仓储及邮电通信业"+"-"+"铁路运输业";
        break;

     case 53:
        trade="交通运输、仓储及邮电通信业"+"-"+"公路运输业";
        break;
          case 54:
             trade="交通运输、仓储及邮电通信业"+"-"+"管道运输业";
             break;

           case 55:
             trade="交通运输、仓储及邮电通信业"+"-"+"水上运输业";
             break;

           case 56:
             trade="交通运输、仓储及邮电通信业"+"-"+"航空运输业";
             break;

           case 57:
             trade="交通运输、仓储及邮电通信业"+"-"+"交通运输辅助业";
             break;

           case 58:
             trade="交通运输、仓储及邮电通信业"+"-"+"其他交通运输业";
             break;

           case 59:
             trade="交通运输、仓储及邮电通信业"+"-"+"仓储业";
             break;

           case 60:
             trade="交通运输、仓储及邮电通信业"+"-"+"邮电通信业";
             break;

           case 61:
             trade="批发和零售贸易、餐饮业"+"-"+"食品、饮料、烟草和家庭用品批发业";
             break;

           case 62:
             trade="批发和零售贸易、餐饮业"+"-"+"能源、材料和机械电子设备批发业";
             break;

           case 63:
             trade="批发和零售贸易、餐饮业"+"-"+"其他批发业";
             break;

           case 64:
             trade="批发和零售贸易、餐饮业"+"-"+"零售业";
             break;
           case 65:
             trade="批发和零售贸易、餐饮业"+"-"+"商业经纪与代理业";
             break;

           case 67:
               trade="批发和零售贸易、餐饮业"+"-"+"餐饮业";
               break;
           case 68:
               trade="金融保险业"+"-"+"金融业";
               break;

           case 70:
               trade="金融保险业"+"-"+"保险业";
               break;


           case 72:
                 trade="房地产业"+"-"+"房地产开发与经营业";
                 break;

           case 73:
                  trade="房地产业"+"-"+"房地产管理业";
                  break;

           case 74:
                   trade="房地产业"+"-"+"房地产代理与经纪业";
                   break;

           case 75:
                    trade="社会服务业"+"-"+"公共服务业";
                    break;

           case 76:
                     trade="社会服务业"+"-"+"居民服务业";
                     break;

           case 78:
                       trade="社会服务业"+"-"+"旅馆业";
                       break;
           case 79:
                  trade="社会服务业"+"-"+"租赁服务业";
                  break;

           case 80:
                trade="社会服务业"+"-"+"旅游业";
                break;

           case 81:
                trade="社会服务业"+"-"+"娱乐服务业";
                break;

           case 82:
               trade="社会服务业"+"-"+"信息、咨询服务业";
             break;

           case 83:
               trade="社会服务业"+"-"+"计算机应用服务业";
               break;
           case 84:
             trade="社会服务业"+"-"+"其他社会服务业";
             break;

           case 85:
             trade="卫生、体育和社会福利业"+"-"+"卫生";
             break;

           case 86:
             trade="卫生、体育和社会福利业"+"-"+"体育";
             break;

           case 87:
             trade="卫生、体育和社会福利业"+"-"+"社会福利保障业";
             break;

           case 89:
             trade="教育、文化艺术及广播电影电视业"+"-"+"教育";
             break;
           case 90:
             trade="教育、文化艺术及广播电影电视业"+"-"+"文化艺术业";
             break;

           case 91:
             trade="教育、文化艺术及广播电影电视业"+"-"+"广播电影电视业";
             break;

           case 92:
             trade="科学研究和综合技术服务业"+"-"+"科学研究业";
             break;

           case 93:
             trade="科学研究和综合技术服务业"+"-"+"综合技术服务业";
             break;

           case 94:
             trade="国家机关、政党机关和社会团体"+"-"+"国家机关";
             break;
           case 95:
             trade="国家机关、政党机关和社会团体"+"-"+"政党机关";
             break;

           case 96:
             trade="国家机关、政党机关和社会团体"+"-"+"社会团体";
             break;

           case 97:
             trade="国家机关、政党机关和社会团体"+"-"+"基层群众自治组织";
             break;


          case 99:
          trade="其他行业"+"-"+"其他行业";
          break;
   }
   return trade;
 }


}

阅读全文
0 0

相关文章推荐

img
取 消
img