-- 区划代码、省、市相同三级改名  更新fname、ffullname、fdescription、ffullspell、fsimplespell，需要人工确认,尤其全拼，简拼 
UPDATE  T_BD_ADMINDIVISIONPRE SET FNAME = '襄都区',FFULLNAME = '河北省_邢台市_襄都区',FDESCRIPTION = '襄都',FFULLSPELL = 'Xiangdu District',FSIMPLESPELL = 'XDQ' WHERE FID = 1069363945262822400;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='襄都区',FFULLNAME='河北省_邢台市_襄都区',FDESCRIPTION='襄都' WHERE FID = 1069363945262822400 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FNAME = '信都区',FFULLNAME = '河北省_邢台市_信都区',FDESCRIPTION = '信都',FFULLSPELL = 'Xindu District',FSIMPLESPELL = 'XDQ' WHERE FID = 1069363945975855104;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='信都区',FFULLNAME='河北省_邢台市_信都区',FDESCRIPTION='信都' WHERE FID = 1069363945975855104 AND FLOCALEID = 'zh_CN';
-- 区划代码前四位、省、市、县相同区划代码变更 更新fareacode
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '350404' WHERE FID = 209;
-- 区划代码前四位、省、市、县(第一个字)相同区划代码更新  更新fareacode、fname、ffullname、fdescription、ffullspell、fsimplespell,需要人工确认,尤其全拼，简拼
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '350405',FNAME = '沙县区',FFULLNAME = '福建省_三明市_沙县区',FDESCRIPTION = '沙县',FFULLSPELL = 'Shaxian District',FSIMPLESPELL = 'SXQ' WHERE FID = 215;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='沙县区',FFULLNAME='福建省_三明市_沙县区',FDESCRIPTION='沙县' WHERE FID = 215 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '350604',FNAME = '龙海区',FFULLNAME = '福建省_漳州市_龙海区',FDESCRIPTION = '龙海',FFULLSPELL = 'Longhai District',FSIMPLESPELL = 'LHQ' WHERE FID = 244;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='龙海区',FFULLNAME='福建省_漳州市_龙海区',FDESCRIPTION='龙海' WHERE FID = 244 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '350605',FNAME = '长泰区',FFULLNAME = '福建省_漳州市_长泰区',FDESCRIPTION = '长泰',FFULLSPELL = 'Changtai District',FSIMPLESPELL = 'CTQ' WHERE FID = 239;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='长泰区',FFULLNAME='福建省_漳州市_长泰区',FDESCRIPTION='长泰' WHERE FID = 239 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '410307',FNAME = '偃师区',FFULLNAME = '河南省_洛阳市_偃师区',FDESCRIPTION = '偃师',FFULLSPELL = 'Yanshi District',FSIMPLESPELL = 'YSQ' WHERE FID = 1428;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='偃师区',FFULLNAME='河南省_洛阳市_偃师区',FDESCRIPTION='偃师' WHERE FID = 1428 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '410308',FNAME = '孟津区',FFULLNAME = '河南省_洛阳市_孟津区',FDESCRIPTION = '孟津',FFULLSPELL = 'Mengjin District',FSIMPLESPELL = 'MJQ' WHERE FID = 1420;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='孟津区',FFULLNAME='河南省_洛阳市_孟津区',FDESCRIPTION='孟津' WHERE FID = 1420 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '431181',FNAME = '祁阳市',FFULLNAME = '湖南省_永州市_祁阳市',FDESCRIPTION = '祁阳',FFULLSPELL = 'Qiyang City',FSIMPLESPELL = 'QYS' WHERE FID = 1880;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='祁阳市',FFULLNAME='湖南省_永州市_祁阳市',FDESCRIPTION='祁阳' WHERE FID = 1880 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '513402',FNAME = '会理市',FFULLNAME = '四川省_凉山彝族自治州_会理市',FDESCRIPTION = '会理',FFULLSPELL = 'Huili City',FSIMPLESPELL = 'HLS' WHERE FID = 3121;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='会理市',FFULLNAME='四川省_凉山彝族自治州_会理市',FDESCRIPTION='会理' WHERE FID = 3121 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '520581',FNAME = '黔西市',FFULLNAME = '贵州省_毕节市_黔西市',FDESCRIPTION = '黔西',FFULLSPELL = 'Qianxi City',FSIMPLESPELL = 'QXS' WHERE FID = 775;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='黔西市',FFULLNAME='贵州省_毕节市_黔西市',FDESCRIPTION='黔西' WHERE FID = 775 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '532302',FNAME = '禄丰市',FFULLNAME = '云南省_楚雄彝族自治州_禄丰市',FDESCRIPTION = '禄丰',FFULLSPELL = 'Lufeng City',FSIMPLESPELL = 'LFS' WHERE FID = 3480;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='禄丰市',FFULLNAME='云南省_楚雄彝族自治州_禄丰市',FDESCRIPTION='禄丰' WHERE FID = 3480 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '610305',FNAME = '凤翔区',FFULLNAME = '陕西省_宝鸡市_凤翔区',FDESCRIPTION = '凤翔',FFULLSPELL = 'Fengxiang District',FSIMPLESPELL = 'FXQ' WHERE FID = 2839;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='凤翔区',FFULLNAME='陕西省_宝鸡市_凤翔区',FDESCRIPTION='凤翔' WHERE FID = 2839 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '610981',FNAME = '旬阳市',FFULLNAME = '陕西省_安康市_旬阳市',FDESCRIPTION = '旬阳',FFULLSPELL = 'Xunyang City',FSIMPLESPELL = 'XYS' WHERE FID = 2923;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='旬阳市',FFULLNAME='陕西省_安康市_旬阳市',FDESCRIPTION='旬阳' WHERE FID = 2923 AND FLOCALEID = 'zh_CN';
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '654203',FNAME = '沙湾市',FFULLNAME = '新疆维吾尔自治区_塔城地区_沙湾市',FDESCRIPTION = '沙湾',FFULLSPELL = 'Shawan City',FSIMPLESPELL = 'SWS' WHERE FID = 1069363944910500864;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='沙湾市',FFULLNAME='新疆维吾尔自治区_塔城地区_沙湾市',FDESCRIPTION='沙湾' WHERE FID = 1069363944910500864 AND FLOCALEID = 'zh_CN';
-- 区划代码前四位、省、市、县(第一个字)相同区划代码更新  更新fareacode、fname、ffullname、fdescription、ffullspell、fsimplespell,需要人工确认,尤其全拼，简拼
UPDATE  T_BD_ADMINDIVISIONPRE SET FAREACODE = '450181',FNAME = '横州市',FFULLNAME = '广西壮族自治区_南宁市_横州市',FDESCRIPTION = '横州',FFULLSPELL = 'Hengzhou City',FSIMPLESPELL = 'HZS' WHERE FID = 600;
UPDATE  T_BD_ADMINDIVISIONPRE_L SET FNAME='横州市',FFULLNAME='广西壮族自治区_南宁市_横州市',FDESCRIPTION='横州' WHERE FID = 600 AND FLOCALEID = 'zh_CN';
-- 新增行政区划数据
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98305;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Linping District',1000001,'临平',98305,3,{ts'2022-02-22 10:13:04'},'330113','1',3,'003533.003534.330113','浙江省_杭州市_临平区','1',0,98305,' ',NULL,3534,'1','C','330113','临平区','1',0,{ts'2022-02-22 10:13:04'},'LPQ',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98304';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98305,'98304','临平区',' ','浙江省_杭州市_临平区','临平','zh_CN');
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98307;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Qiantang District',1000001,'钱塘',98307,3,{ts'2022-02-22 10:13:04'},'330114','1',3,'003533.003534.330114','浙江省_杭州市_钱塘区','1',0,98307,' ',NULL,3534,'1','C','330114','钱塘区','1',0,{ts'2022-02-22 10:13:04'},'QTQ',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98306';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98307,'98306','钱塘区',' ','浙江省_杭州市_钱塘区','钱塘','zh_CN');
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98309;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Kekedala City',1000001,'可克达拉',98309,2,{ts'2022-02-22 10:13:04'},'659008','1',2,'003152.659008','新疆维吾尔自治区_可克达拉市','1',0,98309,' ',NULL,3152,'1','C','659008','可克达拉市','1',0,{ts'2022-02-22 10:13:04'},'KKDLS',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98308';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98309,'98308','可克达拉市',' ','新疆维吾尔自治区_可克达拉市','可克达拉','zh_CN');
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98311;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Kunyu City',1000001,'昆玉',98311,2,{ts'2022-02-22 10:13:04'},'659009','1',2,'003152.659009','新疆维吾尔自治区_昆玉市','1',0,98311,' ',NULL,3152,'1','C','659009','昆玉市','1',0,{ts'2022-02-22 10:13:04'},'KYS',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98310';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98311,'98310','昆玉市',' ','新疆维吾尔自治区_昆玉市','昆玉','zh_CN');
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98313;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Huyanghe City',1000001,'胡杨河',98313,2,{ts'2022-02-22 10:13:04'},'659010','1',2,'003152.659010','新疆维吾尔自治区_胡杨河市','1',0,98313,' ',NULL,3152,'1','C','659010','胡杨河市','1',0,{ts'2022-02-22 10:13:04'},'HYHS',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98312';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98313,'98312','胡杨河市',' ','新疆维吾尔自治区_胡杨河市','胡杨河','zh_CN');
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 98315;
INSERT INTO T_BD_ADMINDIVISIONPRE(FFULLSPELL,FCOUNTRYID,FDESCRIPTION,FMASTERID,FADMINDIVISIONLVID,FCREATETIME,FAREACODE,FENABLE,FLEVEL,FLONGNUMBER,FFULLNAME,FISSYSTEM,FDISABLERID,FID,FCITYNUMBER,FDISABLEDATE,FPARENTID,FISCITY,FSTATUS,FNUMBER,FNAME,FISLEAF,FMODIFIERID,FMODIFYTIME,FSIMPLESPELL,FCREATORID)VALUES ('Xinxing City',1000001,'新星',98315,2,{ts'2022-02-22 10:13:04'},'659011','1',2,'003152.659011','新疆维吾尔自治区_新星市','1',0,98315,' ',NULL,3152,'1','C','659011','新星市','1',0,{ts'2022-02-22 10:13:04'},'XXS',1);
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FPKID  = '98314';
INSERT INTO T_BD_ADMINDIVISIONPRE_L(fid,fpkid,fname,fsimplename,ffullname,fdescription,flocaleid) VALUES (98315,'98314','新星市',' ','新疆维吾尔自治区_新星市','新星','zh_CN');
-- 禁用行政区划数据
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 3536;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 3536;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 3537;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 3537;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 412121485038101504;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 412121485038101504;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 208;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 208;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 1418;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 1418;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 1069363945933912064;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 1069363945933912064;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 1069363945648699392;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 1069363945648699392;
DELETE FROM T_BD_ADMINDIVISIONPRE WHERE FID = 1069363945044718592;
DELETE FROM T_BD_ADMINDIVISIONPRE_L WHERE FID = 1069363945044718592;
-- 增加行政区划版本
DELETE FROM t_bd_preset_version WHERE fid = 100001;
INSERT INTO t_bd_preset_version(fid,fcreatetime,fsource,fisupdate,fissendtoadmin,fversionnum,fcreatorid) VALUES (100001,{ts'2022-02-22  00:00:00'},'bd_admindivision','0','1','admindivision-202202-22',1);
DELETE FROM t_bd_preset_version_l WHERE fpkid = '100001';
INSERT INTO t_bd_preset_version_l(fguideinfo,fid,flocaleid,fpkid) VALUES ('<p>本更新基于中华人民共和国民政部于2021年12月31日发布的行政区划数据（县级及以上）。较之前版本，更新内容主要如下：<p style="text-indent: 2em">1. 禁用8条行政区划，包括已撤销的行政区划（4条），如：杭州市的“下城区”<p style="text-indent: 2em">2. 修正部分更名的行政区划或区划代码（16条），如：邢台市的“桥东区”更名为“襄都区”<p style="text-indent: 2em">3. 补充若干新增的行政区划（6条），如：杭州市的“临平区”、“钱塘区” </p> 请根据您的实际使用情况和当前数据，使用本向导查阅更新内容并自主选择要更新的数据执行操作。',100001,'zh_CN','100001');