Skip to content

中国地理位置信息, 银联卡跨行业务地区代码标准,人民共和国县以上行政区划代码。并做了映射,方便使用。

License

Notifications You must be signed in to change notification settings

MisterChangRay/RegionOfChina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RegionOfChina

中国地理位置信息, 银联卡跨行业务地区代码标准,人民共和国县以上行政区划代码。并做了Id映射,方便使用。

最近公司要做一个对接银联支付通道的东西; 在调用接口时需要传入地区代码, 这个代码银联定义了一套, 行政区划码又定义了一套 而我们项目最开始使用的是 行政区划码。 所以产生了此项目。

1. 文件列表解析

  • yinLianDocParser.py

    这是解析 银联卡业务地区代码标准.doc 的python代码。

  • mapping.html

    这是通过地名将 银联地区代码 和 行政地区代码 进行匹配的;匹配后的地名信息里面包含 银联业务代码的 id 和 行政地区代码的 code 是JS脚本写的,需要打开调试窗口查看结果输出

  • sqlGenerator.html

    这是将解析结果生成sql语句的JS脚本 是JS脚本写的,需要打开调试窗口查看结果输出

  • 人民共和国县以上行政区划代码2020.11.json

    这是解析中国行政区划2020.11信息的出来的json;

    前往民政部官网

    GITHUB中华人民共和国行政区划代码

    数据格式如下:

    {
        code: "12", // 行政区划 code
        name: "天津市",  // 行政区划 name
    }
  • 银联卡跨行业务地区代码标准2018.3.json

    这是解析银联卡跨行业务地区代码标准(2018年3月版).doc得出来的数据

    前往银联官网

    数据格式如下:

    {
        childs: [], 
        id: "1100", // 银联地区代码的 id
        name: "天津市",  // 银联地区代码的名称
        pid: "-1",
        pname: "全国"
    }
  • 银联卡地区代码-行政代码映射.json

    这是将银行的地名数据和行政代码地名数据匹配后的json. 值得注意的是,由于此json使用银联卡去匹配行政区域代码,所以匹配的结果将会可能出现以下情况:

    • 两个名称不匹配的情况,原因是银联地区码匹配到的行政区域名称可能已经改名或者从从县升到市(共有3个)
    • 某些地名行政区域已经撤销,则将code绑定到上级,比如县级撤销了则绑定到市下面(共有10个)
    • 某些新增的行政区域,则将code绑定到上级,比如县级撤销了则绑定到市下面(共有13个)

    数据格式如下: 示例:

    {
        childs: [], 
        code: "12", // 行政区划代码里面的 code
        codeName: "天津市",  // 行政区划代码里面的 name
        id: "1100", // 银联地区代码的 id
        name: "天津市",  // 银联地区代码的名称
        pid: "-1",
        pname: "全国"
    }
    

2. 其他事项

无,已经手工核对相关数据信息, 如果数据有问题,欢迎修正。

两份文件由于具有一定时差, 部分地名就存在变更造成无法匹配的现象。

如果使用,记得兼容一下这个问题。

统计了下, 总共有 106 条银行地名数据未匹配到行政区编码,

未匹配到的所有数据列表:

[{"id":"1243","name":"滦县","childs":[],"pid":"1240","pname":"唐山市"},{"id":"1311","name":"邢台县","childs":[],"pid":"1310","pname":"邢台市"},{"id":"1327","name":"任县","childs":[],"pid":"1310","pname":"邢台市"},{"id":"1328","name":"南和县","childs":[],"pid":"1310","pname":"邢台市"},{"id":"1343","name":"新市区","childs":[],"pid":"1340","pname":"保定市"},{"id":"1638","name":"南郊区","childs":[],"pid":"1620","pname":"大同市"},{"id":"1639","name":"大同县","childs":[],"pid":"1620","pname":"大同市"},{"id":"1661","name":"长治县","childs":[],"pid":"1660","pname":"长治市"},{"id":"1662","name":"潞城市","childs":[],"pid":"1660","pname":"长治市"},{"id":"1664","name":"屯留县","childs":[],"pid":"1660","pname":"长治市"},{"id":"1694","name":"怀仁县","childs":[],"pid":"1690","pname":"朔州市"},{"id":"1757","name":"太谷县","childs":[],"pid":"1750","pname":"晋中市"},{"id":"1917","name":"如意开发区","childs":[],"pid":"1910","pname":"呼和浩特市"},{"id":"2230","name":"鞍山","pid":"2200","pname":"辽宁省","childs":[{"id":"2231","name":"台安县","childs":[],"pid":"2230","pname":"鞍山","code":"210321"},{"id":"2232","name":"海城市","childs":[],"pid":"2230","pname":"鞍山","code":"210381"},{"id":"2233","name":"岫岩满族自治县","childs":[],"pid":"2230","pname":"鞍山","code":"210323"},{"id":"2234","name":"铁东区","childs":[],"pid":"2230","pname":"鞍山","code":"210302"},{"id":"2235","name":"铁西区","childs":[],"pid":"2230","pname":"鞍山","code":"210106"},{"id":"2236","name":"立山区","childs":[],"pid":"2230","pname":"鞍山","code":"210304"},{"id":"2237","name":"千山区","childs":[],"pid":"2230","pname":"鞍山","code":"210311"}]},{"id":"2483","name":"长春新区","childs":[],"pid":"2410","pname":"长春市"},{"id":"2713","name":"伊春区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2714","name":"南岔区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2716","name":"西林区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2717","name":"翠峦区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2718","name":"新青区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2719","name":"美溪区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2811","name":"金山屯区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2812","name":"五营区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2813","name":"乌马河区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2814","name":"汤旺河区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2815","name":"带岭区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2816","name":"乌伊岭区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2817","name":"红星区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2818","name":"上甘岭区","childs":[],"pid":"2710","pname":"伊春市"},{"id":"2784","name":"嫩江县","childs":[],"pid":"2780","pname":"黑河市"},{"id":"2793","name":"漠河县","childs":[],"pid":"2790","pname":"大兴安岭地区"},{"id":"3061","name":"海安县","childs":[],"pid":"3060","pname":"南通市"},{"id":"3065","name":"海门市","childs":[],"pid":"3060","pname":"南通市"},{"id":"3069","name":"港闸区","childs":[],"pid":"3060","pname":"南通市"},{"id":"3319","name":"下城区","childs":[],"pid":"3310","pname":"杭州市"},{"id":"3471","name":"江干区","childs":[],"pid":"3310","pname":"杭州市"},{"id":"3615","name":"巢湖市(直辖)","childs":[],"pid":"3610","pname":"合肥市"},{"id":"3621","name":"芜湖县","childs":[],"pid":"3620","pname":"芜湖市"},{"id":"3622","name":"繁昌县","childs":[],"pid":"3620","pname":"芜湖市"},{"id":"3624","name":"无为县","childs":[],"pid":"3620","pname":"芜湖市"},{"id":"3628","name":"三山区","childs":[],"pid":"3620","pname":"芜湖市"},{"id":"3684","name":"潜山县","childs":[],"pid":"3680","pname":"安庆市"},{"id":"3773","name":"广德县淮南市","childs":[],"pid":"3770","pname":"宣城市"},{"id":"3956","name":"沙 县","childs":[],"pid":"3950","pname":"三明市"},{"id":"3962","name":"梅列区","childs":[],"pid":"3950","pname":"三明市"},{"id":"3991","name":"龙海市","childs":[],"pid":"3990","pname":"漳州市"},{"id":"3995","name":"长泰县","childs":[],"pid":"3990","pname":"漳州市"},{"id":"4219","name":"湾里区","childs":[],"pid":"4210","pname":"南昌市"},{"id":"4391","name":"赣江新区","childs":[],"pid":"4210","pname":"南昌市"},{"id":"4272","name":"余江县","childs":[],"pid":"4270","pname":"鹰潭市"},{"id":"4289","name":"龙南县","childs":[],"pid":"4280","pname":"赣州市"},{"id":"4332","name":"上饶县","childs":[],"pid":"4330","pname":"上饶市"},{"id":"4333","name":"广丰县","childs":[],"pid":"4330","pname":"上饶市"},{"id":"4514","name":"济阳县","childs":[],"pid":"4510","pname":"济南市"},{"id":"4527","name":"西海岸新区(含黄岛区全部区域)","childs":[],"pid":"4520","pname":"青岛市"},{"id":"4561","name":"蓬莱市","childs":[],"pid":"4560","pname":"烟台市"},{"id":"4566","name":"长岛县","childs":[],"pid":"4560","pname":"烟台市"},{"id":"4667","name":"邹平县","childs":[],"pid":"4660","pname":"滨州市"},{"id":"4715","name":"茌平县","childs":[],"pid":"4710","pname":"聊城市"},{"id":"4790","name":"莱芜市","pid":"4500","pname":"山东省","childs":[{"id":"4791","name":"钢城区","childs":[],"pid":"4790","pname":"莱芜市","code":"370117"},{"id":"4792","name":"莱城区","childs":[],"pid":"4790","pname":"莱芜市"}]},{"id":"4792","name":"莱城区","childs":[],"pid":"4790","pname":"莱芜市"},{"id":"4931","name":"偃师市","childs":[],"pid":"4930","pname":"洛阳市"},{"id":"4932","name":"孟津县","childs":[],"pid":"4930","pname":"洛阳市"},{"id":"4945","name":"吉利区","childs":[],"pid":"4930","pname":"洛阳市"},{"id":"4986","name":"长垣县","childs":[],"pid":"4980","pname":"新乡市"},{"id":"5052","name":"陕  县","childs":[],"pid":"5050","pname":"三门峡市"},{"id":"5088","name":"淮阳县","childs":[],"pid":"5080","pname":"周口市"},{"id":"5321","name":"京山县","childs":[],"pid":"5320","pname":"荆门市"},{"id":"5379","name":"监利县","childs":[],"pid":"5370","pname":"荆州市"},{"id":"5521","name":"株洲县","childs":[],"pid":"5520","pname":"株洲市"},{"id":"5551","name":"邵东县","childs":[],"pid":"5550","pname":"邵阳市"},{"id":"5662","name":"祁阳县","childs":[],"pid":"5650","pname":"永州市"},{"id":"5847","name":"坪山新区","childs":[],"pid":"5840","pname":"深圳市"},{"id":"5852","name":"香洲区(横琴新区)","childs":[],"pid":"5850","pname":"珠海市"},{"id":"6021-6029","name":"","pid":"5800","pname":"广东省","childs":[]},{"id":"6031-6039","name":"","pid":"5800","pname":"广东省","childs":[]},{"id":"6112","name":"武鸣县","childs":[],"pid":"6110","pname":"南宁市"},{"id":"6122","name":"横  县","childs":[],"pid":"6110","pname":"南宁市"},{"id":"6189","name":"荔蒲县","childs":[],"pid":"6170","pname":"桂林市"},{"id":"6262","name":"田阳县","childs":[],"pid":"6260","pname":"百色市"},{"id":"6264","name":"平果县","childs":[],"pid":"6260","pname":"百色市"},{"id":"6522","name":"新津县","childs":[],"pid":"6510","pname":"成都市"},{"id":"6622","name":"射洪县","childs":[],"pid":"6620","pname":"遂宁市"},{"id":"6712","name":"宜宾县","childs":[],"pid":"6710","pname":"宜宾市"},{"id":"6811","name":"康定县","childs":[],"pid":"6810","pname":"甘孜藏族自治州"},{"id":"6845","name":"会理县","childs":[],"pid":"6840","pname":"凉山彝族自治州"},{"id":"7004","name":"贵安新区","pid":"7000","pname":"贵州省","childs":[]},{"id":"7021","name":"水城县","childs":[],"pid":"7020","pname":"六盘水市"},{"id":"7072","name":"兴仁县","childs":[],"pid":"7070","pname":"黔西南布依族苗族自治州"},{"id":"7093","name":"黔西县","childs":[],"pid":"7090","pname":"毕节市"},{"id":"7352","name":"水富县","childs":[],"pid":"7340","pname":"昭通市"},{"id":"7362","name":"马龙县","childs":[],"pid":"7360","pname":"曲靖市"},{"id":"7391","name":"禄丰县","childs":[],"pid":"7380","pname":"楚雄彝族自治州"},{"id":"7413","name":"澄江县","childs":[],"pid":"7410","pname":"玉溪市"},{"id":"7904","name":"西咸新区","pid":"7900","pname":"陕西省","childs":[]},{"id":"7932","name":"凤翔县","childs":[],"pid":"7930","pname":"宝鸡市"},{"id":"7957","name":"彬 县","childs":[],"pid":"7950","pname":"咸阳市"},{"id":"8019","name":"旬阳县","childs":[],"pid":"8010","pname":"安康市"},{"id":"8044","name":"子长县","childs":[],"pid":"8040","pname":"延安市"},{"id":"8335","name":"华亭县","childs":[],"pid":"8330","pname":"平凉市"},{"id":"8512","name":"湟中县","childs":[],"pid":"8510","pname":"西宁市"},{"id":"8551","name":"同仁县","childs":[],"pid":"8550","pname":"黄南藏族自治州"},{"id":"8581","name":"玉树县","childs":[],"pid":"8580","pname":"玉树藏族自治州"},{"id":"8913","name":"库车县","childs":[],"pid":"8910","pname":"阿克苏地区"},{"id":"9014","name":"沙湾县","childs":[],"pid":"9010","pname":"塔城地区"},{"id":"新疆维吾尔自治区直辖","name":"新疆维吾尔自治区直辖","pid":"8800","pname":"新疆维吾尔族自治区","childs":[{"id":"9028","name":"石河子市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659001"},{"id":"9041","name":"阿拉尔市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659002"},{"id":"9042","name":"图木舒克市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659003"},{"id":"9043","name":"五家渠市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659004"},{"id":"9044","name":"北屯市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659005"},{"id":"9045","name":"双河市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659007"},{"id":"9046","name":"可克达拉市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659008"},{"id":"8890","name":"铁门关市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659006"},{"id":"9047","name":"昆玉市(自治区直辖)","childs":[],"pid":"新疆维吾尔自治区直辖","pname":"新疆维吾尔自治区直辖","code":"659009"}]}]

About

中国地理位置信息, 银联卡跨行业务地区代码标准,人民共和国县以上行政区划代码。并做了映射,方便使用。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published