commit ae90307a23176afc83b5cffc6ea330e78befa58a Author: liuyiliang Date: Mon Apr 7 17:10:54 2025 +0800 ytt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8cfd370 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# http://editorconfig.org +root = true + +# 空格替代Tab缩进在各种编辑工具下效果一致 +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +[*.java] +indent_style = tab + +[*.{json,yml}] +indent_size = 2 + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..987273c --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# maven # +target + +logs + +# windows # +Thumbs.db + +# Mac # +.DS_Store + +# eclipse # +.settings +.project +.classpath +.log +*.class + +# idea # +.idea +*.iml + +# Package Files # +*.jar +*.war +*.ear +/target diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1caf486 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM anapsix/alpine-java:8_server-jre_unlimited + + +RUN mkdir -p /control + +WORKDIR /control + +EXPOSE 8800 + +ADD ./target/smart-om-system.jar ./app.jar + +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] + +CMD ["--spring.profiles.active=test"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..035325e --- /dev/null +++ b/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "{}" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright 2020 DafX (https://dafx.vip) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..52832f3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# smart-om-system + +智慧运维后台 \ No newline at end of file diff --git a/doc/script/service.cmd b/doc/script/service.cmd new file mode 100644 index 0000000..2b57796 --- /dev/null +++ b/doc/script/service.cmd @@ -0,0 +1 @@ +java -jar app.jar diff --git a/doc/script/service.sh b/doc/script/service.sh new file mode 100644 index 0000000..884d88a --- /dev/null +++ b/doc/script/service.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +#设置jar文件名 +APP_NAME=app.jar + +#使用说明,用来提示输入参数 +usage() { +echo "Usage: sh 执行脚本.sh [start|stop|restart|status]" +exit 1 +} + +#检查程序是否在运行 +is_exist(){ +pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' ` +#如果不存在返回1,存在返回0 +if [ -z "${pid}" ]; then +return 1 +else +return 0 +fi +} + +#启动方法 +start(){ +is_exist +if [ $? -eq "0" ]; then +echo "${APP_NAME} is already running. pid=${pid} ." +else +nohup java -jar $APP_NAME > /dev/null 2>&1 & +fi +} + +#停止方法 +stop(){ +is_exist +if [ $? -eq "0" ]; then +kill -9 $pid +else +echo "${APP_NAME} is not running" +fi +} + +#输出运行状态 +status(){ +is_exist +if [ $? -eq "0" ]; then +echo "${APP_NAME} is running. Pid is ${pid}" +else +echo "${APP_NAME} is NOT running." +fi +} + +#重启 +restart(){ +stop +start +} + +#根据输入参数,选择执行对应方法,不输入则执行使用说明 +case "$1" in +"start") +start +;; +"stop") +stop +;; +"status") +status +;; +"restart") +restart +;; +*) +usage +;; +esac diff --git a/doc/sql/blade-saber-mysql.sql b/doc/sql/blade-saber-mysql.sql new file mode 100644 index 0000000..caf131a --- /dev/null +++ b/doc/sql/blade-saber-mysql.sql @@ -0,0 +1,751 @@ +/* + Navicat Premium Data Transfer + + Source Server : mysql_localhost + Source Server Type : MySQL + Source Server Version : 50729 + Source Host : localhost:3306 + Source Schema : daf + + Target Server Type : MySQL + Target Server Version : 50729 + File Encoding : 65001 + + Date: 02/11/2021 16:34:09 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_client +-- ---------------------------- +DROP TABLE IF EXISTS `sys_client`; +CREATE TABLE `sys_client` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `client_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端id', + `client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端密钥', + `resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源集合', + `scope` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权范围', + `authorized_grant_types` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权类型', + `web_server_redirect_uri` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '回调地址', + `authorities` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限', + `access_token_validity` int(11) NOT NULL COMMENT '令牌过期秒数', + `refresh_token_validity` int(11) NOT NULL COMMENT '刷新令牌过期秒数', + `additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加说明', + `autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动授权', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NOT NULL COMMENT '状态', + `is_deleted` int(2) NOT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '客户端表'; + +-- ---------------------------- +-- Records of sys_client +-- ---------------------------- +BEGIN; +INSERT INTO `sys_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_code +-- ---------------------------- +DROP TABLE IF EXISTS `sys_code`; +CREATE TABLE `sys_code` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `datasource_id` bigint(20) NULL DEFAULT NULL COMMENT '数据源主键', + `service_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称', + `code_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模块名称', + `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表名', + `table_prefix` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表前缀', + `pk_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主键名', + `package_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端包名', + `base_mode` int(2) NULL DEFAULT NULL COMMENT '基础业务模式', + `wrap_mode` int(2) NULL DEFAULT NULL COMMENT '包装器模式', + `api_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端路径', + `web_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '前端路径', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成表'; + +-- ---------------------------- +-- Records of sys_code +-- ---------------------------- +BEGIN; +INSERT INTO `sys_code` +VALUES (1123598812738675201, 1123598812738675201, 'daf-demo', '通知公告', 'sys_notice', 'sys_', 'id', + 'com.dayu.daf.desktop', 1, 1, 'D:\\Develop\\WorkSpace\\Git\\SpringDaf\\daf-ops\\daf-develop', + 'D:\\Develop\\WorkSpace\\Git\\Sword', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_datasource +-- ---------------------------- +DROP TABLE IF EXISTS `sys_datasource`; +CREATE TABLE `sys_datasource` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称', + `driver_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驱动类', + `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接地址', + `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名', + `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据源配置表'; + +-- ---------------------------- +-- Records of sys_datasource +-- ---------------------------- +BEGIN; +INSERT INTO `sys_datasource` +VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', + 'jdbc:mysql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', + 'root', 'root', 'mysql', 1, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), + (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/daf', 'postgres', + '123456', 'postgresql', 1, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), + (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', + 'daf', 'oracle', 1, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `ancestors` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表', + `dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名', + `full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表'; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +BEGIN; +INSERT INTO `sys_dept` VALUES (1123598813738675201, '000000', 0, '0', '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '0,1123598813738675201', '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '0,1123598813738675201', '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_dict +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict`; +CREATE TABLE `sys_dict` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码', + `dict_key` int(2) NULL DEFAULT NULL COMMENT '字典值', + `dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表'; + +-- ---------------------------- +-- Records of sys_dict +-- ---------------------------- +BEGIN; +INSERT INTO `sys_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0), (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0), (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0), (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0), (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0), (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_log_api +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_api`; +CREATE TABLE `sys_log_api` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器环境', + `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '日志类型', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志标题', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '接口日志表'; + +-- ---------------------------- +-- Table structure for sys_log_error +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_error`; +CREATE TABLE `sys_log_error` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '堆栈', + `exception_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异常名', + `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异常信息', + `line_number` int(11) NULL DEFAULT NULL COMMENT '错误行数', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `file_name` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '错误日志表'; + +-- ---------------------------- +-- Table structure for sys_log_usual +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_usual`; +CREATE TABLE `sys_log_usual` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `log_level` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志级别', + `log_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志业务id', + `log_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '日志数据', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` datetime(0) NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通用日志表'; + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父级菜单', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单编号', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称', + `alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单别名', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求地址', + `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单资源', + `sort` int(2) NULL DEFAULT NULL COMMENT '排序', + `category` int(2) NULL DEFAULT NULL COMMENT '菜单类型', + `action` int(2) NULL DEFAULT 0 COMMENT '操作按钮类型', + `is_open` int(2) NULL DEFAULT 1 COMMENT '是否打开新页面', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表'; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +BEGIN; +INSERT INTO `sys_menu` +VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', 1, 1, 0, 1, NULL, 0), + (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', 1, + 1, 0, 1, NULL, 0), + (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', 99, 1, 0, 1, NULL, 0), + (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', + 1, 1, 0, 1, NULL, 0), + (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', 'iconfont iconicon_group', 2, + 1, 0, 1, NULL, 0), + (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', + 'iconfont iconicon_addresslist', 3, 1, 0, 1, NULL, 0), + (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', + 'iconfont iconicon_subordinate', 4, 1, 0, 1, NULL, 0), + (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', + 'iconfont iconicon_community_line', 6, 1, 0, 1, NULL, 0), + (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', 3, 1, 0, 1, NULL, 0), + (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', + 'iconfont iconicon_study', 1, 1, 0, 2, NULL, 0), + (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', + 'iconfont icon-canshu', 2, 1, 0, 2, NULL, 0), + (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', 3, 1, + 0, 1, NULL, 0), + (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, + NULL, 0), + (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, + 0), + (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, + NULL, 0), + (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', 4, 1, 0, 1, NULL, 0), + (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', 1, + 1, 0, 1, NULL, 0), + (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/daf-desk/notice/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/daf-user/remove', 'delete', 3, 2, + 3, 1, NULL, 0), + (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), + (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', + '/api/daf-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), + (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, + 1, NULL, 0), + (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/daf-system/dept/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/daf-system/dict/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/daf-system/menu/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/daf-system/role/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/daf-system/param/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', + 'file-text', 4, 2, 2, 1, NULL, 0), + (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, + 2, 2, 1, NULL, 0), + (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', + 'file-text', 4, 2, 2, 1, NULL, 0), + (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/daf-system/code/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, + NULL, 0), + (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', 'iconfont icon-quanxian', + 7, 1, 0, 1, NULL, 0), + (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, + 1, NULL, 0), + (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/daf-system/tenant/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', + 'iconfont iconicon_mobilephone', 8, 1, 0, 1, NULL, 0), + (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, + 2, NULL, 0), + (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/daf-system/client/remove', + 'delete', 3, 2, 3, 3, NULL, 0), + (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, + 2, 2, NULL, 0), + (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', + 'iconfont icon-caidanguanli', 2, 1, 0, 1, NULL, 0), + (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, + 1, 1, NULL, 0), + (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, + 2, 2, 2, NULL, 0), + (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', + '/api/daf-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), + (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', + 4, 2, 2, 2, NULL, 0), + (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 98, 1, 0, + 1, '', 0), + (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', + 1, 1, 0, 1, NULL, 0), + (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', + 'iconfont icon-shujuzhanshi2', 2, 1, 0, 1, '', 0), + (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, + NULL, 0), + (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', 'iconfont iconicon_message', + 2, 1, 0, 1, NULL, 0), + (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/daf-system/post/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'iconfont iconicon_affiliations_li', 97, 1, 0, 1, NULL, + 0), + (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', 'iconfont icon-iframe', 1, + 1, 0, 1, NULL, 0), + (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), + (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/daf-system/region/remove', '', + 2, 2, 2, 1, NULL, 0), + (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), + (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), + (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), + (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, + 0), + (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', + 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0), + (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', + 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_notice +-- ---------------------------- +DROP TABLE IF EXISTS `sys_notice`; +CREATE TABLE `sys_notice` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题', + `category` int(11) NULL DEFAULT NULL COMMENT '类型', + `release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间', + `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知公告表'; + +-- ---------------------------- +-- Records of sys_notice +-- ---------------------------- +BEGIN; +INSERT INTO `sys_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, 1123598813738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, 1123598813738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, 1123598813738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_param +-- ---------------------------- +DROP TABLE IF EXISTS `sys_param`; +CREATE TABLE `sys_param` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `param_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名', + `param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键', + `param_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参数表'; + +-- ---------------------------- +-- Records of sys_param +-- ---------------------------- +BEGIN; +INSERT INTO `sys_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_post +-- ---------------------------- +DROP TABLE IF EXISTS `sys_post`; +CREATE TABLE `sys_post` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `category` int(11) NULL DEFAULT NULL COMMENT '岗位类型', + `post_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位编号', + `post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称', + `sort` int(2) NULL DEFAULT NULL COMMENT '岗位排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位描述', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位表'; + +-- ---------------------------- +-- Records of sys_post +-- ---------------------------- +BEGIN; +INSERT INTO `sys_post` VALUES (1123598817738675201, '000000', 1, 'ceo', '首席执行官', 1, '总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675202, '000000', 1, 'coo', '首席运营官', 2, '常务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675203, '000000', 1, 'cfo', '首席财务官', 3, '财务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675204, '000000', 1, 'cto', '首席技术官', 4, '技术总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675205, '000000', 1, 'cio', '首席信息官', 5, '信息总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675206, '000000', 2, 'pm', '技术经理', 6, '研发和产品是永远的朋友', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675207, '000000', 2, 'hrm', '人力经理', 7, '人力资源部门工作管理者', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675208, '000000', 3, 'staff', '普通员工', 8, '普通员工', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_region +-- ---------------------------- +DROP TABLE IF EXISTS `sys_region`; +CREATE TABLE `sys_region` ( + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '区划编号', + `parent_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父区划编号', + `ancestors` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖区划编号', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区划名称', + `province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级区划编号', + `province_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级名称', + `city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级区划编号', + `city_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级名称', + `district_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级区划编号', + `district_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级名称', + `town_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级区划编号', + `town_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级名称', + `village_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级区划编号', + `village_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级名称', + `level` int(2) NULL DEFAULT NULL COMMENT '层级', + `sort` int(2) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`code`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '行政区划表'; + +-- ---------------------------- +-- Records of sys_region +-- ---------------------------- +BEGIN; +INSERT INTO `sys_region` VALUES ('00', '0', '0', '中华人民共和国', '', '', '', '', '', '', '', '', '', '', 0, 1, ''), ('11', '00', '00', '北京市', '11', '北京市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1101', '11', '00,11', '北京市', '11', '北京市', '1101', '北京市', '', '', '', '', '', '', 2, 1, ''), ('110101', '1101', '00,11,1101', '东城区', '11', '北京市', '1101', '北京市', '110101', '东城区', '', '', '', '', 3, 1, ''), ('110102', '1101', '00,11,1101', '西城区', '11', '北京市', '1101', '北京市', '110102', '西城区', '', '', '', '', 3, 1, ''), ('110105', '1101', '00,11,1101', '朝阳区', '11', '北京市', '1101', '北京市', '110105', '朝阳区', '', '', '', '', 3, 1, ''), ('110106', '1101', '00,11,1101', '丰台区', '11', '北京市', '1101', '北京市', '110106', '丰台区', '', '', '', '', 3, 1, ''), ('110107', '1101', '00,11,1101', '石景山区', '11', '北京市', '1101', '北京市', '110107', '石景山区', '', '', '', '', 3, 1, ''), ('110108', '1101', '00,11,1101', '海淀区', '11', '北京市', '1101', '北京市', '110108', '海淀区', '', '', '', '', 3, 1, ''), ('110109', '1101', '00,11,1101', '门头沟区', '11', '北京市', '1101', '北京市', '110109', '门头沟区', '', '', '', '', 3, 1, ''), ('110111', '1101', '00,11,1101', '房山区', '11', '北京市', '1101', '北京市', '110111', '房山区', '', '', '', '', 3, 1, ''), ('110112', '1101', '00,11,1101', '通州区', '11', '北京市', '1101', '北京市', '110112', '通州区', '', '', '', '', 3, 1, ''), ('110113', '1101', '00,11,1101', '顺义区', '11', '北京市', '1101', '北京市', '110113', '顺义区', '', '', '', '', 3, 1, ''), ('110114', '1101', '00,11,1101', '昌平区', '11', '北京市', '1101', '北京市', '110114', '昌平区', '', '', '', '', 3, 1, ''), ('110115', '1101', '00,11,1101', '大兴区', '11', '北京市', '1101', '北京市', '110115', '大兴区', '', '', '', '', 3, 1, ''), ('110116', '1101', '00,11,1101', '怀柔区', '11', '北京市', '1101', '北京市', '110116', '怀柔区', '', '', '', '', 3, 1, ''), ('110117', '1101', '00,11,1101', '平谷区', '11', '北京市', '1101', '北京市', '110117', '平谷区', '', '', '', '', 3, 1, ''), ('110118', '1101', '00,11,1101', '密云区', '11', '北京市', '1101', '北京市', '110118', '密云区', '', '', '', '', 3, 1, ''), ('110119', '1101', '00,11,1101', '延庆区', '11', '北京市', '1101', '北京市', '110119', '延庆区', '', '', '', '', 3, 1, ''), ('12', '00', '00', '天津市', '12', '天津市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1201', '12', '00,12', '天津市', '12', '天津市', '1201', '天津市', '', '', '', '', '', '', 2, 1, ''), ('120101', '1201', '00,12,1201', '和平区', '12', '天津市', '1201', '天津市', '120101', '和平区', '', '', '', '', 3, 1, ''), ('120102', '1201', '00,12,1201', '河东区', '12', '天津市', '1201', '天津市', '120102', '河东区', '', '', '', '', 3, 1, ''), ('120103', '1201', '00,12,1201', '河西区', '12', '天津市', '1201', '天津市', '120103', '河西区', '', '', '', '', 3, 1, ''), ('120104', '1201', '00,12,1201', '南开区', '12', '天津市', '1201', '天津市', '120104', '南开区', '', '', '', '', 3, 1, ''), ('120105', '1201', '00,12,1201', '河北区', '12', '天津市', '1201', '天津市', '120105', '河北区', '', '', '', '', 3, 1, ''), ('120106', '1201', '00,12,1201', '红桥区', '12', '天津市', '1201', '天津市', '120106', '红桥区', '', '', '', '', 3, 1, ''), ('120110', '1201', '00,12,1201', '东丽区', '12', '天津市', '1201', '天津市', '120110', '东丽区', '', '', '', '', 3, 1, ''), ('120111', '1201', '00,12,1201', '西青区', '12', '天津市', '1201', '天津市', '120111', '西青区', '', '', '', '', 3, 1, ''), ('120112', '1201', '00,12,1201', '津南区', '12', '天津市', '1201', '天津市', '120112', '津南区', '', '', '', '', 3, 1, ''), ('120113', '1201', '00,12,1201', '北辰区', '12', '天津市', '1201', '天津市', '120113', '北辰区', '', '', '', '', 3, 1, ''), ('120114', '1201', '00,12,1201', '武清区', '12', '天津市', '1201', '天津市', '120114', '武清区', '', '', '', '', 3, 1, ''), ('120115', '1201', '00,12,1201', '宝坻区', '12', '天津市', '1201', '天津市', '120115', '宝坻区', '', '', '', '', 3, 1, ''), ('120116', '1201', '00,12,1201', '滨海新区', '12', '天津市', '1201', '天津市', '120116', '滨海新区', '', '', '', '', 3, 1, ''), ('120117', '1201', '00,12,1201', '宁河区', '12', '天津市', '1201', '天津市', '120117', '宁河区', '', '', '', '', 3, 1, ''), ('120118', '1201', '00,12,1201', '静海区', '12', '天津市', '1201', '天津市', '120118', '静海区', '', '', '', '', 3, 1, ''), ('120119', '1201', '00,12,1201', '蓟州区', '12', '天津市', '1201', '天津市', '120119', '蓟州区', '', '', '', '', 3, 1, ''), ('13', '00', '00', '河北省', '13', '河北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1301', '13', '00,13', '石家庄市', '13', '河北省', '1301', '石家庄市', '', '', '', '', '', '', 2, 1, ''), ('130102', '1301', '00,13,1301', '长安区', '13', '河北省', '1301', '石家庄市', '130102', '长安区', '', '', '', '', 3, 1, ''), ('130104', '1301', '00,13,1301', '桥西区', '13', '河北省', '1301', '石家庄市', '130104', '桥西区', '', '', '', '', 3, 1, ''), ('130105', '1301', '00,13,1301', '新华区', '13', '河北省', '1301', '石家庄市', '130105', '新华区', '', '', '', '', 3, 1, ''), ('130107', '1301', '00,13,1301', '井陉矿区', '13', '河北省', '1301', '石家庄市', '130107', '井陉矿区', '', '', '', '', 3, 1, ''), ('130108', '1301', '00,13,1301', '裕华区', '13', '河北省', '1301', '石家庄市', '130108', '裕华区', '', '', '', '', 3, 1, ''), ('130109', '1301', '00,13,1301', '藁城区', '13', '河北省', '1301', '石家庄市', '130109', '藁城区', '', '', '', '', 3, 1, ''), ('130110', '1301', '00,13,1301', '鹿泉区', '13', '河北省', '1301', '石家庄市', '130110', '鹿泉区', '', '', '', '', 3, 1, ''), ('130111', '1301', '00,13,1301', '栾城区', '13', '河北省', '1301', '石家庄市', '130111', '栾城区', '', '', '', '', 3, 1, ''), ('130121', '1301', '00,13,1301', '井陉县', '13', '河北省', '1301', '石家庄市', '130121', '井陉县', '', '', '', '', 3, 1, ''), ('130123', '1301', '00,13,1301', '正定县', '13', '河北省', '1301', '石家庄市', '130123', '正定县', '', '', '', '', 3, 1, ''), ('130125', '1301', '00,13,1301', '行唐县', '13', '河北省', '1301', '石家庄市', '130125', '行唐县', '', '', '', '', 3, 1, ''), ('130126', '1301', '00,13,1301', '灵寿县', '13', '河北省', '1301', '石家庄市', '130126', '灵寿县', '', '', '', '', 3, 1, ''), ('130127', '1301', '00,13,1301', '高邑县', '13', '河北省', '1301', '石家庄市', '130127', '高邑县', '', '', '', '', 3, 1, ''), ('130128', '1301', '00,13,1301', '深泽县', '13', '河北省', '1301', '石家庄市', '130128', '深泽县', '', '', '', '', 3, 1, ''), ('130129', '1301', '00,13,1301', '赞皇县', '13', '河北省', '1301', '石家庄市', '130129', '赞皇县', '', '', '', '', 3, 1, ''), ('130130', '1301', '00,13,1301', '无极县', '13', '河北省', '1301', '石家庄市', '130130', '无极县', '', '', '', '', 3, 1, ''), ('130131', '1301', '00,13,1301', '平山县', '13', '河北省', '1301', '石家庄市', '130131', '平山县', '', '', '', '', 3, 1, ''), ('130132', '1301', '00,13,1301', '元氏县', '13', '河北省', '1301', '石家庄市', '130132', '元氏县', '', '', '', '', 3, 1, ''), ('130133', '1301', '00,13,1301', '赵县', '13', '河北省', '1301', '石家庄市', '130133', '赵县', '', '', '', '', 3, 1, ''), ('130181', '1301', '00,13,1301', '辛集市', '13', '河北省', '1301', '石家庄市', '130181', '辛集市', '', '', '', '', 3, 1, ''), ('130183', '1301', '00,13,1301', '晋州市', '13', '河北省', '1301', '石家庄市', '130183', '晋州市', '', '', '', '', 3, 1, ''), ('130184', '1301', '00,13,1301', '新乐市', '13', '河北省', '1301', '石家庄市', '130184', '新乐市', '', '', '', '', 3, 1, ''), ('1302', '13', '00,13', '唐山市', '13', '河北省', '1302', '唐山市', '', '', '', '', '', '', 2, 1, ''), ('130202', '1302', '00,13,1302', '路南区', '13', '河北省', '1302', '唐山市', '130202', '路南区', '', '', '', '', 3, 1, ''), ('130203', '1302', '00,13,1302', '路北区', '13', '河北省', '1302', '唐山市', '130203', '路北区', '', '', '', '', 3, 1, ''), ('130204', '1302', '00,13,1302', '古冶区', '13', '河北省', '1302', '唐山市', '130204', '古冶区', '', '', '', '', 3, 1, ''), ('130205', '1302', '00,13,1302', '开平区', '13', '河北省', '1302', '唐山市', '130205', '开平区', '', '', '', '', 3, 1, ''), ('130207', '1302', '00,13,1302', '丰南区', '13', '河北省', '1302', '唐山市', '130207', '丰南区', '', '', '', '', 3, 1, ''), ('130208', '1302', '00,13,1302', '丰润区', '13', '河北省', '1302', '唐山市', '130208', '丰润区', '', '', '', '', 3, 1, ''), ('130209', '1302', '00,13,1302', '曹妃甸区', '13', '河北省', '1302', '唐山市', '130209', '曹妃甸区', '', '', '', '', 3, 1, ''), ('130224', '1302', '00,13,1302', '滦南县', '13', '河北省', '1302', '唐山市', '130224', '滦南县', '', '', '', '', 3, 1, ''), ('130225', '1302', '00,13,1302', '乐亭县', '13', '河北省', '1302', '唐山市', '130225', '乐亭县', '', '', '', '', 3, 1, ''), ('130227', '1302', '00,13,1302', '迁西县', '13', '河北省', '1302', '唐山市', '130227', '迁西县', '', '', '', '', 3, 1, ''), ('130229', '1302', '00,13,1302', '玉田县', '13', '河北省', '1302', '唐山市', '130229', '玉田县', '', '', '', '', 3, 1, ''), ('130281', '1302', '00,13,1302', '遵化市', '13', '河北省', '1302', '唐山市', '130281', '遵化市', '', '', '', '', 3, 1, ''), ('130283', '1302', '00,13,1302', '迁安市', '13', '河北省', '1302', '唐山市', '130283', '迁安市', '', '', '', '', 3, 1, ''), ('130284', '1302', '00,13,1302', '滦州市', '13', '河北省', '1302', '唐山市', '130284', '滦州市', '', '', '', '', 3, 1, ''), ('1303', '13', '00,13', '秦皇岛市', '13', '河北省', '1303', '秦皇岛市', '', '', '', '', '', '', 2, 1, ''), ('130302', '1303', '00,13,1303', '海港区', '13', '河北省', '1303', '秦皇岛市', '130302', '海港区', '', '', '', '', 3, 1, ''), ('130303', '1303', '00,13,1303', '山海关区', '13', '河北省', '1303', '秦皇岛市', '130303', '山海关区', '', '', '', '', 3, 1, ''), ('130304', '1303', '00,13,1303', '北戴河区', '13', '河北省', '1303', '秦皇岛市', '130304', '北戴河区', '', '', '', '', 3, 1, ''), ('130306', '1303', '00,13,1303', '抚宁区', '13', '河北省', '1303', '秦皇岛市', '130306', '抚宁区', '', '', '', '', 3, 1, ''), ('130321', '1303', '00,13,1303', '青龙满族自治县', '13', '河北省', '1303', '秦皇岛市', '130321', '青龙满族自治县', '', '', '', '', 3, 1, ''), ('130322', '1303', '00,13,1303', '昌黎县', '13', '河北省', '1303', '秦皇岛市', '130322', '昌黎县', '', '', '', '', 3, 1, ''), ('130324', '1303', '00,13,1303', '卢龙县', '13', '河北省', '1303', '秦皇岛市', '130324', '卢龙县', '', '', '', '', 3, 1, ''), ('1304', '13', '00,13', '邯郸市', '13', '河北省', '1304', '邯郸市', '', '', '', '', '', '', 2, 1, ''), ('130402', '1304', '00,13,1304', '邯山区', '13', '河北省', '1304', '邯郸市', '130402', '邯山区', '', '', '', '', 3, 1, ''), ('130403', '1304', '00,13,1304', '丛台区', '13', '河北省', '1304', '邯郸市', '130403', '丛台区', '', '', '', '', 3, 1, ''), ('130404', '1304', '00,13,1304', '复兴区', '13', '河北省', '1304', '邯郸市', '130404', '复兴区', '', '', '', '', 3, 1, ''), ('130406', '1304', '00,13,1304', '峰峰矿区', '13', '河北省', '1304', '邯郸市', '130406', '峰峰矿区', '', '', '', '', 3, 1, ''), ('130407', '1304', '00,13,1304', '肥乡区', '13', '河北省', '1304', '邯郸市', '130407', '肥乡区', '', '', '', '', 3, 1, ''), ('130408', '1304', '00,13,1304', '永年区', '13', '河北省', '1304', '邯郸市', '130408', '永年区', '', '', '', '', 3, 1, ''), ('130423', '1304', '00,13,1304', '临漳县', '13', '河北省', '1304', '邯郸市', '130423', '临漳县', '', '', '', '', 3, 1, ''), ('130424', '1304', '00,13,1304', '成安县', '13', '河北省', '1304', '邯郸市', '130424', '成安县', '', '', '', '', 3, 1, ''), ('130425', '1304', '00,13,1304', '大名县', '13', '河北省', '1304', '邯郸市', '130425', '大名县', '', '', '', '', 3, 1, ''), ('130426', '1304', '00,13,1304', '涉县', '13', '河北省', '1304', '邯郸市', '130426', '涉县', '', '', '', '', 3, 1, ''), ('130427', '1304', '00,13,1304', '磁县', '13', '河北省', '1304', '邯郸市', '130427', '磁县', '', '', '', '', 3, 1, ''), ('130430', '1304', '00,13,1304', '邱县', '13', '河北省', '1304', '邯郸市', '130430', '邱县', '', '', '', '', 3, 1, ''), ('130431', '1304', '00,13,1304', '鸡泽县', '13', '河北省', '1304', '邯郸市', '130431', '鸡泽县', '', '', '', '', 3, 1, ''), ('130432', '1304', '00,13,1304', '广平县', '13', '河北省', '1304', '邯郸市', '130432', '广平县', '', '', '', '', 3, 1, ''), ('130433', '1304', '00,13,1304', '馆陶县', '13', '河北省', '1304', '邯郸市', '130433', '馆陶县', '', '', '', '', 3, 1, ''), ('130434', '1304', '00,13,1304', '魏县', '13', '河北省', '1304', '邯郸市', '130434', '魏县', '', '', '', '', 3, 1, ''), ('130435', '1304', '00,13,1304', '曲周县', '13', '河北省', '1304', '邯郸市', '130435', '曲周县', '', '', '', '', 3, 1, ''), ('130481', '1304', '00,13,1304', '武安市', '13', '河北省', '1304', '邯郸市', '130481', '武安市', '', '', '', '', 3, 1, ''), ('1305', '13', '00,13', '邢台市', '13', '河北省', '1305', '邢台市', '', '', '', '', '', '', 2, 1, ''), ('130502', '1305', '00,13,1305', '桥东区', '13', '河北省', '1305', '邢台市', '130502', '桥东区', '', '', '', '', 3, 1, ''), ('130503', '1305', '00,13,1305', '桥西区', '13', '河北省', '1305', '邢台市', '130503', '桥西区', '', '', '', '', 3, 1, ''), ('130521', '1305', '00,13,1305', '邢台县', '13', '河北省', '1305', '邢台市', '130521', '邢台县', '', '', '', '', 3, 1, ''), ('130522', '1305', '00,13,1305', '临城县', '13', '河北省', '1305', '邢台市', '130522', '临城县', '', '', '', '', 3, 1, ''), ('130523', '1305', '00,13,1305', '内丘县', '13', '河北省', '1305', '邢台市', '130523', '内丘县', '', '', '', '', 3, 1, ''), ('130524', '1305', '00,13,1305', '柏乡县', '13', '河北省', '1305', '邢台市', '130524', '柏乡县', '', '', '', '', 3, 1, ''), ('130525', '1305', '00,13,1305', '隆尧县', '13', '河北省', '1305', '邢台市', '130525', '隆尧县', '', '', '', '', 3, 1, ''), ('130526', '1305', '00,13,1305', '任县', '13', '河北省', '1305', '邢台市', '130526', '任县', '', '', '', '', 3, 1, ''), ('130527', '1305', '00,13,1305', '南和县', '13', '河北省', '1305', '邢台市', '130527', '南和县', '', '', '', '', 3, 1, ''), ('130528', '1305', '00,13,1305', '宁晋县', '13', '河北省', '1305', '邢台市', '130528', '宁晋县', '', '', '', '', 3, 1, ''), ('130529', '1305', '00,13,1305', '巨鹿县', '13', '河北省', '1305', '邢台市', '130529', '巨鹿县', '', '', '', '', 3, 1, ''), ('130530', '1305', '00,13,1305', '新河县', '13', '河北省', '1305', '邢台市', '130530', '新河县', '', '', '', '', 3, 1, ''), ('130531', '1305', '00,13,1305', '广宗县', '13', '河北省', '1305', '邢台市', '130531', '广宗县', '', '', '', '', 3, 1, ''), ('130532', '1305', '00,13,1305', '平乡县', '13', '河北省', '1305', '邢台市', '130532', '平乡县', '', '', '', '', 3, 1, ''), ('130533', '1305', '00,13,1305', '威县', '13', '河北省', '1305', '邢台市', '130533', '威县', '', '', '', '', 3, 1, ''), ('130534', '1305', '00,13,1305', '清河县', '13', '河北省', '1305', '邢台市', '130534', '清河县', '', '', '', '', 3, 1, ''), ('130535', '1305', '00,13,1305', '临西县', '13', '河北省', '1305', '邢台市', '130535', '临西县', '', '', '', '', 3, 1, ''), ('130581', '1305', '00,13,1305', '南宫市', '13', '河北省', '1305', '邢台市', '130581', '南宫市', '', '', '', '', 3, 1, ''), ('130582', '1305', '00,13,1305', '沙河市', '13', '河北省', '1305', '邢台市', '130582', '沙河市', '', '', '', '', 3, 1, ''), ('1306', '13', '00,13', '保定市', '13', '河北省', '1306', '保定市', '', '', '', '', '', '', 2, 1, ''), ('130602', '1306', '00,13,1306', '竞秀区', '13', '河北省', '1306', '保定市', '130602', '竞秀区', '', '', '', '', 3, 1, ''), ('130606', '1306', '00,13,1306', '莲池区', '13', '河北省', '1306', '保定市', '130606', '莲池区', '', '', '', '', 3, 1, ''), ('130607', '1306', '00,13,1306', '满城区', '13', '河北省', '1306', '保定市', '130607', '满城区', '', '', '', '', 3, 1, ''), ('130608', '1306', '00,13,1306', '清苑区', '13', '河北省', '1306', '保定市', '130608', '清苑区', '', '', '', '', 3, 1, ''), ('130609', '1306', '00,13,1306', '徐水区', '13', '河北省', '1306', '保定市', '130609', '徐水区', '', '', '', '', 3, 1, ''), ('130623', '1306', '00,13,1306', '涞水县', '13', '河北省', '1306', '保定市', '130623', '涞水县', '', '', '', '', 3, 1, ''), ('130624', '1306', '00,13,1306', '阜平县', '13', '河北省', '1306', '保定市', '130624', '阜平县', '', '', '', '', 3, 1, ''), ('130626', '1306', '00,13,1306', '定兴县', '13', '河北省', '1306', '保定市', '130626', '定兴县', '', '', '', '', 3, 1, ''), ('130627', '1306', '00,13,1306', '唐县', '13', '河北省', '1306', '保定市', '130627', '唐县', '', '', '', '', 3, 1, ''), ('130628', '1306', '00,13,1306', '高阳县', '13', '河北省', '1306', '保定市', '130628', '高阳县', '', '', '', '', 3, 1, ''), ('130629', '1306', '00,13,1306', '容城县', '13', '河北省', '1306', '保定市', '130629', '容城县', '', '', '', '', 3, 1, ''), ('130630', '1306', '00,13,1306', '涞源县', '13', '河北省', '1306', '保定市', '130630', '涞源县', '', '', '', '', 3, 1, ''), ('130631', '1306', '00,13,1306', '望都县', '13', '河北省', '1306', '保定市', '130631', '望都县', '', '', '', '', 3, 1, ''), ('130632', '1306', '00,13,1306', '安新县', '13', '河北省', '1306', '保定市', '130632', '安新县', '', '', '', '', 3, 1, ''), ('130633', '1306', '00,13,1306', '易县', '13', '河北省', '1306', '保定市', '130633', '易县', '', '', '', '', 3, 1, ''), ('130634', '1306', '00,13,1306', '曲阳县', '13', '河北省', '1306', '保定市', '130634', '曲阳县', '', '', '', '', 3, 1, ''), ('130635', '1306', '00,13,1306', '蠡县', '13', '河北省', '1306', '保定市', '130635', '蠡县', '', '', '', '', 3, 1, ''), ('130636', '1306', '00,13,1306', '顺平县', '13', '河北省', '1306', '保定市', '130636', '顺平县', '', '', '', '', 3, 1, ''), ('130637', '1306', '00,13,1306', '博野县', '13', '河北省', '1306', '保定市', '130637', '博野县', '', '', '', '', 3, 1, ''), ('130638', '1306', '00,13,1306', '雄县', '13', '河北省', '1306', '保定市', '130638', '雄县', '', '', '', '', 3, 1, ''), ('130681', '1306', '00,13,1306', '涿州市', '13', '河北省', '1306', '保定市', '130681', '涿州市', '', '', '', '', 3, 1, ''), ('130682', '1306', '00,13,1306', '定州市', '13', '河北省', '1306', '保定市', '130682', '定州市', '', '', '', '', 3, 1, ''), ('130683', '1306', '00,13,1306', '安国市', '13', '河北省', '1306', '保定市', '130683', '安国市', '', '', '', '', 3, 1, ''), ('130684', '1306', '00,13,1306', '高碑店市', '13', '河北省', '1306', '保定市', '130684', '高碑店市', '', '', '', '', 3, 1, ''), ('1307', '13', '00,13', '张家口市', '13', '河北省', '1307', '张家口市', '', '', '', '', '', '', 2, 1, ''), ('130702', '1307', '00,13,1307', '桥东区', '13', '河北省', '1307', '张家口市', '130702', '桥东区', '', '', '', '', 3, 1, ''), ('130703', '1307', '00,13,1307', '桥西区', '13', '河北省', '1307', '张家口市', '130703', '桥西区', '', '', '', '', 3, 1, ''), ('130705', '1307', '00,13,1307', '宣化区', '13', '河北省', '1307', '张家口市', '130705', '宣化区', '', '', '', '', 3, 1, ''), ('130706', '1307', '00,13,1307', '下花园区', '13', '河北省', '1307', '张家口市', '130706', '下花园区', '', '', '', '', 3, 1, ''), ('130708', '1307', '00,13,1307', '万全区', '13', '河北省', '1307', '张家口市', '130708', '万全区', '', '', '', '', 3, 1, ''), ('130709', '1307', '00,13,1307', '崇礼区', '13', '河北省', '1307', '张家口市', '130709', '崇礼区', '', '', '', '', 3, 1, ''), ('130722', '1307', '00,13,1307', '张北县', '13', '河北省', '1307', '张家口市', '130722', '张北县', '', '', '', '', 3, 1, ''), ('130723', '1307', '00,13,1307', '康保县', '13', '河北省', '1307', '张家口市', '130723', '康保县', '', '', '', '', 3, 1, ''), ('130724', '1307', '00,13,1307', '沽源县', '13', '河北省', '1307', '张家口市', '130724', '沽源县', '', '', '', '', 3, 1, ''), ('130725', '1307', '00,13,1307', '尚义县', '13', '河北省', '1307', '张家口市', '130725', '尚义县', '', '', '', '', 3, 1, ''), ('130726', '1307', '00,13,1307', '蔚县', '13', '河北省', '1307', '张家口市', '130726', '蔚县', '', '', '', '', 3, 1, ''), ('130727', '1307', '00,13,1307', '阳原县', '13', '河北省', '1307', '张家口市', '130727', '阳原县', '', '', '', '', 3, 1, ''), ('130728', '1307', '00,13,1307', '怀安县', '13', '河北省', '1307', '张家口市', '130728', '怀安县', '', '', '', '', 3, 1, ''), ('130730', '1307', '00,13,1307', '怀来县', '13', '河北省', '1307', '张家口市', '130730', '怀来县', '', '', '', '', 3, 1, ''), ('130731', '1307', '00,13,1307', '涿鹿县', '13', '河北省', '1307', '张家口市', '130731', '涿鹿县', '', '', '', '', 3, 1, ''), ('130732', '1307', '00,13,1307', '赤城县', '13', '河北省', '1307', '张家口市', '130732', '赤城县', '', '', '', '', 3, 1, ''), ('1308', '13', '00,13', '承德市', '13', '河北省', '1308', '承德市', '', '', '', '', '', '', 2, 1, ''), ('130802', '1308', '00,13,1308', '双桥区', '13', '河北省', '1308', '承德市', '130802', '双桥区', '', '', '', '', 3, 1, ''), ('130803', '1308', '00,13,1308', '双滦区', '13', '河北省', '1308', '承德市', '130803', '双滦区', '', '', '', '', 3, 1, ''), ('130804', '1308', '00,13,1308', '鹰手营子矿区', '13', '河北省', '1308', '承德市', '130804', '鹰手营子矿区', '', '', '', '', 3, 1, ''), ('130821', '1308', '00,13,1308', '承德县', '13', '河北省', '1308', '承德市', '130821', '承德县', '', '', '', '', 3, 1, ''), ('130822', '1308', '00,13,1308', '兴隆县', '13', '河北省', '1308', '承德市', '130822', '兴隆县', '', '', '', '', 3, 1, ''), ('130824', '1308', '00,13,1308', '滦平县', '13', '河北省', '1308', '承德市', '130824', '滦平县', '', '', '', '', 3, 1, ''), ('130825', '1308', '00,13,1308', '隆化县', '13', '河北省', '1308', '承德市', '130825', '隆化县', '', '', '', '', 3, 1, ''), ('130826', '1308', '00,13,1308', '丰宁满族自治县', '13', '河北省', '1308', '承德市', '130826', '丰宁满族自治县', '', '', '', '', 3, 1, ''), ('130827', '1308', '00,13,1308', '宽城满族自治县', '13', '河北省', '1308', '承德市', '130827', '宽城满族自治县', '', '', '', '', 3, 1, ''), ('130828', '1308', '00,13,1308', '围场满族蒙古族自治县', '13', '河北省', '1308', '承德市', '130828', '围场满族蒙古族自治县', '', '', '', '', 3, 1, ''), ('130881', '1308', '00,13,1308', '平泉市', '13', '河北省', '1308', '承德市', '130881', '平泉市', '', '', '', '', 3, 1, ''), ('1309', '13', '00,13', '沧州市', '13', '河北省', '1309', '沧州市', '', '', '', '', '', '', 2, 1, ''), ('130902', '1309', '00,13,1309', '新华区', '13', '河北省', '1309', '沧州市', '130902', '新华区', '', '', '', '', 3, 1, ''), ('130903', '1309', '00,13,1309', '运河区', '13', '河北省', '1309', '沧州市', '130903', '运河区', '', '', '', '', 3, 1, ''), ('130921', '1309', '00,13,1309', '沧县', '13', '河北省', '1309', '沧州市', '130921', '沧县', '', '', '', '', 3, 1, ''), ('130922', '1309', '00,13,1309', '青县', '13', '河北省', '1309', '沧州市', '130922', '青县', '', '', '', '', 3, 1, ''), ('130923', '1309', '00,13,1309', '东光县', '13', '河北省', '1309', '沧州市', '130923', '东光县', '', '', '', '', 3, 1, ''), ('130924', '1309', '00,13,1309', '海兴县', '13', '河北省', '1309', '沧州市', '130924', '海兴县', '', '', '', '', 3, 1, ''), ('130925', '1309', '00,13,1309', '盐山县', '13', '河北省', '1309', '沧州市', '130925', '盐山县', '', '', '', '', 3, 1, ''), ('130926', '1309', '00,13,1309', '肃宁县', '13', '河北省', '1309', '沧州市', '130926', '肃宁县', '', '', '', '', 3, 1, ''), ('130927', '1309', '00,13,1309', '南皮县', '13', '河北省', '1309', '沧州市', '130927', '南皮县', '', '', '', '', 3, 1, ''), ('130928', '1309', '00,13,1309', '吴桥县', '13', '河北省', '1309', '沧州市', '130928', '吴桥县', '', '', '', '', 3, 1, ''), ('130929', '1309', '00,13,1309', '献县', '13', '河北省', '1309', '沧州市', '130929', '献县', '', '', '', '', 3, 1, ''), ('130930', '1309', '00,13,1309', '孟村回族自治县', '13', '河北省', '1309', '沧州市', '130930', '孟村回族自治县', '', '', '', '', 3, 1, ''), ('130981', '1309', '00,13,1309', '泊头市', '13', '河北省', '1309', '沧州市', '130981', '泊头市', '', '', '', '', 3, 1, ''), ('130982', '1309', '00,13,1309', '任丘市', '13', '河北省', '1309', '沧州市', '130982', '任丘市', '', '', '', '', 3, 1, ''), ('130983', '1309', '00,13,1309', '黄骅市', '13', '河北省', '1309', '沧州市', '130983', '黄骅市', '', '', '', '', 3, 1, ''), ('130984', '1309', '00,13,1309', '河间市', '13', '河北省', '1309', '沧州市', '130984', '河间市', '', '', '', '', 3, 1, ''), ('1310', '13', '00,13', '廊坊市', '13', '河北省', '1310', '廊坊市', '', '', '', '', '', '', 2, 1, ''), ('131002', '1310', '00,13,1310', '安次区', '13', '河北省', '1310', '廊坊市', '131002', '安次区', '', '', '', '', 3, 1, ''), ('131003', '1310', '00,13,1310', '广阳区', '13', '河北省', '1310', '廊坊市', '131003', '广阳区', '', '', '', '', 3, 1, ''), ('131022', '1310', '00,13,1310', '固安县', '13', '河北省', '1310', '廊坊市', '131022', '固安县', '', '', '', '', 3, 1, ''), ('131023', '1310', '00,13,1310', '永清县', '13', '河北省', '1310', '廊坊市', '131023', '永清县', '', '', '', '', 3, 1, ''), ('131024', '1310', '00,13,1310', '香河县', '13', '河北省', '1310', '廊坊市', '131024', '香河县', '', '', '', '', 3, 1, ''), ('131025', '1310', '00,13,1310', '大城县', '13', '河北省', '1310', '廊坊市', '131025', '大城县', '', '', '', '', 3, 1, ''), ('131026', '1310', '00,13,1310', '文安县', '13', '河北省', '1310', '廊坊市', '131026', '文安县', '', '', '', '', 3, 1, ''), ('131028', '1310', '00,13,1310', '大厂回族自治县', '13', '河北省', '1310', '廊坊市', '131028', '大厂回族自治县', '', '', '', '', 3, 1, ''), ('131081', '1310', '00,13,1310', '霸州市', '13', '河北省', '1310', '廊坊市', '131081', '霸州市', '', '', '', '', 3, 1, ''), ('131082', '1310', '00,13,1310', '三河市', '13', '河北省', '1310', '廊坊市', '131082', '三河市', '', '', '', '', 3, 1, ''), ('1311', '13', '00,13', '衡水市', '13', '河北省', '1311', '衡水市', '', '', '', '', '', '', 2, 1, ''), ('131102', '1311', '00,13,1311', '桃城区', '13', '河北省', '1311', '衡水市', '131102', '桃城区', '', '', '', '', 3, 1, ''), ('131103', '1311', '00,13,1311', '冀州区', '13', '河北省', '1311', '衡水市', '131103', '冀州区', '', '', '', '', 3, 1, ''), ('131121', '1311', '00,13,1311', '枣强县', '13', '河北省', '1311', '衡水市', '131121', '枣强县', '', '', '', '', 3, 1, ''), ('131122', '1311', '00,13,1311', '武邑县', '13', '河北省', '1311', '衡水市', '131122', '武邑县', '', '', '', '', 3, 1, ''), ('131123', '1311', '00,13,1311', '武强县', '13', '河北省', '1311', '衡水市', '131123', '武强县', '', '', '', '', 3, 1, ''), ('131124', '1311', '00,13,1311', '饶阳县', '13', '河北省', '1311', '衡水市', '131124', '饶阳县', '', '', '', '', 3, 1, ''), ('131125', '1311', '00,13,1311', '安平县', '13', '河北省', '1311', '衡水市', '131125', '安平县', '', '', '', '', 3, 1, ''), ('131126', '1311', '00,13,1311', '故城县', '13', '河北省', '1311', '衡水市', '131126', '故城县', '', '', '', '', 3, 1, ''), ('131127', '1311', '00,13,1311', '景县', '13', '河北省', '1311', '衡水市', '131127', '景县', '', '', '', '', 3, 1, ''), ('131128', '1311', '00,13,1311', '阜城县', '13', '河北省', '1311', '衡水市', '131128', '阜城县', '', '', '', '', 3, 1, ''), ('131182', '1311', '00,13,1311', '深州市', '13', '河北省', '1311', '衡水市', '131182', '深州市', '', '', '', '', 3, 1, ''), ('14', '00', '00', '山西省', '14', '山西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1401', '14', '00,14', '太原市', '14', '山西省', '1401', '太原市', '', '', '', '', '', '', 2, 1, ''), ('140105', '1401', '00,14,1401', '小店区', '14', '山西省', '1401', '太原市', '140105', '小店区', '', '', '', '', 3, 1, ''), ('140106', '1401', '00,14,1401', '迎泽区', '14', '山西省', '1401', '太原市', '140106', '迎泽区', '', '', '', '', 3, 1, ''), ('140107', '1401', '00,14,1401', '杏花岭区', '14', '山西省', '1401', '太原市', '140107', '杏花岭区', '', '', '', '', 3, 1, ''), ('140108', '1401', '00,14,1401', '尖草坪区', '14', '山西省', '1401', '太原市', '140108', '尖草坪区', '', '', '', '', 3, 1, ''), ('140109', '1401', '00,14,1401', '万柏林区', '14', '山西省', '1401', '太原市', '140109', '万柏林区', '', '', '', '', 3, 1, ''), ('140110', '1401', '00,14,1401', '晋源区', '14', '山西省', '1401', '太原市', '140110', '晋源区', '', '', '', '', 3, 1, ''), ('140121', '1401', '00,14,1401', '清徐县', '14', '山西省', '1401', '太原市', '140121', '清徐县', '', '', '', '', 3, 1, ''), ('140122', '1401', '00,14,1401', '阳曲县', '14', '山西省', '1401', '太原市', '140122', '阳曲县', '', '', '', '', 3, 1, ''), ('140123', '1401', '00,14,1401', '娄烦县', '14', '山西省', '1401', '太原市', '140123', '娄烦县', '', '', '', '', 3, 1, ''), ('140181', '1401', '00,14,1401', '古交市', '14', '山西省', '1401', '太原市', '140181', '古交市', '', '', '', '', 3, 1, ''), ('1402', '14', '00,14', '大同市', '14', '山西省', '1402', '大同市', '', '', '', '', '', '', 2, 1, ''), ('140212', '1402', '00,14,1402', '新荣区', '14', '山西省', '1402', '大同市', '140212', '新荣区', '', '', '', '', 3, 1, ''), ('140213', '1402', '00,14,1402', '平城区', '14', '山西省', '1402', '大同市', '140213', '平城区', '', '', '', '', 3, 1, ''), ('140214', '1402', '00,14,1402', '云冈区', '14', '山西省', '1402', '大同市', '140214', '云冈区', '', '', '', '', 3, 1, ''), ('140215', '1402', '00,14,1402', '云州区', '14', '山西省', '1402', '大同市', '140215', '云州区', '', '', '', '', 3, 1, ''), ('140221', '1402', '00,14,1402', '阳高县', '14', '山西省', '1402', '大同市', '140221', '阳高县', '', '', '', '', 3, 1, ''), ('140222', '1402', '00,14,1402', '天镇县', '14', '山西省', '1402', '大同市', '140222', '天镇县', '', '', '', '', 3, 1, ''), ('140223', '1402', '00,14,1402', '广灵县', '14', '山西省', '1402', '大同市', '140223', '广灵县', '', '', '', '', 3, 1, ''), ('140224', '1402', '00,14,1402', '灵丘县', '14', '山西省', '1402', '大同市', '140224', '灵丘县', '', '', '', '', 3, 1, ''), ('140225', '1402', '00,14,1402', '浑源县', '14', '山西省', '1402', '大同市', '140225', '浑源县', '', '', '', '', 3, 1, ''), ('140226', '1402', '00,14,1402', '左云县', '14', '山西省', '1402', '大同市', '140226', '左云县', '', '', '', '', 3, 1, ''), ('1403', '14', '00,14', '阳泉市', '14', '山西省', '1403', '阳泉市', '', '', '', '', '', '', 2, 1, ''), ('140302', '1403', '00,14,1403', '城区', '14', '山西省', '1403', '阳泉市', '140302', '城区', '', '', '', '', 3, 1, ''), ('140303', '1403', '00,14,1403', '矿区', '14', '山西省', '1403', '阳泉市', '140303', '矿区', '', '', '', '', 3, 1, ''), ('140311', '1403', '00,14,1403', '郊区', '14', '山西省', '1403', '阳泉市', '140311', '郊区', '', '', '', '', 3, 1, ''), ('140321', '1403', '00,14,1403', '平定县', '14', '山西省', '1403', '阳泉市', '140321', '平定县', '', '', '', '', 3, 1, ''), ('140322', '1403', '00,14,1403', '盂县', '14', '山西省', '1403', '阳泉市', '140322', '盂县', '', '', '', '', 3, 1, ''), ('1404', '14', '00,14', '长治市', '14', '山西省', '1404', '长治市', '', '', '', '', '', '', 2, 1, ''), ('140403', '1404', '00,14,1404', '潞州区', '14', '山西省', '1404', '长治市', '140403', '潞州区', '', '', '', '', 3, 1, ''), ('140404', '1404', '00,14,1404', '上党区', '14', '山西省', '1404', '长治市', '140404', '上党区', '', '', '', '', 3, 1, ''), ('140405', '1404', '00,14,1404', '屯留区', '14', '山西省', '1404', '长治市', '140405', '屯留区', '', '', '', '', 3, 1, ''), ('140406', '1404', '00,14,1404', '潞城区', '14', '山西省', '1404', '长治市', '140406', '潞城区', '', '', '', '', 3, 1, ''), ('140423', '1404', '00,14,1404', '襄垣县', '14', '山西省', '1404', '长治市', '140423', '襄垣县', '', '', '', '', 3, 1, ''), ('140425', '1404', '00,14,1404', '平顺县', '14', '山西省', '1404', '长治市', '140425', '平顺县', '', '', '', '', 3, 1, ''), ('140426', '1404', '00,14,1404', '黎城县', '14', '山西省', '1404', '长治市', '140426', '黎城县', '', '', '', '', 3, 1, ''), ('140427', '1404', '00,14,1404', '壶关县', '14', '山西省', '1404', '长治市', '140427', '壶关县', '', '', '', '', 3, 1, ''), ('140428', '1404', '00,14,1404', '长子县', '14', '山西省', '1404', '长治市', '140428', '长子县', '', '', '', '', 3, 1, ''), ('140429', '1404', '00,14,1404', '武乡县', '14', '山西省', '1404', '长治市', '140429', '武乡县', '', '', '', '', 3, 1, ''), ('140430', '1404', '00,14,1404', '沁县', '14', '山西省', '1404', '长治市', '140430', '沁县', '', '', '', '', 3, 1, ''), ('140431', '1404', '00,14,1404', '沁源县', '14', '山西省', '1404', '长治市', '140431', '沁源县', '', '', '', '', 3, 1, ''), ('1405', '14', '00,14', '晋城市', '14', '山西省', '1405', '晋城市', '', '', '', '', '', '', 2, 1, ''), ('140502', '1405', '00,14,1405', '城区', '14', '山西省', '1405', '晋城市', '140502', '城区', '', '', '', '', 3, 1, ''), ('140521', '1405', '00,14,1405', '沁水县', '14', '山西省', '1405', '晋城市', '140521', '沁水县', '', '', '', '', 3, 1, ''), ('140522', '1405', '00,14,1405', '阳城县', '14', '山西省', '1405', '晋城市', '140522', '阳城县', '', '', '', '', 3, 1, ''), ('140524', '1405', '00,14,1405', '陵川县', '14', '山西省', '1405', '晋城市', '140524', '陵川县', '', '', '', '', 3, 1, ''), ('140525', '1405', '00,14,1405', '泽州县', '14', '山西省', '1405', '晋城市', '140525', '泽州县', '', '', '', '', 3, 1, ''), ('140581', '1405', '00,14,1405', '高平市', '14', '山西省', '1405', '晋城市', '140581', '高平市', '', '', '', '', 3, 1, ''), ('1406', '14', '00,14', '朔州市', '14', '山西省', '1406', '朔州市', '', '', '', '', '', '', 2, 1, ''), ('140602', '1406', '00,14,1406', '朔城区', '14', '山西省', '1406', '朔州市', '140602', '朔城区', '', '', '', '', 3, 1, ''), ('140603', '1406', '00,14,1406', '平鲁区', '14', '山西省', '1406', '朔州市', '140603', '平鲁区', '', '', '', '', 3, 1, ''), ('140621', '1406', '00,14,1406', '山阴县', '14', '山西省', '1406', '朔州市', '140621', '山阴县', '', '', '', '', 3, 1, ''), ('140622', '1406', '00,14,1406', '应县', '14', '山西省', '1406', '朔州市', '140622', '应县', '', '', '', '', 3, 1, ''), ('140623', '1406', '00,14,1406', '右玉县', '14', '山西省', '1406', '朔州市', '140623', '右玉县', '', '', '', '', 3, 1, ''), ('140681', '1406', '00,14,1406', '怀仁市', '14', '山西省', '1406', '朔州市', '140681', '怀仁市', '', '', '', '', 3, 1, ''), ('1407', '14', '00,14', '晋中市', '14', '山西省', '1407', '晋中市', '', '', '', '', '', '', 2, 1, ''), ('140702', '1407', '00,14,1407', '榆次区', '14', '山西省', '1407', '晋中市', '140702', '榆次区', '', '', '', '', 3, 1, ''), ('140703', '1407', '00,14,1407', '太谷区', '14', '山西省', '1407', '晋中市', '140703', '太谷区', '', '', '', '', 3, 1, ''), ('140721', '1407', '00,14,1407', '榆社县', '14', '山西省', '1407', '晋中市', '140721', '榆社县', '', '', '', '', 3, 1, ''), ('140722', '1407', '00,14,1407', '左权县', '14', '山西省', '1407', '晋中市', '140722', '左权县', '', '', '', '', 3, 1, ''), ('140723', '1407', '00,14,1407', '和顺县', '14', '山西省', '1407', '晋中市', '140723', '和顺县', '', '', '', '', 3, 1, ''), ('140724', '1407', '00,14,1407', '昔阳县', '14', '山西省', '1407', '晋中市', '140724', '昔阳县', '', '', '', '', 3, 1, ''), ('140725', '1407', '00,14,1407', '寿阳县', '14', '山西省', '1407', '晋中市', '140725', '寿阳县', '', '', '', '', 3, 1, ''), ('140727', '1407', '00,14,1407', '祁县', '14', '山西省', '1407', '晋中市', '140727', '祁县', '', '', '', '', 3, 1, ''), ('140728', '1407', '00,14,1407', '平遥县', '14', '山西省', '1407', '晋中市', '140728', '平遥县', '', '', '', '', 3, 1, ''), ('140729', '1407', '00,14,1407', '灵石县', '14', '山西省', '1407', '晋中市', '140729', '灵石县', '', '', '', '', 3, 1, ''), ('140781', '1407', '00,14,1407', '介休市', '14', '山西省', '1407', '晋中市', '140781', '介休市', '', '', '', '', 3, 1, ''), ('1408', '14', '00,14', '运城市', '14', '山西省', '1408', '运城市', '', '', '', '', '', '', 2, 1, ''), ('140802', '1408', '00,14,1408', '盐湖区', '14', '山西省', '1408', '运城市', '140802', '盐湖区', '', '', '', '', 3, 1, ''), ('140821', '1408', '00,14,1408', '临猗县', '14', '山西省', '1408', '运城市', '140821', '临猗县', '', '', '', '', 3, 1, ''), ('140822', '1408', '00,14,1408', '万荣县', '14', '山西省', '1408', '运城市', '140822', '万荣县', '', '', '', '', 3, 1, ''), ('140823', '1408', '00,14,1408', '闻喜县', '14', '山西省', '1408', '运城市', '140823', '闻喜县', '', '', '', '', 3, 1, ''), ('140824', '1408', '00,14,1408', '稷山县', '14', '山西省', '1408', '运城市', '140824', '稷山县', '', '', '', '', 3, 1, ''), ('140825', '1408', '00,14,1408', '新绛县', '14', '山西省', '1408', '运城市', '140825', '新绛县', '', '', '', '', 3, 1, ''), ('140826', '1408', '00,14,1408', '绛县', '14', '山西省', '1408', '运城市', '140826', '绛县', '', '', '', '', 3, 1, ''), ('140827', '1408', '00,14,1408', '垣曲县', '14', '山西省', '1408', '运城市', '140827', '垣曲县', '', '', '', '', 3, 1, ''), ('140828', '1408', '00,14,1408', '夏县', '14', '山西省', '1408', '运城市', '140828', '夏县', '', '', '', '', 3, 1, ''), ('140829', '1408', '00,14,1408', '平陆县', '14', '山西省', '1408', '运城市', '140829', '平陆县', '', '', '', '', 3, 1, ''), ('140830', '1408', '00,14,1408', '芮城县', '14', '山西省', '1408', '运城市', '140830', '芮城县', '', '', '', '', 3, 1, ''), ('140881', '1408', '00,14,1408', '永济市', '14', '山西省', '1408', '运城市', '140881', '永济市', '', '', '', '', 3, 1, ''), ('140882', '1408', '00,14,1408', '河津市', '14', '山西省', '1408', '运城市', '140882', '河津市', '', '', '', '', 3, 1, ''), ('1409', '14', '00,14', '忻州市', '14', '山西省', '1409', '忻州市', '', '', '', '', '', '', 2, 1, ''), ('140902', '1409', '00,14,1409', '忻府区', '14', '山西省', '1409', '忻州市', '140902', '忻府区', '', '', '', '', 3, 1, ''), ('140921', '1409', '00,14,1409', '定襄县', '14', '山西省', '1409', '忻州市', '140921', '定襄县', '', '', '', '', 3, 1, ''), ('140922', '1409', '00,14,1409', '五台县', '14', '山西省', '1409', '忻州市', '140922', '五台县', '', '', '', '', 3, 1, ''), ('140923', '1409', '00,14,1409', '代县', '14', '山西省', '1409', '忻州市', '140923', '代县', '', '', '', '', 3, 1, ''), ('140924', '1409', '00,14,1409', '繁峙县', '14', '山西省', '1409', '忻州市', '140924', '繁峙县', '', '', '', '', 3, 1, ''), ('140925', '1409', '00,14,1409', '宁武县', '14', '山西省', '1409', '忻州市', '140925', '宁武县', '', '', '', '', 3, 1, ''), ('140926', '1409', '00,14,1409', '静乐县', '14', '山西省', '1409', '忻州市', '140926', '静乐县', '', '', '', '', 3, 1, ''), ('140927', '1409', '00,14,1409', '神池县', '14', '山西省', '1409', '忻州市', '140927', '神池县', '', '', '', '', 3, 1, ''), ('140928', '1409', '00,14,1409', '五寨县', '14', '山西省', '1409', '忻州市', '140928', '五寨县', '', '', '', '', 3, 1, ''), ('140929', '1409', '00,14,1409', '岢岚县', '14', '山西省', '1409', '忻州市', '140929', '岢岚县', '', '', '', '', 3, 1, ''), ('140930', '1409', '00,14,1409', '河曲县', '14', '山西省', '1409', '忻州市', '140930', '河曲县', '', '', '', '', 3, 1, ''), ('140931', '1409', '00,14,1409', '保德县', '14', '山西省', '1409', '忻州市', '140931', '保德县', '', '', '', '', 3, 1, ''), ('140932', '1409', '00,14,1409', '偏关县', '14', '山西省', '1409', '忻州市', '140932', '偏关县', '', '', '', '', 3, 1, ''), ('140981', '1409', '00,14,1409', '原平市', '14', '山西省', '1409', '忻州市', '140981', '原平市', '', '', '', '', 3, 1, ''), ('1410', '14', '00,14', '临汾市', '14', '山西省', '1410', '临汾市', '', '', '', '', '', '', 2, 1, ''), ('141002', '1410', '00,14,1410', '尧都区', '14', '山西省', '1410', '临汾市', '141002', '尧都区', '', '', '', '', 3, 1, ''), ('141021', '1410', '00,14,1410', '曲沃县', '14', '山西省', '1410', '临汾市', '141021', '曲沃县', '', '', '', '', 3, 1, ''), ('141022', '1410', '00,14,1410', '翼城县', '14', '山西省', '1410', '临汾市', '141022', '翼城县', '', '', '', '', 3, 1, ''), ('141023', '1410', '00,14,1410', '襄汾县', '14', '山西省', '1410', '临汾市', '141023', '襄汾县', '', '', '', '', 3, 1, ''), ('141024', '1410', '00,14,1410', '洪洞县', '14', '山西省', '1410', '临汾市', '141024', '洪洞县', '', '', '', '', 3, 1, ''), ('141025', '1410', '00,14,1410', '古县', '14', '山西省', '1410', '临汾市', '141025', '古县', '', '', '', '', 3, 1, ''), ('141026', '1410', '00,14,1410', '安泽县', '14', '山西省', '1410', '临汾市', '141026', '安泽县', '', '', '', '', 3, 1, ''), ('141027', '1410', '00,14,1410', '浮山县', '14', '山西省', '1410', '临汾市', '141027', '浮山县', '', '', '', '', 3, 1, ''), ('141028', '1410', '00,14,1410', '吉县', '14', '山西省', '1410', '临汾市', '141028', '吉县', '', '', '', '', 3, 1, ''), ('141029', '1410', '00,14,1410', '乡宁县', '14', '山西省', '1410', '临汾市', '141029', '乡宁县', '', '', '', '', 3, 1, ''), ('141030', '1410', '00,14,1410', '大宁县', '14', '山西省', '1410', '临汾市', '141030', '大宁县', '', '', '', '', 3, 1, ''), ('141031', '1410', '00,14,1410', '隰县', '14', '山西省', '1410', '临汾市', '141031', '隰县', '', '', '', '', 3, 1, ''), ('141032', '1410', '00,14,1410', '永和县', '14', '山西省', '1410', '临汾市', '141032', '永和县', '', '', '', '', 3, 1, ''), ('141033', '1410', '00,14,1410', '蒲县', '14', '山西省', '1410', '临汾市', '141033', '蒲县', '', '', '', '', 3, 1, ''), ('141034', '1410', '00,14,1410', '汾西县', '14', '山西省', '1410', '临汾市', '141034', '汾西县', '', '', '', '', 3, 1, ''), ('141081', '1410', '00,14,1410', '侯马市', '14', '山西省', '1410', '临汾市', '141081', '侯马市', '', '', '', '', 3, 1, ''), ('141082', '1410', '00,14,1410', '霍州市', '14', '山西省', '1410', '临汾市', '141082', '霍州市', '', '', '', '', 3, 1, ''), ('1411', '14', '00,14', '吕梁市', '14', '山西省', '1411', '吕梁市', '', '', '', '', '', '', 2, 1, ''), ('141102', '1411', '00,14,1411', '离石区', '14', '山西省', '1411', '吕梁市', '141102', '离石区', '', '', '', '', 3, 1, ''), ('141121', '1411', '00,14,1411', '文水县', '14', '山西省', '1411', '吕梁市', '141121', '文水县', '', '', '', '', 3, 1, ''), ('141122', '1411', '00,14,1411', '交城县', '14', '山西省', '1411', '吕梁市', '141122', '交城县', '', '', '', '', 3, 1, ''), ('141123', '1411', '00,14,1411', '兴县', '14', '山西省', '1411', '吕梁市', '141123', '兴县', '', '', '', '', 3, 1, ''), ('141124', '1411', '00,14,1411', '临县', '14', '山西省', '1411', '吕梁市', '141124', '临县', '', '', '', '', 3, 1, ''), ('141125', '1411', '00,14,1411', '柳林县', '14', '山西省', '1411', '吕梁市', '141125', '柳林县', '', '', '', '', 3, 1, ''), ('141126', '1411', '00,14,1411', '石楼县', '14', '山西省', '1411', '吕梁市', '141126', '石楼县', '', '', '', '', 3, 1, ''), ('141127', '1411', '00,14,1411', '岚县', '14', '山西省', '1411', '吕梁市', '141127', '岚县', '', '', '', '', 3, 1, ''), ('141128', '1411', '00,14,1411', '方山县', '14', '山西省', '1411', '吕梁市', '141128', '方山县', '', '', '', '', 3, 1, ''), ('141129', '1411', '00,14,1411', '中阳县', '14', '山西省', '1411', '吕梁市', '141129', '中阳县', '', '', '', '', 3, 1, ''), ('141130', '1411', '00,14,1411', '交口县', '14', '山西省', '1411', '吕梁市', '141130', '交口县', '', '', '', '', 3, 1, ''), ('141181', '1411', '00,14,1411', '孝义市', '14', '山西省', '1411', '吕梁市', '141181', '孝义市', '', '', '', '', 3, 1, ''), ('141182', '1411', '00,14,1411', '汾阳市', '14', '山西省', '1411', '吕梁市', '141182', '汾阳市', '', '', '', '', 3, 1, ''), ('15', '00', '00', '内蒙古自治区', '15', '内蒙古自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('1501', '15', '00,15', '呼和浩特市', '15', '内蒙古自治区', '1501', '呼和浩特市', '', '', '', '', '', '', 2, 1, ''), ('150102', '1501', '00,15,1501', '新城区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150102', '新城区', '', '', '', '', 3, 1, ''), ('150103', '1501', '00,15,1501', '回民区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150103', '回民区', '', '', '', '', 3, 1, ''), ('150104', '1501', '00,15,1501', '玉泉区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150104', '玉泉区', '', '', '', '', 3, 1, ''), ('150105', '1501', '00,15,1501', '赛罕区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150105', '赛罕区', '', '', '', '', 3, 1, ''), ('150121', '1501', '00,15,1501', '土默特左旗', '15', '内蒙古自治区', '1501', '呼和浩特市', '150121', '土默特左旗', '', '', '', '', 3, 1, ''), ('150122', '1501', '00,15,1501', '托克托县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150122', '托克托县', '', '', '', '', 3, 1, ''), ('150123', '1501', '00,15,1501', '和林格尔县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150123', '和林格尔县', '', '', '', '', 3, 1, ''), ('150124', '1501', '00,15,1501', '清水河县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150124', '清水河县', '', '', '', '', 3, 1, ''), ('150125', '1501', '00,15,1501', '武川县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150125', '武川县', '', '', '', '', 3, 1, ''), ('1502', '15', '00,15', '包头市', '15', '内蒙古自治区', '1502', '包头市', '', '', '', '', '', '', 2, 1, ''), ('150202', '1502', '00,15,1502', '东河区', '15', '内蒙古自治区', '1502', '包头市', '150202', '东河区', '', '', '', '', 3, 1, ''), ('150203', '1502', '00,15,1502', '昆都仑区', '15', '内蒙古自治区', '1502', '包头市', '150203', '昆都仑区', '', '', '', '', 3, 1, ''), ('150204', '1502', '00,15,1502', '青山区', '15', '内蒙古自治区', '1502', '包头市', '150204', '青山区', '', '', '', '', 3, 1, ''), ('150205', '1502', '00,15,1502', '石拐区', '15', '内蒙古自治区', '1502', '包头市', '150205', '石拐区', '', '', '', '', 3, 1, ''), ('150206', '1502', '00,15,1502', '白云鄂博矿区', '15', '内蒙古自治区', '1502', '包头市', '150206', '白云鄂博矿区', '', '', '', '', 3, 1, ''), ('150207', '1502', '00,15,1502', '九原区', '15', '内蒙古自治区', '1502', '包头市', '150207', '九原区', '', '', '', '', 3, 1, ''), ('150221', '1502', '00,15,1502', '土默特右旗', '15', '内蒙古自治区', '1502', '包头市', '150221', '土默特右旗', '', '', '', '', 3, 1, ''), ('150222', '1502', '00,15,1502', '固阳县', '15', '内蒙古自治区', '1502', '包头市', '150222', '固阳县', '', '', '', '', 3, 1, ''), ('150223', '1502', '00,15,1502', '达尔罕茂明安联合旗', '15', '内蒙古自治区', '1502', '包头市', '150223', '达尔罕茂明安联合旗', '', '', '', '', 3, 1, ''), ('1503', '15', '00,15', '乌海市', '15', '内蒙古自治区', '1503', '乌海市', '', '', '', '', '', '', 2, 1, ''), ('150302', '1503', '00,15,1503', '海勃湾区', '15', '内蒙古自治区', '1503', '乌海市', '150302', '海勃湾区', '', '', '', '', 3, 1, ''), ('150303', '1503', '00,15,1503', '海南区', '15', '内蒙古自治区', '1503', '乌海市', '150303', '海南区', '', '', '', '', 3, 1, ''), ('150304', '1503', '00,15,1503', '乌达区', '15', '内蒙古自治区', '1503', '乌海市', '150304', '乌达区', '', '', '', '', 3, 1, ''), ('1504', '15', '00,15', '赤峰市', '15', '内蒙古自治区', '1504', '赤峰市', '', '', '', '', '', '', 2, 1, ''), ('150402', '1504', '00,15,1504', '红山区', '15', '内蒙古自治区', '1504', '赤峰市', '150402', '红山区', '', '', '', '', 3, 1, ''), ('150403', '1504', '00,15,1504', '元宝山区', '15', '内蒙古自治区', '1504', '赤峰市', '150403', '元宝山区', '', '', '', '', 3, 1, ''), ('150404', '1504', '00,15,1504', '松山区', '15', '内蒙古自治区', '1504', '赤峰市', '150404', '松山区', '', '', '', '', 3, 1, ''), ('150421', '1504', '00,15,1504', '阿鲁科尔沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150421', '阿鲁科尔沁旗', '', '', '', '', 3, 1, ''), ('150422', '1504', '00,15,1504', '巴林左旗', '15', '内蒙古自治区', '1504', '赤峰市', '150422', '巴林左旗', '', '', '', '', 3, 1, ''), ('150423', '1504', '00,15,1504', '巴林右旗', '15', '内蒙古自治区', '1504', '赤峰市', '150423', '巴林右旗', '', '', '', '', 3, 1, ''), ('150424', '1504', '00,15,1504', '林西县', '15', '内蒙古自治区', '1504', '赤峰市', '150424', '林西县', '', '', '', '', 3, 1, ''), ('150425', '1504', '00,15,1504', '克什克腾旗', '15', '内蒙古自治区', '1504', '赤峰市', '150425', '克什克腾旗', '', '', '', '', 3, 1, ''), ('150426', '1504', '00,15,1504', '翁牛特旗', '15', '内蒙古自治区', '1504', '赤峰市', '150426', '翁牛特旗', '', '', '', '', 3, 1, ''), ('150428', '1504', '00,15,1504', '喀喇沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150428', '喀喇沁旗', '', '', '', '', 3, 1, ''), ('150429', '1504', '00,15,1504', '宁城县', '15', '内蒙古自治区', '1504', '赤峰市', '150429', '宁城县', '', '', '', '', 3, 1, ''), ('150430', '1504', '00,15,1504', '敖汉旗', '15', '内蒙古自治区', '1504', '赤峰市', '150430', '敖汉旗', '', '', '', '', 3, 1, ''), ('1505', '15', '00,15', '通辽市', '15', '内蒙古自治区', '1505', '通辽市', '', '', '', '', '', '', 2, 1, ''), ('150502', '1505', '00,15,1505', '科尔沁区', '15', '内蒙古自治区', '1505', '通辽市', '150502', '科尔沁区', '', '', '', '', 3, 1, ''), ('150521', '1505', '00,15,1505', '科尔沁左翼中旗', '15', '内蒙古自治区', '1505', '通辽市', '150521', '科尔沁左翼中旗', '', '', '', '', 3, 1, ''), ('150522', '1505', '00,15,1505', '科尔沁左翼后旗', '15', '内蒙古自治区', '1505', '通辽市', '150522', '科尔沁左翼后旗', '', '', '', '', 3, 1, ''), ('150523', '1505', '00,15,1505', '开鲁县', '15', '内蒙古自治区', '1505', '通辽市', '150523', '开鲁县', '', '', '', '', 3, 1, ''), ('150524', '1505', '00,15,1505', '库伦旗', '15', '内蒙古自治区', '1505', '通辽市', '150524', '库伦旗', '', '', '', '', 3, 1, ''), ('150525', '1505', '00,15,1505', '奈曼旗', '15', '内蒙古自治区', '1505', '通辽市', '150525', '奈曼旗', '', '', '', '', 3, 1, ''), ('150526', '1505', '00,15,1505', '扎鲁特旗', '15', '内蒙古自治区', '1505', '通辽市', '150526', '扎鲁特旗', '', '', '', '', 3, 1, ''), ('150581', '1505', '00,15,1505', '霍林郭勒市', '15', '内蒙古自治区', '1505', '通辽市', '150581', '霍林郭勒市', '', '', '', '', 3, 1, ''), ('1506', '15', '00,15', '鄂尔多斯市', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '', '', '', '', '', '', 2, 1, ''), ('150602', '1506', '00,15,1506', '东胜区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150602', '东胜区', '', '', '', '', 3, 1, ''), ('150603', '1506', '00,15,1506', '康巴什区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150603', '康巴什区', '', '', '', '', 3, 1, ''), ('150621', '1506', '00,15,1506', '达拉特旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150621', '达拉特旗', '', '', '', '', 3, 1, ''), ('150622', '1506', '00,15,1506', '准格尔旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150622', '准格尔旗', '', '', '', '', 3, 1, ''), ('150623', '1506', '00,15,1506', '鄂托克前旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150623', '鄂托克前旗', '', '', '', '', 3, 1, ''), ('150624', '1506', '00,15,1506', '鄂托克旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150624', '鄂托克旗', '', '', '', '', 3, 1, ''), ('150625', '1506', '00,15,1506', '杭锦旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150625', '杭锦旗', '', '', '', '', 3, 1, ''), ('150626', '1506', '00,15,1506', '乌审旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150626', '乌审旗', '', '', '', '', 3, 1, ''), ('150627', '1506', '00,15,1506', '伊金霍洛旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150627', '伊金霍洛旗', '', '', '', '', 3, 1, ''), ('1507', '15', '00,15', '呼伦贝尔市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '', '', '', '', '', '', 2, 1, ''), ('150702', '1507', '00,15,1507', '海拉尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150702', '海拉尔区', '', '', '', '', 3, 1, ''), ('150703', '1507', '00,15,1507', '扎赉诺尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150703', '扎赉诺尔区', '', '', '', '', 3, 1, ''), ('150721', '1507', '00,15,1507', '阿荣旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150721', '阿荣旗', '', '', '', '', 3, 1, ''), ('150722', '1507', '00,15,1507', '莫力达瓦达斡尔族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150722', '莫力达瓦达斡尔族自治旗', '', '', '', '', 3, 1, ''), ('150723', '1507', '00,15,1507', '鄂伦春自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150723', '鄂伦春自治旗', '', '', '', '', 3, 1, ''), ('150724', '1507', '00,15,1507', '鄂温克族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150724', '鄂温克族自治旗', '', '', '', '', 3, 1, ''), ('150725', '1507', '00,15,1507', '陈巴尔虎旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150725', '陈巴尔虎旗', '', '', '', '', 3, 1, ''), ('150726', '1507', '00,15,1507', '新巴尔虎左旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150726', '新巴尔虎左旗', '', '', '', '', 3, 1, ''), ('150727', '1507', '00,15,1507', '新巴尔虎右旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150727', '新巴尔虎右旗', '', '', '', '', 3, 1, ''), ('150781', '1507', '00,15,1507', '满洲里市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150781', '满洲里市', '', '', '', '', 3, 1, ''), ('150782', '1507', '00,15,1507', '牙克石市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150782', '牙克石市', '', '', '', '', 3, 1, ''), ('150783', '1507', '00,15,1507', '扎兰屯市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150783', '扎兰屯市', '', '', '', '', 3, 1, ''), ('150784', '1507', '00,15,1507', '额尔古纳市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150784', '额尔古纳市', '', '', '', '', 3, 1, ''), ('150785', '1507', '00,15,1507', '根河市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150785', '根河市', '', '', '', '', 3, 1, ''), ('1508', '15', '00,15', '巴彦淖尔市', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '', '', '', '', '', '', 2, 1, ''), ('150802', '1508', '00,15,1508', '临河区', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150802', '临河区', '', '', '', '', 3, 1, ''), ('150821', '1508', '00,15,1508', '五原县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150821', '五原县', '', '', '', '', 3, 1, ''), ('150822', '1508', '00,15,1508', '磴口县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150822', '磴口县', '', '', '', '', 3, 1, ''), ('150823', '1508', '00,15,1508', '乌拉特前旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150823', '乌拉特前旗', '', '', '', '', 3, 1, ''), ('150824', '1508', '00,15,1508', '乌拉特中旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150824', '乌拉特中旗', '', '', '', '', 3, 1, ''), ('150825', '1508', '00,15,1508', '乌拉特后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150825', '乌拉特后旗', '', '', '', '', 3, 1, ''), ('150826', '1508', '00,15,1508', '杭锦后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150826', '杭锦后旗', '', '', '', '', 3, 1, ''), ('1509', '15', '00,15', '乌兰察布市', '15', '内蒙古自治区', '1509', '乌兰察布市', '', '', '', '', '', '', 2, 1, ''), ('150902', '1509', '00,15,1509', '集宁区', '15', '内蒙古自治区', '1509', '乌兰察布市', '150902', '集宁区', '', '', '', '', 3, 1, ''), ('150921', '1509', '00,15,1509', '卓资县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150921', '卓资县', '', '', '', '', 3, 1, ''), ('150922', '1509', '00,15,1509', '化德县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150922', '化德县', '', '', '', '', 3, 1, ''), ('150923', '1509', '00,15,1509', '商都县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150923', '商都县', '', '', '', '', 3, 1, ''), ('150924', '1509', '00,15,1509', '兴和县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150924', '兴和县', '', '', '', '', 3, 1, ''), ('150925', '1509', '00,15,1509', '凉城县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150925', '凉城县', '', '', '', '', 3, 1, ''), ('150926', '1509', '00,15,1509', '察哈尔右翼前旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150926', '察哈尔右翼前旗', '', '', '', '', 3, 1, ''), ('150927', '1509', '00,15,1509', '察哈尔右翼中旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150927', '察哈尔右翼中旗', '', '', '', '', 3, 1, ''), ('150928', '1509', '00,15,1509', '察哈尔右翼后旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150928', '察哈尔右翼后旗', '', '', '', '', 3, 1, ''), ('150929', '1509', '00,15,1509', '四子王旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150929', '四子王旗', '', '', '', '', 3, 1, ''), ('150981', '1509', '00,15,1509', '丰镇市', '15', '内蒙古自治区', '1509', '乌兰察布市', '150981', '丰镇市', '', '', '', '', 3, 1, ''), ('1522', '15', '00,15', '兴安盟', '15', '内蒙古自治区', '1522', '兴安盟', '', '', '', '', '', '', 2, 1, ''), ('152201', '1522', '00,15,1522', '乌兰浩特市', '15', '内蒙古自治区', '1522', '兴安盟', '152201', '乌兰浩特市', '', '', '', '', 3, 1, ''), ('152202', '1522', '00,15,1522', '阿尔山市', '15', '内蒙古自治区', '1522', '兴安盟', '152202', '阿尔山市', '', '', '', '', 3, 1, ''), ('152221', '1522', '00,15,1522', '科尔沁右翼前旗', '15', '内蒙古自治区', '1522', '兴安盟', '152221', '科尔沁右翼前旗', '', '', '', '', 3, 1, ''), ('152222', '1522', '00,15,1522', '科尔沁右翼中旗', '15', '内蒙古自治区', '1522', '兴安盟', '152222', '科尔沁右翼中旗', '', '', '', '', 3, 1, ''), ('152223', '1522', '00,15,1522', '扎赉特旗', '15', '内蒙古自治区', '1522', '兴安盟', '152223', '扎赉特旗', '', '', '', '', 3, 1, ''), ('152224', '1522', '00,15,1522', '突泉县', '15', '内蒙古自治区', '1522', '兴安盟', '152224', '突泉县', '', '', '', '', 3, 1, ''), ('1525', '15', '00,15', '锡林郭勒盟', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '', '', '', '', '', '', 2, 1, ''), ('152501', '1525', '00,15,1525', '二连浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152501', '二连浩特市', '', '', '', '', 3, 1, ''), ('152502', '1525', '00,15,1525', '锡林浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152502', '锡林浩特市', '', '', '', '', 3, 1, ''), ('152522', '1525', '00,15,1525', '阿巴嘎旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152522', '阿巴嘎旗', '', '', '', '', 3, 1, ''), ('152523', '1525', '00,15,1525', '苏尼特左旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152523', '苏尼特左旗', '', '', '', '', 3, 1, ''), ('152524', '1525', '00,15,1525', '苏尼特右旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152524', '苏尼特右旗', '', '', '', '', 3, 1, ''), ('152525', '1525', '00,15,1525', '东乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152525', '东乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152526', '1525', '00,15,1525', '西乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152526', '西乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152527', '1525', '00,15,1525', '太仆寺旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152527', '太仆寺旗', '', '', '', '', 3, 1, ''), ('152528', '1525', '00,15,1525', '镶黄旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152528', '镶黄旗', '', '', '', '', 3, 1, ''), ('152529', '1525', '00,15,1525', '正镶白旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152529', '正镶白旗', '', '', '', '', 3, 1, ''), ('152530', '1525', '00,15,1525', '正蓝旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152530', '正蓝旗', '', '', '', '', 3, 1, ''), ('152531', '1525', '00,15,1525', '多伦县', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152531', '多伦县', '', '', '', '', 3, 1, ''), ('1529', '15', '00,15', '阿拉善盟', '15', '内蒙古自治区', '1529', '阿拉善盟', '', '', '', '', '', '', 2, 1, ''), ('152921', '1529', '00,15,1529', '阿拉善左旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152921', '阿拉善左旗', '', '', '', '', 3, 1, ''), ('152922', '1529', '00,15,1529', '阿拉善右旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152922', '阿拉善右旗', '', '', '', '', 3, 1, ''), ('152923', '1529', '00,15,1529', '额济纳旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152923', '额济纳旗', '', '', '', '', 3, 1, ''), ('21', '00', '00', '辽宁省', '21', '辽宁省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2101', '21', '00,21', '沈阳市', '21', '辽宁省', '2101', '沈阳市', '', '', '', '', '', '', 2, 1, ''), ('210102', '2101', '00,21,2101', '和平区', '21', '辽宁省', '2101', '沈阳市', '210102', '和平区', '', '', '', '', 3, 1, ''), ('210103', '2101', '00,21,2101', '沈河区', '21', '辽宁省', '2101', '沈阳市', '210103', '沈河区', '', '', '', '', 3, 1, ''), ('210104', '2101', '00,21,2101', '大东区', '21', '辽宁省', '2101', '沈阳市', '210104', '大东区', '', '', '', '', 3, 1, ''), ('210105', '2101', '00,21,2101', '皇姑区', '21', '辽宁省', '2101', '沈阳市', '210105', '皇姑区', '', '', '', '', 3, 1, ''), ('210106', '2101', '00,21,2101', '铁西区', '21', '辽宁省', '2101', '沈阳市', '210106', '铁西区', '', '', '', '', 3, 1, ''), ('210111', '2101', '00,21,2101', '苏家屯区', '21', '辽宁省', '2101', '沈阳市', '210111', '苏家屯区', '', '', '', '', 3, 1, ''), ('210112', '2101', '00,21,2101', '浑南区', '21', '辽宁省', '2101', '沈阳市', '210112', '浑南区', '', '', '', '', 3, 1, ''), ('210113', '2101', '00,21,2101', '沈北新区', '21', '辽宁省', '2101', '沈阳市', '210113', '沈北新区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('210114', '2101', '00,21,2101', '于洪区', '21', '辽宁省', '2101', '沈阳市', '210114', '于洪区', '', '', '', '', 3, 1, ''), ('210115', '2101', '00,21,2101', '辽中区', '21', '辽宁省', '2101', '沈阳市', '210115', '辽中区', '', '', '', '', 3, 1, ''), ('210123', '2101', '00,21,2101', '康平县', '21', '辽宁省', '2101', '沈阳市', '210123', '康平县', '', '', '', '', 3, 1, ''), ('210124', '2101', '00,21,2101', '法库县', '21', '辽宁省', '2101', '沈阳市', '210124', '法库县', '', '', '', '', 3, 1, ''), ('210181', '2101', '00,21,2101', '新民市', '21', '辽宁省', '2101', '沈阳市', '210181', '新民市', '', '', '', '', 3, 1, ''), ('2102', '21', '00,21', '大连市', '21', '辽宁省', '2102', '大连市', '', '', '', '', '', '', 2, 1, ''), ('210202', '2102', '00,21,2102', '中山区', '21', '辽宁省', '2102', '大连市', '210202', '中山区', '', '', '', '', 3, 1, ''), ('210203', '2102', '00,21,2102', '西岗区', '21', '辽宁省', '2102', '大连市', '210203', '西岗区', '', '', '', '', 3, 1, ''), ('210204', '2102', '00,21,2102', '沙河口区', '21', '辽宁省', '2102', '大连市', '210204', '沙河口区', '', '', '', '', 3, 1, ''), ('210211', '2102', '00,21,2102', '甘井子区', '21', '辽宁省', '2102', '大连市', '210211', '甘井子区', '', '', '', '', 3, 1, ''), ('210212', '2102', '00,21,2102', '旅顺口区', '21', '辽宁省', '2102', '大连市', '210212', '旅顺口区', '', '', '', '', 3, 1, ''), ('210213', '2102', '00,21,2102', '金州区', '21', '辽宁省', '2102', '大连市', '210213', '金州区', '', '', '', '', 3, 1, ''), ('210214', '2102', '00,21,2102', '普兰店区', '21', '辽宁省', '2102', '大连市', '210214', '普兰店区', '', '', '', '', 3, 1, ''), ('210224', '2102', '00,21,2102', '长海县', '21', '辽宁省', '2102', '大连市', '210224', '长海县', '', '', '', '', 3, 1, ''), ('210281', '2102', '00,21,2102', '瓦房店市', '21', '辽宁省', '2102', '大连市', '210281', '瓦房店市', '', '', '', '', 3, 1, ''), ('210283', '2102', '00,21,2102', '庄河市', '21', '辽宁省', '2102', '大连市', '210283', '庄河市', '', '', '', '', 3, 1, ''), ('2103', '21', '00,21', '鞍山市', '21', '辽宁省', '2103', '鞍山市', '', '', '', '', '', '', 2, 1, ''), ('210302', '2103', '00,21,2103', '铁东区', '21', '辽宁省', '2103', '鞍山市', '210302', '铁东区', '', '', '', '', 3, 1, ''), ('210303', '2103', '00,21,2103', '铁西区', '21', '辽宁省', '2103', '鞍山市', '210303', '铁西区', '', '', '', '', 3, 1, ''), ('210304', '2103', '00,21,2103', '立山区', '21', '辽宁省', '2103', '鞍山市', '210304', '立山区', '', '', '', '', 3, 1, ''), ('210311', '2103', '00,21,2103', '千山区', '21', '辽宁省', '2103', '鞍山市', '210311', '千山区', '', '', '', '', 3, 1, ''), ('210321', '2103', '00,21,2103', '台安县', '21', '辽宁省', '2103', '鞍山市', '210321', '台安县', '', '', '', '', 3, 1, ''), ('210323', '2103', '00,21,2103', '岫岩满族自治县', '21', '辽宁省', '2103', '鞍山市', '210323', '岫岩满族自治县', '', '', '', '', 3, 1, ''), ('210381', '2103', '00,21,2103', '海城市', '21', '辽宁省', '2103', '鞍山市', '210381', '海城市', '', '', '', '', 3, 1, ''), ('2104', '21', '00,21', '抚顺市', '21', '辽宁省', '2104', '抚顺市', '', '', '', '', '', '', 2, 1, ''), ('210402', '2104', '00,21,2104', '新抚区', '21', '辽宁省', '2104', '抚顺市', '210402', '新抚区', '', '', '', '', 3, 1, ''), ('210403', '2104', '00,21,2104', '东洲区', '21', '辽宁省', '2104', '抚顺市', '210403', '东洲区', '', '', '', '', 3, 1, ''), ('210404', '2104', '00,21,2104', '望花区', '21', '辽宁省', '2104', '抚顺市', '210404', '望花区', '', '', '', '', 3, 1, ''), ('210411', '2104', '00,21,2104', '顺城区', '21', '辽宁省', '2104', '抚顺市', '210411', '顺城区', '', '', '', '', 3, 1, ''), ('210421', '2104', '00,21,2104', '抚顺县', '21', '辽宁省', '2104', '抚顺市', '210421', '抚顺县', '', '', '', '', 3, 1, ''), ('210422', '2104', '00,21,2104', '新宾满族自治县', '21', '辽宁省', '2104', '抚顺市', '210422', '新宾满族自治县', '', '', '', '', 3, 1, ''), ('210423', '2104', '00,21,2104', '清原满族自治县', '21', '辽宁省', '2104', '抚顺市', '210423', '清原满族自治县', '', '', '', '', 3, 1, ''), ('2105', '21', '00,21', '本溪市', '21', '辽宁省', '2105', '本溪市', '', '', '', '', '', '', 2, 1, ''), ('210502', '2105', '00,21,2105', '平山区', '21', '辽宁省', '2105', '本溪市', '210502', '平山区', '', '', '', '', 3, 1, ''), ('210503', '2105', '00,21,2105', '溪湖区', '21', '辽宁省', '2105', '本溪市', '210503', '溪湖区', '', '', '', '', 3, 1, ''), ('210504', '2105', '00,21,2105', '明山区', '21', '辽宁省', '2105', '本溪市', '210504', '明山区', '', '', '', '', 3, 1, ''), ('210505', '2105', '00,21,2105', '南芬区', '21', '辽宁省', '2105', '本溪市', '210505', '南芬区', '', '', '', '', 3, 1, ''), ('210521', '2105', '00,21,2105', '本溪满族自治县', '21', '辽宁省', '2105', '本溪市', '210521', '本溪满族自治县', '', '', '', '', 3, 1, ''), ('210522', '2105', '00,21,2105', '桓仁满族自治县', '21', '辽宁省', '2105', '本溪市', '210522', '桓仁满族自治县', '', '', '', '', 3, 1, ''), ('2106', '21', '00,21', '丹东市', '21', '辽宁省', '2106', '丹东市', '', '', '', '', '', '', 2, 1, ''), ('210602', '2106', '00,21,2106', '元宝区', '21', '辽宁省', '2106', '丹东市', '210602', '元宝区', '', '', '', '', 3, 1, ''), ('210603', '2106', '00,21,2106', '振兴区', '21', '辽宁省', '2106', '丹东市', '210603', '振兴区', '', '', '', '', 3, 1, ''), ('210604', '2106', '00,21,2106', '振安区', '21', '辽宁省', '2106', '丹东市', '210604', '振安区', '', '', '', '', 3, 1, ''), ('210624', '2106', '00,21,2106', '宽甸满族自治县', '21', '辽宁省', '2106', '丹东市', '210624', '宽甸满族自治县', '', '', '', '', 3, 1, ''), ('210681', '2106', '00,21,2106', '东港市', '21', '辽宁省', '2106', '丹东市', '210681', '东港市', '', '', '', '', 3, 1, ''), ('210682', '2106', '00,21,2106', '凤城市', '21', '辽宁省', '2106', '丹东市', '210682', '凤城市', '', '', '', '', 3, 1, ''), ('2107', '21', '00,21', '锦州市', '21', '辽宁省', '2107', '锦州市', '', '', '', '', '', '', 2, 1, ''), ('210702', '2107', '00,21,2107', '古塔区', '21', '辽宁省', '2107', '锦州市', '210702', '古塔区', '', '', '', '', 3, 1, ''), ('210703', '2107', '00,21,2107', '凌河区', '21', '辽宁省', '2107', '锦州市', '210703', '凌河区', '', '', '', '', 3, 1, ''), ('210711', '2107', '00,21,2107', '太和区', '21', '辽宁省', '2107', '锦州市', '210711', '太和区', '', '', '', '', 3, 1, ''), ('210726', '2107', '00,21,2107', '黑山县', '21', '辽宁省', '2107', '锦州市', '210726', '黑山县', '', '', '', '', 3, 1, ''), ('210727', '2107', '00,21,2107', '义县', '21', '辽宁省', '2107', '锦州市', '210727', '义县', '', '', '', '', 3, 1, ''), ('210781', '2107', '00,21,2107', '凌海市', '21', '辽宁省', '2107', '锦州市', '210781', '凌海市', '', '', '', '', 3, 1, ''), ('210782', '2107', '00,21,2107', '北镇市', '21', '辽宁省', '2107', '锦州市', '210782', '北镇市', '', '', '', '', 3, 1, ''), ('2108', '21', '00,21', '营口市', '21', '辽宁省', '2108', '营口市', '', '', '', '', '', '', 2, 1, ''), ('210802', '2108', '00,21,2108', '站前区', '21', '辽宁省', '2108', '营口市', '210802', '站前区', '', '', '', '', 3, 1, ''), ('210803', '2108', '00,21,2108', '西市区', '21', '辽宁省', '2108', '营口市', '210803', '西市区', '', '', '', '', 3, 1, ''), ('210804', '2108', '00,21,2108', '鲅鱼圈区', '21', '辽宁省', '2108', '营口市', '210804', '鲅鱼圈区', '', '', '', '', 3, 1, ''), ('210811', '2108', '00,21,2108', '老边区', '21', '辽宁省', '2108', '营口市', '210811', '老边区', '', '', '', '', 3, 1, ''), ('210881', '2108', '00,21,2108', '盖州市', '21', '辽宁省', '2108', '营口市', '210881', '盖州市', '', '', '', '', 3, 1, ''), ('210882', '2108', '00,21,2108', '大石桥市', '21', '辽宁省', '2108', '营口市', '210882', '大石桥市', '', '', '', '', 3, 1, ''), ('2109', '21', '00,21', '阜新市', '21', '辽宁省', '2109', '阜新市', '', '', '', '', '', '', 2, 1, ''), ('210902', '2109', '00,21,2109', '海州区', '21', '辽宁省', '2109', '阜新市', '210902', '海州区', '', '', '', '', 3, 1, ''), ('210903', '2109', '00,21,2109', '新邱区', '21', '辽宁省', '2109', '阜新市', '210903', '新邱区', '', '', '', '', 3, 1, ''), ('210904', '2109', '00,21,2109', '太平区', '21', '辽宁省', '2109', '阜新市', '210904', '太平区', '', '', '', '', 3, 1, ''), ('210905', '2109', '00,21,2109', '清河门区', '21', '辽宁省', '2109', '阜新市', '210905', '清河门区', '', '', '', '', 3, 1, ''), ('210911', '2109', '00,21,2109', '细河区', '21', '辽宁省', '2109', '阜新市', '210911', '细河区', '', '', '', '', 3, 1, ''), ('210921', '2109', '00,21,2109', '阜新蒙古族自治县', '21', '辽宁省', '2109', '阜新市', '210921', '阜新蒙古族自治县', '', '', '', '', 3, 1, ''), ('210922', '2109', '00,21,2109', '彰武县', '21', '辽宁省', '2109', '阜新市', '210922', '彰武县', '', '', '', '', 3, 1, ''), ('2110', '21', '00,21', '辽阳市', '21', '辽宁省', '2110', '辽阳市', '', '', '', '', '', '', 2, 1, ''), ('211002', '2110', '00,21,2110', '白塔区', '21', '辽宁省', '2110', '辽阳市', '211002', '白塔区', '', '', '', '', 3, 1, ''), ('211003', '2110', '00,21,2110', '文圣区', '21', '辽宁省', '2110', '辽阳市', '211003', '文圣区', '', '', '', '', 3, 1, ''), ('211004', '2110', '00,21,2110', '宏伟区', '21', '辽宁省', '2110', '辽阳市', '211004', '宏伟区', '', '', '', '', 3, 1, ''), ('211005', '2110', '00,21,2110', '弓长岭区', '21', '辽宁省', '2110', '辽阳市', '211005', '弓长岭区', '', '', '', '', 3, 1, ''), ('211011', '2110', '00,21,2110', '太子河区', '21', '辽宁省', '2110', '辽阳市', '211011', '太子河区', '', '', '', '', 3, 1, ''), ('211021', '2110', '00,21,2110', '辽阳县', '21', '辽宁省', '2110', '辽阳市', '211021', '辽阳县', '', '', '', '', 3, 1, ''), ('211081', '2110', '00,21,2110', '灯塔市', '21', '辽宁省', '2110', '辽阳市', '211081', '灯塔市', '', '', '', '', 3, 1, ''), ('2111', '21', '00,21', '盘锦市', '21', '辽宁省', '2111', '盘锦市', '', '', '', '', '', '', 2, 1, ''), ('211102', '2111', '00,21,2111', '双台子区', '21', '辽宁省', '2111', '盘锦市', '211102', '双台子区', '', '', '', '', 3, 1, ''), ('211103', '2111', '00,21,2111', '兴隆台区', '21', '辽宁省', '2111', '盘锦市', '211103', '兴隆台区', '', '', '', '', 3, 1, ''), ('211104', '2111', '00,21,2111', '大洼区', '21', '辽宁省', '2111', '盘锦市', '211104', '大洼区', '', '', '', '', 3, 1, ''), ('211122', '2111', '00,21,2111', '盘山县', '21', '辽宁省', '2111', '盘锦市', '211122', '盘山县', '', '', '', '', 3, 1, ''), ('2112', '21', '00,21', '铁岭市', '21', '辽宁省', '2112', '铁岭市', '', '', '', '', '', '', 2, 1, ''), ('211202', '2112', '00,21,2112', '银州区', '21', '辽宁省', '2112', '铁岭市', '211202', '银州区', '', '', '', '', 3, 1, ''), ('211204', '2112', '00,21,2112', '清河区', '21', '辽宁省', '2112', '铁岭市', '211204', '清河区', '', '', '', '', 3, 1, ''), ('211221', '2112', '00,21,2112', '铁岭县', '21', '辽宁省', '2112', '铁岭市', '211221', '铁岭县', '', '', '', '', 3, 1, ''), ('211223', '2112', '00,21,2112', '西丰县', '21', '辽宁省', '2112', '铁岭市', '211223', '西丰县', '', '', '', '', 3, 1, ''), ('211224', '2112', '00,21,2112', '昌图县', '21', '辽宁省', '2112', '铁岭市', '211224', '昌图县', '', '', '', '', 3, 1, ''), ('211281', '2112', '00,21,2112', '调兵山市', '21', '辽宁省', '2112', '铁岭市', '211281', '调兵山市', '', '', '', '', 3, 1, ''), ('211282', '2112', '00,21,2112', '开原市', '21', '辽宁省', '2112', '铁岭市', '211282', '开原市', '', '', '', '', 3, 1, ''), ('2113', '21', '00,21', '朝阳市', '21', '辽宁省', '2113', '朝阳市', '', '', '', '', '', '', 2, 1, ''), ('211302', '2113', '00,21,2113', '双塔区', '21', '辽宁省', '2113', '朝阳市', '211302', '双塔区', '', '', '', '', 3, 1, ''), ('211303', '2113', '00,21,2113', '龙城区', '21', '辽宁省', '2113', '朝阳市', '211303', '龙城区', '', '', '', '', 3, 1, ''), ('211321', '2113', '00,21,2113', '朝阳县', '21', '辽宁省', '2113', '朝阳市', '211321', '朝阳县', '', '', '', '', 3, 1, ''), ('211322', '2113', '00,21,2113', '建平县', '21', '辽宁省', '2113', '朝阳市', '211322', '建平县', '', '', '', '', 3, 1, ''), ('211324', '2113', '00,21,2113', '喀喇沁左翼蒙古族自治县', '21', '辽宁省', '2113', '朝阳市', '211324', '喀喇沁左翼蒙古族自治县', '', '', '', '', 3, 1, ''), ('211381', '2113', '00,21,2113', '北票市', '21', '辽宁省', '2113', '朝阳市', '211381', '北票市', '', '', '', '', 3, 1, ''), ('211382', '2113', '00,21,2113', '凌源市', '21', '辽宁省', '2113', '朝阳市', '211382', '凌源市', '', '', '', '', 3, 1, ''), ('2114', '21', '00,21', '葫芦岛市', '21', '辽宁省', '2114', '葫芦岛市', '', '', '', '', '', '', 2, 1, ''), ('211402', '2114', '00,21,2114', '连山区', '21', '辽宁省', '2114', '葫芦岛市', '211402', '连山区', '', '', '', '', 3, 1, ''), ('211403', '2114', '00,21,2114', '龙港区', '21', '辽宁省', '2114', '葫芦岛市', '211403', '龙港区', '', '', '', '', 3, 1, ''), ('211404', '2114', '00,21,2114', '南票区', '21', '辽宁省', '2114', '葫芦岛市', '211404', '南票区', '', '', '', '', 3, 1, ''), ('211421', '2114', '00,21,2114', '绥中县', '21', '辽宁省', '2114', '葫芦岛市', '211421', '绥中县', '', '', '', '', 3, 1, ''), ('211422', '2114', '00,21,2114', '建昌县', '21', '辽宁省', '2114', '葫芦岛市', '211422', '建昌县', '', '', '', '', 3, 1, ''), ('211481', '2114', '00,21,2114', '兴城市', '21', '辽宁省', '2114', '葫芦岛市', '211481', '兴城市', '', '', '', '', 3, 1, ''), ('22', '00', '00', '吉林省', '22', '吉林省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2201', '22', '00,22', '长春市', '22', '吉林省', '2201', '长春市', '', '', '', '', '', '', 2, 1, ''), ('220102', '2201', '00,22,2201', '南关区', '22', '吉林省', '2201', '长春市', '220102', '南关区', '', '', '', '', 3, 1, ''), ('220103', '2201', '00,22,2201', '宽城区', '22', '吉林省', '2201', '长春市', '220103', '宽城区', '', '', '', '', 3, 1, ''), ('220104', '2201', '00,22,2201', '朝阳区', '22', '吉林省', '2201', '长春市', '220104', '朝阳区', '', '', '', '', 3, 1, ''), ('220105', '2201', '00,22,2201', '二道区', '22', '吉林省', '2201', '长春市', '220105', '二道区', '', '', '', '', 3, 1, ''), ('220106', '2201', '00,22,2201', '绿园区', '22', '吉林省', '2201', '长春市', '220106', '绿园区', '', '', '', '', 3, 1, ''), ('220112', '2201', '00,22,2201', '双阳区', '22', '吉林省', '2201', '长春市', '220112', '双阳区', '', '', '', '', 3, 1, ''), ('220113', '2201', '00,22,2201', '九台区', '22', '吉林省', '2201', '长春市', '220113', '九台区', '', '', '', '', 3, 1, ''), ('220122', '2201', '00,22,2201', '农安县', '22', '吉林省', '2201', '长春市', '220122', '农安县', '', '', '', '', 3, 1, ''), ('220182', '2201', '00,22,2201', '榆树市', '22', '吉林省', '2201', '长春市', '220182', '榆树市', '', '', '', '', 3, 1, ''), ('220183', '2201', '00,22,2201', '德惠市', '22', '吉林省', '2201', '长春市', '220183', '德惠市', '', '', '', '', 3, 1, ''), ('2202', '22', '00,22', '吉林市', '22', '吉林省', '2202', '吉林市', '', '', '', '', '', '', 2, 1, ''), ('220202', '2202', '00,22,2202', '昌邑区', '22', '吉林省', '2202', '吉林市', '220202', '昌邑区', '', '', '', '', 3, 1, ''), ('220203', '2202', '00,22,2202', '龙潭区', '22', '吉林省', '2202', '吉林市', '220203', '龙潭区', '', '', '', '', 3, 1, ''), ('220204', '2202', '00,22,2202', '船营区', '22', '吉林省', '2202', '吉林市', '220204', '船营区', '', '', '', '', 3, 1, ''), ('220211', '2202', '00,22,2202', '丰满区', '22', '吉林省', '2202', '吉林市', '220211', '丰满区', '', '', '', '', 3, 1, ''), ('220221', '2202', '00,22,2202', '永吉县', '22', '吉林省', '2202', '吉林市', '220221', '永吉县', '', '', '', '', 3, 1, ''), ('220281', '2202', '00,22,2202', '蛟河市', '22', '吉林省', '2202', '吉林市', '220281', '蛟河市', '', '', '', '', 3, 1, ''), ('220282', '2202', '00,22,2202', '桦甸市', '22', '吉林省', '2202', '吉林市', '220282', '桦甸市', '', '', '', '', 3, 1, ''), ('220283', '2202', '00,22,2202', '舒兰市', '22', '吉林省', '2202', '吉林市', '220283', '舒兰市', '', '', '', '', 3, 1, ''), ('220284', '2202', '00,22,2202', '磐石市', '22', '吉林省', '2202', '吉林市', '220284', '磐石市', '', '', '', '', 3, 1, ''), ('2203', '22', '00,22', '四平市', '22', '吉林省', '2203', '四平市', '', '', '', '', '', '', 2, 1, ''), ('220302', '2203', '00,22,2203', '铁西区', '22', '吉林省', '2203', '四平市', '220302', '铁西区', '', '', '', '', 3, 1, ''), ('220303', '2203', '00,22,2203', '铁东区', '22', '吉林省', '2203', '四平市', '220303', '铁东区', '', '', '', '', 3, 1, ''), ('220322', '2203', '00,22,2203', '梨树县', '22', '吉林省', '2203', '四平市', '220322', '梨树县', '', '', '', '', 3, 1, ''), ('220323', '2203', '00,22,2203', '伊通满族自治县', '22', '吉林省', '2203', '四平市', '220323', '伊通满族自治县', '', '', '', '', 3, 1, ''), ('220381', '2203', '00,22,2203', '公主岭市', '22', '吉林省', '2203', '四平市', '220381', '公主岭市', '', '', '', '', 3, 1, ''), ('220382', '2203', '00,22,2203', '双辽市', '22', '吉林省', '2203', '四平市', '220382', '双辽市', '', '', '', '', 3, 1, ''), ('2204', '22', '00,22', '辽源市', '22', '吉林省', '2204', '辽源市', '', '', '', '', '', '', 2, 1, ''), ('220402', '2204', '00,22,2204', '龙山区', '22', '吉林省', '2204', '辽源市', '220402', '龙山区', '', '', '', '', 3, 1, ''), ('220403', '2204', '00,22,2204', '西安区', '22', '吉林省', '2204', '辽源市', '220403', '西安区', '', '', '', '', 3, 1, ''), ('220421', '2204', '00,22,2204', '东丰县', '22', '吉林省', '2204', '辽源市', '220421', '东丰县', '', '', '', '', 3, 1, ''), ('220422', '2204', '00,22,2204', '东辽县', '22', '吉林省', '2204', '辽源市', '220422', '东辽县', '', '', '', '', 3, 1, ''), ('2205', '22', '00,22', '通化市', '22', '吉林省', '2205', '通化市', '', '', '', '', '', '', 2, 1, ''), ('220502', '2205', '00,22,2205', '东昌区', '22', '吉林省', '2205', '通化市', '220502', '东昌区', '', '', '', '', 3, 1, ''), ('220503', '2205', '00,22,2205', '二道江区', '22', '吉林省', '2205', '通化市', '220503', '二道江区', '', '', '', '', 3, 1, ''), ('220521', '2205', '00,22,2205', '通化县', '22', '吉林省', '2205', '通化市', '220521', '通化县', '', '', '', '', 3, 1, ''), ('220523', '2205', '00,22,2205', '辉南县', '22', '吉林省', '2205', '通化市', '220523', '辉南县', '', '', '', '', 3, 1, ''), ('220524', '2205', '00,22,2205', '柳河县', '22', '吉林省', '2205', '通化市', '220524', '柳河县', '', '', '', '', 3, 1, ''), ('220581', '2205', '00,22,2205', '梅河口市', '22', '吉林省', '2205', '通化市', '220581', '梅河口市', '', '', '', '', 3, 1, ''), ('220582', '2205', '00,22,2205', '集安市', '22', '吉林省', '2205', '通化市', '220582', '集安市', '', '', '', '', 3, 1, ''), ('2206', '22', '00,22', '白山市', '22', '吉林省', '2206', '白山市', '', '', '', '', '', '', 2, 1, ''), ('220602', '2206', '00,22,2206', '浑江区', '22', '吉林省', '2206', '白山市', '220602', '浑江区', '', '', '', '', 3, 1, ''), ('220605', '2206', '00,22,2206', '江源区', '22', '吉林省', '2206', '白山市', '220605', '江源区', '', '', '', '', 3, 1, ''), ('220621', '2206', '00,22,2206', '抚松县', '22', '吉林省', '2206', '白山市', '220621', '抚松县', '', '', '', '', 3, 1, ''), ('220622', '2206', '00,22,2206', '靖宇县', '22', '吉林省', '2206', '白山市', '220622', '靖宇县', '', '', '', '', 3, 1, ''), ('220623', '2206', '00,22,2206', '长白朝鲜族自治县', '22', '吉林省', '2206', '白山市', '220623', '长白朝鲜族自治县', '', '', '', '', 3, 1, ''), ('220681', '2206', '00,22,2206', '临江市', '22', '吉林省', '2206', '白山市', '220681', '临江市', '', '', '', '', 3, 1, ''), ('2207', '22', '00,22', '松原市', '22', '吉林省', '2207', '松原市', '', '', '', '', '', '', 2, 1, ''), ('220702', '2207', '00,22,2207', '宁江区', '22', '吉林省', '2207', '松原市', '220702', '宁江区', '', '', '', '', 3, 1, ''), ('220721', '2207', '00,22,2207', '前郭尔罗斯蒙古族自治县', '22', '吉林省', '2207', '松原市', '220721', '前郭尔罗斯蒙古族自治县', '', '', '', '', 3, 1, ''), ('220722', '2207', '00,22,2207', '长岭县', '22', '吉林省', '2207', '松原市', '220722', '长岭县', '', '', '', '', 3, 1, ''), ('220723', '2207', '00,22,2207', '乾安县', '22', '吉林省', '2207', '松原市', '220723', '乾安县', '', '', '', '', 3, 1, ''), ('220781', '2207', '00,22,2207', '扶余市', '22', '吉林省', '2207', '松原市', '220781', '扶余市', '', '', '', '', 3, 1, ''), ('2208', '22', '00,22', '白城市', '22', '吉林省', '2208', '白城市', '', '', '', '', '', '', 2, 1, ''), ('220802', '2208', '00,22,2208', '洮北区', '22', '吉林省', '2208', '白城市', '220802', '洮北区', '', '', '', '', 3, 1, ''), ('220821', '2208', '00,22,2208', '镇赉县', '22', '吉林省', '2208', '白城市', '220821', '镇赉县', '', '', '', '', 3, 1, ''), ('220822', '2208', '00,22,2208', '通榆县', '22', '吉林省', '2208', '白城市', '220822', '通榆县', '', '', '', '', 3, 1, ''), ('220881', '2208', '00,22,2208', '洮南市', '22', '吉林省', '2208', '白城市', '220881', '洮南市', '', '', '', '', 3, 1, ''), ('220882', '2208', '00,22,2208', '大安市', '22', '吉林省', '2208', '白城市', '220882', '大安市', '', '', '', '', 3, 1, ''), ('2224', '22', '00,22', '延边朝鲜族自治州', '22', '吉林省', '2224', '延边朝鲜族自治州', '', '', '', '', '', '', 2, 1, ''), ('222401', '2224', '00,22,2224', '延吉市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222401', '延吉市', '', '', '', '', 3, 1, ''), ('222402', '2224', '00,22,2224', '图们市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222402', '图们市', '', '', '', '', 3, 1, ''), ('222403', '2224', '00,22,2224', '敦化市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222403', '敦化市', '', '', '', '', 3, 1, ''), ('222404', '2224', '00,22,2224', '珲春市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222404', '珲春市', '', '', '', '', 3, 1, ''), ('222405', '2224', '00,22,2224', '龙井市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222405', '龙井市', '', '', '', '', 3, 1, ''), ('222406', '2224', '00,22,2224', '和龙市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222406', '和龙市', '', '', '', '', 3, 1, ''), ('222424', '2224', '00,22,2224', '汪清县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222424', '汪清县', '', '', '', '', 3, 1, ''), ('222426', '2224', '00,22,2224', '安图县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222426', '安图县', '', '', '', '', 3, 1, ''), ('23', '00', '00', '黑龙江省', '23', '黑龙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2301', '23', '00,23', '哈尔滨市', '23', '黑龙江省', '2301', '哈尔滨市', '', '', '', '', '', '', 2, 1, ''), ('230102', '2301', '00,23,2301', '道里区', '23', '黑龙江省', '2301', '哈尔滨市', '230102', '道里区', '', '', '', '', 3, 1, ''), ('230103', '2301', '00,23,2301', '南岗区', '23', '黑龙江省', '2301', '哈尔滨市', '230103', '南岗区', '', '', '', '', 3, 1, ''), ('230104', '2301', '00,23,2301', '道外区', '23', '黑龙江省', '2301', '哈尔滨市', '230104', '道外区', '', '', '', '', 3, 1, ''), ('230108', '2301', '00,23,2301', '平房区', '23', '黑龙江省', '2301', '哈尔滨市', '230108', '平房区', '', '', '', '', 3, 1, ''), ('230109', '2301', '00,23,2301', '松北区', '23', '黑龙江省', '2301', '哈尔滨市', '230109', '松北区', '', '', '', '', 3, 1, ''), ('230110', '2301', '00,23,2301', '香坊区', '23', '黑龙江省', '2301', '哈尔滨市', '230110', '香坊区', '', '', '', '', 3, 1, ''), ('230111', '2301', '00,23,2301', '呼兰区', '23', '黑龙江省', '2301', '哈尔滨市', '230111', '呼兰区', '', '', '', '', 3, 1, ''), ('230112', '2301', '00,23,2301', '阿城区', '23', '黑龙江省', '2301', '哈尔滨市', '230112', '阿城区', '', '', '', '', 3, 1, ''), ('230113', '2301', '00,23,2301', '双城区', '23', '黑龙江省', '2301', '哈尔滨市', '230113', '双城区', '', '', '', '', 3, 1, ''), ('230123', '2301', '00,23,2301', '依兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230123', '依兰县', '', '', '', '', 3, 1, ''), ('230124', '2301', '00,23,2301', '方正县', '23', '黑龙江省', '2301', '哈尔滨市', '230124', '方正县', '', '', '', '', 3, 1, ''), ('230125', '2301', '00,23,2301', '宾县', '23', '黑龙江省', '2301', '哈尔滨市', '230125', '宾县', '', '', '', '', 3, 1, ''), ('230126', '2301', '00,23,2301', '巴彦县', '23', '黑龙江省', '2301', '哈尔滨市', '230126', '巴彦县', '', '', '', '', 3, 1, ''), ('230127', '2301', '00,23,2301', '木兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230127', '木兰县', '', '', '', '', 3, 1, ''), ('230128', '2301', '00,23,2301', '通河县', '23', '黑龙江省', '2301', '哈尔滨市', '230128', '通河县', '', '', '', '', 3, 1, ''), ('230129', '2301', '00,23,2301', '延寿县', '23', '黑龙江省', '2301', '哈尔滨市', '230129', '延寿县', '', '', '', '', 3, 1, ''), ('230183', '2301', '00,23,2301', '尚志市', '23', '黑龙江省', '2301', '哈尔滨市', '230183', '尚志市', '', '', '', '', 3, 1, ''), ('230184', '2301', '00,23,2301', '五常市', '23', '黑龙江省', '2301', '哈尔滨市', '230184', '五常市', '', '', '', '', 3, 1, ''), ('2302', '23', '00,23', '齐齐哈尔市', '23', '黑龙江省', '2302', '齐齐哈尔市', '', '', '', '', '', '', 2, 1, ''), ('230202', '2302', '00,23,2302', '龙沙区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230202', '龙沙区', '', '', '', '', 3, 1, ''), ('230203', '2302', '00,23,2302', '建华区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230203', '建华区', '', '', '', '', 3, 1, ''), ('230204', '2302', '00,23,2302', '铁锋区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230204', '铁锋区', '', '', '', '', 3, 1, ''), ('230205', '2302', '00,23,2302', '昂昂溪区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230205', '昂昂溪区', '', '', '', '', 3, 1, ''), ('230206', '2302', '00,23,2302', '富拉尔基区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230206', '富拉尔基区', '', '', '', '', 3, 1, ''), ('230207', '2302', '00,23,2302', '碾子山区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230207', '碾子山区', '', '', '', '', 3, 1, ''), ('230208', '2302', '00,23,2302', '梅里斯达斡尔族区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230208', '梅里斯达斡尔族区', '', '', '', '', 3, 1, ''), ('230221', '2302', '00,23,2302', '龙江县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230221', '龙江县', '', '', '', '', 3, 1, ''), ('230223', '2302', '00,23,2302', '依安县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230223', '依安县', '', '', '', '', 3, 1, ''), ('230224', '2302', '00,23,2302', '泰来县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230224', '泰来县', '', '', '', '', 3, 1, ''), ('230225', '2302', '00,23,2302', '甘南县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230225', '甘南县', '', '', '', '', 3, 1, ''), ('230227', '2302', '00,23,2302', '富裕县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230227', '富裕县', '', '', '', '', 3, 1, ''), ('230229', '2302', '00,23,2302', '克山县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230229', '克山县', '', '', '', '', 3, 1, ''), ('230230', '2302', '00,23,2302', '克东县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230230', '克东县', '', '', '', '', 3, 1, ''), ('230231', '2302', '00,23,2302', '拜泉县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230231', '拜泉县', '', '', '', '', 3, 1, ''), ('230281', '2302', '00,23,2302', '讷河市', '23', '黑龙江省', '2302', '齐齐哈尔市', '230281', '讷河市', '', '', '', '', 3, 1, ''), ('2303', '23', '00,23', '鸡西市', '23', '黑龙江省', '2303', '鸡西市', '', '', '', '', '', '', 2, 1, ''), ('230302', '2303', '00,23,2303', '鸡冠区', '23', '黑龙江省', '2303', '鸡西市', '230302', '鸡冠区', '', '', '', '', 3, 1, ''), ('230303', '2303', '00,23,2303', '恒山区', '23', '黑龙江省', '2303', '鸡西市', '230303', '恒山区', '', '', '', '', 3, 1, ''), ('230304', '2303', '00,23,2303', '滴道区', '23', '黑龙江省', '2303', '鸡西市', '230304', '滴道区', '', '', '', '', 3, 1, ''), ('230305', '2303', '00,23,2303', '梨树区', '23', '黑龙江省', '2303', '鸡西市', '230305', '梨树区', '', '', '', '', 3, 1, ''), ('230306', '2303', '00,23,2303', '城子河区', '23', '黑龙江省', '2303', '鸡西市', '230306', '城子河区', '', '', '', '', 3, 1, ''), ('230307', '2303', '00,23,2303', '麻山区', '23', '黑龙江省', '2303', '鸡西市', '230307', '麻山区', '', '', '', '', 3, 1, ''), ('230321', '2303', '00,23,2303', '鸡东县', '23', '黑龙江省', '2303', '鸡西市', '230321', '鸡东县', '', '', '', '', 3, 1, ''), ('230381', '2303', '00,23,2303', '虎林市', '23', '黑龙江省', '2303', '鸡西市', '230381', '虎林市', '', '', '', '', 3, 1, ''), ('230382', '2303', '00,23,2303', '密山市', '23', '黑龙江省', '2303', '鸡西市', '230382', '密山市', '', '', '', '', 3, 1, ''), ('2304', '23', '00,23', '鹤岗市', '23', '黑龙江省', '2304', '鹤岗市', '', '', '', '', '', '', 2, 1, ''), ('230402', '2304', '00,23,2304', '向阳区', '23', '黑龙江省', '2304', '鹤岗市', '230402', '向阳区', '', '', '', '', 3, 1, ''), ('230403', '2304', '00,23,2304', '工农区', '23', '黑龙江省', '2304', '鹤岗市', '230403', '工农区', '', '', '', '', 3, 1, ''), ('230404', '2304', '00,23,2304', '南山区', '23', '黑龙江省', '2304', '鹤岗市', '230404', '南山区', '', '', '', '', 3, 1, ''), ('230405', '2304', '00,23,2304', '兴安区', '23', '黑龙江省', '2304', '鹤岗市', '230405', '兴安区', '', '', '', '', 3, 1, ''), ('230406', '2304', '00,23,2304', '东山区', '23', '黑龙江省', '2304', '鹤岗市', '230406', '东山区', '', '', '', '', 3, 1, ''), ('230407', '2304', '00,23,2304', '兴山区', '23', '黑龙江省', '2304', '鹤岗市', '230407', '兴山区', '', '', '', '', 3, 1, ''), ('230421', '2304', '00,23,2304', '萝北县', '23', '黑龙江省', '2304', '鹤岗市', '230421', '萝北县', '', '', '', '', 3, 1, ''), ('230422', '2304', '00,23,2304', '绥滨县', '23', '黑龙江省', '2304', '鹤岗市', '230422', '绥滨县', '', '', '', '', 3, 1, ''), ('2305', '23', '00,23', '双鸭山市', '23', '黑龙江省', '2305', '双鸭山市', '', '', '', '', '', '', 2, 1, ''), ('230502', '2305', '00,23,2305', '尖山区', '23', '黑龙江省', '2305', '双鸭山市', '230502', '尖山区', '', '', '', '', 3, 1, ''), ('230503', '2305', '00,23,2305', '岭东区', '23', '黑龙江省', '2305', '双鸭山市', '230503', '岭东区', '', '', '', '', 3, 1, ''), ('230505', '2305', '00,23,2305', '四方台区', '23', '黑龙江省', '2305', '双鸭山市', '230505', '四方台区', '', '', '', '', 3, 1, ''), ('230506', '2305', '00,23,2305', '宝山区', '23', '黑龙江省', '2305', '双鸭山市', '230506', '宝山区', '', '', '', '', 3, 1, ''), ('230521', '2305', '00,23,2305', '集贤县', '23', '黑龙江省', '2305', '双鸭山市', '230521', '集贤县', '', '', '', '', 3, 1, ''), ('230522', '2305', '00,23,2305', '友谊县', '23', '黑龙江省', '2305', '双鸭山市', '230522', '友谊县', '', '', '', '', 3, 1, ''), ('230523', '2305', '00,23,2305', '宝清县', '23', '黑龙江省', '2305', '双鸭山市', '230523', '宝清县', '', '', '', '', 3, 1, ''), ('230524', '2305', '00,23,2305', '饶河县', '23', '黑龙江省', '2305', '双鸭山市', '230524', '饶河县', '', '', '', '', 3, 1, ''), ('2306', '23', '00,23', '大庆市', '23', '黑龙江省', '2306', '大庆市', '', '', '', '', '', '', 2, 1, ''), ('230602', '2306', '00,23,2306', '萨尔图区', '23', '黑龙江省', '2306', '大庆市', '230602', '萨尔图区', '', '', '', '', 3, 1, ''), ('230603', '2306', '00,23,2306', '龙凤区', '23', '黑龙江省', '2306', '大庆市', '230603', '龙凤区', '', '', '', '', 3, 1, ''), ('230604', '2306', '00,23,2306', '让胡路区', '23', '黑龙江省', '2306', '大庆市', '230604', '让胡路区', '', '', '', '', 3, 1, ''), ('230605', '2306', '00,23,2306', '红岗区', '23', '黑龙江省', '2306', '大庆市', '230605', '红岗区', '', '', '', '', 3, 1, ''), ('230606', '2306', '00,23,2306', '大同区', '23', '黑龙江省', '2306', '大庆市', '230606', '大同区', '', '', '', '', 3, 1, ''), ('230621', '2306', '00,23,2306', '肇州县', '23', '黑龙江省', '2306', '大庆市', '230621', '肇州县', '', '', '', '', 3, 1, ''), ('230622', '2306', '00,23,2306', '肇源县', '23', '黑龙江省', '2306', '大庆市', '230622', '肇源县', '', '', '', '', 3, 1, ''), ('230623', '2306', '00,23,2306', '林甸县', '23', '黑龙江省', '2306', '大庆市', '230623', '林甸县', '', '', '', '', 3, 1, ''), ('230624', '2306', '00,23,2306', '杜尔伯特蒙古族自治县', '23', '黑龙江省', '2306', '大庆市', '230624', '杜尔伯特蒙古族自治县', '', '', '', '', 3, 1, ''), ('2307', '23', '00,23', '伊春市', '23', '黑龙江省', '2307', '伊春市', '', '', '', '', '', '', 2, 1, ''), ('230717', '2307', '00,23,2307', '伊美区', '23', '黑龙江省', '2307', '伊春市', '230717', '伊美区', '', '', '', '', 3, 1, ''), ('230718', '2307', '00,23,2307', '乌翠区', '23', '黑龙江省', '2307', '伊春市', '230718', '乌翠区', '', '', '', '', 3, 1, ''), ('230719', '2307', '00,23,2307', '友好区', '23', '黑龙江省', '2307', '伊春市', '230719', '友好区', '', '', '', '', 3, 1, ''), ('230722', '2307', '00,23,2307', '嘉荫县', '23', '黑龙江省', '2307', '伊春市', '230722', '嘉荫县', '', '', '', '', 3, 1, ''), ('230723', '2307', '00,23,2307', '汤旺县', '23', '黑龙江省', '2307', '伊春市', '230723', '汤旺县', '', '', '', '', 3, 1, ''), ('230724', '2307', '00,23,2307', '丰林县', '23', '黑龙江省', '2307', '伊春市', '230724', '丰林县', '', '', '', '', 3, 1, ''), ('230725', '2307', '00,23,2307', '大箐山县', '23', '黑龙江省', '2307', '伊春市', '230725', '大箐山县', '', '', '', '', 3, 1, ''), ('230726', '2307', '00,23,2307', '南岔县', '23', '黑龙江省', '2307', '伊春市', '230726', '南岔县', '', '', '', '', 3, 1, ''), ('230751', '2307', '00,23,2307', '金林区', '23', '黑龙江省', '2307', '伊春市', '230751', '金林区', '', '', '', '', 3, 1, ''), ('230781', '2307', '00,23,2307', '铁力市', '23', '黑龙江省', '2307', '伊春市', '230781', '铁力市', '', '', '', '', 3, 1, ''), ('2308', '23', '00,23', '佳木斯市', '23', '黑龙江省', '2308', '佳木斯市', '', '', '', '', '', '', 2, 1, ''), ('230803', '2308', '00,23,2308', '向阳区', '23', '黑龙江省', '2308', '佳木斯市', '230803', '向阳区', '', '', '', '', 3, 1, ''), ('230804', '2308', '00,23,2308', '前进区', '23', '黑龙江省', '2308', '佳木斯市', '230804', '前进区', '', '', '', '', 3, 1, ''), ('230805', '2308', '00,23,2308', '东风区', '23', '黑龙江省', '2308', '佳木斯市', '230805', '东风区', '', '', '', '', 3, 1, ''), ('230811', '2308', '00,23,2308', '郊区', '23', '黑龙江省', '2308', '佳木斯市', '230811', '郊区', '', '', '', '', 3, 1, ''), ('230822', '2308', '00,23,2308', '桦南县', '23', '黑龙江省', '2308', '佳木斯市', '230822', '桦南县', '', '', '', '', 3, 1, ''), ('230826', '2308', '00,23,2308', '桦川县', '23', '黑龙江省', '2308', '佳木斯市', '230826', '桦川县', '', '', '', '', 3, 1, ''), ('230828', '2308', '00,23,2308', '汤原县', '23', '黑龙江省', '2308', '佳木斯市', '230828', '汤原县', '', '', '', '', 3, 1, ''), ('230881', '2308', '00,23,2308', '同江市', '23', '黑龙江省', '2308', '佳木斯市', '230881', '同江市', '', '', '', '', 3, 1, ''), ('230882', '2308', '00,23,2308', '富锦市', '23', '黑龙江省', '2308', '佳木斯市', '230882', '富锦市', '', '', '', '', 3, 1, ''), ('230883', '2308', '00,23,2308', '抚远市', '23', '黑龙江省', '2308', '佳木斯市', '230883', '抚远市', '', '', '', '', 3, 1, ''), ('2309', '23', '00,23', '七台河市', '23', '黑龙江省', '2309', '七台河市', '', '', '', '', '', '', 2, 1, ''), ('230902', '2309', '00,23,2309', '新兴区', '23', '黑龙江省', '2309', '七台河市', '230902', '新兴区', '', '', '', '', 3, 1, ''), ('230903', '2309', '00,23,2309', '桃山区', '23', '黑龙江省', '2309', '七台河市', '230903', '桃山区', '', '', '', '', 3, 1, ''), ('230904', '2309', '00,23,2309', '茄子河区', '23', '黑龙江省', '2309', '七台河市', '230904', '茄子河区', '', '', '', '', 3, 1, ''), ('230921', '2309', '00,23,2309', '勃利县', '23', '黑龙江省', '2309', '七台河市', '230921', '勃利县', '', '', '', '', 3, 1, ''), ('2310', '23', '00,23', '牡丹江市', '23', '黑龙江省', '2310', '牡丹江市', '', '', '', '', '', '', 2, 1, ''), ('231002', '2310', '00,23,2310', '东安区', '23', '黑龙江省', '2310', '牡丹江市', '231002', '东安区', '', '', '', '', 3, 1, ''), ('231003', '2310', '00,23,2310', '阳明区', '23', '黑龙江省', '2310', '牡丹江市', '231003', '阳明区', '', '', '', '', 3, 1, ''), ('231004', '2310', '00,23,2310', '爱民区', '23', '黑龙江省', '2310', '牡丹江市', '231004', '爱民区', '', '', '', '', 3, 1, ''), ('231005', '2310', '00,23,2310', '西安区', '23', '黑龙江省', '2310', '牡丹江市', '231005', '西安区', '', '', '', '', 3, 1, ''), ('231025', '2310', '00,23,2310', '林口县', '23', '黑龙江省', '2310', '牡丹江市', '231025', '林口县', '', '', '', '', 3, 1, ''), ('231081', '2310', '00,23,2310', '绥芬河市', '23', '黑龙江省', '2310', '牡丹江市', '231081', '绥芬河市', '', '', '', '', 3, 1, ''), ('231083', '2310', '00,23,2310', '海林市', '23', '黑龙江省', '2310', '牡丹江市', '231083', '海林市', '', '', '', '', 3, 1, ''), ('231084', '2310', '00,23,2310', '宁安市', '23', '黑龙江省', '2310', '牡丹江市', '231084', '宁安市', '', '', '', '', 3, 1, ''), ('231085', '2310', '00,23,2310', '穆棱市', '23', '黑龙江省', '2310', '牡丹江市', '231085', '穆棱市', '', '', '', '', 3, 1, ''), ('231086', '2310', '00,23,2310', '东宁市', '23', '黑龙江省', '2310', '牡丹江市', '231086', '东宁市', '', '', '', '', 3, 1, ''), ('2311', '23', '00,23', '黑河市', '23', '黑龙江省', '2311', '黑河市', '', '', '', '', '', '', 2, 1, ''), ('231102', '2311', '00,23,2311', '爱辉区', '23', '黑龙江省', '2311', '黑河市', '231102', '爱辉区', '', '', '', '', 3, 1, ''), ('231123', '2311', '00,23,2311', '逊克县', '23', '黑龙江省', '2311', '黑河市', '231123', '逊克县', '', '', '', '', 3, 1, ''), ('231124', '2311', '00,23,2311', '孙吴县', '23', '黑龙江省', '2311', '黑河市', '231124', '孙吴县', '', '', '', '', 3, 1, ''), ('231181', '2311', '00,23,2311', '北安市', '23', '黑龙江省', '2311', '黑河市', '231181', '北安市', '', '', '', '', 3, 1, ''), ('231182', '2311', '00,23,2311', '五大连池市', '23', '黑龙江省', '2311', '黑河市', '231182', '五大连池市', '', '', '', '', 3, 1, ''), ('231183', '2311', '00,23,2311', '嫩江市', '23', '黑龙江省', '2311', '黑河市', '231183', '嫩江市', '', '', '', '', 3, 1, ''), ('2312', '23', '00,23', '绥化市', '23', '黑龙江省', '2312', '绥化市', '', '', '', '', '', '', 2, 1, ''), ('231202', '2312', '00,23,2312', '北林区', '23', '黑龙江省', '2312', '绥化市', '231202', '北林区', '', '', '', '', 3, 1, ''), ('231221', '2312', '00,23,2312', '望奎县', '23', '黑龙江省', '2312', '绥化市', '231221', '望奎县', '', '', '', '', 3, 1, ''), ('231222', '2312', '00,23,2312', '兰西县', '23', '黑龙江省', '2312', '绥化市', '231222', '兰西县', '', '', '', '', 3, 1, ''), ('231223', '2312', '00,23,2312', '青冈县', '23', '黑龙江省', '2312', '绥化市', '231223', '青冈县', '', '', '', '', 3, 1, ''), ('231224', '2312', '00,23,2312', '庆安县', '23', '黑龙江省', '2312', '绥化市', '231224', '庆安县', '', '', '', '', 3, 1, ''), ('231225', '2312', '00,23,2312', '明水县', '23', '黑龙江省', '2312', '绥化市', '231225', '明水县', '', '', '', '', 3, 1, ''), ('231226', '2312', '00,23,2312', '绥棱县', '23', '黑龙江省', '2312', '绥化市', '231226', '绥棱县', '', '', '', '', 3, 1, ''), ('231281', '2312', '00,23,2312', '安达市', '23', '黑龙江省', '2312', '绥化市', '231281', '安达市', '', '', '', '', 3, 1, ''), ('231282', '2312', '00,23,2312', '肇东市', '23', '黑龙江省', '2312', '绥化市', '231282', '肇东市', '', '', '', '', 3, 1, ''), ('231283', '2312', '00,23,2312', '海伦市', '23', '黑龙江省', '2312', '绥化市', '231283', '海伦市', '', '', '', '', 3, 1, ''), ('2327', '23', '00,23', '大兴安岭地区', '23', '黑龙江省', '2327', '大兴安岭地区', '', '', '', '', '', '', 2, 1, ''), ('232701', '2327', '00,23,2327', '漠河市', '23', '黑龙江省', '2327', '大兴安岭地区', '232701', '漠河市', '', '', '', '', 3, 1, ''), ('232721', '2327', '00,23,2327', '呼玛县', '23', '黑龙江省', '2327', '大兴安岭地区', '232721', '呼玛县', '', '', '', '', 3, 1, ''), ('232722', '2327', '00,23,2327', '塔河县', '23', '黑龙江省', '2327', '大兴安岭地区', '232722', '塔河县', '', '', '', '', 3, 1, ''), ('31', '00', '00', '上海市', '31', '上海市', '', '', '', '', '', '', '', '', 1, 1, ''), ('3101', '31', '00,31', '上海市', '31', '上海市', '3101', '上海市', '', '', '', '', '', '', 2, 1, ''), ('310101', '3101', '00,31,3101', '黄浦区', '31', '上海市', '3101', '上海市', '310101', '黄浦区', '', '', '', '', 3, 1, ''), ('310104', '3101', '00,31,3101', '徐汇区', '31', '上海市', '3101', '上海市', '310104', '徐汇区', '', '', '', '', 3, 1, ''), ('310105', '3101', '00,31,3101', '长宁区', '31', '上海市', '3101', '上海市', '310105', '长宁区', '', '', '', '', 3, 1, ''), ('310106', '3101', '00,31,3101', '静安区', '31', '上海市', '3101', '上海市', '310106', '静安区', '', '', '', '', 3, 1, ''), ('310107', '3101', '00,31,3101', '普陀区', '31', '上海市', '3101', '上海市', '310107', '普陀区', '', '', '', '', 3, 1, ''), ('310109', '3101', '00,31,3101', '虹口区', '31', '上海市', '3101', '上海市', '310109', '虹口区', '', '', '', '', 3, 1, ''), ('310110', '3101', '00,31,3101', '杨浦区', '31', '上海市', '3101', '上海市', '310110', '杨浦区', '', '', '', '', 3, 1, ''), ('310112', '3101', '00,31,3101', '闵行区', '31', '上海市', '3101', '上海市', '310112', '闵行区', '', '', '', '', 3, 1, ''), ('310113', '3101', '00,31,3101', '宝山区', '31', '上海市', '3101', '上海市', '310113', '宝山区', '', '', '', '', 3, 1, ''), ('310114', '3101', '00,31,3101', '嘉定区', '31', '上海市', '3101', '上海市', '310114', '嘉定区', '', '', '', '', 3, 1, ''), ('310115', '3101', '00,31,3101', '浦东新区', '31', '上海市', '3101', '上海市', '310115', '浦东新区', '', '', '', '', 3, 1, ''), ('310116', '3101', '00,31,3101', '金山区', '31', '上海市', '3101', '上海市', '310116', '金山区', '', '', '', '', 3, 1, ''), ('310117', '3101', '00,31,3101', '松江区', '31', '上海市', '3101', '上海市', '310117', '松江区', '', '', '', '', 3, 1, ''), ('310118', '3101', '00,31,3101', '青浦区', '31', '上海市', '3101', '上海市', '310118', '青浦区', '', '', '', '', 3, 1, ''), ('310120', '3101', '00,31,3101', '奉贤区', '31', '上海市', '3101', '上海市', '310120', '奉贤区', '', '', '', '', 3, 1, ''), ('310151', '3101', '00,31,3101', '崇明区', '31', '上海市', '3101', '上海市', '310151', '崇明区', '', '', '', '', 3, 1, ''), ('32', '00', '00', '江苏省', '32', '江苏省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3201', '32', '00,32', '南京市', '32', '江苏省', '3201', '南京市', '', '', '', '', '', '', 2, 1, ''), ('320102', '3201', '00,32,3201', '玄武区', '32', '江苏省', '3201', '南京市', '320102', '玄武区', '', '', '', '', 3, 1, ''), ('320104', '3201', '00,32,3201', '秦淮区', '32', '江苏省', '3201', '南京市', '320104', '秦淮区', '', '', '', '', 3, 1, ''), ('320105', '3201', '00,32,3201', '建邺区', '32', '江苏省', '3201', '南京市', '320105', '建邺区', '', '', '', '', 3, 1, ''), ('320106', '3201', '00,32,3201', '鼓楼区', '32', '江苏省', '3201', '南京市', '320106', '鼓楼区', '', '', '', '', 3, 1, ''), ('320111', '3201', '00,32,3201', '浦口区', '32', '江苏省', '3201', '南京市', '320111', '浦口区', '', '', '', '', 3, 1, ''), ('320113', '3201', '00,32,3201', '栖霞区', '32', '江苏省', '3201', '南京市', '320113', '栖霞区', '', '', '', '', 3, 1, ''), ('320114', '3201', '00,32,3201', '雨花台区', '32', '江苏省', '3201', '南京市', '320114', '雨花台区', '', '', '', '', 3, 1, ''), ('320115', '3201', '00,32,3201', '江宁区', '32', '江苏省', '3201', '南京市', '320115', '江宁区', '', '', '', '', 3, 1, ''), ('320116', '3201', '00,32,3201', '六合区', '32', '江苏省', '3201', '南京市', '320116', '六合区', '', '', '', '', 3, 1, ''), ('320117', '3201', '00,32,3201', '溧水区', '32', '江苏省', '3201', '南京市', '320117', '溧水区', '', '', '', '', 3, 1, ''), ('320118', '3201', '00,32,3201', '高淳区', '32', '江苏省', '3201', '南京市', '320118', '高淳区', '', '', '', '', 3, 1, ''), ('3202', '32', '00,32', '无锡市', '32', '江苏省', '3202', '无锡市', '', '', '', '', '', '', 2, 1, ''), ('320205', '3202', '00,32,3202', '锡山区', '32', '江苏省', '3202', '无锡市', '320205', '锡山区', '', '', '', '', 3, 1, ''), ('320206', '3202', '00,32,3202', '惠山区', '32', '江苏省', '3202', '无锡市', '320206', '惠山区', '', '', '', '', 3, 1, ''), ('320211', '3202', '00,32,3202', '滨湖区', '32', '江苏省', '3202', '无锡市', '320211', '滨湖区', '', '', '', '', 3, 1, ''), ('320213', '3202', '00,32,3202', '梁溪区', '32', '江苏省', '3202', '无锡市', '320213', '梁溪区', '', '', '', '', 3, 1, ''), ('320214', '3202', '00,32,3202', '新吴区', '32', '江苏省', '3202', '无锡市', '320214', '新吴区', '', '', '', '', 3, 1, ''), ('320281', '3202', '00,32,3202', '江阴市', '32', '江苏省', '3202', '无锡市', '320281', '江阴市', '', '', '', '', 3, 1, ''), ('320282', '3202', '00,32,3202', '宜兴市', '32', '江苏省', '3202', '无锡市', '320282', '宜兴市', '', '', '', '', 3, 1, ''), ('3203', '32', '00,32', '徐州市', '32', '江苏省', '3203', '徐州市', '', '', '', '', '', '', 2, 1, ''), ('320302', '3203', '00,32,3203', '鼓楼区', '32', '江苏省', '3203', '徐州市', '320302', '鼓楼区', '', '', '', '', 3, 1, ''), ('320303', '3203', '00,32,3203', '云龙区', '32', '江苏省', '3203', '徐州市', '320303', '云龙区', '', '', '', '', 3, 1, ''), ('320305', '3203', '00,32,3203', '贾汪区', '32', '江苏省', '3203', '徐州市', '320305', '贾汪区', '', '', '', '', 3, 1, ''), ('320311', '3203', '00,32,3203', '泉山区', '32', '江苏省', '3203', '徐州市', '320311', '泉山区', '', '', '', '', 3, 1, ''), ('320312', '3203', '00,32,3203', '铜山区', '32', '江苏省', '3203', '徐州市', '320312', '铜山区', '', '', '', '', 3, 1, ''), ('320321', '3203', '00,32,3203', '丰县', '32', '江苏省', '3203', '徐州市', '320321', '丰县', '', '', '', '', 3, 1, ''), ('320322', '3203', '00,32,3203', '沛县', '32', '江苏省', '3203', '徐州市', '320322', '沛县', '', '', '', '', 3, 1, ''), ('320324', '3203', '00,32,3203', '睢宁县', '32', '江苏省', '3203', '徐州市', '320324', '睢宁县', '', '', '', '', 3, 1, ''), ('320381', '3203', '00,32,3203', '新沂市', '32', '江苏省', '3203', '徐州市', '320381', '新沂市', '', '', '', '', 3, 1, ''), ('320382', '3203', '00,32,3203', '邳州市', '32', '江苏省', '3203', '徐州市', '320382', '邳州市', '', '', '', '', 3, 1, ''), ('3204', '32', '00,32', '常州市', '32', '江苏省', '3204', '常州市', '', '', '', '', '', '', 2, 1, ''), ('320402', '3204', '00,32,3204', '天宁区', '32', '江苏省', '3204', '常州市', '320402', '天宁区', '', '', '', '', 3, 1, ''), ('320404', '3204', '00,32,3204', '钟楼区', '32', '江苏省', '3204', '常州市', '320404', '钟楼区', '', '', '', '', 3, 1, ''), ('320411', '3204', '00,32,3204', '新北区', '32', '江苏省', '3204', '常州市', '320411', '新北区', '', '', '', '', 3, 1, ''), ('320412', '3204', '00,32,3204', '武进区', '32', '江苏省', '3204', '常州市', '320412', '武进区', '', '', '', '', 3, 1, ''), ('320413', '3204', '00,32,3204', '金坛区', '32', '江苏省', '3204', '常州市', '320413', '金坛区', '', '', '', '', 3, 1, ''), ('320481', '3204', '00,32,3204', '溧阳市', '32', '江苏省', '3204', '常州市', '320481', '溧阳市', '', '', '', '', 3, 1, ''), ('3205', '32', '00,32', '苏州市', '32', '江苏省', '3205', '苏州市', '', '', '', '', '', '', 2, 1, ''), ('320505', '3205', '00,32,3205', '虎丘区', '32', '江苏省', '3205', '苏州市', '320505', '虎丘区', '', '', '', '', 3, 1, ''), ('320506', '3205', '00,32,3205', '吴中区', '32', '江苏省', '3205', '苏州市', '320506', '吴中区', '', '', '', '', 3, 1, ''), ('320507', '3205', '00,32,3205', '相城区', '32', '江苏省', '3205', '苏州市', '320507', '相城区', '', '', '', '', 3, 1, ''), ('320508', '3205', '00,32,3205', '姑苏区', '32', '江苏省', '3205', '苏州市', '320508', '姑苏区', '', '', '', '', 3, 1, ''), ('320509', '3205', '00,32,3205', '吴江区', '32', '江苏省', '3205', '苏州市', '320509', '吴江区', '', '', '', '', 3, 1, ''), ('320581', '3205', '00,32,3205', '常熟市', '32', '江苏省', '3205', '苏州市', '320581', '常熟市', '', '', '', '', 3, 1, ''), ('320582', '3205', '00,32,3205', '张家港市', '32', '江苏省', '3205', '苏州市', '320582', '张家港市', '', '', '', '', 3, 1, ''), ('320583', '3205', '00,32,3205', '昆山市', '32', '江苏省', '3205', '苏州市', '320583', '昆山市', '', '', '', '', 3, 1, ''), ('320585', '3205', '00,32,3205', '太仓市', '32', '江苏省', '3205', '苏州市', '320585', '太仓市', '', '', '', '', 3, 1, ''), ('3206', '32', '00,32', '南通市', '32', '江苏省', '3206', '南通市', '', '', '', '', '', '', 2, 1, ''), ('320602', '3206', '00,32,3206', '崇川区', '32', '江苏省', '3206', '南通市', '320602', '崇川区', '', '', '', '', 3, 1, ''), ('320611', '3206', '00,32,3206', '港闸区', '32', '江苏省', '3206', '南通市', '320611', '港闸区', '', '', '', '', 3, 1, ''), ('320612', '3206', '00,32,3206', '通州区', '32', '江苏省', '3206', '南通市', '320612', '通州区', '', '', '', '', 3, 1, ''), ('320623', '3206', '00,32,3206', '如东县', '32', '江苏省', '3206', '南通市', '320623', '如东县', '', '', '', '', 3, 1, ''), ('320681', '3206', '00,32,3206', '启东市', '32', '江苏省', '3206', '南通市', '320681', '启东市', '', '', '', '', 3, 1, ''), ('320682', '3206', '00,32,3206', '如皋市', '32', '江苏省', '3206', '南通市', '320682', '如皋市', '', '', '', '', 3, 1, ''), ('320684', '3206', '00,32,3206', '海门市', '32', '江苏省', '3206', '南通市', '320684', '海门市', '', '', '', '', 3, 1, ''), ('320685', '3206', '00,32,3206', '海安市', '32', '江苏省', '3206', '南通市', '320685', '海安市', '', '', '', '', 3, 1, ''), ('3207', '32', '00,32', '连云港市', '32', '江苏省', '3207', '连云港市', '', '', '', '', '', '', 2, 1, ''), ('320703', '3207', '00,32,3207', '连云区', '32', '江苏省', '3207', '连云港市', '320703', '连云区', '', '', '', '', 3, 1, ''), ('320706', '3207', '00,32,3207', '海州区', '32', '江苏省', '3207', '连云港市', '320706', '海州区', '', '', '', '', 3, 1, ''), ('320707', '3207', '00,32,3207', '赣榆区', '32', '江苏省', '3207', '连云港市', '320707', '赣榆区', '', '', '', '', 3, 1, ''), ('320722', '3207', '00,32,3207', '东海县', '32', '江苏省', '3207', '连云港市', '320722', '东海县', '', '', '', '', 3, 1, ''), ('320723', '3207', '00,32,3207', '灌云县', '32', '江苏省', '3207', '连云港市', '320723', '灌云县', '', '', '', '', 3, 1, ''), ('320724', '3207', '00,32,3207', '灌南县', '32', '江苏省', '3207', '连云港市', '320724', '灌南县', '', '', '', '', 3, 1, ''), ('3208', '32', '00,32', '淮安市', '32', '江苏省', '3208', '淮安市', '', '', '', '', '', '', 2, 1, ''), ('320803', '3208', '00,32,3208', '淮安区', '32', '江苏省', '3208', '淮安市', '320803', '淮安区', '', '', '', '', 3, 1, ''), ('320804', '3208', '00,32,3208', '淮阴区', '32', '江苏省', '3208', '淮安市', '320804', '淮阴区', '', '', '', '', 3, 1, ''), ('320812', '3208', '00,32,3208', '清江浦区', '32', '江苏省', '3208', '淮安市', '320812', '清江浦区', '', '', '', '', 3, 1, ''), ('320813', '3208', '00,32,3208', '洪泽区', '32', '江苏省', '3208', '淮安市', '320813', '洪泽区', '', '', '', '', 3, 1, ''), ('320826', '3208', '00,32,3208', '涟水县', '32', '江苏省', '3208', '淮安市', '320826', '涟水县', '', '', '', '', 3, 1, ''), ('320830', '3208', '00,32,3208', '盱眙县', '32', '江苏省', '3208', '淮安市', '320830', '盱眙县', '', '', '', '', 3, 1, ''), ('320831', '3208', '00,32,3208', '金湖县', '32', '江苏省', '3208', '淮安市', '320831', '金湖县', '', '', '', '', 3, 1, ''), ('3209', '32', '00,32', '盐城市', '32', '江苏省', '3209', '盐城市', '', '', '', '', '', '', 2, 1, ''), ('320902', '3209', '00,32,3209', '亭湖区', '32', '江苏省', '3209', '盐城市', '320902', '亭湖区', '', '', '', '', 3, 1, ''), ('320903', '3209', '00,32,3209', '盐都区', '32', '江苏省', '3209', '盐城市', '320903', '盐都区', '', '', '', '', 3, 1, ''), ('320904', '3209', '00,32,3209', '大丰区', '32', '江苏省', '3209', '盐城市', '320904', '大丰区', '', '', '', '', 3, 1, ''), ('320921', '3209', '00,32,3209', '响水县', '32', '江苏省', '3209', '盐城市', '320921', '响水县', '', '', '', '', 3, 1, ''), ('320922', '3209', '00,32,3209', '滨海县', '32', '江苏省', '3209', '盐城市', '320922', '滨海县', '', '', '', '', 3, 1, ''), ('320923', '3209', '00,32,3209', '阜宁县', '32', '江苏省', '3209', '盐城市', '320923', '阜宁县', '', '', '', '', 3, 1, ''), ('320924', '3209', '00,32,3209', '射阳县', '32', '江苏省', '3209', '盐城市', '320924', '射阳县', '', '', '', '', 3, 1, ''), ('320925', '3209', '00,32,3209', '建湖县', '32', '江苏省', '3209', '盐城市', '320925', '建湖县', '', '', '', '', 3, 1, ''), ('320981', '3209', '00,32,3209', '东台市', '32', '江苏省', '3209', '盐城市', '320981', '东台市', '', '', '', '', 3, 1, ''), ('3210', '32', '00,32', '扬州市', '32', '江苏省', '3210', '扬州市', '', '', '', '', '', '', 2, 1, ''), ('321002', '3210', '00,32,3210', '广陵区', '32', '江苏省', '3210', '扬州市', '321002', '广陵区', '', '', '', '', 3, 1, ''), ('321003', '3210', '00,32,3210', '邗江区', '32', '江苏省', '3210', '扬州市', '321003', '邗江区', '', '', '', '', 3, 1, ''), ('321012', '3210', '00,32,3210', '江都区', '32', '江苏省', '3210', '扬州市', '321012', '江都区', '', '', '', '', 3, 1, ''), ('321023', '3210', '00,32,3210', '宝应县', '32', '江苏省', '3210', '扬州市', '321023', '宝应县', '', '', '', '', 3, 1, ''), ('321081', '3210', '00,32,3210', '仪征市', '32', '江苏省', '3210', '扬州市', '321081', '仪征市', '', '', '', '', 3, 1, ''), ('321084', '3210', '00,32,3210', '高邮市', '32', '江苏省', '3210', '扬州市', '321084', '高邮市', '', '', '', '', 3, 1, ''), ('3211', '32', '00,32', '镇江市', '32', '江苏省', '3211', '镇江市', '', '', '', '', '', '', 2, 1, ''), ('321102', '3211', '00,32,3211', '京口区', '32', '江苏省', '3211', '镇江市', '321102', '京口区', '', '', '', '', 3, 1, ''), ('321111', '3211', '00,32,3211', '润州区', '32', '江苏省', '3211', '镇江市', '321111', '润州区', '', '', '', '', 3, 1, ''), ('321112', '3211', '00,32,3211', '丹徒区', '32', '江苏省', '3211', '镇江市', '321112', '丹徒区', '', '', '', '', 3, 1, ''), ('321181', '3211', '00,32,3211', '丹阳市', '32', '江苏省', '3211', '镇江市', '321181', '丹阳市', '', '', '', '', 3, 1, ''), ('321182', '3211', '00,32,3211', '扬中市', '32', '江苏省', '3211', '镇江市', '321182', '扬中市', '', '', '', '', 3, 1, ''), ('321183', '3211', '00,32,3211', '句容市', '32', '江苏省', '3211', '镇江市', '321183', '句容市', '', '', '', '', 3, 1, ''), ('3212', '32', '00,32', '泰州市', '32', '江苏省', '3212', '泰州市', '', '', '', '', '', '', 2, 1, ''), ('321202', '3212', '00,32,3212', '海陵区', '32', '江苏省', '3212', '泰州市', '321202', '海陵区', '', '', '', '', 3, 1, ''), ('321203', '3212', '00,32,3212', '高港区', '32', '江苏省', '3212', '泰州市', '321203', '高港区', '', '', '', '', 3, 1, ''), ('321204', '3212', '00,32,3212', '姜堰区', '32', '江苏省', '3212', '泰州市', '321204', '姜堰区', '', '', '', '', 3, 1, ''), ('321281', '3212', '00,32,3212', '兴化市', '32', '江苏省', '3212', '泰州市', '321281', '兴化市', '', '', '', '', 3, 1, ''), ('321282', '3212', '00,32,3212', '靖江市', '32', '江苏省', '3212', '泰州市', '321282', '靖江市', '', '', '', '', 3, 1, ''), ('321283', '3212', '00,32,3212', '泰兴市', '32', '江苏省', '3212', '泰州市', '321283', '泰兴市', '', '', '', '', 3, 1, ''), ('3213', '32', '00,32', '宿迁市', '32', '江苏省', '3213', '宿迁市', '', '', '', '', '', '', 2, 1, ''), ('321302', '3213', '00,32,3213', '宿城区', '32', '江苏省', '3213', '宿迁市', '321302', '宿城区', '', '', '', '', 3, 1, ''), ('321311', '3213', '00,32,3213', '宿豫区', '32', '江苏省', '3213', '宿迁市', '321311', '宿豫区', '', '', '', '', 3, 1, ''), ('321322', '3213', '00,32,3213', '沭阳县', '32', '江苏省', '3213', '宿迁市', '321322', '沭阳县', '', '', '', '', 3, 1, ''), ('321323', '3213', '00,32,3213', '泗阳县', '32', '江苏省', '3213', '宿迁市', '321323', '泗阳县', '', '', '', '', 3, 1, ''), ('321324', '3213', '00,32,3213', '泗洪县', '32', '江苏省', '3213', '宿迁市', '321324', '泗洪县', '', '', '', '', 3, 1, ''), ('33', '00', '00', '浙江省', '33', '浙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3301', '33', '00,33', '杭州市', '33', '浙江省', '3301', '杭州市', '', '', '', '', '', '', 2, 1, ''), ('330102', '3301', '00,33,3301', '上城区', '33', '浙江省', '3301', '杭州市', '330102', '上城区', '', '', '', '', 3, 1, ''), ('330103', '3301', '00,33,3301', '下城区', '33', '浙江省', '3301', '杭州市', '330103', '下城区', '', '', '', '', 3, 1, ''), ('330104', '3301', '00,33,3301', '江干区', '33', '浙江省', '3301', '杭州市', '330104', '江干区', '', '', '', '', 3, 1, ''), ('330105', '3301', '00,33,3301', '拱墅区', '33', '浙江省', '3301', '杭州市', '330105', '拱墅区', '', '', '', '', 3, 1, ''), ('330106', '3301', '00,33,3301', '西湖区', '33', '浙江省', '3301', '杭州市', '330106', '西湖区', '', '', '', '', 3, 1, ''), ('330108', '3301', '00,33,3301', '滨江区', '33', '浙江省', '3301', '杭州市', '330108', '滨江区', '', '', '', '', 3, 1, ''), ('330109', '3301', '00,33,3301', '萧山区', '33', '浙江省', '3301', '杭州市', '330109', '萧山区', '', '', '', '', 3, 1, ''), ('330110', '3301', '00,33,3301', '余杭区', '33', '浙江省', '3301', '杭州市', '330110', '余杭区', '', '', '', '', 3, 1, ''), ('330111', '3301', '00,33,3301', '富阳区', '33', '浙江省', '3301', '杭州市', '330111', '富阳区', '', '', '', '', 3, 1, ''), ('330112', '3301', '00,33,3301', '临安区', '33', '浙江省', '3301', '杭州市', '330112', '临安区', '', '', '', '', 3, 1, ''), ('330122', '3301', '00,33,3301', '桐庐县', '33', '浙江省', '3301', '杭州市', '330122', '桐庐县', '', '', '', '', 3, 1, ''), ('330127', '3301', '00,33,3301', '淳安县', '33', '浙江省', '3301', '杭州市', '330127', '淳安县', '', '', '', '', 3, 1, ''), ('330182', '3301', '00,33,3301', '建德市', '33', '浙江省', '3301', '杭州市', '330182', '建德市', '', '', '', '', 3, 1, ''), ('3302', '33', '00,33', '宁波市', '33', '浙江省', '3302', '宁波市', '', '', '', '', '', '', 2, 1, ''), ('330203', '3302', '00,33,3302', '海曙区', '33', '浙江省', '3302', '宁波市', '330203', '海曙区', '', '', '', '', 3, 1, ''), ('330205', '3302', '00,33,3302', '江北区', '33', '浙江省', '3302', '宁波市', '330205', '江北区', '', '', '', '', 3, 1, ''), ('330206', '3302', '00,33,3302', '北仑区', '33', '浙江省', '3302', '宁波市', '330206', '北仑区', '', '', '', '', 3, 1, ''), ('330211', '3302', '00,33,3302', '镇海区', '33', '浙江省', '3302', '宁波市', '330211', '镇海区', '', '', '', '', 3, 1, ''), ('330212', '3302', '00,33,3302', '鄞州区', '33', '浙江省', '3302', '宁波市', '330212', '鄞州区', '', '', '', '', 3, 1, ''), ('330213', '3302', '00,33,3302', '奉化区', '33', '浙江省', '3302', '宁波市', '330213', '奉化区', '', '', '', '', 3, 1, ''), ('330225', '3302', '00,33,3302', '象山县', '33', '浙江省', '3302', '宁波市', '330225', '象山县', '', '', '', '', 3, 1, ''), ('330226', '3302', '00,33,3302', '宁海县', '33', '浙江省', '3302', '宁波市', '330226', '宁海县', '', '', '', '', 3, 1, ''), ('330281', '3302', '00,33,3302', '余姚市', '33', '浙江省', '3302', '宁波市', '330281', '余姚市', '', '', '', '', 3, 1, ''), ('330282', '3302', '00,33,3302', '慈溪市', '33', '浙江省', '3302', '宁波市', '330282', '慈溪市', '', '', '', '', 3, 1, ''), ('3303', '33', '00,33', '温州市', '33', '浙江省', '3303', '温州市', '', '', '', '', '', '', 2, 1, ''), ('330302', '3303', '00,33,3303', '鹿城区', '33', '浙江省', '3303', '温州市', '330302', '鹿城区', '', '', '', '', 3, 1, ''), ('330303', '3303', '00,33,3303', '龙湾区', '33', '浙江省', '3303', '温州市', '330303', '龙湾区', '', '', '', '', 3, 1, ''), ('330304', '3303', '00,33,3303', '瓯海区', '33', '浙江省', '3303', '温州市', '330304', '瓯海区', '', '', '', '', 3, 1, ''), ('330305', '3303', '00,33,3303', '洞头区', '33', '浙江省', '3303', '温州市', '330305', '洞头区', '', '', '', '', 3, 1, ''), ('330324', '3303', '00,33,3303', '永嘉县', '33', '浙江省', '3303', '温州市', '330324', '永嘉县', '', '', '', '', 3, 1, ''), ('330326', '3303', '00,33,3303', '平阳县', '33', '浙江省', '3303', '温州市', '330326', '平阳县', '', '', '', '', 3, 1, ''), ('330327', '3303', '00,33,3303', '苍南县', '33', '浙江省', '3303', '温州市', '330327', '苍南县', '', '', '', '', 3, 1, ''), ('330328', '3303', '00,33,3303', '文成县', '33', '浙江省', '3303', '温州市', '330328', '文成县', '', '', '', '', 3, 1, ''), ('330329', '3303', '00,33,3303', '泰顺县', '33', '浙江省', '3303', '温州市', '330329', '泰顺县', '', '', '', '', 3, 1, ''), ('330381', '3303', '00,33,3303', '瑞安市', '33', '浙江省', '3303', '温州市', '330381', '瑞安市', '', '', '', '', 3, 1, ''), ('330382', '3303', '00,33,3303', '乐清市', '33', '浙江省', '3303', '温州市', '330382', '乐清市', '', '', '', '', 3, 1, ''), ('330383', '3303', '00,33,3303', '龙港市', '33', '浙江省', '3303', '温州市', '330383', '龙港市', '', '', '', '', 3, 1, ''), ('3304', '33', '00,33', '嘉兴市', '33', '浙江省', '3304', '嘉兴市', '', '', '', '', '', '', 2, 1, ''), ('330402', '3304', '00,33,3304', '南湖区', '33', '浙江省', '3304', '嘉兴市', '330402', '南湖区', '', '', '', '', 3, 1, ''), ('330411', '3304', '00,33,3304', '秀洲区', '33', '浙江省', '3304', '嘉兴市', '330411', '秀洲区', '', '', '', '', 3, 1, ''), ('330421', '3304', '00,33,3304', '嘉善县', '33', '浙江省', '3304', '嘉兴市', '330421', '嘉善县', '', '', '', '', 3, 1, ''), ('330424', '3304', '00,33,3304', '海盐县', '33', '浙江省', '3304', '嘉兴市', '330424', '海盐县', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('330481', '3304', '00,33,3304', '海宁市', '33', '浙江省', '3304', '嘉兴市', '330481', '海宁市', '', '', '', '', 3, 1, ''), ('330482', '3304', '00,33,3304', '平湖市', '33', '浙江省', '3304', '嘉兴市', '330482', '平湖市', '', '', '', '', 3, 1, ''), ('330483', '3304', '00,33,3304', '桐乡市', '33', '浙江省', '3304', '嘉兴市', '330483', '桐乡市', '', '', '', '', 3, 1, ''), ('3305', '33', '00,33', '湖州市', '33', '浙江省', '3305', '湖州市', '', '', '', '', '', '', 2, 1, ''), ('330502', '3305', '00,33,3305', '吴兴区', '33', '浙江省', '3305', '湖州市', '330502', '吴兴区', '', '', '', '', 3, 1, ''), ('330503', '3305', '00,33,3305', '南浔区', '33', '浙江省', '3305', '湖州市', '330503', '南浔区', '', '', '', '', 3, 1, ''), ('330521', '3305', '00,33,3305', '德清县', '33', '浙江省', '3305', '湖州市', '330521', '德清县', '', '', '', '', 3, 1, ''), ('330522', '3305', '00,33,3305', '长兴县', '33', '浙江省', '3305', '湖州市', '330522', '长兴县', '', '', '', '', 3, 1, ''), ('330523', '3305', '00,33,3305', '安吉县', '33', '浙江省', '3305', '湖州市', '330523', '安吉县', '', '', '', '', 3, 1, ''), ('3306', '33', '00,33', '绍兴市', '33', '浙江省', '3306', '绍兴市', '', '', '', '', '', '', 2, 1, ''), ('330602', '3306', '00,33,3306', '越城区', '33', '浙江省', '3306', '绍兴市', '330602', '越城区', '', '', '', '', 3, 1, ''), ('330603', '3306', '00,33,3306', '柯桥区', '33', '浙江省', '3306', '绍兴市', '330603', '柯桥区', '', '', '', '', 3, 1, ''), ('330604', '3306', '00,33,3306', '上虞区', '33', '浙江省', '3306', '绍兴市', '330604', '上虞区', '', '', '', '', 3, 1, ''), ('330624', '3306', '00,33,3306', '新昌县', '33', '浙江省', '3306', '绍兴市', '330624', '新昌县', '', '', '', '', 3, 1, ''), ('330681', '3306', '00,33,3306', '诸暨市', '33', '浙江省', '3306', '绍兴市', '330681', '诸暨市', '', '', '', '', 3, 1, ''), ('330683', '3306', '00,33,3306', '嵊州市', '33', '浙江省', '3306', '绍兴市', '330683', '嵊州市', '', '', '', '', 3, 1, ''), ('3307', '33', '00,33', '金华市', '33', '浙江省', '3307', '金华市', '', '', '', '', '', '', 2, 1, ''), ('330702', '3307', '00,33,3307', '婺城区', '33', '浙江省', '3307', '金华市', '330702', '婺城区', '', '', '', '', 3, 1, ''), ('330703', '3307', '00,33,3307', '金东区', '33', '浙江省', '3307', '金华市', '330703', '金东区', '', '', '', '', 3, 1, ''), ('330723', '3307', '00,33,3307', '武义县', '33', '浙江省', '3307', '金华市', '330723', '武义县', '', '', '', '', 3, 1, ''), ('330726', '3307', '00,33,3307', '浦江县', '33', '浙江省', '3307', '金华市', '330726', '浦江县', '', '', '', '', 3, 1, ''), ('330727', '3307', '00,33,3307', '磐安县', '33', '浙江省', '3307', '金华市', '330727', '磐安县', '', '', '', '', 3, 1, ''), ('330781', '3307', '00,33,3307', '兰溪市', '33', '浙江省', '3307', '金华市', '330781', '兰溪市', '', '', '', '', 3, 1, ''), ('330782', '3307', '00,33,3307', '义乌市', '33', '浙江省', '3307', '金华市', '330782', '义乌市', '', '', '', '', 3, 1, ''), ('330783', '3307', '00,33,3307', '东阳市', '33', '浙江省', '3307', '金华市', '330783', '东阳市', '', '', '', '', 3, 1, ''), ('330784', '3307', '00,33,3307', '永康市', '33', '浙江省', '3307', '金华市', '330784', '永康市', '', '', '', '', 3, 1, ''), ('3308', '33', '00,33', '衢州市', '33', '浙江省', '3308', '衢州市', '', '', '', '', '', '', 2, 1, ''), ('330802', '3308', '00,33,3308', '柯城区', '33', '浙江省', '3308', '衢州市', '330802', '柯城区', '', '', '', '', 3, 1, ''), ('330803', '3308', '00,33,3308', '衢江区', '33', '浙江省', '3308', '衢州市', '330803', '衢江区', '', '', '', '', 3, 1, ''), ('330822', '3308', '00,33,3308', '常山县', '33', '浙江省', '3308', '衢州市', '330822', '常山县', '', '', '', '', 3, 1, ''), ('330824', '3308', '00,33,3308', '开化县', '33', '浙江省', '3308', '衢州市', '330824', '开化县', '', '', '', '', 3, 1, ''), ('330825', '3308', '00,33,3308', '龙游县', '33', '浙江省', '3308', '衢州市', '330825', '龙游县', '', '', '', '', 3, 1, ''), ('330881', '3308', '00,33,3308', '江山市', '33', '浙江省', '3308', '衢州市', '330881', '江山市', '', '', '', '', 3, 1, ''), ('3309', '33', '00,33', '舟山市', '33', '浙江省', '3309', '舟山市', '', '', '', '', '', '', 2, 1, ''), ('330902', '3309', '00,33,3309', '定海区', '33', '浙江省', '3309', '舟山市', '330902', '定海区', '', '', '', '', 3, 1, ''), ('330903', '3309', '00,33,3309', '普陀区', '33', '浙江省', '3309', '舟山市', '330903', '普陀区', '', '', '', '', 3, 1, ''), ('330921', '3309', '00,33,3309', '岱山县', '33', '浙江省', '3309', '舟山市', '330921', '岱山县', '', '', '', '', 3, 1, ''), ('330922', '3309', '00,33,3309', '嵊泗县', '33', '浙江省', '3309', '舟山市', '330922', '嵊泗县', '', '', '', '', 3, 1, ''), ('3310', '33', '00,33', '台州市', '33', '浙江省', '3310', '台州市', '', '', '', '', '', '', 2, 1, ''), ('331002', '3310', '00,33,3310', '椒江区', '33', '浙江省', '3310', '台州市', '331002', '椒江区', '', '', '', '', 3, 1, ''), ('331003', '3310', '00,33,3310', '黄岩区', '33', '浙江省', '3310', '台州市', '331003', '黄岩区', '', '', '', '', 3, 1, ''), ('331004', '3310', '00,33,3310', '路桥区', '33', '浙江省', '3310', '台州市', '331004', '路桥区', '', '', '', '', 3, 1, ''), ('331022', '3310', '00,33,3310', '三门县', '33', '浙江省', '3310', '台州市', '331022', '三门县', '', '', '', '', 3, 1, ''), ('331023', '3310', '00,33,3310', '天台县', '33', '浙江省', '3310', '台州市', '331023', '天台县', '', '', '', '', 3, 1, ''), ('331024', '3310', '00,33,3310', '仙居县', '33', '浙江省', '3310', '台州市', '331024', '仙居县', '', '', '', '', 3, 1, ''), ('331081', '3310', '00,33,3310', '温岭市', '33', '浙江省', '3310', '台州市', '331081', '温岭市', '', '', '', '', 3, 1, ''), ('331082', '3310', '00,33,3310', '临海市', '33', '浙江省', '3310', '台州市', '331082', '临海市', '', '', '', '', 3, 1, ''), ('331083', '3310', '00,33,3310', '玉环市', '33', '浙江省', '3310', '台州市', '331083', '玉环市', '', '', '', '', 3, 1, ''), ('3311', '33', '00,33', '丽水市', '33', '浙江省', '3311', '丽水市', '', '', '', '', '', '', 2, 1, ''), ('331102', '3311', '00,33,3311', '莲都区', '33', '浙江省', '3311', '丽水市', '331102', '莲都区', '', '', '', '', 3, 1, ''), ('331121', '3311', '00,33,3311', '青田县', '33', '浙江省', '3311', '丽水市', '331121', '青田县', '', '', '', '', 3, 1, ''), ('331122', '3311', '00,33,3311', '缙云县', '33', '浙江省', '3311', '丽水市', '331122', '缙云县', '', '', '', '', 3, 1, ''), ('331123', '3311', '00,33,3311', '遂昌县', '33', '浙江省', '3311', '丽水市', '331123', '遂昌县', '', '', '', '', 3, 1, ''), ('331124', '3311', '00,33,3311', '松阳县', '33', '浙江省', '3311', '丽水市', '331124', '松阳县', '', '', '', '', 3, 1, ''), ('331125', '3311', '00,33,3311', '云和县', '33', '浙江省', '3311', '丽水市', '331125', '云和县', '', '', '', '', 3, 1, ''), ('331126', '3311', '00,33,3311', '庆元县', '33', '浙江省', '3311', '丽水市', '331126', '庆元县', '', '', '', '', 3, 1, ''), ('331127', '3311', '00,33,3311', '景宁畲族自治县', '33', '浙江省', '3311', '丽水市', '331127', '景宁畲族自治县', '', '', '', '', 3, 1, ''), ('331181', '3311', '00,33,3311', '龙泉市', '33', '浙江省', '3311', '丽水市', '331181', '龙泉市', '', '', '', '', 3, 1, ''), ('34', '00', '00', '安徽省', '34', '安徽省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3401', '34', '00,34', '合肥市', '34', '安徽省', '3401', '合肥市', '', '', '', '', '', '', 2, 1, ''), ('340102', '3401', '00,34,3401', '瑶海区', '34', '安徽省', '3401', '合肥市', '340102', '瑶海区', '', '', '', '', 3, 1, ''), ('340103', '3401', '00,34,3401', '庐阳区', '34', '安徽省', '3401', '合肥市', '340103', '庐阳区', '', '', '', '', 3, 1, ''), ('340104', '3401', '00,34,3401', '蜀山区', '34', '安徽省', '3401', '合肥市', '340104', '蜀山区', '', '', '', '', 3, 1, ''), ('340111', '3401', '00,34,3401', '包河区', '34', '安徽省', '3401', '合肥市', '340111', '包河区', '', '', '', '', 3, 1, ''), ('340121', '3401', '00,34,3401', '长丰县', '34', '安徽省', '3401', '合肥市', '340121', '长丰县', '', '', '', '', 3, 1, ''), ('340122', '3401', '00,34,3401', '肥东县', '34', '安徽省', '3401', '合肥市', '340122', '肥东县', '', '', '', '', 3, 1, ''), ('340123', '3401', '00,34,3401', '肥西县', '34', '安徽省', '3401', '合肥市', '340123', '肥西县', '', '', '', '', 3, 1, ''), ('340124', '3401', '00,34,3401', '庐江县', '34', '安徽省', '3401', '合肥市', '340124', '庐江县', '', '', '', '', 3, 1, ''), ('340181', '3401', '00,34,3401', '巢湖市', '34', '安徽省', '3401', '合肥市', '340181', '巢湖市', '', '', '', '', 3, 1, ''), ('3402', '34', '00,34', '芜湖市', '34', '安徽省', '3402', '芜湖市', '', '', '', '', '', '', 2, 1, ''), ('340202', '3402', '00,34,3402', '镜湖区', '34', '安徽省', '3402', '芜湖市', '340202', '镜湖区', '', '', '', '', 3, 1, ''), ('340203', '3402', '00,34,3402', '弋江区', '34', '安徽省', '3402', '芜湖市', '340203', '弋江区', '', '', '', '', 3, 1, ''), ('340207', '3402', '00,34,3402', '鸠江区', '34', '安徽省', '3402', '芜湖市', '340207', '鸠江区', '', '', '', '', 3, 1, ''), ('340208', '3402', '00,34,3402', '三山区', '34', '安徽省', '3402', '芜湖市', '340208', '三山区', '', '', '', '', 3, 1, ''), ('340221', '3402', '00,34,3402', '芜湖县', '34', '安徽省', '3402', '芜湖市', '340221', '芜湖县', '', '', '', '', 3, 1, ''), ('340222', '3402', '00,34,3402', '繁昌县', '34', '安徽省', '3402', '芜湖市', '340222', '繁昌县', '', '', '', '', 3, 1, ''), ('340223', '3402', '00,34,3402', '南陵县', '34', '安徽省', '3402', '芜湖市', '340223', '南陵县', '', '', '', '', 3, 1, ''), ('340281', '3402', '00,34,3402', '无为市', '34', '安徽省', '3402', '芜湖市', '340281', '无为市', '', '', '', '', 3, 1, ''), ('3403', '34', '00,34', '蚌埠市', '34', '安徽省', '3403', '蚌埠市', '', '', '', '', '', '', 2, 1, ''), ('340302', '3403', '00,34,3403', '龙子湖区', '34', '安徽省', '3403', '蚌埠市', '340302', '龙子湖区', '', '', '', '', 3, 1, ''), ('340303', '3403', '00,34,3403', '蚌山区', '34', '安徽省', '3403', '蚌埠市', '340303', '蚌山区', '', '', '', '', 3, 1, ''), ('340304', '3403', '00,34,3403', '禹会区', '34', '安徽省', '3403', '蚌埠市', '340304', '禹会区', '', '', '', '', 3, 1, ''), ('340311', '3403', '00,34,3403', '淮上区', '34', '安徽省', '3403', '蚌埠市', '340311', '淮上区', '', '', '', '', 3, 1, ''), ('340321', '3403', '00,34,3403', '怀远县', '34', '安徽省', '3403', '蚌埠市', '340321', '怀远县', '', '', '', '', 3, 1, ''), ('340322', '3403', '00,34,3403', '五河县', '34', '安徽省', '3403', '蚌埠市', '340322', '五河县', '', '', '', '', 3, 1, ''), ('340323', '3403', '00,34,3403', '固镇县', '34', '安徽省', '3403', '蚌埠市', '340323', '固镇县', '', '', '', '', 3, 1, ''), ('3404', '34', '00,34', '淮南市', '34', '安徽省', '3404', '淮南市', '', '', '', '', '', '', 2, 1, ''), ('340402', '3404', '00,34,3404', '大通区', '34', '安徽省', '3404', '淮南市', '340402', '大通区', '', '', '', '', 3, 1, ''), ('340403', '3404', '00,34,3404', '田家庵区', '34', '安徽省', '3404', '淮南市', '340403', '田家庵区', '', '', '', '', 3, 1, ''), ('340404', '3404', '00,34,3404', '谢家集区', '34', '安徽省', '3404', '淮南市', '340404', '谢家集区', '', '', '', '', 3, 1, ''), ('340405', '3404', '00,34,3404', '八公山区', '34', '安徽省', '3404', '淮南市', '340405', '八公山区', '', '', '', '', 3, 1, ''), ('340406', '3404', '00,34,3404', '潘集区', '34', '安徽省', '3404', '淮南市', '340406', '潘集区', '', '', '', '', 3, 1, ''), ('340421', '3404', '00,34,3404', '凤台县', '34', '安徽省', '3404', '淮南市', '340421', '凤台县', '', '', '', '', 3, 1, ''), ('340422', '3404', '00,34,3404', '寿县', '34', '安徽省', '3404', '淮南市', '340422', '寿县', '', '', '', '', 3, 1, ''), ('3405', '34', '00,34', '马鞍山市', '34', '安徽省', '3405', '马鞍山市', '', '', '', '', '', '', 2, 1, ''), ('340503', '3405', '00,34,3405', '花山区', '34', '安徽省', '3405', '马鞍山市', '340503', '花山区', '', '', '', '', 3, 1, ''), ('340504', '3405', '00,34,3405', '雨山区', '34', '安徽省', '3405', '马鞍山市', '340504', '雨山区', '', '', '', '', 3, 1, ''), ('340506', '3405', '00,34,3405', '博望区', '34', '安徽省', '3405', '马鞍山市', '340506', '博望区', '', '', '', '', 3, 1, ''), ('340521', '3405', '00,34,3405', '当涂县', '34', '安徽省', '3405', '马鞍山市', '340521', '当涂县', '', '', '', '', 3, 1, ''), ('340522', '3405', '00,34,3405', '含山县', '34', '安徽省', '3405', '马鞍山市', '340522', '含山县', '', '', '', '', 3, 1, ''), ('340523', '3405', '00,34,3405', '和县', '34', '安徽省', '3405', '马鞍山市', '340523', '和县', '', '', '', '', 3, 1, ''), ('3406', '34', '00,34', '淮北市', '34', '安徽省', '3406', '淮北市', '', '', '', '', '', '', 2, 1, ''), ('340602', '3406', '00,34,3406', '杜集区', '34', '安徽省', '3406', '淮北市', '340602', '杜集区', '', '', '', '', 3, 1, ''), ('340603', '3406', '00,34,3406', '相山区', '34', '安徽省', '3406', '淮北市', '340603', '相山区', '', '', '', '', 3, 1, ''), ('340604', '3406', '00,34,3406', '烈山区', '34', '安徽省', '3406', '淮北市', '340604', '烈山区', '', '', '', '', 3, 1, ''), ('340621', '3406', '00,34,3406', '濉溪县', '34', '安徽省', '3406', '淮北市', '340621', '濉溪县', '', '', '', '', 3, 1, ''), ('3407', '34', '00,34', '铜陵市', '34', '安徽省', '3407', '铜陵市', '', '', '', '', '', '', 2, 1, ''), ('340705', '3407', '00,34,3407', '铜官区', '34', '安徽省', '3407', '铜陵市', '340705', '铜官区', '', '', '', '', 3, 1, ''), ('340706', '3407', '00,34,3407', '义安区', '34', '安徽省', '3407', '铜陵市', '340706', '义安区', '', '', '', '', 3, 1, ''), ('340711', '3407', '00,34,3407', '郊区', '34', '安徽省', '3407', '铜陵市', '340711', '郊区', '', '', '', '', 3, 1, ''), ('340722', '3407', '00,34,3407', '枞阳县', '34', '安徽省', '3407', '铜陵市', '340722', '枞阳县', '', '', '', '', 3, 1, ''), ('3408', '34', '00,34', '安庆市', '34', '安徽省', '3408', '安庆市', '', '', '', '', '', '', 2, 1, ''), ('340802', '3408', '00,34,3408', '迎江区', '34', '安徽省', '3408', '安庆市', '340802', '迎江区', '', '', '', '', 3, 1, ''), ('340803', '3408', '00,34,3408', '大观区', '34', '安徽省', '3408', '安庆市', '340803', '大观区', '', '', '', '', 3, 1, ''), ('340811', '3408', '00,34,3408', '宜秀区', '34', '安徽省', '3408', '安庆市', '340811', '宜秀区', '', '', '', '', 3, 1, ''), ('340822', '3408', '00,34,3408', '怀宁县', '34', '安徽省', '3408', '安庆市', '340822', '怀宁县', '', '', '', '', 3, 1, ''), ('340825', '3408', '00,34,3408', '太湖县', '34', '安徽省', '3408', '安庆市', '340825', '太湖县', '', '', '', '', 3, 1, ''), ('340826', '3408', '00,34,3408', '宿松县', '34', '安徽省', '3408', '安庆市', '340826', '宿松县', '', '', '', '', 3, 1, ''), ('340827', '3408', '00,34,3408', '望江县', '34', '安徽省', '3408', '安庆市', '340827', '望江县', '', '', '', '', 3, 1, ''), ('340828', '3408', '00,34,3408', '岳西县', '34', '安徽省', '3408', '安庆市', '340828', '岳西县', '', '', '', '', 3, 1, ''), ('340881', '3408', '00,34,3408', '桐城市', '34', '安徽省', '3408', '安庆市', '340881', '桐城市', '', '', '', '', 3, 1, ''), ('340882', '3408', '00,34,3408', '潜山市', '34', '安徽省', '3408', '安庆市', '340882', '潜山市', '', '', '', '', 3, 1, ''), ('3410', '34', '00,34', '黄山市', '34', '安徽省', '3410', '黄山市', '', '', '', '', '', '', 2, 1, ''), ('341002', '3410', '00,34,3410', '屯溪区', '34', '安徽省', '3410', '黄山市', '341002', '屯溪区', '', '', '', '', 3, 1, ''), ('341003', '3410', '00,34,3410', '黄山区', '34', '安徽省', '3410', '黄山市', '341003', '黄山区', '', '', '', '', 3, 1, ''), ('341004', '3410', '00,34,3410', '徽州区', '34', '安徽省', '3410', '黄山市', '341004', '徽州区', '', '', '', '', 3, 1, ''), ('341021', '3410', '00,34,3410', '歙县', '34', '安徽省', '3410', '黄山市', '341021', '歙县', '', '', '', '', 3, 1, ''), ('341022', '3410', '00,34,3410', '休宁县', '34', '安徽省', '3410', '黄山市', '341022', '休宁县', '', '', '', '', 3, 1, ''), ('341023', '3410', '00,34,3410', '黟县', '34', '安徽省', '3410', '黄山市', '341023', '黟县', '', '', '', '', 3, 1, ''), ('341024', '3410', '00,34,3410', '祁门县', '34', '安徽省', '3410', '黄山市', '341024', '祁门县', '', '', '', '', 3, 1, ''), ('3411', '34', '00,34', '滁州市', '34', '安徽省', '3411', '滁州市', '', '', '', '', '', '', 2, 1, ''), ('341102', '3411', '00,34,3411', '琅琊区', '34', '安徽省', '3411', '滁州市', '341102', '琅琊区', '', '', '', '', 3, 1, ''), ('341103', '3411', '00,34,3411', '南谯区', '34', '安徽省', '3411', '滁州市', '341103', '南谯区', '', '', '', '', 3, 1, ''), ('341122', '3411', '00,34,3411', '来安县', '34', '安徽省', '3411', '滁州市', '341122', '来安县', '', '', '', '', 3, 1, ''), ('341124', '3411', '00,34,3411', '全椒县', '34', '安徽省', '3411', '滁州市', '341124', '全椒县', '', '', '', '', 3, 1, ''), ('341125', '3411', '00,34,3411', '定远县', '34', '安徽省', '3411', '滁州市', '341125', '定远县', '', '', '', '', 3, 1, ''), ('341126', '3411', '00,34,3411', '凤阳县', '34', '安徽省', '3411', '滁州市', '341126', '凤阳县', '', '', '', '', 3, 1, ''), ('341181', '3411', '00,34,3411', '天长市', '34', '安徽省', '3411', '滁州市', '341181', '天长市', '', '', '', '', 3, 1, ''), ('341182', '3411', '00,34,3411', '明光市', '34', '安徽省', '3411', '滁州市', '341182', '明光市', '', '', '', '', 3, 1, ''), ('3412', '34', '00,34', '阜阳市', '34', '安徽省', '3412', '阜阳市', '', '', '', '', '', '', 2, 1, ''), ('341202', '3412', '00,34,3412', '颍州区', '34', '安徽省', '3412', '阜阳市', '341202', '颍州区', '', '', '', '', 3, 1, ''), ('341203', '3412', '00,34,3412', '颍东区', '34', '安徽省', '3412', '阜阳市', '341203', '颍东区', '', '', '', '', 3, 1, ''), ('341204', '3412', '00,34,3412', '颍泉区', '34', '安徽省', '3412', '阜阳市', '341204', '颍泉区', '', '', '', '', 3, 1, ''), ('341221', '3412', '00,34,3412', '临泉县', '34', '安徽省', '3412', '阜阳市', '341221', '临泉县', '', '', '', '', 3, 1, ''), ('341222', '3412', '00,34,3412', '太和县', '34', '安徽省', '3412', '阜阳市', '341222', '太和县', '', '', '', '', 3, 1, ''), ('341225', '3412', '00,34,3412', '阜南县', '34', '安徽省', '3412', '阜阳市', '341225', '阜南县', '', '', '', '', 3, 1, ''), ('341226', '3412', '00,34,3412', '颍上县', '34', '安徽省', '3412', '阜阳市', '341226', '颍上县', '', '', '', '', 3, 1, ''), ('341282', '3412', '00,34,3412', '界首市', '34', '安徽省', '3412', '阜阳市', '341282', '界首市', '', '', '', '', 3, 1, ''), ('3413', '34', '00,34', '宿州市', '34', '安徽省', '3413', '宿州市', '', '', '', '', '', '', 2, 1, ''), ('341302', '3413', '00,34,3413', '埇桥区', '34', '安徽省', '3413', '宿州市', '341302', '埇桥区', '', '', '', '', 3, 1, ''), ('341321', '3413', '00,34,3413', '砀山县', '34', '安徽省', '3413', '宿州市', '341321', '砀山县', '', '', '', '', 3, 1, ''), ('341322', '3413', '00,34,3413', '萧县', '34', '安徽省', '3413', '宿州市', '341322', '萧县', '', '', '', '', 3, 1, ''), ('341323', '3413', '00,34,3413', '灵璧县', '34', '安徽省', '3413', '宿州市', '341323', '灵璧县', '', '', '', '', 3, 1, ''), ('341324', '3413', '00,34,3413', '泗县', '34', '安徽省', '3413', '宿州市', '341324', '泗县', '', '', '', '', 3, 1, ''), ('3415', '34', '00,34', '六安市', '34', '安徽省', '3415', '六安市', '', '', '', '', '', '', 2, 1, ''), ('341502', '3415', '00,34,3415', '金安区', '34', '安徽省', '3415', '六安市', '341502', '金安区', '', '', '', '', 3, 1, ''), ('341503', '3415', '00,34,3415', '裕安区', '34', '安徽省', '3415', '六安市', '341503', '裕安区', '', '', '', '', 3, 1, ''), ('341504', '3415', '00,34,3415', '叶集区', '34', '安徽省', '3415', '六安市', '341504', '叶集区', '', '', '', '', 3, 1, ''), ('341522', '3415', '00,34,3415', '霍邱县', '34', '安徽省', '3415', '六安市', '341522', '霍邱县', '', '', '', '', 3, 1, ''), ('341523', '3415', '00,34,3415', '舒城县', '34', '安徽省', '3415', '六安市', '341523', '舒城县', '', '', '', '', 3, 1, ''), ('341524', '3415', '00,34,3415', '金寨县', '34', '安徽省', '3415', '六安市', '341524', '金寨县', '', '', '', '', 3, 1, ''), ('341525', '3415', '00,34,3415', '霍山县', '34', '安徽省', '3415', '六安市', '341525', '霍山县', '', '', '', '', 3, 1, ''), ('3416', '34', '00,34', '亳州市', '34', '安徽省', '3416', '亳州市', '', '', '', '', '', '', 2, 1, ''), ('341602', '3416', '00,34,3416', '谯城区', '34', '安徽省', '3416', '亳州市', '341602', '谯城区', '', '', '', '', 3, 1, ''), ('341621', '3416', '00,34,3416', '涡阳县', '34', '安徽省', '3416', '亳州市', '341621', '涡阳县', '', '', '', '', 3, 1, ''), ('341622', '3416', '00,34,3416', '蒙城县', '34', '安徽省', '3416', '亳州市', '341622', '蒙城县', '', '', '', '', 3, 1, ''), ('341623', '3416', '00,34,3416', '利辛县', '34', '安徽省', '3416', '亳州市', '341623', '利辛县', '', '', '', '', 3, 1, ''), ('3417', '34', '00,34', '池州市', '34', '安徽省', '3417', '池州市', '', '', '', '', '', '', 2, 1, ''), ('341702', '3417', '00,34,3417', '贵池区', '34', '安徽省', '3417', '池州市', '341702', '贵池区', '', '', '', '', 3, 1, ''), ('341721', '3417', '00,34,3417', '东至县', '34', '安徽省', '3417', '池州市', '341721', '东至县', '', '', '', '', 3, 1, ''), ('341722', '3417', '00,34,3417', '石台县', '34', '安徽省', '3417', '池州市', '341722', '石台县', '', '', '', '', 3, 1, ''), ('341723', '3417', '00,34,3417', '青阳县', '34', '安徽省', '3417', '池州市', '341723', '青阳县', '', '', '', '', 3, 1, ''), ('3418', '34', '00,34', '宣城市', '34', '安徽省', '3418', '宣城市', '', '', '', '', '', '', 2, 1, ''), ('341802', '3418', '00,34,3418', '宣州区', '34', '安徽省', '3418', '宣城市', '341802', '宣州区', '', '', '', '', 3, 1, ''), ('341821', '3418', '00,34,3418', '郎溪县', '34', '安徽省', '3418', '宣城市', '341821', '郎溪县', '', '', '', '', 3, 1, ''), ('341823', '3418', '00,34,3418', '泾县', '34', '安徽省', '3418', '宣城市', '341823', '泾县', '', '', '', '', 3, 1, ''), ('341824', '3418', '00,34,3418', '绩溪县', '34', '安徽省', '3418', '宣城市', '341824', '绩溪县', '', '', '', '', 3, 1, ''), ('341825', '3418', '00,34,3418', '旌德县', '34', '安徽省', '3418', '宣城市', '341825', '旌德县', '', '', '', '', 3, 1, ''), ('341881', '3418', '00,34,3418', '宁国市', '34', '安徽省', '3418', '宣城市', '341881', '宁国市', '', '', '', '', 3, 1, ''), ('341882', '3418', '00,34,3418', '广德市', '34', '安徽省', '3418', '宣城市', '341882', '广德市', '', '', '', '', 3, 1, ''), ('35', '00', '00', '福建省', '35', '福建省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3501', '35', '00,35', '福州市', '35', '福建省', '3501', '福州市', '', '', '', '', '', '', 2, 1, ''), ('350102', '3501', '00,35,3501', '鼓楼区', '35', '福建省', '3501', '福州市', '350102', '鼓楼区', '', '', '', '', 3, 1, ''), ('350103', '3501', '00,35,3501', '台江区', '35', '福建省', '3501', '福州市', '350103', '台江区', '', '', '', '', 3, 1, ''), ('350104', '3501', '00,35,3501', '仓山区', '35', '福建省', '3501', '福州市', '350104', '仓山区', '', '', '', '', 3, 1, ''), ('350105', '3501', '00,35,3501', '马尾区', '35', '福建省', '3501', '福州市', '350105', '马尾区', '', '', '', '', 3, 1, ''), ('350111', '3501', '00,35,3501', '晋安区', '35', '福建省', '3501', '福州市', '350111', '晋安区', '', '', '', '', 3, 1, ''), ('350112', '3501', '00,35,3501', '长乐区', '35', '福建省', '3501', '福州市', '350112', '长乐区', '', '', '', '', 3, 1, ''), ('350121', '3501', '00,35,3501', '闽侯县', '35', '福建省', '3501', '福州市', '350121', '闽侯县', '', '', '', '', 3, 1, ''), ('350122', '3501', '00,35,3501', '连江县', '35', '福建省', '3501', '福州市', '350122', '连江县', '', '', '', '', 3, 1, ''), ('350123', '3501', '00,35,3501', '罗源县', '35', '福建省', '3501', '福州市', '350123', '罗源县', '', '', '', '', 3, 1, ''), ('350124', '3501', '00,35,3501', '闽清县', '35', '福建省', '3501', '福州市', '350124', '闽清县', '', '', '', '', 3, 1, ''), ('350125', '3501', '00,35,3501', '永泰县', '35', '福建省', '3501', '福州市', '350125', '永泰县', '', '', '', '', 3, 1, ''), ('350128', '3501', '00,35,3501', '平潭县', '35', '福建省', '3501', '福州市', '350128', '平潭县', '', '', '', '', 3, 1, ''), ('350181', '3501', '00,35,3501', '福清市', '35', '福建省', '3501', '福州市', '350181', '福清市', '', '', '', '', 3, 1, ''), ('3502', '35', '00,35', '厦门市', '35', '福建省', '3502', '厦门市', '', '', '', '', '', '', 2, 1, ''), ('350203', '3502', '00,35,3502', '思明区', '35', '福建省', '3502', '厦门市', '350203', '思明区', '', '', '', '', 3, 1, ''), ('350205', '3502', '00,35,3502', '海沧区', '35', '福建省', '3502', '厦门市', '350205', '海沧区', '', '', '', '', 3, 1, ''), ('350206', '3502', '00,35,3502', '湖里区', '35', '福建省', '3502', '厦门市', '350206', '湖里区', '', '', '', '', 3, 1, ''), ('350211', '3502', '00,35,3502', '集美区', '35', '福建省', '3502', '厦门市', '350211', '集美区', '', '', '', '', 3, 1, ''), ('350212', '3502', '00,35,3502', '同安区', '35', '福建省', '3502', '厦门市', '350212', '同安区', '', '', '', '', 3, 1, ''), ('350213', '3502', '00,35,3502', '翔安区', '35', '福建省', '3502', '厦门市', '350213', '翔安区', '', '', '', '', 3, 1, ''), ('3503', '35', '00,35', '莆田市', '35', '福建省', '3503', '莆田市', '', '', '', '', '', '', 2, 1, ''), ('350302', '3503', '00,35,3503', '城厢区', '35', '福建省', '3503', '莆田市', '350302', '城厢区', '', '', '', '', 3, 1, ''), ('350303', '3503', '00,35,3503', '涵江区', '35', '福建省', '3503', '莆田市', '350303', '涵江区', '', '', '', '', 3, 1, ''), ('350304', '3503', '00,35,3503', '荔城区', '35', '福建省', '3503', '莆田市', '350304', '荔城区', '', '', '', '', 3, 1, ''), ('350305', '3503', '00,35,3503', '秀屿区', '35', '福建省', '3503', '莆田市', '350305', '秀屿区', '', '', '', '', 3, 1, ''), ('350322', '3503', '00,35,3503', '仙游县', '35', '福建省', '3503', '莆田市', '350322', '仙游县', '', '', '', '', 3, 1, ''), ('3504', '35', '00,35', '三明市', '35', '福建省', '3504', '三明市', '', '', '', '', '', '', 2, 1, ''), ('350402', '3504', '00,35,3504', '梅列区', '35', '福建省', '3504', '三明市', '350402', '梅列区', '', '', '', '', 3, 1, ''), ('350403', '3504', '00,35,3504', '三元区', '35', '福建省', '3504', '三明市', '350403', '三元区', '', '', '', '', 3, 1, ''), ('350421', '3504', '00,35,3504', '明溪县', '35', '福建省', '3504', '三明市', '350421', '明溪县', '', '', '', '', 3, 1, ''), ('350423', '3504', '00,35,3504', '清流县', '35', '福建省', '3504', '三明市', '350423', '清流县', '', '', '', '', 3, 1, ''), ('350424', '3504', '00,35,3504', '宁化县', '35', '福建省', '3504', '三明市', '350424', '宁化县', '', '', '', '', 3, 1, ''), ('350425', '3504', '00,35,3504', '大田县', '35', '福建省', '3504', '三明市', '350425', '大田县', '', '', '', '', 3, 1, ''), ('350426', '3504', '00,35,3504', '尤溪县', '35', '福建省', '3504', '三明市', '350426', '尤溪县', '', '', '', '', 3, 1, ''), ('350427', '3504', '00,35,3504', '沙县', '35', '福建省', '3504', '三明市', '350427', '沙县', '', '', '', '', 3, 1, ''), ('350428', '3504', '00,35,3504', '将乐县', '35', '福建省', '3504', '三明市', '350428', '将乐县', '', '', '', '', 3, 1, ''), ('350429', '3504', '00,35,3504', '泰宁县', '35', '福建省', '3504', '三明市', '350429', '泰宁县', '', '', '', '', 3, 1, ''), ('350430', '3504', '00,35,3504', '建宁县', '35', '福建省', '3504', '三明市', '350430', '建宁县', '', '', '', '', 3, 1, ''), ('350481', '3504', '00,35,3504', '永安市', '35', '福建省', '3504', '三明市', '350481', '永安市', '', '', '', '', 3, 1, ''), ('3505', '35', '00,35', '泉州市', '35', '福建省', '3505', '泉州市', '', '', '', '', '', '', 2, 1, ''), ('350502', '3505', '00,35,3505', '鲤城区', '35', '福建省', '3505', '泉州市', '350502', '鲤城区', '', '', '', '', 3, 1, ''), ('350503', '3505', '00,35,3505', '丰泽区', '35', '福建省', '3505', '泉州市', '350503', '丰泽区', '', '', '', '', 3, 1, ''), ('350504', '3505', '00,35,3505', '洛江区', '35', '福建省', '3505', '泉州市', '350504', '洛江区', '', '', '', '', 3, 1, ''), ('350505', '3505', '00,35,3505', '泉港区', '35', '福建省', '3505', '泉州市', '350505', '泉港区', '', '', '', '', 3, 1, ''), ('350521', '3505', '00,35,3505', '惠安县', '35', '福建省', '3505', '泉州市', '350521', '惠安县', '', '', '', '', 3, 1, ''), ('350524', '3505', '00,35,3505', '安溪县', '35', '福建省', '3505', '泉州市', '350524', '安溪县', '', '', '', '', 3, 1, ''), ('350525', '3505', '00,35,3505', '永春县', '35', '福建省', '3505', '泉州市', '350525', '永春县', '', '', '', '', 3, 1, ''), ('350526', '3505', '00,35,3505', '德化县', '35', '福建省', '3505', '泉州市', '350526', '德化县', '', '', '', '', 3, 1, ''), ('350527', '3505', '00,35,3505', '金门县', '35', '福建省', '3505', '泉州市', '350527', '金门县', '', '', '', '', 3, 1, ''), ('350581', '3505', '00,35,3505', '石狮市', '35', '福建省', '3505', '泉州市', '350581', '石狮市', '', '', '', '', 3, 1, ''), ('350582', '3505', '00,35,3505', '晋江市', '35', '福建省', '3505', '泉州市', '350582', '晋江市', '', '', '', '', 3, 1, ''), ('350583', '3505', '00,35,3505', '南安市', '35', '福建省', '3505', '泉州市', '350583', '南安市', '', '', '', '', 3, 1, ''), ('3506', '35', '00,35', '漳州市', '35', '福建省', '3506', '漳州市', '', '', '', '', '', '', 2, 1, ''), ('350602', '3506', '00,35,3506', '芗城区', '35', '福建省', '3506', '漳州市', '350602', '芗城区', '', '', '', '', 3, 1, ''), ('350603', '3506', '00,35,3506', '龙文区', '35', '福建省', '3506', '漳州市', '350603', '龙文区', '', '', '', '', 3, 1, ''), ('350622', '3506', '00,35,3506', '云霄县', '35', '福建省', '3506', '漳州市', '350622', '云霄县', '', '', '', '', 3, 1, ''), ('350623', '3506', '00,35,3506', '漳浦县', '35', '福建省', '3506', '漳州市', '350623', '漳浦县', '', '', '', '', 3, 1, ''), ('350624', '3506', '00,35,3506', '诏安县', '35', '福建省', '3506', '漳州市', '350624', '诏安县', '', '', '', '', 3, 1, ''), ('350625', '3506', '00,35,3506', '长泰县', '35', '福建省', '3506', '漳州市', '350625', '长泰县', '', '', '', '', 3, 1, ''), ('350626', '3506', '00,35,3506', '东山县', '35', '福建省', '3506', '漳州市', '350626', '东山县', '', '', '', '', 3, 1, ''), ('350627', '3506', '00,35,3506', '南靖县', '35', '福建省', '3506', '漳州市', '350627', '南靖县', '', '', '', '', 3, 1, ''), ('350628', '3506', '00,35,3506', '平和县', '35', '福建省', '3506', '漳州市', '350628', '平和县', '', '', '', '', 3, 1, ''), ('350629', '3506', '00,35,3506', '华安县', '35', '福建省', '3506', '漳州市', '350629', '华安县', '', '', '', '', 3, 1, ''), ('350681', '3506', '00,35,3506', '龙海市', '35', '福建省', '3506', '漳州市', '350681', '龙海市', '', '', '', '', 3, 1, ''), ('3507', '35', '00,35', '南平市', '35', '福建省', '3507', '南平市', '', '', '', '', '', '', 2, 1, ''), ('350702', '3507', '00,35,3507', '延平区', '35', '福建省', '3507', '南平市', '350702', '延平区', '', '', '', '', 3, 1, ''), ('350703', '3507', '00,35,3507', '建阳区', '35', '福建省', '3507', '南平市', '350703', '建阳区', '', '', '', '', 3, 1, ''), ('350721', '3507', '00,35,3507', '顺昌县', '35', '福建省', '3507', '南平市', '350721', '顺昌县', '', '', '', '', 3, 1, ''), ('350722', '3507', '00,35,3507', '浦城县', '35', '福建省', '3507', '南平市', '350722', '浦城县', '', '', '', '', 3, 1, ''), ('350723', '3507', '00,35,3507', '光泽县', '35', '福建省', '3507', '南平市', '350723', '光泽县', '', '', '', '', 3, 1, ''), ('350724', '3507', '00,35,3507', '松溪县', '35', '福建省', '3507', '南平市', '350724', '松溪县', '', '', '', '', 3, 1, ''), ('350725', '3507', '00,35,3507', '政和县', '35', '福建省', '3507', '南平市', '350725', '政和县', '', '', '', '', 3, 1, ''), ('350781', '3507', '00,35,3507', '邵武市', '35', '福建省', '3507', '南平市', '350781', '邵武市', '', '', '', '', 3, 1, ''), ('350782', '3507', '00,35,3507', '武夷山市', '35', '福建省', '3507', '南平市', '350782', '武夷山市', '', '', '', '', 3, 1, ''), ('350783', '3507', '00,35,3507', '建瓯市', '35', '福建省', '3507', '南平市', '350783', '建瓯市', '', '', '', '', 3, 1, ''), ('3508', '35', '00,35', '龙岩市', '35', '福建省', '3508', '龙岩市', '', '', '', '', '', '', 2, 1, ''), ('350802', '3508', '00,35,3508', '新罗区', '35', '福建省', '3508', '龙岩市', '350802', '新罗区', '', '', '', '', 3, 1, ''), ('350803', '3508', '00,35,3508', '永定区', '35', '福建省', '3508', '龙岩市', '350803', '永定区', '', '', '', '', 3, 1, ''), ('350821', '3508', '00,35,3508', '长汀县', '35', '福建省', '3508', '龙岩市', '350821', '长汀县', '', '', '', '', 3, 1, ''), ('350823', '3508', '00,35,3508', '上杭县', '35', '福建省', '3508', '龙岩市', '350823', '上杭县', '', '', '', '', 3, 1, ''), ('350824', '3508', '00,35,3508', '武平县', '35', '福建省', '3508', '龙岩市', '350824', '武平县', '', '', '', '', 3, 1, ''), ('350825', '3508', '00,35,3508', '连城县', '35', '福建省', '3508', '龙岩市', '350825', '连城县', '', '', '', '', 3, 1, ''), ('350881', '3508', '00,35,3508', '漳平市', '35', '福建省', '3508', '龙岩市', '350881', '漳平市', '', '', '', '', 3, 1, ''), ('3509', '35', '00,35', '宁德市', '35', '福建省', '3509', '宁德市', '', '', '', '', '', '', 2, 1, ''), ('350902', '3509', '00,35,3509', '蕉城区', '35', '福建省', '3509', '宁德市', '350902', '蕉城区', '', '', '', '', 3, 1, ''), ('350921', '3509', '00,35,3509', '霞浦县', '35', '福建省', '3509', '宁德市', '350921', '霞浦县', '', '', '', '', 3, 1, ''), ('350922', '3509', '00,35,3509', '古田县', '35', '福建省', '3509', '宁德市', '350922', '古田县', '', '', '', '', 3, 1, ''), ('350923', '3509', '00,35,3509', '屏南县', '35', '福建省', '3509', '宁德市', '350923', '屏南县', '', '', '', '', 3, 1, ''), ('350924', '3509', '00,35,3509', '寿宁县', '35', '福建省', '3509', '宁德市', '350924', '寿宁县', '', '', '', '', 3, 1, ''), ('350925', '3509', '00,35,3509', '周宁县', '35', '福建省', '3509', '宁德市', '350925', '周宁县', '', '', '', '', 3, 1, ''), ('350926', '3509', '00,35,3509', '柘荣县', '35', '福建省', '3509', '宁德市', '350926', '柘荣县', '', '', '', '', 3, 1, ''), ('350981', '3509', '00,35,3509', '福安市', '35', '福建省', '3509', '宁德市', '350981', '福安市', '', '', '', '', 3, 1, ''), ('350982', '3509', '00,35,3509', '福鼎市', '35', '福建省', '3509', '宁德市', '350982', '福鼎市', '', '', '', '', 3, 1, ''), ('36', '00', '00', '江西省', '36', '江西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3601', '36', '00,36', '南昌市', '36', '江西省', '3601', '南昌市', '', '', '', '', '', '', 2, 1, ''), ('360102', '3601', '00,36,3601', '东湖区', '36', '江西省', '3601', '南昌市', '360102', '东湖区', '', '', '', '', 3, 1, ''), ('360103', '3601', '00,36,3601', '西湖区', '36', '江西省', '3601', '南昌市', '360103', '西湖区', '', '', '', '', 3, 1, ''), ('360104', '3601', '00,36,3601', '青云谱区', '36', '江西省', '3601', '南昌市', '360104', '青云谱区', '', '', '', '', 3, 1, ''), ('360111', '3601', '00,36,3601', '青山湖区', '36', '江西省', '3601', '南昌市', '360111', '青山湖区', '', '', '', '', 3, 1, ''), ('360112', '3601', '00,36,3601', '新建区', '36', '江西省', '3601', '南昌市', '360112', '新建区', '', '', '', '', 3, 1, ''), ('360113', '3601', '00,36,3601', '红谷滩区', '36', '江西省', '3601', '南昌市', '360113', '红谷滩区', '', '', '', '', 3, 1, ''), ('360121', '3601', '00,36,3601', '南昌县', '36', '江西省', '3601', '南昌市', '360121', '南昌县', '', '', '', '', 3, 1, ''), ('360123', '3601', '00,36,3601', '安义县', '36', '江西省', '3601', '南昌市', '360123', '安义县', '', '', '', '', 3, 1, ''), ('360124', '3601', '00,36,3601', '进贤县', '36', '江西省', '3601', '南昌市', '360124', '进贤县', '', '', '', '', 3, 1, ''), ('3602', '36', '00,36', '景德镇市', '36', '江西省', '3602', '景德镇市', '', '', '', '', '', '', 2, 1, ''), ('360202', '3602', '00,36,3602', '昌江区', '36', '江西省', '3602', '景德镇市', '360202', '昌江区', '', '', '', '', 3, 1, ''), ('360203', '3602', '00,36,3602', '珠山区', '36', '江西省', '3602', '景德镇市', '360203', '珠山区', '', '', '', '', 3, 1, ''), ('360222', '3602', '00,36,3602', '浮梁县', '36', '江西省', '3602', '景德镇市', '360222', '浮梁县', '', '', '', '', 3, 1, ''), ('360281', '3602', '00,36,3602', '乐平市', '36', '江西省', '3602', '景德镇市', '360281', '乐平市', '', '', '', '', 3, 1, ''), ('3603', '36', '00,36', '萍乡市', '36', '江西省', '3603', '萍乡市', '', '', '', '', '', '', 2, 1, ''), ('360302', '3603', '00,36,3603', '安源区', '36', '江西省', '3603', '萍乡市', '360302', '安源区', '', '', '', '', 3, 1, ''), ('360313', '3603', '00,36,3603', '湘东区', '36', '江西省', '3603', '萍乡市', '360313', '湘东区', '', '', '', '', 3, 1, ''), ('360321', '3603', '00,36,3603', '莲花县', '36', '江西省', '3603', '萍乡市', '360321', '莲花县', '', '', '', '', 3, 1, ''), ('360322', '3603', '00,36,3603', '上栗县', '36', '江西省', '3603', '萍乡市', '360322', '上栗县', '', '', '', '', 3, 1, ''), ('360323', '3603', '00,36,3603', '芦溪县', '36', '江西省', '3603', '萍乡市', '360323', '芦溪县', '', '', '', '', 3, 1, ''), ('3604', '36', '00,36', '九江市', '36', '江西省', '3604', '九江市', '', '', '', '', '', '', 2, 1, ''), ('360402', '3604', '00,36,3604', '濂溪区', '36', '江西省', '3604', '九江市', '360402', '濂溪区', '', '', '', '', 3, 1, ''), ('360403', '3604', '00,36,3604', '浔阳区', '36', '江西省', '3604', '九江市', '360403', '浔阳区', '', '', '', '', 3, 1, ''), ('360404', '3604', '00,36,3604', '柴桑区', '36', '江西省', '3604', '九江市', '360404', '柴桑区', '', '', '', '', 3, 1, ''), ('360423', '3604', '00,36,3604', '武宁县', '36', '江西省', '3604', '九江市', '360423', '武宁县', '', '', '', '', 3, 1, ''), ('360424', '3604', '00,36,3604', '修水县', '36', '江西省', '3604', '九江市', '360424', '修水县', '', '', '', '', 3, 1, ''), ('360425', '3604', '00,36,3604', '永修县', '36', '江西省', '3604', '九江市', '360425', '永修县', '', '', '', '', 3, 1, ''), ('360426', '3604', '00,36,3604', '德安县', '36', '江西省', '3604', '九江市', '360426', '德安县', '', '', '', '', 3, 1, ''), ('360428', '3604', '00,36,3604', '都昌县', '36', '江西省', '3604', '九江市', '360428', '都昌县', '', '', '', '', 3, 1, ''), ('360429', '3604', '00,36,3604', '湖口县', '36', '江西省', '3604', '九江市', '360429', '湖口县', '', '', '', '', 3, 1, ''), ('360430', '3604', '00,36,3604', '彭泽县', '36', '江西省', '3604', '九江市', '360430', '彭泽县', '', '', '', '', 3, 1, ''), ('360481', '3604', '00,36,3604', '瑞昌市', '36', '江西省', '3604', '九江市', '360481', '瑞昌市', '', '', '', '', 3, 1, ''), ('360482', '3604', '00,36,3604', '共青城市', '36', '江西省', '3604', '九江市', '360482', '共青城市', '', '', '', '', 3, 1, ''), ('360483', '3604', '00,36,3604', '庐山市', '36', '江西省', '3604', '九江市', '360483', '庐山市', '', '', '', '', 3, 1, ''), ('3605', '36', '00,36', '新余市', '36', '江西省', '3605', '新余市', '', '', '', '', '', '', 2, 1, ''), ('360502', '3605', '00,36,3605', '渝水区', '36', '江西省', '3605', '新余市', '360502', '渝水区', '', '', '', '', 3, 1, ''), ('360521', '3605', '00,36,3605', '分宜县', '36', '江西省', '3605', '新余市', '360521', '分宜县', '', '', '', '', 3, 1, ''), ('3606', '36', '00,36', '鹰潭市', '36', '江西省', '3606', '鹰潭市', '', '', '', '', '', '', 2, 1, ''), ('360602', '3606', '00,36,3606', '月湖区', '36', '江西省', '3606', '鹰潭市', '360602', '月湖区', '', '', '', '', 3, 1, ''), ('360603', '3606', '00,36,3606', '余江区', '36', '江西省', '3606', '鹰潭市', '360603', '余江区', '', '', '', '', 3, 1, ''), ('360681', '3606', '00,36,3606', '贵溪市', '36', '江西省', '3606', '鹰潭市', '360681', '贵溪市', '', '', '', '', 3, 1, ''), ('3607', '36', '00,36', '赣州市', '36', '江西省', '3607', '赣州市', '', '', '', '', '', '', 2, 1, ''), ('360702', '3607', '00,36,3607', '章贡区', '36', '江西省', '3607', '赣州市', '360702', '章贡区', '', '', '', '', 3, 1, ''), ('360703', '3607', '00,36,3607', '南康区', '36', '江西省', '3607', '赣州市', '360703', '南康区', '', '', '', '', 3, 1, ''), ('360704', '3607', '00,36,3607', '赣县区', '36', '江西省', '3607', '赣州市', '360704', '赣县区', '', '', '', '', 3, 1, ''), ('360722', '3607', '00,36,3607', '信丰县', '36', '江西省', '3607', '赣州市', '360722', '信丰县', '', '', '', '', 3, 1, ''), ('360723', '3607', '00,36,3607', '大余县', '36', '江西省', '3607', '赣州市', '360723', '大余县', '', '', '', '', 3, 1, ''), ('360724', '3607', '00,36,3607', '上犹县', '36', '江西省', '3607', '赣州市', '360724', '上犹县', '', '', '', '', 3, 1, ''), ('360725', '3607', '00,36,3607', '崇义县', '36', '江西省', '3607', '赣州市', '360725', '崇义县', '', '', '', '', 3, 1, ''), ('360726', '3607', '00,36,3607', '安远县', '36', '江西省', '3607', '赣州市', '360726', '安远县', '', '', '', '', 3, 1, ''), ('360727', '3607', '00,36,3607', '龙南县', '36', '江西省', '3607', '赣州市', '360727', '龙南县', '', '', '', '', 3, 1, ''), ('360728', '3607', '00,36,3607', '定南县', '36', '江西省', '3607', '赣州市', '360728', '定南县', '', '', '', '', 3, 1, ''), ('360729', '3607', '00,36,3607', '全南县', '36', '江西省', '3607', '赣州市', '360729', '全南县', '', '', '', '', 3, 1, ''), ('360730', '3607', '00,36,3607', '宁都县', '36', '江西省', '3607', '赣州市', '360730', '宁都县', '', '', '', '', 3, 1, ''), ('360731', '3607', '00,36,3607', '于都县', '36', '江西省', '3607', '赣州市', '360731', '于都县', '', '', '', '', 3, 1, ''), ('360732', '3607', '00,36,3607', '兴国县', '36', '江西省', '3607', '赣州市', '360732', '兴国县', '', '', '', '', 3, 1, ''), ('360733', '3607', '00,36,3607', '会昌县', '36', '江西省', '3607', '赣州市', '360733', '会昌县', '', '', '', '', 3, 1, ''), ('360734', '3607', '00,36,3607', '寻乌县', '36', '江西省', '3607', '赣州市', '360734', '寻乌县', '', '', '', '', 3, 1, ''), ('360735', '3607', '00,36,3607', '石城县', '36', '江西省', '3607', '赣州市', '360735', '石城县', '', '', '', '', 3, 1, ''), ('360781', '3607', '00,36,3607', '瑞金市', '36', '江西省', '3607', '赣州市', '360781', '瑞金市', '', '', '', '', 3, 1, ''), ('3608', '36', '00,36', '吉安市', '36', '江西省', '3608', '吉安市', '', '', '', '', '', '', 2, 1, ''), ('360802', '3608', '00,36,3608', '吉州区', '36', '江西省', '3608', '吉安市', '360802', '吉州区', '', '', '', '', 3, 1, ''), ('360803', '3608', '00,36,3608', '青原区', '36', '江西省', '3608', '吉安市', '360803', '青原区', '', '', '', '', 3, 1, ''), ('360821', '3608', '00,36,3608', '吉安县', '36', '江西省', '3608', '吉安市', '360821', '吉安县', '', '', '', '', 3, 1, ''), ('360822', '3608', '00,36,3608', '吉水县', '36', '江西省', '3608', '吉安市', '360822', '吉水县', '', '', '', '', 3, 1, ''), ('360823', '3608', '00,36,3608', '峡江县', '36', '江西省', '3608', '吉安市', '360823', '峡江县', '', '', '', '', 3, 1, ''), ('360824', '3608', '00,36,3608', '新干县', '36', '江西省', '3608', '吉安市', '360824', '新干县', '', '', '', '', 3, 1, ''), ('360825', '3608', '00,36,3608', '永丰县', '36', '江西省', '3608', '吉安市', '360825', '永丰县', '', '', '', '', 3, 1, ''), ('360826', '3608', '00,36,3608', '泰和县', '36', '江西省', '3608', '吉安市', '360826', '泰和县', '', '', '', '', 3, 1, ''), ('360827', '3608', '00,36,3608', '遂川县', '36', '江西省', '3608', '吉安市', '360827', '遂川县', '', '', '', '', 3, 1, ''), ('360828', '3608', '00,36,3608', '万安县', '36', '江西省', '3608', '吉安市', '360828', '万安县', '', '', '', '', 3, 1, ''), ('360829', '3608', '00,36,3608', '安福县', '36', '江西省', '3608', '吉安市', '360829', '安福县', '', '', '', '', 3, 1, ''), ('360830', '3608', '00,36,3608', '永新县', '36', '江西省', '3608', '吉安市', '360830', '永新县', '', '', '', '', 3, 1, ''), ('360881', '3608', '00,36,3608', '井冈山市', '36', '江西省', '3608', '吉安市', '360881', '井冈山市', '', '', '', '', 3, 1, ''), ('3609', '36', '00,36', '宜春市', '36', '江西省', '3609', '宜春市', '', '', '', '', '', '', 2, 1, ''), ('360902', '3609', '00,36,3609', '袁州区', '36', '江西省', '3609', '宜春市', '360902', '袁州区', '', '', '', '', 3, 1, ''), ('360921', '3609', '00,36,3609', '奉新县', '36', '江西省', '3609', '宜春市', '360921', '奉新县', '', '', '', '', 3, 1, ''), ('360922', '3609', '00,36,3609', '万载县', '36', '江西省', '3609', '宜春市', '360922', '万载县', '', '', '', '', 3, 1, ''), ('360923', '3609', '00,36,3609', '上高县', '36', '江西省', '3609', '宜春市', '360923', '上高县', '', '', '', '', 3, 1, ''), ('360924', '3609', '00,36,3609', '宜丰县', '36', '江西省', '3609', '宜春市', '360924', '宜丰县', '', '', '', '', 3, 1, ''), ('360925', '3609', '00,36,3609', '靖安县', '36', '江西省', '3609', '宜春市', '360925', '靖安县', '', '', '', '', 3, 1, ''), ('360926', '3609', '00,36,3609', '铜鼓县', '36', '江西省', '3609', '宜春市', '360926', '铜鼓县', '', '', '', '', 3, 1, ''), ('360981', '3609', '00,36,3609', '丰城市', '36', '江西省', '3609', '宜春市', '360981', '丰城市', '', '', '', '', 3, 1, ''), ('360982', '3609', '00,36,3609', '樟树市', '36', '江西省', '3609', '宜春市', '360982', '樟树市', '', '', '', '', 3, 1, ''), ('360983', '3609', '00,36,3609', '高安市', '36', '江西省', '3609', '宜春市', '360983', '高安市', '', '', '', '', 3, 1, ''), ('3610', '36', '00,36', '抚州市', '36', '江西省', '3610', '抚州市', '', '', '', '', '', '', 2, 1, ''), ('361002', '3610', '00,36,3610', '临川区', '36', '江西省', '3610', '抚州市', '361002', '临川区', '', '', '', '', 3, 1, ''), ('361003', '3610', '00,36,3610', '东乡区', '36', '江西省', '3610', '抚州市', '361003', '东乡区', '', '', '', '', 3, 1, ''), ('361021', '3610', '00,36,3610', '南城县', '36', '江西省', '3610', '抚州市', '361021', '南城县', '', '', '', '', 3, 1, ''), ('361022', '3610', '00,36,3610', '黎川县', '36', '江西省', '3610', '抚州市', '361022', '黎川县', '', '', '', '', 3, 1, ''), ('361023', '3610', '00,36,3610', '南丰县', '36', '江西省', '3610', '抚州市', '361023', '南丰县', '', '', '', '', 3, 1, ''), ('361024', '3610', '00,36,3610', '崇仁县', '36', '江西省', '3610', '抚州市', '361024', '崇仁县', '', '', '', '', 3, 1, ''), ('361025', '3610', '00,36,3610', '乐安县', '36', '江西省', '3610', '抚州市', '361025', '乐安县', '', '', '', '', 3, 1, ''), ('361026', '3610', '00,36,3610', '宜黄县', '36', '江西省', '3610', '抚州市', '361026', '宜黄县', '', '', '', '', 3, 1, ''), ('361027', '3610', '00,36,3610', '金溪县', '36', '江西省', '3610', '抚州市', '361027', '金溪县', '', '', '', '', 3, 1, ''), ('361028', '3610', '00,36,3610', '资溪县', '36', '江西省', '3610', '抚州市', '361028', '资溪县', '', '', '', '', 3, 1, ''), ('361030', '3610', '00,36,3610', '广昌县', '36', '江西省', '3610', '抚州市', '361030', '广昌县', '', '', '', '', 3, 1, ''), ('3611', '36', '00,36', '上饶市', '36', '江西省', '3611', '上饶市', '', '', '', '', '', '', 2, 1, ''), ('361102', '3611', '00,36,3611', '信州区', '36', '江西省', '3611', '上饶市', '361102', '信州区', '', '', '', '', 3, 1, ''), ('361103', '3611', '00,36,3611', '广丰区', '36', '江西省', '3611', '上饶市', '361103', '广丰区', '', '', '', '', 3, 1, ''), ('361104', '3611', '00,36,3611', '广信区', '36', '江西省', '3611', '上饶市', '361104', '广信区', '', '', '', '', 3, 1, ''), ('361123', '3611', '00,36,3611', '玉山县', '36', '江西省', '3611', '上饶市', '361123', '玉山县', '', '', '', '', 3, 1, ''), ('361124', '3611', '00,36,3611', '铅山县', '36', '江西省', '3611', '上饶市', '361124', '铅山县', '', '', '', '', 3, 1, ''), ('361125', '3611', '00,36,3611', '横峰县', '36', '江西省', '3611', '上饶市', '361125', '横峰县', '', '', '', '', 3, 1, ''), ('361126', '3611', '00,36,3611', '弋阳县', '36', '江西省', '3611', '上饶市', '361126', '弋阳县', '', '', '', '', 3, 1, ''), ('361127', '3611', '00,36,3611', '余干县', '36', '江西省', '3611', '上饶市', '361127', '余干县', '', '', '', '', 3, 1, ''), ('361128', '3611', '00,36,3611', '鄱阳县', '36', '江西省', '3611', '上饶市', '361128', '鄱阳县', '', '', '', '', 3, 1, ''), ('361129', '3611', '00,36,3611', '万年县', '36', '江西省', '3611', '上饶市', '361129', '万年县', '', '', '', '', 3, 1, ''), ('361130', '3611', '00,36,3611', '婺源县', '36', '江西省', '3611', '上饶市', '361130', '婺源县', '', '', '', '', 3, 1, ''), ('361181', '3611', '00,36,3611', '德兴市', '36', '江西省', '3611', '上饶市', '361181', '德兴市', '', '', '', '', 3, 1, ''), ('37', '00', '00', '山东省', '37', '山东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3701', '37', '00,37', '济南市', '37', '山东省', '3701', '济南市', '', '', '', '', '', '', 2, 1, ''), ('370102', '3701', '00,37,3701', '历下区', '37', '山东省', '3701', '济南市', '370102', '历下区', '', '', '', '', 3, 1, ''), ('370103', '3701', '00,37,3701', '市中区', '37', '山东省', '3701', '济南市', '370103', '市中区', '', '', '', '', 3, 1, ''), ('370104', '3701', '00,37,3701', '槐荫区', '37', '山东省', '3701', '济南市', '370104', '槐荫区', '', '', '', '', 3, 1, ''), ('370105', '3701', '00,37,3701', '天桥区', '37', '山东省', '3701', '济南市', '370105', '天桥区', '', '', '', '', 3, 1, ''), ('370112', '3701', '00,37,3701', '历城区', '37', '山东省', '3701', '济南市', '370112', '历城区', '', '', '', '', 3, 1, ''), ('370113', '3701', '00,37,3701', '长清区', '37', '山东省', '3701', '济南市', '370113', '长清区', '', '', '', '', 3, 1, ''), ('370114', '3701', '00,37,3701', '章丘区', '37', '山东省', '3701', '济南市', '370114', '章丘区', '', '', '', '', 3, 1, ''), ('370115', '3701', '00,37,3701', '济阳区', '37', '山东省', '3701', '济南市', '370115', '济阳区', '', '', '', '', 3, 1, ''), ('370116', '3701', '00,37,3701', '莱芜区', '37', '山东省', '3701', '济南市', '370116', '莱芜区', '', '', '', '', 3, 1, ''), ('370117', '3701', '00,37,3701', '钢城区', '37', '山东省', '3701', '济南市', '370117', '钢城区', '', '', '', '', 3, 1, ''), ('370124', '3701', '00,37,3701', '平阴县', '37', '山东省', '3701', '济南市', '370124', '平阴县', '', '', '', '', 3, 1, ''), ('370126', '3701', '00,37,3701', '商河县', '37', '山东省', '3701', '济南市', '370126', '商河县', '', '', '', '', 3, 1, ''), ('3702', '37', '00,37', '青岛市', '37', '山东省', '3702', '青岛市', '', '', '', '', '', '', 2, 1, ''), ('370202', '3702', '00,37,3702', '市南区', '37', '山东省', '3702', '青岛市', '370202', '市南区', '', '', '', '', 3, 1, ''), ('370203', '3702', '00,37,3702', '市北区', '37', '山东省', '3702', '青岛市', '370203', '市北区', '', '', '', '', 3, 1, ''), ('370211', '3702', '00,37,3702', '黄岛区', '37', '山东省', '3702', '青岛市', '370211', '黄岛区', '', '', '', '', 3, 1, ''), ('370212', '3702', '00,37,3702', '崂山区', '37', '山东省', '3702', '青岛市', '370212', '崂山区', '', '', '', '', 3, 1, ''), ('370213', '3702', '00,37,3702', '李沧区', '37', '山东省', '3702', '青岛市', '370213', '李沧区', '', '', '', '', 3, 1, ''), ('370214', '3702', '00,37,3702', '城阳区', '37', '山东省', '3702', '青岛市', '370214', '城阳区', '', '', '', '', 3, 1, ''), ('370215', '3702', '00,37,3702', '即墨区', '37', '山东省', '3702', '青岛市', '370215', '即墨区', '', '', '', '', 3, 1, ''), ('370281', '3702', '00,37,3702', '胶州市', '37', '山东省', '3702', '青岛市', '370281', '胶州市', '', '', '', '', 3, 1, ''), ('370283', '3702', '00,37,3702', '平度市', '37', '山东省', '3702', '青岛市', '370283', '平度市', '', '', '', '', 3, 1, ''), ('370285', '3702', '00,37,3702', '莱西市', '37', '山东省', '3702', '青岛市', '370285', '莱西市', '', '', '', '', 3, 1, ''), ('3703', '37', '00,37', '淄博市', '37', '山东省', '3703', '淄博市', '', '', '', '', '', '', 2, 1, ''), ('370302', '3703', '00,37,3703', '淄川区', '37', '山东省', '3703', '淄博市', '370302', '淄川区', '', '', '', '', 3, 1, ''), ('370303', '3703', '00,37,3703', '张店区', '37', '山东省', '3703', '淄博市', '370303', '张店区', '', '', '', '', 3, 1, ''), ('370304', '3703', '00,37,3703', '博山区', '37', '山东省', '3703', '淄博市', '370304', '博山区', '', '', '', '', 3, 1, ''), ('370305', '3703', '00,37,3703', '临淄区', '37', '山东省', '3703', '淄博市', '370305', '临淄区', '', '', '', '', 3, 1, ''), ('370306', '3703', '00,37,3703', '周村区', '37', '山东省', '3703', '淄博市', '370306', '周村区', '', '', '', '', 3, 1, ''), ('370321', '3703', '00,37,3703', '桓台县', '37', '山东省', '3703', '淄博市', '370321', '桓台县', '', '', '', '', 3, 1, ''), ('370322', '3703', '00,37,3703', '高青县', '37', '山东省', '3703', '淄博市', '370322', '高青县', '', '', '', '', 3, 1, ''), ('370323', '3703', '00,37,3703', '沂源县', '37', '山东省', '3703', '淄博市', '370323', '沂源县', '', '', '', '', 3, 1, ''), ('3704', '37', '00,37', '枣庄市', '37', '山东省', '3704', '枣庄市', '', '', '', '', '', '', 2, 1, ''), ('370402', '3704', '00,37,3704', '市中区', '37', '山东省', '3704', '枣庄市', '370402', '市中区', '', '', '', '', 3, 1, ''), ('370403', '3704', '00,37,3704', '薛城区', '37', '山东省', '3704', '枣庄市', '370403', '薛城区', '', '', '', '', 3, 1, ''), ('370404', '3704', '00,37,3704', '峄城区', '37', '山东省', '3704', '枣庄市', '370404', '峄城区', '', '', '', '', 3, 1, ''), ('370405', '3704', '00,37,3704', '台儿庄区', '37', '山东省', '3704', '枣庄市', '370405', '台儿庄区', '', '', '', '', 3, 1, ''), ('370406', '3704', '00,37,3704', '山亭区', '37', '山东省', '3704', '枣庄市', '370406', '山亭区', '', '', '', '', 3, 1, ''), ('370481', '3704', '00,37,3704', '滕州市', '37', '山东省', '3704', '枣庄市', '370481', '滕州市', '', '', '', '', 3, 1, ''), ('3705', '37', '00,37', '东营市', '37', '山东省', '3705', '东营市', '', '', '', '', '', '', 2, 1, ''), ('370502', '3705', '00,37,3705', '东营区', '37', '山东省', '3705', '东营市', '370502', '东营区', '', '', '', '', 3, 1, ''), ('370503', '3705', '00,37,3705', '河口区', '37', '山东省', '3705', '东营市', '370503', '河口区', '', '', '', '', 3, 1, ''), ('370505', '3705', '00,37,3705', '垦利区', '37', '山东省', '3705', '东营市', '370505', '垦利区', '', '', '', '', 3, 1, ''), ('370522', '3705', '00,37,3705', '利津县', '37', '山东省', '3705', '东营市', '370522', '利津县', '', '', '', '', 3, 1, ''), ('370523', '3705', '00,37,3705', '广饶县', '37', '山东省', '3705', '东营市', '370523', '广饶县', '', '', '', '', 3, 1, ''), ('3706', '37', '00,37', '烟台市', '37', '山东省', '3706', '烟台市', '', '', '', '', '', '', 2, 1, ''), ('370602', '3706', '00,37,3706', '芝罘区', '37', '山东省', '3706', '烟台市', '370602', '芝罘区', '', '', '', '', 3, 1, ''), ('370611', '3706', '00,37,3706', '福山区', '37', '山东省', '3706', '烟台市', '370611', '福山区', '', '', '', '', 3, 1, ''), ('370612', '3706', '00,37,3706', '牟平区', '37', '山东省', '3706', '烟台市', '370612', '牟平区', '', '', '', '', 3, 1, ''), ('370613', '3706', '00,37,3706', '莱山区', '37', '山东省', '3706', '烟台市', '370613', '莱山区', '', '', '', '', 3, 1, ''), ('370634', '3706', '00,37,3706', '长岛县', '37', '山东省', '3706', '烟台市', '370634', '长岛县', '', '', '', '', 3, 1, ''), ('370681', '3706', '00,37,3706', '龙口市', '37', '山东省', '3706', '烟台市', '370681', '龙口市', '', '', '', '', 3, 1, ''), ('370682', '3706', '00,37,3706', '莱阳市', '37', '山东省', '3706', '烟台市', '370682', '莱阳市', '', '', '', '', 3, 1, ''), ('370683', '3706', '00,37,3706', '莱州市', '37', '山东省', '3706', '烟台市', '370683', '莱州市', '', '', '', '', 3, 1, ''), ('370684', '3706', '00,37,3706', '蓬莱市', '37', '山东省', '3706', '烟台市', '370684', '蓬莱市', '', '', '', '', 3, 1, ''), ('370685', '3706', '00,37,3706', '招远市', '37', '山东省', '3706', '烟台市', '370685', '招远市', '', '', '', '', 3, 1, ''), ('370686', '3706', '00,37,3706', '栖霞市', '37', '山东省', '3706', '烟台市', '370686', '栖霞市', '', '', '', '', 3, 1, ''), ('370687', '3706', '00,37,3706', '海阳市', '37', '山东省', '3706', '烟台市', '370687', '海阳市', '', '', '', '', 3, 1, ''), ('3707', '37', '00,37', '潍坊市', '37', '山东省', '3707', '潍坊市', '', '', '', '', '', '', 2, 1, ''), ('370702', '3707', '00,37,3707', '潍城区', '37', '山东省', '3707', '潍坊市', '370702', '潍城区', '', '', '', '', 3, 1, ''), ('370703', '3707', '00,37,3707', '寒亭区', '37', '山东省', '3707', '潍坊市', '370703', '寒亭区', '', '', '', '', 3, 1, ''), ('370704', '3707', '00,37,3707', '坊子区', '37', '山东省', '3707', '潍坊市', '370704', '坊子区', '', '', '', '', 3, 1, ''), ('370705', '3707', '00,37,3707', '奎文区', '37', '山东省', '3707', '潍坊市', '370705', '奎文区', '', '', '', '', 3, 1, ''), ('370724', '3707', '00,37,3707', '临朐县', '37', '山东省', '3707', '潍坊市', '370724', '临朐县', '', '', '', '', 3, 1, ''), ('370725', '3707', '00,37,3707', '昌乐县', '37', '山东省', '3707', '潍坊市', '370725', '昌乐县', '', '', '', '', 3, 1, ''), ('370781', '3707', '00,37,3707', '青州市', '37', '山东省', '3707', '潍坊市', '370781', '青州市', '', '', '', '', 3, 1, ''), ('370782', '3707', '00,37,3707', '诸城市', '37', '山东省', '3707', '潍坊市', '370782', '诸城市', '', '', '', '', 3, 1, ''), ('370783', '3707', '00,37,3707', '寿光市', '37', '山东省', '3707', '潍坊市', '370783', '寿光市', '', '', '', '', 3, 1, ''), ('370784', '3707', '00,37,3707', '安丘市', '37', '山东省', '3707', '潍坊市', '370784', '安丘市', '', '', '', '', 3, 1, ''), ('370785', '3707', '00,37,3707', '高密市', '37', '山东省', '3707', '潍坊市', '370785', '高密市', '', '', '', '', 3, 1, ''), ('370786', '3707', '00,37,3707', '昌邑市', '37', '山东省', '3707', '潍坊市', '370786', '昌邑市', '', '', '', '', 3, 1, ''), ('3708', '37', '00,37', '济宁市', '37', '山东省', '3708', '济宁市', '', '', '', '', '', '', 2, 1, ''), ('370811', '3708', '00,37,3708', '任城区', '37', '山东省', '3708', '济宁市', '370811', '任城区', '', '', '', '', 3, 1, ''), ('370812', '3708', '00,37,3708', '兖州区', '37', '山东省', '3708', '济宁市', '370812', '兖州区', '', '', '', '', 3, 1, ''), ('370826', '3708', '00,37,3708', '微山县', '37', '山东省', '3708', '济宁市', '370826', '微山县', '', '', '', '', 3, 1, ''), ('370827', '3708', '00,37,3708', '鱼台县', '37', '山东省', '3708', '济宁市', '370827', '鱼台县', '', '', '', '', 3, 1, ''), ('370828', '3708', '00,37,3708', '金乡县', '37', '山东省', '3708', '济宁市', '370828', '金乡县', '', '', '', '', 3, 1, ''), ('370829', '3708', '00,37,3708', '嘉祥县', '37', '山东省', '3708', '济宁市', '370829', '嘉祥县', '', '', '', '', 3, 1, ''), ('370830', '3708', '00,37,3708', '汶上县', '37', '山东省', '3708', '济宁市', '370830', '汶上县', '', '', '', '', 3, 1, ''), ('370831', '3708', '00,37,3708', '泗水县', '37', '山东省', '3708', '济宁市', '370831', '泗水县', '', '', '', '', 3, 1, ''), ('370832', '3708', '00,37,3708', '梁山县', '37', '山东省', '3708', '济宁市', '370832', '梁山县', '', '', '', '', 3, 1, ''), ('370881', '3708', '00,37,3708', '曲阜市', '37', '山东省', '3708', '济宁市', '370881', '曲阜市', '', '', '', '', 3, 1, ''), ('370883', '3708', '00,37,3708', '邹城市', '37', '山东省', '3708', '济宁市', '370883', '邹城市', '', '', '', '', 3, 1, ''), ('3709', '37', '00,37', '泰安市', '37', '山东省', '3709', '泰安市', '', '', '', '', '', '', 2, 1, ''), ('370902', '3709', '00,37,3709', '泰山区', '37', '山东省', '3709', '泰安市', '370902', '泰山区', '', '', '', '', 3, 1, ''), ('370911', '3709', '00,37,3709', '岱岳区', '37', '山东省', '3709', '泰安市', '370911', '岱岳区', '', '', '', '', 3, 1, ''), ('370921', '3709', '00,37,3709', '宁阳县', '37', '山东省', '3709', '泰安市', '370921', '宁阳县', '', '', '', '', 3, 1, ''), ('370923', '3709', '00,37,3709', '东平县', '37', '山东省', '3709', '泰安市', '370923', '东平县', '', '', '', '', 3, 1, ''), ('370982', '3709', '00,37,3709', '新泰市', '37', '山东省', '3709', '泰安市', '370982', '新泰市', '', '', '', '', 3, 1, ''), ('370983', '3709', '00,37,3709', '肥城市', '37', '山东省', '3709', '泰安市', '370983', '肥城市', '', '', '', '', 3, 1, ''), ('3710', '37', '00,37', '威海市', '37', '山东省', '3710', '威海市', '', '', '', '', '', '', 2, 1, ''), ('371002', '3710', '00,37,3710', '环翠区', '37', '山东省', '3710', '威海市', '371002', '环翠区', '', '', '', '', 3, 1, ''), ('371003', '3710', '00,37,3710', '文登区', '37', '山东省', '3710', '威海市', '371003', '文登区', '', '', '', '', 3, 1, ''), ('371082', '3710', '00,37,3710', '荣成市', '37', '山东省', '3710', '威海市', '371082', '荣成市', '', '', '', '', 3, 1, ''), ('371083', '3710', '00,37,3710', '乳山市', '37', '山东省', '3710', '威海市', '371083', '乳山市', '', '', '', '', 3, 1, ''), ('3711', '37', '00,37', '日照市', '37', '山东省', '3711', '日照市', '', '', '', '', '', '', 2, 1, ''), ('371102', '3711', '00,37,3711', '东港区', '37', '山东省', '3711', '日照市', '371102', '东港区', '', '', '', '', 3, 1, ''), ('371103', '3711', '00,37,3711', '岚山区', '37', '山东省', '3711', '日照市', '371103', '岚山区', '', '', '', '', 3, 1, ''), ('371121', '3711', '00,37,3711', '五莲县', '37', '山东省', '3711', '日照市', '371121', '五莲县', '', '', '', '', 3, 1, ''), ('371122', '3711', '00,37,3711', '莒县', '37', '山东省', '3711', '日照市', '371122', '莒县', '', '', '', '', 3, 1, ''), ('3713', '37', '00,37', '临沂市', '37', '山东省', '3713', '临沂市', '', '', '', '', '', '', 2, 1, ''), ('371302', '3713', '00,37,3713', '兰山区', '37', '山东省', '3713', '临沂市', '371302', '兰山区', '', '', '', '', 3, 1, ''), ('371311', '3713', '00,37,3713', '罗庄区', '37', '山东省', '3713', '临沂市', '371311', '罗庄区', '', '', '', '', 3, 1, ''), ('371312', '3713', '00,37,3713', '河东区', '37', '山东省', '3713', '临沂市', '371312', '河东区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('371321', '3713', '00,37,3713', '沂南县', '37', '山东省', '3713', '临沂市', '371321', '沂南县', '', '', '', '', 3, 1, ''), ('371322', '3713', '00,37,3713', '郯城县', '37', '山东省', '3713', '临沂市', '371322', '郯城县', '', '', '', '', 3, 1, ''), ('371323', '3713', '00,37,3713', '沂水县', '37', '山东省', '3713', '临沂市', '371323', '沂水县', '', '', '', '', 3, 1, ''), ('371324', '3713', '00,37,3713', '兰陵县', '37', '山东省', '3713', '临沂市', '371324', '兰陵县', '', '', '', '', 3, 1, ''), ('371325', '3713', '00,37,3713', '费县', '37', '山东省', '3713', '临沂市', '371325', '费县', '', '', '', '', 3, 1, ''), ('371326', '3713', '00,37,3713', '平邑县', '37', '山东省', '3713', '临沂市', '371326', '平邑县', '', '', '', '', 3, 1, ''), ('371327', '3713', '00,37,3713', '莒南县', '37', '山东省', '3713', '临沂市', '371327', '莒南县', '', '', '', '', 3, 1, ''), ('371328', '3713', '00,37,3713', '蒙阴县', '37', '山东省', '3713', '临沂市', '371328', '蒙阴县', '', '', '', '', 3, 1, ''), ('371329', '3713', '00,37,3713', '临沭县', '37', '山东省', '3713', '临沂市', '371329', '临沭县', '', '', '', '', 3, 1, ''), ('3714', '37', '00,37', '德州市', '37', '山东省', '3714', '德州市', '', '', '', '', '', '', 2, 1, ''), ('371402', '3714', '00,37,3714', '德城区', '37', '山东省', '3714', '德州市', '371402', '德城区', '', '', '', '', 3, 1, ''), ('371403', '3714', '00,37,3714', '陵城区', '37', '山东省', '3714', '德州市', '371403', '陵城区', '', '', '', '', 3, 1, ''), ('371422', '3714', '00,37,3714', '宁津县', '37', '山东省', '3714', '德州市', '371422', '宁津县', '', '', '', '', 3, 1, ''), ('371423', '3714', '00,37,3714', '庆云县', '37', '山东省', '3714', '德州市', '371423', '庆云县', '', '', '', '', 3, 1, ''), ('371424', '3714', '00,37,3714', '临邑县', '37', '山东省', '3714', '德州市', '371424', '临邑县', '', '', '', '', 3, 1, ''), ('371425', '3714', '00,37,3714', '齐河县', '37', '山东省', '3714', '德州市', '371425', '齐河县', '', '', '', '', 3, 1, ''), ('371426', '3714', '00,37,3714', '平原县', '37', '山东省', '3714', '德州市', '371426', '平原县', '', '', '', '', 3, 1, ''), ('371427', '3714', '00,37,3714', '夏津县', '37', '山东省', '3714', '德州市', '371427', '夏津县', '', '', '', '', 3, 1, ''), ('371428', '3714', '00,37,3714', '武城县', '37', '山东省', '3714', '德州市', '371428', '武城县', '', '', '', '', 3, 1, ''), ('371481', '3714', '00,37,3714', '乐陵市', '37', '山东省', '3714', '德州市', '371481', '乐陵市', '', '', '', '', 3, 1, ''), ('371482', '3714', '00,37,3714', '禹城市', '37', '山东省', '3714', '德州市', '371482', '禹城市', '', '', '', '', 3, 1, ''), ('3715', '37', '00,37', '聊城市', '37', '山东省', '3715', '聊城市', '', '', '', '', '', '', 2, 1, ''), ('371502', '3715', '00,37,3715', '东昌府区', '37', '山东省', '3715', '聊城市', '371502', '东昌府区', '', '', '', '', 3, 1, ''), ('371503', '3715', '00,37,3715', '茌平区', '37', '山东省', '3715', '聊城市', '371503', '茌平区', '', '', '', '', 3, 1, ''), ('371521', '3715', '00,37,3715', '阳谷县', '37', '山东省', '3715', '聊城市', '371521', '阳谷县', '', '', '', '', 3, 1, ''), ('371522', '3715', '00,37,3715', '莘县', '37', '山东省', '3715', '聊城市', '371522', '莘县', '', '', '', '', 3, 1, ''), ('371524', '3715', '00,37,3715', '东阿县', '37', '山东省', '3715', '聊城市', '371524', '东阿县', '', '', '', '', 3, 1, ''), ('371525', '3715', '00,37,3715', '冠县', '37', '山东省', '3715', '聊城市', '371525', '冠县', '', '', '', '', 3, 1, ''), ('371526', '3715', '00,37,3715', '高唐县', '37', '山东省', '3715', '聊城市', '371526', '高唐县', '', '', '', '', 3, 1, ''), ('371581', '3715', '00,37,3715', '临清市', '37', '山东省', '3715', '聊城市', '371581', '临清市', '', '', '', '', 3, 1, ''), ('3716', '37', '00,37', '滨州市', '37', '山东省', '3716', '滨州市', '', '', '', '', '', '', 2, 1, ''), ('371602', '3716', '00,37,3716', '滨城区', '37', '山东省', '3716', '滨州市', '371602', '滨城区', '', '', '', '', 3, 1, ''), ('371603', '3716', '00,37,3716', '沾化区', '37', '山东省', '3716', '滨州市', '371603', '沾化区', '', '', '', '', 3, 1, ''), ('371621', '3716', '00,37,3716', '惠民县', '37', '山东省', '3716', '滨州市', '371621', '惠民县', '', '', '', '', 3, 1, ''), ('371622', '3716', '00,37,3716', '阳信县', '37', '山东省', '3716', '滨州市', '371622', '阳信县', '', '', '', '', 3, 1, ''), ('371623', '3716', '00,37,3716', '无棣县', '37', '山东省', '3716', '滨州市', '371623', '无棣县', '', '', '', '', 3, 1, ''), ('371625', '3716', '00,37,3716', '博兴县', '37', '山东省', '3716', '滨州市', '371625', '博兴县', '', '', '', '', 3, 1, ''), ('371681', '3716', '00,37,3716', '邹平市', '37', '山东省', '3716', '滨州市', '371681', '邹平市', '', '', '', '', 3, 1, ''), ('3717', '37', '00,37', '菏泽市', '37', '山东省', '3717', '菏泽市', '', '', '', '', '', '', 2, 1, ''), ('371702', '3717', '00,37,3717', '牡丹区', '37', '山东省', '3717', '菏泽市', '371702', '牡丹区', '', '', '', '', 3, 1, ''), ('371703', '3717', '00,37,3717', '定陶区', '37', '山东省', '3717', '菏泽市', '371703', '定陶区', '', '', '', '', 3, 1, ''), ('371721', '3717', '00,37,3717', '曹县', '37', '山东省', '3717', '菏泽市', '371721', '曹县', '', '', '', '', 3, 1, ''), ('371722', '3717', '00,37,3717', '单县', '37', '山东省', '3717', '菏泽市', '371722', '单县', '', '', '', '', 3, 1, ''), ('371723', '3717', '00,37,3717', '成武县', '37', '山东省', '3717', '菏泽市', '371723', '成武县', '', '', '', '', 3, 1, ''), ('371724', '3717', '00,37,3717', '巨野县', '37', '山东省', '3717', '菏泽市', '371724', '巨野县', '', '', '', '', 3, 1, ''), ('371725', '3717', '00,37,3717', '郓城县', '37', '山东省', '3717', '菏泽市', '371725', '郓城县', '', '', '', '', 3, 1, ''), ('371726', '3717', '00,37,3717', '鄄城县', '37', '山东省', '3717', '菏泽市', '371726', '鄄城县', '', '', '', '', 3, 1, ''), ('371728', '3717', '00,37,3717', '东明县', '37', '山东省', '3717', '菏泽市', '371728', '东明县', '', '', '', '', 3, 1, ''), ('41', '00', '00', '河南省', '41', '河南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4101', '41', '00,41', '郑州市', '41', '河南省', '4101', '郑州市', '', '', '', '', '', '', 2, 1, ''), ('410102', '4101', '00,41,4101', '中原区', '41', '河南省', '4101', '郑州市', '410102', '中原区', '', '', '', '', 3, 1, ''), ('410103', '4101', '00,41,4101', '二七区', '41', '河南省', '4101', '郑州市', '410103', '二七区', '', '', '', '', 3, 1, ''), ('410104', '4101', '00,41,4101', '管城回族区', '41', '河南省', '4101', '郑州市', '410104', '管城回族区', '', '', '', '', 3, 1, ''), ('410105', '4101', '00,41,4101', '金水区', '41', '河南省', '4101', '郑州市', '410105', '金水区', '', '', '', '', 3, 1, ''), ('410106', '4101', '00,41,4101', '上街区', '41', '河南省', '4101', '郑州市', '410106', '上街区', '', '', '', '', 3, 1, ''), ('410108', '4101', '00,41,4101', '惠济区', '41', '河南省', '4101', '郑州市', '410108', '惠济区', '', '', '', '', 3, 1, ''), ('410122', '4101', '00,41,4101', '中牟县', '41', '河南省', '4101', '郑州市', '410122', '中牟县', '', '', '', '', 3, 1, ''), ('410181', '4101', '00,41,4101', '巩义市', '41', '河南省', '4101', '郑州市', '410181', '巩义市', '', '', '', '', 3, 1, ''), ('410182', '4101', '00,41,4101', '荥阳市', '41', '河南省', '4101', '郑州市', '410182', '荥阳市', '', '', '', '', 3, 1, ''), ('410183', '4101', '00,41,4101', '新密市', '41', '河南省', '4101', '郑州市', '410183', '新密市', '', '', '', '', 3, 1, ''), ('410184', '4101', '00,41,4101', '新郑市', '41', '河南省', '4101', '郑州市', '410184', '新郑市', '', '', '', '', 3, 1, ''), ('410185', '4101', '00,41,4101', '登封市', '41', '河南省', '4101', '郑州市', '410185', '登封市', '', '', '', '', 3, 1, ''), ('4102', '41', '00,41', '开封市', '41', '河南省', '4102', '开封市', '', '', '', '', '', '', 2, 1, ''), ('410202', '4102', '00,41,4102', '龙亭区', '41', '河南省', '4102', '开封市', '410202', '龙亭区', '', '', '', '', 3, 1, ''), ('410203', '4102', '00,41,4102', '顺河回族区', '41', '河南省', '4102', '开封市', '410203', '顺河回族区', '', '', '', '', 3, 1, ''), ('410204', '4102', '00,41,4102', '鼓楼区', '41', '河南省', '4102', '开封市', '410204', '鼓楼区', '', '', '', '', 3, 1, ''), ('410205', '4102', '00,41,4102', '禹王台区', '41', '河南省', '4102', '开封市', '410205', '禹王台区', '', '', '', '', 3, 1, ''), ('410212', '4102', '00,41,4102', '祥符区', '41', '河南省', '4102', '开封市', '410212', '祥符区', '', '', '', '', 3, 1, ''), ('410221', '4102', '00,41,4102', '杞县', '41', '河南省', '4102', '开封市', '410221', '杞县', '', '', '', '', 3, 1, ''), ('410222', '4102', '00,41,4102', '通许县', '41', '河南省', '4102', '开封市', '410222', '通许县', '', '', '', '', 3, 1, ''), ('410223', '4102', '00,41,4102', '尉氏县', '41', '河南省', '4102', '开封市', '410223', '尉氏县', '', '', '', '', 3, 1, ''), ('410225', '4102', '00,41,4102', '兰考县', '41', '河南省', '4102', '开封市', '410225', '兰考县', '', '', '', '', 3, 1, ''), ('4103', '41', '00,41', '洛阳市', '41', '河南省', '4103', '洛阳市', '', '', '', '', '', '', 2, 1, ''), ('410302', '4103', '00,41,4103', '老城区', '41', '河南省', '4103', '洛阳市', '410302', '老城区', '', '', '', '', 3, 1, ''), ('410303', '4103', '00,41,4103', '西工区', '41', '河南省', '4103', '洛阳市', '410303', '西工区', '', '', '', '', 3, 1, ''), ('410304', '4103', '00,41,4103', '瀍河回族区', '41', '河南省', '4103', '洛阳市', '410304', '瀍河回族区', '', '', '', '', 3, 1, ''), ('410305', '4103', '00,41,4103', '涧西区', '41', '河南省', '4103', '洛阳市', '410305', '涧西区', '', '', '', '', 3, 1, ''), ('410306', '4103', '00,41,4103', '吉利区', '41', '河南省', '4103', '洛阳市', '410306', '吉利区', '', '', '', '', 3, 1, ''), ('410311', '4103', '00,41,4103', '洛龙区', '41', '河南省', '4103', '洛阳市', '410311', '洛龙区', '', '', '', '', 3, 1, ''), ('410322', '4103', '00,41,4103', '孟津县', '41', '河南省', '4103', '洛阳市', '410322', '孟津县', '', '', '', '', 3, 1, ''), ('410323', '4103', '00,41,4103', '新安县', '41', '河南省', '4103', '洛阳市', '410323', '新安县', '', '', '', '', 3, 1, ''), ('410324', '4103', '00,41,4103', '栾川县', '41', '河南省', '4103', '洛阳市', '410324', '栾川县', '', '', '', '', 3, 1, ''), ('410325', '4103', '00,41,4103', '嵩县', '41', '河南省', '4103', '洛阳市', '410325', '嵩县', '', '', '', '', 3, 1, ''), ('410326', '4103', '00,41,4103', '汝阳县', '41', '河南省', '4103', '洛阳市', '410326', '汝阳县', '', '', '', '', 3, 1, ''), ('410327', '4103', '00,41,4103', '宜阳县', '41', '河南省', '4103', '洛阳市', '410327', '宜阳县', '', '', '', '', 3, 1, ''), ('410328', '4103', '00,41,4103', '洛宁县', '41', '河南省', '4103', '洛阳市', '410328', '洛宁县', '', '', '', '', 3, 1, ''), ('410329', '4103', '00,41,4103', '伊川县', '41', '河南省', '4103', '洛阳市', '410329', '伊川县', '', '', '', '', 3, 1, ''), ('410381', '4103', '00,41,4103', '偃师市', '41', '河南省', '4103', '洛阳市', '410381', '偃师市', '', '', '', '', 3, 1, ''), ('4104', '41', '00,41', '平顶山市', '41', '河南省', '4104', '平顶山市', '', '', '', '', '', '', 2, 1, ''), ('410402', '4104', '00,41,4104', '新华区', '41', '河南省', '4104', '平顶山市', '410402', '新华区', '', '', '', '', 3, 1, ''), ('410403', '4104', '00,41,4104', '卫东区', '41', '河南省', '4104', '平顶山市', '410403', '卫东区', '', '', '', '', 3, 1, ''), ('410404', '4104', '00,41,4104', '石龙区', '41', '河南省', '4104', '平顶山市', '410404', '石龙区', '', '', '', '', 3, 1, ''), ('410411', '4104', '00,41,4104', '湛河区', '41', '河南省', '4104', '平顶山市', '410411', '湛河区', '', '', '', '', 3, 1, ''), ('410421', '4104', '00,41,4104', '宝丰县', '41', '河南省', '4104', '平顶山市', '410421', '宝丰县', '', '', '', '', 3, 1, ''), ('410422', '4104', '00,41,4104', '叶县', '41', '河南省', '4104', '平顶山市', '410422', '叶县', '', '', '', '', 3, 1, ''), ('410423', '4104', '00,41,4104', '鲁山县', '41', '河南省', '4104', '平顶山市', '410423', '鲁山县', '', '', '', '', 3, 1, ''), ('410425', '4104', '00,41,4104', '郏县', '41', '河南省', '4104', '平顶山市', '410425', '郏县', '', '', '', '', 3, 1, ''), ('410481', '4104', '00,41,4104', '舞钢市', '41', '河南省', '4104', '平顶山市', '410481', '舞钢市', '', '', '', '', 3, 1, ''), ('410482', '4104', '00,41,4104', '汝州市', '41', '河南省', '4104', '平顶山市', '410482', '汝州市', '', '', '', '', 3, 1, ''), ('4105', '41', '00,41', '安阳市', '41', '河南省', '4105', '安阳市', '', '', '', '', '', '', 2, 1, ''), ('410502', '4105', '00,41,4105', '文峰区', '41', '河南省', '4105', '安阳市', '410502', '文峰区', '', '', '', '', 3, 1, ''), ('410503', '4105', '00,41,4105', '北关区', '41', '河南省', '4105', '安阳市', '410503', '北关区', '', '', '', '', 3, 1, ''), ('410505', '4105', '00,41,4105', '殷都区', '41', '河南省', '4105', '安阳市', '410505', '殷都区', '', '', '', '', 3, 1, ''), ('410506', '4105', '00,41,4105', '龙安区', '41', '河南省', '4105', '安阳市', '410506', '龙安区', '', '', '', '', 3, 1, ''), ('410522', '4105', '00,41,4105', '安阳县', '41', '河南省', '4105', '安阳市', '410522', '安阳县', '', '', '', '', 3, 1, ''), ('410523', '4105', '00,41,4105', '汤阴县', '41', '河南省', '4105', '安阳市', '410523', '汤阴县', '', '', '', '', 3, 1, ''), ('410526', '4105', '00,41,4105', '滑县', '41', '河南省', '4105', '安阳市', '410526', '滑县', '', '', '', '', 3, 1, ''), ('410527', '4105', '00,41,4105', '内黄县', '41', '河南省', '4105', '安阳市', '410527', '内黄县', '', '', '', '', 3, 1, ''), ('410581', '4105', '00,41,4105', '林州市', '41', '河南省', '4105', '安阳市', '410581', '林州市', '', '', '', '', 3, 1, ''), ('4106', '41', '00,41', '鹤壁市', '41', '河南省', '4106', '鹤壁市', '', '', '', '', '', '', 2, 1, ''), ('410602', '4106', '00,41,4106', '鹤山区', '41', '河南省', '4106', '鹤壁市', '410602', '鹤山区', '', '', '', '', 3, 1, ''), ('410603', '4106', '00,41,4106', '山城区', '41', '河南省', '4106', '鹤壁市', '410603', '山城区', '', '', '', '', 3, 1, ''), ('410611', '4106', '00,41,4106', '淇滨区', '41', '河南省', '4106', '鹤壁市', '410611', '淇滨区', '', '', '', '', 3, 1, ''), ('410621', '4106', '00,41,4106', '浚县', '41', '河南省', '4106', '鹤壁市', '410621', '浚县', '', '', '', '', 3, 1, ''), ('410622', '4106', '00,41,4106', '淇县', '41', '河南省', '4106', '鹤壁市', '410622', '淇县', '', '', '', '', 3, 1, ''), ('4107', '41', '00,41', '新乡市', '41', '河南省', '4107', '新乡市', '', '', '', '', '', '', 2, 1, ''), ('410702', '4107', '00,41,4107', '红旗区', '41', '河南省', '4107', '新乡市', '410702', '红旗区', '', '', '', '', 3, 1, ''), ('410703', '4107', '00,41,4107', '卫滨区', '41', '河南省', '4107', '新乡市', '410703', '卫滨区', '', '', '', '', 3, 1, ''), ('410704', '4107', '00,41,4107', '凤泉区', '41', '河南省', '4107', '新乡市', '410704', '凤泉区', '', '', '', '', 3, 1, ''), ('410711', '4107', '00,41,4107', '牧野区', '41', '河南省', '4107', '新乡市', '410711', '牧野区', '', '', '', '', 3, 1, ''), ('410721', '4107', '00,41,4107', '新乡县', '41', '河南省', '4107', '新乡市', '410721', '新乡县', '', '', '', '', 3, 1, ''), ('410724', '4107', '00,41,4107', '获嘉县', '41', '河南省', '4107', '新乡市', '410724', '获嘉县', '', '', '', '', 3, 1, ''), ('410725', '4107', '00,41,4107', '原阳县', '41', '河南省', '4107', '新乡市', '410725', '原阳县', '', '', '', '', 3, 1, ''), ('410726', '4107', '00,41,4107', '延津县', '41', '河南省', '4107', '新乡市', '410726', '延津县', '', '', '', '', 3, 1, ''), ('410727', '4107', '00,41,4107', '封丘县', '41', '河南省', '4107', '新乡市', '410727', '封丘县', '', '', '', '', 3, 1, ''), ('410781', '4107', '00,41,4107', '卫辉市', '41', '河南省', '4107', '新乡市', '410781', '卫辉市', '', '', '', '', 3, 1, ''), ('410782', '4107', '00,41,4107', '辉县市', '41', '河南省', '4107', '新乡市', '410782', '辉县市', '', '', '', '', 3, 1, ''), ('410783', '4107', '00,41,4107', '长垣市', '41', '河南省', '4107', '新乡市', '410783', '长垣市', '', '', '', '', 3, 1, ''), ('4108', '41', '00,41', '焦作市', '41', '河南省', '4108', '焦作市', '', '', '', '', '', '', 2, 1, ''), ('410802', '4108', '00,41,4108', '解放区', '41', '河南省', '4108', '焦作市', '410802', '解放区', '', '', '', '', 3, 1, ''), ('410803', '4108', '00,41,4108', '中站区', '41', '河南省', '4108', '焦作市', '410803', '中站区', '', '', '', '', 3, 1, ''), ('410804', '4108', '00,41,4108', '马村区', '41', '河南省', '4108', '焦作市', '410804', '马村区', '', '', '', '', 3, 1, ''), ('410811', '4108', '00,41,4108', '山阳区', '41', '河南省', '4108', '焦作市', '410811', '山阳区', '', '', '', '', 3, 1, ''), ('410821', '4108', '00,41,4108', '修武县', '41', '河南省', '4108', '焦作市', '410821', '修武县', '', '', '', '', 3, 1, ''), ('410822', '4108', '00,41,4108', '博爱县', '41', '河南省', '4108', '焦作市', '410822', '博爱县', '', '', '', '', 3, 1, ''), ('410823', '4108', '00,41,4108', '武陟县', '41', '河南省', '4108', '焦作市', '410823', '武陟县', '', '', '', '', 3, 1, ''), ('410825', '4108', '00,41,4108', '温县', '41', '河南省', '4108', '焦作市', '410825', '温县', '', '', '', '', 3, 1, ''), ('410882', '4108', '00,41,4108', '沁阳市', '41', '河南省', '4108', '焦作市', '410882', '沁阳市', '', '', '', '', 3, 1, ''), ('410883', '4108', '00,41,4108', '孟州市', '41', '河南省', '4108', '焦作市', '410883', '孟州市', '', '', '', '', 3, 1, ''), ('4109', '41', '00,41', '濮阳市', '41', '河南省', '4109', '濮阳市', '', '', '', '', '', '', 2, 1, ''), ('410902', '4109', '00,41,4109', '华龙区', '41', '河南省', '4109', '濮阳市', '410902', '华龙区', '', '', '', '', 3, 1, ''), ('410922', '4109', '00,41,4109', '清丰县', '41', '河南省', '4109', '濮阳市', '410922', '清丰县', '', '', '', '', 3, 1, ''), ('410923', '4109', '00,41,4109', '南乐县', '41', '河南省', '4109', '濮阳市', '410923', '南乐县', '', '', '', '', 3, 1, ''), ('410926', '4109', '00,41,4109', '范县', '41', '河南省', '4109', '濮阳市', '410926', '范县', '', '', '', '', 3, 1, ''), ('410927', '4109', '00,41,4109', '台前县', '41', '河南省', '4109', '濮阳市', '410927', '台前县', '', '', '', '', 3, 1, ''), ('410928', '4109', '00,41,4109', '濮阳县', '41', '河南省', '4109', '濮阳市', '410928', '濮阳县', '', '', '', '', 3, 1, ''), ('4110', '41', '00,41', '许昌市', '41', '河南省', '4110', '许昌市', '', '', '', '', '', '', 2, 1, ''), ('411002', '4110', '00,41,4110', '魏都区', '41', '河南省', '4110', '许昌市', '411002', '魏都区', '', '', '', '', 3, 1, ''), ('411003', '4110', '00,41,4110', '建安区', '41', '河南省', '4110', '许昌市', '411003', '建安区', '', '', '', '', 3, 1, ''), ('411024', '4110', '00,41,4110', '鄢陵县', '41', '河南省', '4110', '许昌市', '411024', '鄢陵县', '', '', '', '', 3, 1, ''), ('411025', '4110', '00,41,4110', '襄城县', '41', '河南省', '4110', '许昌市', '411025', '襄城县', '', '', '', '', 3, 1, ''), ('411081', '4110', '00,41,4110', '禹州市', '41', '河南省', '4110', '许昌市', '411081', '禹州市', '', '', '', '', 3, 1, ''), ('411082', '4110', '00,41,4110', '长葛市', '41', '河南省', '4110', '许昌市', '411082', '长葛市', '', '', '', '', 3, 1, ''), ('4111', '41', '00,41', '漯河市', '41', '河南省', '4111', '漯河市', '', '', '', '', '', '', 2, 1, ''), ('411102', '4111', '00,41,4111', '源汇区', '41', '河南省', '4111', '漯河市', '411102', '源汇区', '', '', '', '', 3, 1, ''), ('411103', '4111', '00,41,4111', '郾城区', '41', '河南省', '4111', '漯河市', '411103', '郾城区', '', '', '', '', 3, 1, ''), ('411104', '4111', '00,41,4111', '召陵区', '41', '河南省', '4111', '漯河市', '411104', '召陵区', '', '', '', '', 3, 1, ''), ('411121', '4111', '00,41,4111', '舞阳县', '41', '河南省', '4111', '漯河市', '411121', '舞阳县', '', '', '', '', 3, 1, ''), ('411122', '4111', '00,41,4111', '临颍县', '41', '河南省', '4111', '漯河市', '411122', '临颍县', '', '', '', '', 3, 1, ''), ('4112', '41', '00,41', '三门峡市', '41', '河南省', '4112', '三门峡市', '', '', '', '', '', '', 2, 1, ''), ('411202', '4112', '00,41,4112', '湖滨区', '41', '河南省', '4112', '三门峡市', '411202', '湖滨区', '', '', '', '', 3, 1, ''), ('411203', '4112', '00,41,4112', '陕州区', '41', '河南省', '4112', '三门峡市', '411203', '陕州区', '', '', '', '', 3, 1, ''), ('411221', '4112', '00,41,4112', '渑池县', '41', '河南省', '4112', '三门峡市', '411221', '渑池县', '', '', '', '', 3, 1, ''), ('411224', '4112', '00,41,4112', '卢氏县', '41', '河南省', '4112', '三门峡市', '411224', '卢氏县', '', '', '', '', 3, 1, ''), ('411281', '4112', '00,41,4112', '义马市', '41', '河南省', '4112', '三门峡市', '411281', '义马市', '', '', '', '', 3, 1, ''), ('411282', '4112', '00,41,4112', '灵宝市', '41', '河南省', '4112', '三门峡市', '411282', '灵宝市', '', '', '', '', 3, 1, ''), ('4113', '41', '00,41', '南阳市', '41', '河南省', '4113', '南阳市', '', '', '', '', '', '', 2, 1, ''), ('411302', '4113', '00,41,4113', '宛城区', '41', '河南省', '4113', '南阳市', '411302', '宛城区', '', '', '', '', 3, 1, ''), ('411303', '4113', '00,41,4113', '卧龙区', '41', '河南省', '4113', '南阳市', '411303', '卧龙区', '', '', '', '', 3, 1, ''), ('411321', '4113', '00,41,4113', '南召县', '41', '河南省', '4113', '南阳市', '411321', '南召县', '', '', '', '', 3, 1, ''), ('411322', '4113', '00,41,4113', '方城县', '41', '河南省', '4113', '南阳市', '411322', '方城县', '', '', '', '', 3, 1, ''), ('411323', '4113', '00,41,4113', '西峡县', '41', '河南省', '4113', '南阳市', '411323', '西峡县', '', '', '', '', 3, 1, ''), ('411324', '4113', '00,41,4113', '镇平县', '41', '河南省', '4113', '南阳市', '411324', '镇平县', '', '', '', '', 3, 1, ''), ('411325', '4113', '00,41,4113', '内乡县', '41', '河南省', '4113', '南阳市', '411325', '内乡县', '', '', '', '', 3, 1, ''), ('411326', '4113', '00,41,4113', '淅川县', '41', '河南省', '4113', '南阳市', '411326', '淅川县', '', '', '', '', 3, 1, ''), ('411327', '4113', '00,41,4113', '社旗县', '41', '河南省', '4113', '南阳市', '411327', '社旗县', '', '', '', '', 3, 1, ''), ('411328', '4113', '00,41,4113', '唐河县', '41', '河南省', '4113', '南阳市', '411328', '唐河县', '', '', '', '', 3, 1, ''), ('411329', '4113', '00,41,4113', '新野县', '41', '河南省', '4113', '南阳市', '411329', '新野县', '', '', '', '', 3, 1, ''), ('411330', '4113', '00,41,4113', '桐柏县', '41', '河南省', '4113', '南阳市', '411330', '桐柏县', '', '', '', '', 3, 1, ''), ('411381', '4113', '00,41,4113', '邓州市', '41', '河南省', '4113', '南阳市', '411381', '邓州市', '', '', '', '', 3, 1, ''), ('4114', '41', '00,41', '商丘市', '41', '河南省', '4114', '商丘市', '', '', '', '', '', '', 2, 1, ''), ('411402', '4114', '00,41,4114', '梁园区', '41', '河南省', '4114', '商丘市', '411402', '梁园区', '', '', '', '', 3, 1, ''), ('411403', '4114', '00,41,4114', '睢阳区', '41', '河南省', '4114', '商丘市', '411403', '睢阳区', '', '', '', '', 3, 1, ''), ('411421', '4114', '00,41,4114', '民权县', '41', '河南省', '4114', '商丘市', '411421', '民权县', '', '', '', '', 3, 1, ''), ('411422', '4114', '00,41,4114', '睢县', '41', '河南省', '4114', '商丘市', '411422', '睢县', '', '', '', '', 3, 1, ''), ('411423', '4114', '00,41,4114', '宁陵县', '41', '河南省', '4114', '商丘市', '411423', '宁陵县', '', '', '', '', 3, 1, ''), ('411424', '4114', '00,41,4114', '柘城县', '41', '河南省', '4114', '商丘市', '411424', '柘城县', '', '', '', '', 3, 1, ''), ('411425', '4114', '00,41,4114', '虞城县', '41', '河南省', '4114', '商丘市', '411425', '虞城县', '', '', '', '', 3, 1, ''), ('411426', '4114', '00,41,4114', '夏邑县', '41', '河南省', '4114', '商丘市', '411426', '夏邑县', '', '', '', '', 3, 1, ''), ('411481', '4114', '00,41,4114', '永城市', '41', '河南省', '4114', '商丘市', '411481', '永城市', '', '', '', '', 3, 1, ''), ('4115', '41', '00,41', '信阳市', '41', '河南省', '4115', '信阳市', '', '', '', '', '', '', 2, 1, ''), ('411502', '4115', '00,41,4115', '浉河区', '41', '河南省', '4115', '信阳市', '411502', '浉河区', '', '', '', '', 3, 1, ''), ('411503', '4115', '00,41,4115', '平桥区', '41', '河南省', '4115', '信阳市', '411503', '平桥区', '', '', '', '', 3, 1, ''), ('411521', '4115', '00,41,4115', '罗山县', '41', '河南省', '4115', '信阳市', '411521', '罗山县', '', '', '', '', 3, 1, ''), ('411522', '4115', '00,41,4115', '光山县', '41', '河南省', '4115', '信阳市', '411522', '光山县', '', '', '', '', 3, 1, ''), ('411523', '4115', '00,41,4115', '新县', '41', '河南省', '4115', '信阳市', '411523', '新县', '', '', '', '', 3, 1, ''), ('411524', '4115', '00,41,4115', '商城县', '41', '河南省', '4115', '信阳市', '411524', '商城县', '', '', '', '', 3, 1, ''), ('411525', '4115', '00,41,4115', '固始县', '41', '河南省', '4115', '信阳市', '411525', '固始县', '', '', '', '', 3, 1, ''), ('411526', '4115', '00,41,4115', '潢川县', '41', '河南省', '4115', '信阳市', '411526', '潢川县', '', '', '', '', 3, 1, ''), ('411527', '4115', '00,41,4115', '淮滨县', '41', '河南省', '4115', '信阳市', '411527', '淮滨县', '', '', '', '', 3, 1, ''), ('411528', '4115', '00,41,4115', '息县', '41', '河南省', '4115', '信阳市', '411528', '息县', '', '', '', '', 3, 1, ''), ('4116', '41', '00,41', '周口市', '41', '河南省', '4116', '周口市', '', '', '', '', '', '', 2, 1, ''), ('411602', '4116', '00,41,4116', '川汇区', '41', '河南省', '4116', '周口市', '411602', '川汇区', '', '', '', '', 3, 1, ''), ('411603', '4116', '00,41,4116', '淮阳区', '41', '河南省', '4116', '周口市', '411603', '淮阳区', '', '', '', '', 3, 1, ''), ('411621', '4116', '00,41,4116', '扶沟县', '41', '河南省', '4116', '周口市', '411621', '扶沟县', '', '', '', '', 3, 1, ''), ('411622', '4116', '00,41,4116', '西华县', '41', '河南省', '4116', '周口市', '411622', '西华县', '', '', '', '', 3, 1, ''), ('411623', '4116', '00,41,4116', '商水县', '41', '河南省', '4116', '周口市', '411623', '商水县', '', '', '', '', 3, 1, ''), ('411624', '4116', '00,41,4116', '沈丘县', '41', '河南省', '4116', '周口市', '411624', '沈丘县', '', '', '', '', 3, 1, ''), ('411625', '4116', '00,41,4116', '郸城县', '41', '河南省', '4116', '周口市', '411625', '郸城县', '', '', '', '', 3, 1, ''), ('411627', '4116', '00,41,4116', '太康县', '41', '河南省', '4116', '周口市', '411627', '太康县', '', '', '', '', 3, 1, ''), ('411628', '4116', '00,41,4116', '鹿邑县', '41', '河南省', '4116', '周口市', '411628', '鹿邑县', '', '', '', '', 3, 1, ''), ('411681', '4116', '00,41,4116', '项城市', '41', '河南省', '4116', '周口市', '411681', '项城市', '', '', '', '', 3, 1, ''), ('4117', '41', '00,41', '驻马店市', '41', '河南省', '4117', '驻马店市', '', '', '', '', '', '', 2, 1, ''), ('411702', '4117', '00,41,4117', '驿城区', '41', '河南省', '4117', '驻马店市', '411702', '驿城区', '', '', '', '', 3, 1, ''), ('411721', '4117', '00,41,4117', '西平县', '41', '河南省', '4117', '驻马店市', '411721', '西平县', '', '', '', '', 3, 1, ''), ('411722', '4117', '00,41,4117', '上蔡县', '41', '河南省', '4117', '驻马店市', '411722', '上蔡县', '', '', '', '', 3, 1, ''), ('411723', '4117', '00,41,4117', '平舆县', '41', '河南省', '4117', '驻马店市', '411723', '平舆县', '', '', '', '', 3, 1, ''), ('411724', '4117', '00,41,4117', '正阳县', '41', '河南省', '4117', '驻马店市', '411724', '正阳县', '', '', '', '', 3, 1, ''), ('411725', '4117', '00,41,4117', '确山县', '41', '河南省', '4117', '驻马店市', '411725', '确山县', '', '', '', '', 3, 1, ''), ('411726', '4117', '00,41,4117', '泌阳县', '41', '河南省', '4117', '驻马店市', '411726', '泌阳县', '', '', '', '', 3, 1, ''), ('411727', '4117', '00,41,4117', '汝南县', '41', '河南省', '4117', '驻马店市', '411727', '汝南县', '', '', '', '', 3, 1, ''), ('411728', '4117', '00,41,4117', '遂平县', '41', '河南省', '4117', '驻马店市', '411728', '遂平县', '', '', '', '', 3, 1, ''), ('411729', '4117', '00,41,4117', '新蔡县', '41', '河南省', '4117', '驻马店市', '411729', '新蔡县', '', '', '', '', 3, 1, ''), ('4190', '41', '00,41', '省直辖县级行政区', '41', '河南省', '4190', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('419001', '4190', '00,41,4190', '济源市', '41', '河南省', '4190', '省直辖县级行政区', '419001', '济源市', '', '', '', '', 3, 1, ''), ('42', '00', '00', '湖北省', '42', '湖北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4201', '42', '00,42', '武汉市', '42', '湖北省', '4201', '武汉市', '', '', '', '', '', '', 2, 1, ''), ('420102', '4201', '00,42,4201', '江岸区', '42', '湖北省', '4201', '武汉市', '420102', '江岸区', '', '', '', '', 3, 1, ''), ('420103', '4201', '00,42,4201', '江汉区', '42', '湖北省', '4201', '武汉市', '420103', '江汉区', '', '', '', '', 3, 1, ''), ('420104', '4201', '00,42,4201', '硚口区', '42', '湖北省', '4201', '武汉市', '420104', '硚口区', '', '', '', '', 3, 1, ''), ('420105', '4201', '00,42,4201', '汉阳区', '42', '湖北省', '4201', '武汉市', '420105', '汉阳区', '', '', '', '', 3, 1, ''), ('420106', '4201', '00,42,4201', '武昌区', '42', '湖北省', '4201', '武汉市', '420106', '武昌区', '', '', '', '', 3, 1, ''), ('420107', '4201', '00,42,4201', '青山区', '42', '湖北省', '4201', '武汉市', '420107', '青山区', '', '', '', '', 3, 1, ''), ('420111', '4201', '00,42,4201', '洪山区', '42', '湖北省', '4201', '武汉市', '420111', '洪山区', '', '', '', '', 3, 1, ''), ('420112', '4201', '00,42,4201', '东西湖区', '42', '湖北省', '4201', '武汉市', '420112', '东西湖区', '', '', '', '', 3, 1, ''), ('420113', '4201', '00,42,4201', '汉南区', '42', '湖北省', '4201', '武汉市', '420113', '汉南区', '', '', '', '', 3, 1, ''), ('420114', '4201', '00,42,4201', '蔡甸区', '42', '湖北省', '4201', '武汉市', '420114', '蔡甸区', '', '', '', '', 3, 1, ''), ('420115', '4201', '00,42,4201', '江夏区', '42', '湖北省', '4201', '武汉市', '420115', '江夏区', '', '', '', '', 3, 1, ''), ('420116', '4201', '00,42,4201', '黄陂区', '42', '湖北省', '4201', '武汉市', '420116', '黄陂区', '', '', '', '', 3, 1, ''), ('420117', '4201', '00,42,4201', '新洲区', '42', '湖北省', '4201', '武汉市', '420117', '新洲区', '', '', '', '', 3, 1, ''), ('4202', '42', '00,42', '黄石市', '42', '湖北省', '4202', '黄石市', '', '', '', '', '', '', 2, 1, ''), ('420202', '4202', '00,42,4202', '黄石港区', '42', '湖北省', '4202', '黄石市', '420202', '黄石港区', '', '', '', '', 3, 1, ''), ('420203', '4202', '00,42,4202', '西塞山区', '42', '湖北省', '4202', '黄石市', '420203', '西塞山区', '', '', '', '', 3, 1, ''), ('420204', '4202', '00,42,4202', '下陆区', '42', '湖北省', '4202', '黄石市', '420204', '下陆区', '', '', '', '', 3, 1, ''), ('420205', '4202', '00,42,4202', '铁山区', '42', '湖北省', '4202', '黄石市', '420205', '铁山区', '', '', '', '', 3, 1, ''), ('420222', '4202', '00,42,4202', '阳新县', '42', '湖北省', '4202', '黄石市', '420222', '阳新县', '', '', '', '', 3, 1, ''), ('420281', '4202', '00,42,4202', '大冶市', '42', '湖北省', '4202', '黄石市', '420281', '大冶市', '', '', '', '', 3, 1, ''), ('4203', '42', '00,42', '十堰市', '42', '湖北省', '4203', '十堰市', '', '', '', '', '', '', 2, 1, ''), ('420302', '4203', '00,42,4203', '茅箭区', '42', '湖北省', '4203', '十堰市', '420302', '茅箭区', '', '', '', '', 3, 1, ''), ('420303', '4203', '00,42,4203', '张湾区', '42', '湖北省', '4203', '十堰市', '420303', '张湾区', '', '', '', '', 3, 1, ''), ('420304', '4203', '00,42,4203', '郧阳区', '42', '湖北省', '4203', '十堰市', '420304', '郧阳区', '', '', '', '', 3, 1, ''), ('420322', '4203', '00,42,4203', '郧西县', '42', '湖北省', '4203', '十堰市', '420322', '郧西县', '', '', '', '', 3, 1, ''), ('420323', '4203', '00,42,4203', '竹山县', '42', '湖北省', '4203', '十堰市', '420323', '竹山县', '', '', '', '', 3, 1, ''), ('420324', '4203', '00,42,4203', '竹溪县', '42', '湖北省', '4203', '十堰市', '420324', '竹溪县', '', '', '', '', 3, 1, ''), ('420325', '4203', '00,42,4203', '房县', '42', '湖北省', '4203', '十堰市', '420325', '房县', '', '', '', '', 3, 1, ''), ('420381', '4203', '00,42,4203', '丹江口市', '42', '湖北省', '4203', '十堰市', '420381', '丹江口市', '', '', '', '', 3, 1, ''), ('4205', '42', '00,42', '宜昌市', '42', '湖北省', '4205', '宜昌市', '', '', '', '', '', '', 2, 1, ''), ('420502', '4205', '00,42,4205', '西陵区', '42', '湖北省', '4205', '宜昌市', '420502', '西陵区', '', '', '', '', 3, 1, ''), ('420503', '4205', '00,42,4205', '伍家岗区', '42', '湖北省', '4205', '宜昌市', '420503', '伍家岗区', '', '', '', '', 3, 1, ''), ('420504', '4205', '00,42,4205', '点军区', '42', '湖北省', '4205', '宜昌市', '420504', '点军区', '', '', '', '', 3, 1, ''), ('420505', '4205', '00,42,4205', '猇亭区', '42', '湖北省', '4205', '宜昌市', '420505', '猇亭区', '', '', '', '', 3, 1, ''), ('420506', '4205', '00,42,4205', '夷陵区', '42', '湖北省', '4205', '宜昌市', '420506', '夷陵区', '', '', '', '', 3, 1, ''), ('420525', '4205', '00,42,4205', '远安县', '42', '湖北省', '4205', '宜昌市', '420525', '远安县', '', '', '', '', 3, 1, ''), ('420526', '4205', '00,42,4205', '兴山县', '42', '湖北省', '4205', '宜昌市', '420526', '兴山县', '', '', '', '', 3, 1, ''), ('420527', '4205', '00,42,4205', '秭归县', '42', '湖北省', '4205', '宜昌市', '420527', '秭归县', '', '', '', '', 3, 1, ''), ('420528', '4205', '00,42,4205', '长阳土家族自治县', '42', '湖北省', '4205', '宜昌市', '420528', '长阳土家族自治县', '', '', '', '', 3, 1, ''), ('420529', '4205', '00,42,4205', '五峰土家族自治县', '42', '湖北省', '4205', '宜昌市', '420529', '五峰土家族自治县', '', '', '', '', 3, 1, ''), ('420581', '4205', '00,42,4205', '宜都市', '42', '湖北省', '4205', '宜昌市', '420581', '宜都市', '', '', '', '', 3, 1, ''), ('420582', '4205', '00,42,4205', '当阳市', '42', '湖北省', '4205', '宜昌市', '420582', '当阳市', '', '', '', '', 3, 1, ''), ('420583', '4205', '00,42,4205', '枝江市', '42', '湖北省', '4205', '宜昌市', '420583', '枝江市', '', '', '', '', 3, 1, ''), ('4206', '42', '00,42', '襄阳市', '42', '湖北省', '4206', '襄阳市', '', '', '', '', '', '', 2, 1, ''), ('420602', '4206', '00,42,4206', '襄城区', '42', '湖北省', '4206', '襄阳市', '420602', '襄城区', '', '', '', '', 3, 1, ''), ('420606', '4206', '00,42,4206', '樊城区', '42', '湖北省', '4206', '襄阳市', '420606', '樊城区', '', '', '', '', 3, 1, ''), ('420607', '4206', '00,42,4206', '襄州区', '42', '湖北省', '4206', '襄阳市', '420607', '襄州区', '', '', '', '', 3, 1, ''), ('420624', '4206', '00,42,4206', '南漳县', '42', '湖北省', '4206', '襄阳市', '420624', '南漳县', '', '', '', '', 3, 1, ''), ('420625', '4206', '00,42,4206', '谷城县', '42', '湖北省', '4206', '襄阳市', '420625', '谷城县', '', '', '', '', 3, 1, ''), ('420626', '4206', '00,42,4206', '保康县', '42', '湖北省', '4206', '襄阳市', '420626', '保康县', '', '', '', '', 3, 1, ''), ('420682', '4206', '00,42,4206', '老河口市', '42', '湖北省', '4206', '襄阳市', '420682', '老河口市', '', '', '', '', 3, 1, ''), ('420683', '4206', '00,42,4206', '枣阳市', '42', '湖北省', '4206', '襄阳市', '420683', '枣阳市', '', '', '', '', 3, 1, ''), ('420684', '4206', '00,42,4206', '宜城市', '42', '湖北省', '4206', '襄阳市', '420684', '宜城市', '', '', '', '', 3, 1, ''), ('4207', '42', '00,42', '鄂州市', '42', '湖北省', '4207', '鄂州市', '', '', '', '', '', '', 2, 1, ''), ('420702', '4207', '00,42,4207', '梁子湖区', '42', '湖北省', '4207', '鄂州市', '420702', '梁子湖区', '', '', '', '', 3, 1, ''), ('420703', '4207', '00,42,4207', '华容区', '42', '湖北省', '4207', '鄂州市', '420703', '华容区', '', '', '', '', 3, 1, ''), ('420704', '4207', '00,42,4207', '鄂城区', '42', '湖北省', '4207', '鄂州市', '420704', '鄂城区', '', '', '', '', 3, 1, ''), ('4208', '42', '00,42', '荆门市', '42', '湖北省', '4208', '荆门市', '', '', '', '', '', '', 2, 1, ''), ('420802', '4208', '00,42,4208', '东宝区', '42', '湖北省', '4208', '荆门市', '420802', '东宝区', '', '', '', '', 3, 1, ''), ('420804', '4208', '00,42,4208', '掇刀区', '42', '湖北省', '4208', '荆门市', '420804', '掇刀区', '', '', '', '', 3, 1, ''), ('420822', '4208', '00,42,4208', '沙洋县', '42', '湖北省', '4208', '荆门市', '420822', '沙洋县', '', '', '', '', 3, 1, ''), ('420881', '4208', '00,42,4208', '钟祥市', '42', '湖北省', '4208', '荆门市', '420881', '钟祥市', '', '', '', '', 3, 1, ''), ('420882', '4208', '00,42,4208', '京山市', '42', '湖北省', '4208', '荆门市', '420882', '京山市', '', '', '', '', 3, 1, ''), ('4209', '42', '00,42', '孝感市', '42', '湖北省', '4209', '孝感市', '', '', '', '', '', '', 2, 1, ''), ('420902', '4209', '00,42,4209', '孝南区', '42', '湖北省', '4209', '孝感市', '420902', '孝南区', '', '', '', '', 3, 1, ''), ('420921', '4209', '00,42,4209', '孝昌县', '42', '湖北省', '4209', '孝感市', '420921', '孝昌县', '', '', '', '', 3, 1, ''), ('420922', '4209', '00,42,4209', '大悟县', '42', '湖北省', '4209', '孝感市', '420922', '大悟县', '', '', '', '', 3, 1, ''), ('420923', '4209', '00,42,4209', '云梦县', '42', '湖北省', '4209', '孝感市', '420923', '云梦县', '', '', '', '', 3, 1, ''), ('420981', '4209', '00,42,4209', '应城市', '42', '湖北省', '4209', '孝感市', '420981', '应城市', '', '', '', '', 3, 1, ''), ('420982', '4209', '00,42,4209', '安陆市', '42', '湖北省', '4209', '孝感市', '420982', '安陆市', '', '', '', '', 3, 1, ''), ('420984', '4209', '00,42,4209', '汉川市', '42', '湖北省', '4209', '孝感市', '420984', '汉川市', '', '', '', '', 3, 1, ''), ('4210', '42', '00,42', '荆州市', '42', '湖北省', '4210', '荆州市', '', '', '', '', '', '', 2, 1, ''), ('421002', '4210', '00,42,4210', '沙市区', '42', '湖北省', '4210', '荆州市', '421002', '沙市区', '', '', '', '', 3, 1, ''), ('421003', '4210', '00,42,4210', '荆州区', '42', '湖北省', '4210', '荆州市', '421003', '荆州区', '', '', '', '', 3, 1, ''), ('421022', '4210', '00,42,4210', '公安县', '42', '湖北省', '4210', '荆州市', '421022', '公安县', '', '', '', '', 3, 1, ''), ('421023', '4210', '00,42,4210', '监利县', '42', '湖北省', '4210', '荆州市', '421023', '监利县', '', '', '', '', 3, 1, ''), ('421024', '4210', '00,42,4210', '江陵县', '42', '湖北省', '4210', '荆州市', '421024', '江陵县', '', '', '', '', 3, 1, ''), ('421081', '4210', '00,42,4210', '石首市', '42', '湖北省', '4210', '荆州市', '421081', '石首市', '', '', '', '', 3, 1, ''), ('421083', '4210', '00,42,4210', '洪湖市', '42', '湖北省', '4210', '荆州市', '421083', '洪湖市', '', '', '', '', 3, 1, ''), ('421087', '4210', '00,42,4210', '松滋市', '42', '湖北省', '4210', '荆州市', '421087', '松滋市', '', '', '', '', 3, 1, ''), ('4211', '42', '00,42', '黄冈市', '42', '湖北省', '4211', '黄冈市', '', '', '', '', '', '', 2, 1, ''), ('421102', '4211', '00,42,4211', '黄州区', '42', '湖北省', '4211', '黄冈市', '421102', '黄州区', '', '', '', '', 3, 1, ''), ('421121', '4211', '00,42,4211', '团风县', '42', '湖北省', '4211', '黄冈市', '421121', '团风县', '', '', '', '', 3, 1, ''), ('421122', '4211', '00,42,4211', '红安县', '42', '湖北省', '4211', '黄冈市', '421122', '红安县', '', '', '', '', 3, 1, ''), ('421123', '4211', '00,42,4211', '罗田县', '42', '湖北省', '4211', '黄冈市', '421123', '罗田县', '', '', '', '', 3, 1, ''), ('421124', '4211', '00,42,4211', '英山县', '42', '湖北省', '4211', '黄冈市', '421124', '英山县', '', '', '', '', 3, 1, ''), ('421125', '4211', '00,42,4211', '浠水县', '42', '湖北省', '4211', '黄冈市', '421125', '浠水县', '', '', '', '', 3, 1, ''), ('421126', '4211', '00,42,4211', '蕲春县', '42', '湖北省', '4211', '黄冈市', '421126', '蕲春县', '', '', '', '', 3, 1, ''), ('421127', '4211', '00,42,4211', '黄梅县', '42', '湖北省', '4211', '黄冈市', '421127', '黄梅县', '', '', '', '', 3, 1, ''), ('421181', '4211', '00,42,4211', '麻城市', '42', '湖北省', '4211', '黄冈市', '421181', '麻城市', '', '', '', '', 3, 1, ''), ('421182', '4211', '00,42,4211', '武穴市', '42', '湖北省', '4211', '黄冈市', '421182', '武穴市', '', '', '', '', 3, 1, ''), ('4212', '42', '00,42', '咸宁市', '42', '湖北省', '4212', '咸宁市', '', '', '', '', '', '', 2, 1, ''), ('421202', '4212', '00,42,4212', '咸安区', '42', '湖北省', '4212', '咸宁市', '421202', '咸安区', '', '', '', '', 3, 1, ''), ('421221', '4212', '00,42,4212', '嘉鱼县', '42', '湖北省', '4212', '咸宁市', '421221', '嘉鱼县', '', '', '', '', 3, 1, ''), ('421222', '4212', '00,42,4212', '通城县', '42', '湖北省', '4212', '咸宁市', '421222', '通城县', '', '', '', '', 3, 1, ''), ('421223', '4212', '00,42,4212', '崇阳县', '42', '湖北省', '4212', '咸宁市', '421223', '崇阳县', '', '', '', '', 3, 1, ''), ('421224', '4212', '00,42,4212', '通山县', '42', '湖北省', '4212', '咸宁市', '421224', '通山县', '', '', '', '', 3, 1, ''), ('421281', '4212', '00,42,4212', '赤壁市', '42', '湖北省', '4212', '咸宁市', '421281', '赤壁市', '', '', '', '', 3, 1, ''), ('4213', '42', '00,42', '随州市', '42', '湖北省', '4213', '随州市', '', '', '', '', '', '', 2, 1, ''), ('421303', '4213', '00,42,4213', '曾都区', '42', '湖北省', '4213', '随州市', '421303', '曾都区', '', '', '', '', 3, 1, ''), ('421321', '4213', '00,42,4213', '随县', '42', '湖北省', '4213', '随州市', '421321', '随县', '', '', '', '', 3, 1, ''), ('421381', '4213', '00,42,4213', '广水市', '42', '湖北省', '4213', '随州市', '421381', '广水市', '', '', '', '', 3, 1, ''), ('4228', '42', '00,42', '恩施土家族苗族自治州', '42', '湖北省', '4228', '恩施土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('422801', '4228', '00,42,4228', '恩施市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422801', '恩施市', '', '', '', '', 3, 1, ''), ('422802', '4228', '00,42,4228', '利川市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422802', '利川市', '', '', '', '', 3, 1, ''), ('422822', '4228', '00,42,4228', '建始县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422822', '建始县', '', '', '', '', 3, 1, ''), ('422823', '4228', '00,42,4228', '巴东县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422823', '巴东县', '', '', '', '', 3, 1, ''), ('422825', '4228', '00,42,4228', '宣恩县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422825', '宣恩县', '', '', '', '', 3, 1, ''), ('422826', '4228', '00,42,4228', '咸丰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422826', '咸丰县', '', '', '', '', 3, 1, ''), ('422827', '4228', '00,42,4228', '来凤县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422827', '来凤县', '', '', '', '', 3, 1, ''), ('422828', '4228', '00,42,4228', '鹤峰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422828', '鹤峰县', '', '', '', '', 3, 1, ''), ('4290', '42', '00,42', '省直辖县级行政区', '42', '湖北省', '4290', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('429004', '4290', '00,42,4290', '仙桃市', '42', '湖北省', '4290', '省直辖县级行政区', '429004', '仙桃市', '', '', '', '', 3, 1, ''), ('429005', '4290', '00,42,4290', '潜江市', '42', '湖北省', '4290', '省直辖县级行政区', '429005', '潜江市', '', '', '', '', 3, 1, ''), ('429006', '4290', '00,42,4290', '天门市', '42', '湖北省', '4290', '省直辖县级行政区', '429006', '天门市', '', '', '', '', 3, 1, ''), ('429021', '4290', '00,42,4290', '神农架林区', '42', '湖北省', '4290', '省直辖县级行政区', '429021', '神农架林区', '', '', '', '', 3, 1, ''), ('43', '00', '00', '湖南省', '43', '湖南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4301', '43', '00,43', '长沙市', '43', '湖南省', '4301', '长沙市', '', '', '', '', '', '', 2, 1, ''), ('430102', '4301', '00,43,4301', '芙蓉区', '43', '湖南省', '4301', '长沙市', '430102', '芙蓉区', '', '', '', '', 3, 1, ''), ('430103', '4301', '00,43,4301', '天心区', '43', '湖南省', '4301', '长沙市', '430103', '天心区', '', '', '', '', 3, 1, ''), ('430104', '4301', '00,43,4301', '岳麓区', '43', '湖南省', '4301', '长沙市', '430104', '岳麓区', '', '', '', '', 3, 1, ''), ('430105', '4301', '00,43,4301', '开福区', '43', '湖南省', '4301', '长沙市', '430105', '开福区', '', '', '', '', 3, 1, ''), ('430111', '4301', '00,43,4301', '雨花区', '43', '湖南省', '4301', '长沙市', '430111', '雨花区', '', '', '', '', 3, 1, ''), ('430112', '4301', '00,43,4301', '望城区', '43', '湖南省', '4301', '长沙市', '430112', '望城区', '', '', '', '', 3, 1, ''), ('430121', '4301', '00,43,4301', '长沙县', '43', '湖南省', '4301', '长沙市', '430121', '长沙县', '', '', '', '', 3, 1, ''), ('430181', '4301', '00,43,4301', '浏阳市', '43', '湖南省', '4301', '长沙市', '430181', '浏阳市', '', '', '', '', 3, 1, ''), ('430182', '4301', '00,43,4301', '宁乡市', '43', '湖南省', '4301', '长沙市', '430182', '宁乡市', '', '', '', '', 3, 1, ''), ('4302', '43', '00,43', '株洲市', '43', '湖南省', '4302', '株洲市', '', '', '', '', '', '', 2, 1, ''), ('430202', '4302', '00,43,4302', '荷塘区', '43', '湖南省', '4302', '株洲市', '430202', '荷塘区', '', '', '', '', 3, 1, ''), ('430203', '4302', '00,43,4302', '芦淞区', '43', '湖南省', '4302', '株洲市', '430203', '芦淞区', '', '', '', '', 3, 1, ''), ('430204', '4302', '00,43,4302', '石峰区', '43', '湖南省', '4302', '株洲市', '430204', '石峰区', '', '', '', '', 3, 1, ''), ('430211', '4302', '00,43,4302', '天元区', '43', '湖南省', '4302', '株洲市', '430211', '天元区', '', '', '', '', 3, 1, ''), ('430212', '4302', '00,43,4302', '渌口区', '43', '湖南省', '4302', '株洲市', '430212', '渌口区', '', '', '', '', 3, 1, ''), ('430223', '4302', '00,43,4302', '攸县', '43', '湖南省', '4302', '株洲市', '430223', '攸县', '', '', '', '', 3, 1, ''), ('430224', '4302', '00,43,4302', '茶陵县', '43', '湖南省', '4302', '株洲市', '430224', '茶陵县', '', '', '', '', 3, 1, ''), ('430225', '4302', '00,43,4302', '炎陵县', '43', '湖南省', '4302', '株洲市', '430225', '炎陵县', '', '', '', '', 3, 1, ''), ('430281', '4302', '00,43,4302', '醴陵市', '43', '湖南省', '4302', '株洲市', '430281', '醴陵市', '', '', '', '', 3, 1, ''), ('4303', '43', '00,43', '湘潭市', '43', '湖南省', '4303', '湘潭市', '', '', '', '', '', '', 2, 1, ''), ('430302', '4303', '00,43,4303', '雨湖区', '43', '湖南省', '4303', '湘潭市', '430302', '雨湖区', '', '', '', '', 3, 1, ''), ('430304', '4303', '00,43,4303', '岳塘区', '43', '湖南省', '4303', '湘潭市', '430304', '岳塘区', '', '', '', '', 3, 1, ''), ('430321', '4303', '00,43,4303', '湘潭县', '43', '湖南省', '4303', '湘潭市', '430321', '湘潭县', '', '', '', '', 3, 1, ''), ('430381', '4303', '00,43,4303', '湘乡市', '43', '湖南省', '4303', '湘潭市', '430381', '湘乡市', '', '', '', '', 3, 1, ''), ('430382', '4303', '00,43,4303', '韶山市', '43', '湖南省', '4303', '湘潭市', '430382', '韶山市', '', '', '', '', 3, 1, ''), ('4304', '43', '00,43', '衡阳市', '43', '湖南省', '4304', '衡阳市', '', '', '', '', '', '', 2, 1, ''), ('430405', '4304', '00,43,4304', '珠晖区', '43', '湖南省', '4304', '衡阳市', '430405', '珠晖区', '', '', '', '', 3, 1, ''), ('430406', '4304', '00,43,4304', '雁峰区', '43', '湖南省', '4304', '衡阳市', '430406', '雁峰区', '', '', '', '', 3, 1, ''), ('430407', '4304', '00,43,4304', '石鼓区', '43', '湖南省', '4304', '衡阳市', '430407', '石鼓区', '', '', '', '', 3, 1, ''), ('430408', '4304', '00,43,4304', '蒸湘区', '43', '湖南省', '4304', '衡阳市', '430408', '蒸湘区', '', '', '', '', 3, 1, ''), ('430412', '4304', '00,43,4304', '南岳区', '43', '湖南省', '4304', '衡阳市', '430412', '南岳区', '', '', '', '', 3, 1, ''), ('430421', '4304', '00,43,4304', '衡阳县', '43', '湖南省', '4304', '衡阳市', '430421', '衡阳县', '', '', '', '', 3, 1, ''), ('430422', '4304', '00,43,4304', '衡南县', '43', '湖南省', '4304', '衡阳市', '430422', '衡南县', '', '', '', '', 3, 1, ''), ('430423', '4304', '00,43,4304', '衡山县', '43', '湖南省', '4304', '衡阳市', '430423', '衡山县', '', '', '', '', 3, 1, ''), ('430424', '4304', '00,43,4304', '衡东县', '43', '湖南省', '4304', '衡阳市', '430424', '衡东县', '', '', '', '', 3, 1, ''), ('430426', '4304', '00,43,4304', '祁东县', '43', '湖南省', '4304', '衡阳市', '430426', '祁东县', '', '', '', '', 3, 1, ''), ('430481', '4304', '00,43,4304', '耒阳市', '43', '湖南省', '4304', '衡阳市', '430481', '耒阳市', '', '', '', '', 3, 1, ''), ('430482', '4304', '00,43,4304', '常宁市', '43', '湖南省', '4304', '衡阳市', '430482', '常宁市', '', '', '', '', 3, 1, ''), ('4305', '43', '00,43', '邵阳市', '43', '湖南省', '4305', '邵阳市', '', '', '', '', '', '', 2, 1, ''), ('430502', '4305', '00,43,4305', '双清区', '43', '湖南省', '4305', '邵阳市', '430502', '双清区', '', '', '', '', 3, 1, ''), ('430503', '4305', '00,43,4305', '大祥区', '43', '湖南省', '4305', '邵阳市', '430503', '大祥区', '', '', '', '', 3, 1, ''), ('430511', '4305', '00,43,4305', '北塔区', '43', '湖南省', '4305', '邵阳市', '430511', '北塔区', '', '', '', '', 3, 1, ''), ('430522', '4305', '00,43,4305', '新邵县', '43', '湖南省', '4305', '邵阳市', '430522', '新邵县', '', '', '', '', 3, 1, ''), ('430523', '4305', '00,43,4305', '邵阳县', '43', '湖南省', '4305', '邵阳市', '430523', '邵阳县', '', '', '', '', 3, 1, ''), ('430524', '4305', '00,43,4305', '隆回县', '43', '湖南省', '4305', '邵阳市', '430524', '隆回县', '', '', '', '', 3, 1, ''), ('430525', '4305', '00,43,4305', '洞口县', '43', '湖南省', '4305', '邵阳市', '430525', '洞口县', '', '', '', '', 3, 1, ''), ('430527', '4305', '00,43,4305', '绥宁县', '43', '湖南省', '4305', '邵阳市', '430527', '绥宁县', '', '', '', '', 3, 1, ''), ('430528', '4305', '00,43,4305', '新宁县', '43', '湖南省', '4305', '邵阳市', '430528', '新宁县', '', '', '', '', 3, 1, ''), ('430529', '4305', '00,43,4305', '城步苗族自治县', '43', '湖南省', '4305', '邵阳市', '430529', '城步苗族自治县', '', '', '', '', 3, 1, ''), ('430581', '4305', '00,43,4305', '武冈市', '43', '湖南省', '4305', '邵阳市', '430581', '武冈市', '', '', '', '', 3, 1, ''), ('430582', '4305', '00,43,4305', '邵东市', '43', '湖南省', '4305', '邵阳市', '430582', '邵东市', '', '', '', '', 3, 1, ''), ('4306', '43', '00,43', '岳阳市', '43', '湖南省', '4306', '岳阳市', '', '', '', '', '', '', 2, 1, ''), ('430602', '4306', '00,43,4306', '岳阳楼区', '43', '湖南省', '4306', '岳阳市', '430602', '岳阳楼区', '', '', '', '', 3, 1, ''), ('430603', '4306', '00,43,4306', '云溪区', '43', '湖南省', '4306', '岳阳市', '430603', '云溪区', '', '', '', '', 3, 1, ''), ('430611', '4306', '00,43,4306', '君山区', '43', '湖南省', '4306', '岳阳市', '430611', '君山区', '', '', '', '', 3, 1, ''), ('430621', '4306', '00,43,4306', '岳阳县', '43', '湖南省', '4306', '岳阳市', '430621', '岳阳县', '', '', '', '', 3, 1, ''), ('430623', '4306', '00,43,4306', '华容县', '43', '湖南省', '4306', '岳阳市', '430623', '华容县', '', '', '', '', 3, 1, ''), ('430624', '4306', '00,43,4306', '湘阴县', '43', '湖南省', '4306', '岳阳市', '430624', '湘阴县', '', '', '', '', 3, 1, ''), ('430626', '4306', '00,43,4306', '平江县', '43', '湖南省', '4306', '岳阳市', '430626', '平江县', '', '', '', '', 3, 1, ''), ('430681', '4306', '00,43,4306', '汨罗市', '43', '湖南省', '4306', '岳阳市', '430681', '汨罗市', '', '', '', '', 3, 1, ''), ('430682', '4306', '00,43,4306', '临湘市', '43', '湖南省', '4306', '岳阳市', '430682', '临湘市', '', '', '', '', 3, 1, ''), ('4307', '43', '00,43', '常德市', '43', '湖南省', '4307', '常德市', '', '', '', '', '', '', 2, 1, ''), ('430702', '4307', '00,43,4307', '武陵区', '43', '湖南省', '4307', '常德市', '430702', '武陵区', '', '', '', '', 3, 1, ''), ('430703', '4307', '00,43,4307', '鼎城区', '43', '湖南省', '4307', '常德市', '430703', '鼎城区', '', '', '', '', 3, 1, ''), ('430721', '4307', '00,43,4307', '安乡县', '43', '湖南省', '4307', '常德市', '430721', '安乡县', '', '', '', '', 3, 1, ''), ('430722', '4307', '00,43,4307', '汉寿县', '43', '湖南省', '4307', '常德市', '430722', '汉寿县', '', '', '', '', 3, 1, ''), ('430723', '4307', '00,43,4307', '澧县', '43', '湖南省', '4307', '常德市', '430723', '澧县', '', '', '', '', 3, 1, ''), ('430724', '4307', '00,43,4307', '临澧县', '43', '湖南省', '4307', '常德市', '430724', '临澧县', '', '', '', '', 3, 1, ''), ('430725', '4307', '00,43,4307', '桃源县', '43', '湖南省', '4307', '常德市', '430725', '桃源县', '', '', '', '', 3, 1, ''), ('430726', '4307', '00,43,4307', '石门县', '43', '湖南省', '4307', '常德市', '430726', '石门县', '', '', '', '', 3, 1, ''), ('430781', '4307', '00,43,4307', '津市市', '43', '湖南省', '4307', '常德市', '430781', '津市市', '', '', '', '', 3, 1, ''), ('4308', '43', '00,43', '张家界市', '43', '湖南省', '4308', '张家界市', '', '', '', '', '', '', 2, 1, ''), ('430802', '4308', '00,43,4308', '永定区', '43', '湖南省', '4308', '张家界市', '430802', '永定区', '', '', '', '', 3, 1, ''), ('430811', '4308', '00,43,4308', '武陵源区', '43', '湖南省', '4308', '张家界市', '430811', '武陵源区', '', '', '', '', 3, 1, ''), ('430821', '4308', '00,43,4308', '慈利县', '43', '湖南省', '4308', '张家界市', '430821', '慈利县', '', '', '', '', 3, 1, ''), ('430822', '4308', '00,43,4308', '桑植县', '43', '湖南省', '4308', '张家界市', '430822', '桑植县', '', '', '', '', 3, 1, ''), ('4309', '43', '00,43', '益阳市', '43', '湖南省', '4309', '益阳市', '', '', '', '', '', '', 2, 1, ''), ('430902', '4309', '00,43,4309', '资阳区', '43', '湖南省', '4309', '益阳市', '430902', '资阳区', '', '', '', '', 3, 1, ''), ('430903', '4309', '00,43,4309', '赫山区', '43', '湖南省', '4309', '益阳市', '430903', '赫山区', '', '', '', '', 3, 1, ''), ('430921', '4309', '00,43,4309', '南县', '43', '湖南省', '4309', '益阳市', '430921', '南县', '', '', '', '', 3, 1, ''), ('430922', '4309', '00,43,4309', '桃江县', '43', '湖南省', '4309', '益阳市', '430922', '桃江县', '', '', '', '', 3, 1, ''), ('430923', '4309', '00,43,4309', '安化县', '43', '湖南省', '4309', '益阳市', '430923', '安化县', '', '', '', '', 3, 1, ''), ('430981', '4309', '00,43,4309', '沅江市', '43', '湖南省', '4309', '益阳市', '430981', '沅江市', '', '', '', '', 3, 1, ''), ('4310', '43', '00,43', '郴州市', '43', '湖南省', '4310', '郴州市', '', '', '', '', '', '', 2, 1, ''), ('431002', '4310', '00,43,4310', '北湖区', '43', '湖南省', '4310', '郴州市', '431002', '北湖区', '', '', '', '', 3, 1, ''), ('431003', '4310', '00,43,4310', '苏仙区', '43', '湖南省', '4310', '郴州市', '431003', '苏仙区', '', '', '', '', 3, 1, ''), ('431021', '4310', '00,43,4310', '桂阳县', '43', '湖南省', '4310', '郴州市', '431021', '桂阳县', '', '', '', '', 3, 1, ''), ('431022', '4310', '00,43,4310', '宜章县', '43', '湖南省', '4310', '郴州市', '431022', '宜章县', '', '', '', '', 3, 1, ''), ('431023', '4310', '00,43,4310', '永兴县', '43', '湖南省', '4310', '郴州市', '431023', '永兴县', '', '', '', '', 3, 1, ''), ('431024', '4310', '00,43,4310', '嘉禾县', '43', '湖南省', '4310', '郴州市', '431024', '嘉禾县', '', '', '', '', 3, 1, ''), ('431025', '4310', '00,43,4310', '临武县', '43', '湖南省', '4310', '郴州市', '431025', '临武县', '', '', '', '', 3, 1, ''), ('431026', '4310', '00,43,4310', '汝城县', '43', '湖南省', '4310', '郴州市', '431026', '汝城县', '', '', '', '', 3, 1, ''), ('431027', '4310', '00,43,4310', '桂东县', '43', '湖南省', '4310', '郴州市', '431027', '桂东县', '', '', '', '', 3, 1, ''), ('431028', '4310', '00,43,4310', '安仁县', '43', '湖南省', '4310', '郴州市', '431028', '安仁县', '', '', '', '', 3, 1, ''), ('431081', '4310', '00,43,4310', '资兴市', '43', '湖南省', '4310', '郴州市', '431081', '资兴市', '', '', '', '', 3, 1, ''), ('4311', '43', '00,43', '永州市', '43', '湖南省', '4311', '永州市', '', '', '', '', '', '', 2, 1, ''), ('431102', '4311', '00,43,4311', '零陵区', '43', '湖南省', '4311', '永州市', '431102', '零陵区', '', '', '', '', 3, 1, ''), ('431103', '4311', '00,43,4311', '冷水滩区', '43', '湖南省', '4311', '永州市', '431103', '冷水滩区', '', '', '', '', 3, 1, ''), ('431121', '4311', '00,43,4311', '祁阳县', '43', '湖南省', '4311', '永州市', '431121', '祁阳县', '', '', '', '', 3, 1, ''), ('431122', '4311', '00,43,4311', '东安县', '43', '湖南省', '4311', '永州市', '431122', '东安县', '', '', '', '', 3, 1, ''), ('431123', '4311', '00,43,4311', '双牌县', '43', '湖南省', '4311', '永州市', '431123', '双牌县', '', '', '', '', 3, 1, ''), ('431124', '4311', '00,43,4311', '道县', '43', '湖南省', '4311', '永州市', '431124', '道县', '', '', '', '', 3, 1, ''), ('431125', '4311', '00,43,4311', '江永县', '43', '湖南省', '4311', '永州市', '431125', '江永县', '', '', '', '', 3, 1, ''), ('431126', '4311', '00,43,4311', '宁远县', '43', '湖南省', '4311', '永州市', '431126', '宁远县', '', '', '', '', 3, 1, ''), ('431127', '4311', '00,43,4311', '蓝山县', '43', '湖南省', '4311', '永州市', '431127', '蓝山县', '', '', '', '', 3, 1, ''), ('431128', '4311', '00,43,4311', '新田县', '43', '湖南省', '4311', '永州市', '431128', '新田县', '', '', '', '', 3, 1, ''), ('431129', '4311', '00,43,4311', '江华瑶族自治县', '43', '湖南省', '4311', '永州市', '431129', '江华瑶族自治县', '', '', '', '', 3, 1, ''), ('4312', '43', '00,43', '怀化市', '43', '湖南省', '4312', '怀化市', '', '', '', '', '', '', 2, 1, ''), ('431202', '4312', '00,43,4312', '鹤城区', '43', '湖南省', '4312', '怀化市', '431202', '鹤城区', '', '', '', '', 3, 1, ''), ('431221', '4312', '00,43,4312', '中方县', '43', '湖南省', '4312', '怀化市', '431221', '中方县', '', '', '', '', 3, 1, ''), ('431222', '4312', '00,43,4312', '沅陵县', '43', '湖南省', '4312', '怀化市', '431222', '沅陵县', '', '', '', '', 3, 1, ''), ('431223', '4312', '00,43,4312', '辰溪县', '43', '湖南省', '4312', '怀化市', '431223', '辰溪县', '', '', '', '', 3, 1, ''), ('431224', '4312', '00,43,4312', '溆浦县', '43', '湖南省', '4312', '怀化市', '431224', '溆浦县', '', '', '', '', 3, 1, ''), ('431225', '4312', '00,43,4312', '会同县', '43', '湖南省', '4312', '怀化市', '431225', '会同县', '', '', '', '', 3, 1, ''), ('431226', '4312', '00,43,4312', '麻阳苗族自治县', '43', '湖南省', '4312', '怀化市', '431226', '麻阳苗族自治县', '', '', '', '', 3, 1, ''), ('431227', '4312', '00,43,4312', '新晃侗族自治县', '43', '湖南省', '4312', '怀化市', '431227', '新晃侗族自治县', '', '', '', '', 3, 1, ''), ('431228', '4312', '00,43,4312', '芷江侗族自治县', '43', '湖南省', '4312', '怀化市', '431228', '芷江侗族自治县', '', '', '', '', 3, 1, ''), ('431229', '4312', '00,43,4312', '靖州苗族侗族自治县', '43', '湖南省', '4312', '怀化市', '431229', '靖州苗族侗族自治县', '', '', '', '', 3, 1, ''), ('431230', '4312', '00,43,4312', '通道侗族自治县', '43', '湖南省', '4312', '怀化市', '431230', '通道侗族自治县', '', '', '', '', 3, 1, ''), ('431281', '4312', '00,43,4312', '洪江市', '43', '湖南省', '4312', '怀化市', '431281', '洪江市', '', '', '', '', 3, 1, ''), ('4313', '43', '00,43', '娄底市', '43', '湖南省', '4313', '娄底市', '', '', '', '', '', '', 2, 1, ''), ('431302', '4313', '00,43,4313', '娄星区', '43', '湖南省', '4313', '娄底市', '431302', '娄星区', '', '', '', '', 3, 1, ''), ('431321', '4313', '00,43,4313', '双峰县', '43', '湖南省', '4313', '娄底市', '431321', '双峰县', '', '', '', '', 3, 1, ''), ('431322', '4313', '00,43,4313', '新化县', '43', '湖南省', '4313', '娄底市', '431322', '新化县', '', '', '', '', 3, 1, ''), ('431381', '4313', '00,43,4313', '冷水江市', '43', '湖南省', '4313', '娄底市', '431381', '冷水江市', '', '', '', '', 3, 1, ''), ('431382', '4313', '00,43,4313', '涟源市', '43', '湖南省', '4313', '娄底市', '431382', '涟源市', '', '', '', '', 3, 1, ''), ('4331', '43', '00,43', '湘西土家族苗族自治州', '43', '湖南省', '4331', '湘西土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('433101', '4331', '00,43,4331', '吉首市', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433101', '吉首市', '', '', '', '', 3, 1, ''), ('433122', '4331', '00,43,4331', '泸溪县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433122', '泸溪县', '', '', '', '', 3, 1, ''), ('433123', '4331', '00,43,4331', '凤凰县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433123', '凤凰县', '', '', '', '', 3, 1, ''), ('433124', '4331', '00,43,4331', '花垣县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433124', '花垣县', '', '', '', '', 3, 1, ''), ('433125', '4331', '00,43,4331', '保靖县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433125', '保靖县', '', '', '', '', 3, 1, ''), ('433126', '4331', '00,43,4331', '古丈县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433126', '古丈县', '', '', '', '', 3, 1, ''), ('433127', '4331', '00,43,4331', '永顺县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433127', '永顺县', '', '', '', '', 3, 1, ''), ('433130', '4331', '00,43,4331', '龙山县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433130', '龙山县', '', '', '', '', 3, 1, ''), ('44', '00', '00', '广东省', '44', '广东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4401', '44', '00,44', '广州市', '44', '广东省', '4401', '广州市', '', '', '', '', '', '', 2, 1, ''), ('440103', '4401', '00,44,4401', '荔湾区', '44', '广东省', '4401', '广州市', '440103', '荔湾区', '', '', '', '', 3, 1, ''), ('440104', '4401', '00,44,4401', '越秀区', '44', '广东省', '4401', '广州市', '440104', '越秀区', '', '', '', '', 3, 1, ''), ('440105', '4401', '00,44,4401', '海珠区', '44', '广东省', '4401', '广州市', '440105', '海珠区', '', '', '', '', 3, 1, ''), ('440106', '4401', '00,44,4401', '天河区', '44', '广东省', '4401', '广州市', '440106', '天河区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('440111', '4401', '00,44,4401', '白云区', '44', '广东省', '4401', '广州市', '440111', '白云区', '', '', '', '', 3, 1, ''), ('440112', '4401', '00,44,4401', '黄埔区', '44', '广东省', '4401', '广州市', '440112', '黄埔区', '', '', '', '', 3, 1, ''), ('440113', '4401', '00,44,4401', '番禺区', '44', '广东省', '4401', '广州市', '440113', '番禺区', '', '', '', '', 3, 1, ''), ('440114', '4401', '00,44,4401', '花都区', '44', '广东省', '4401', '广州市', '440114', '花都区', '', '', '', '', 3, 1, ''), ('440115', '4401', '00,44,4401', '南沙区', '44', '广东省', '4401', '广州市', '440115', '南沙区', '', '', '', '', 3, 1, ''), ('440117', '4401', '00,44,4401', '从化区', '44', '广东省', '4401', '广州市', '440117', '从化区', '', '', '', '', 3, 1, ''), ('440118', '4401', '00,44,4401', '增城区', '44', '广东省', '4401', '广州市', '440118', '增城区', '', '', '', '', 3, 1, ''), ('4402', '44', '00,44', '韶关市', '44', '广东省', '4402', '韶关市', '', '', '', '', '', '', 2, 1, ''), ('440203', '4402', '00,44,4402', '武江区', '44', '广东省', '4402', '韶关市', '440203', '武江区', '', '', '', '', 3, 1, ''), ('440204', '4402', '00,44,4402', '浈江区', '44', '广东省', '4402', '韶关市', '440204', '浈江区', '', '', '', '', 3, 1, ''), ('440205', '4402', '00,44,4402', '曲江区', '44', '广东省', '4402', '韶关市', '440205', '曲江区', '', '', '', '', 3, 1, ''), ('440222', '4402', '00,44,4402', '始兴县', '44', '广东省', '4402', '韶关市', '440222', '始兴县', '', '', '', '', 3, 1, ''), ('440224', '4402', '00,44,4402', '仁化县', '44', '广东省', '4402', '韶关市', '440224', '仁化县', '', '', '', '', 3, 1, ''), ('440229', '4402', '00,44,4402', '翁源县', '44', '广东省', '4402', '韶关市', '440229', '翁源县', '', '', '', '', 3, 1, ''), ('440232', '4402', '00,44,4402', '乳源瑶族自治县', '44', '广东省', '4402', '韶关市', '440232', '乳源瑶族自治县', '', '', '', '', 3, 1, ''), ('440233', '4402', '00,44,4402', '新丰县', '44', '广东省', '4402', '韶关市', '440233', '新丰县', '', '', '', '', 3, 1, ''), ('440281', '4402', '00,44,4402', '乐昌市', '44', '广东省', '4402', '韶关市', '440281', '乐昌市', '', '', '', '', 3, 1, ''), ('440282', '4402', '00,44,4402', '南雄市', '44', '广东省', '4402', '韶关市', '440282', '南雄市', '', '', '', '', 3, 1, ''), ('4403', '44', '00,44', '深圳市', '44', '广东省', '4403', '深圳市', '', '', '', '', '', '', 2, 1, ''), ('440303', '4403', '00,44,4403', '罗湖区', '44', '广东省', '4403', '深圳市', '440303', '罗湖区', '', '', '', '', 3, 1, ''), ('440304', '4403', '00,44,4403', '福田区', '44', '广东省', '4403', '深圳市', '440304', '福田区', '', '', '', '', 3, 1, ''), ('440305', '4403', '00,44,4403', '南山区', '44', '广东省', '4403', '深圳市', '440305', '南山区', '', '', '', '', 3, 1, ''), ('440306', '4403', '00,44,4403', '宝安区', '44', '广东省', '4403', '深圳市', '440306', '宝安区', '', '', '', '', 3, 1, ''), ('440307', '4403', '00,44,4403', '龙岗区', '44', '广东省', '4403', '深圳市', '440307', '龙岗区', '', '', '', '', 3, 1, ''), ('440308', '4403', '00,44,4403', '盐田区', '44', '广东省', '4403', '深圳市', '440308', '盐田区', '', '', '', '', 3, 1, ''), ('440309', '4403', '00,44,4403', '龙华区', '44', '广东省', '4403', '深圳市', '440309', '龙华区', '', '', '', '', 3, 1, ''), ('440310', '4403', '00,44,4403', '坪山区', '44', '广东省', '4403', '深圳市', '440310', '坪山区', '', '', '', '', 3, 1, ''), ('440311', '4403', '00,44,4403', '光明区', '44', '广东省', '4403', '深圳市', '440311', '光明区', '', '', '', '', 3, 1, ''), ('4404', '44', '00,44', '珠海市', '44', '广东省', '4404', '珠海市', '', '', '', '', '', '', 2, 1, ''), ('440402', '4404', '00,44,4404', '香洲区', '44', '广东省', '4404', '珠海市', '440402', '香洲区', '', '', '', '', 3, 1, ''), ('440403', '4404', '00,44,4404', '斗门区', '44', '广东省', '4404', '珠海市', '440403', '斗门区', '', '', '', '', 3, 1, ''), ('440404', '4404', '00,44,4404', '金湾区', '44', '广东省', '4404', '珠海市', '440404', '金湾区', '', '', '', '', 3, 1, ''), ('4405', '44', '00,44', '汕头市', '44', '广东省', '4405', '汕头市', '', '', '', '', '', '', 2, 1, ''), ('440507', '4405', '00,44,4405', '龙湖区', '44', '广东省', '4405', '汕头市', '440507', '龙湖区', '', '', '', '', 3, 1, ''), ('440511', '4405', '00,44,4405', '金平区', '44', '广东省', '4405', '汕头市', '440511', '金平区', '', '', '', '', 3, 1, ''), ('440512', '4405', '00,44,4405', '濠江区', '44', '广东省', '4405', '汕头市', '440512', '濠江区', '', '', '', '', 3, 1, ''), ('440513', '4405', '00,44,4405', '潮阳区', '44', '广东省', '4405', '汕头市', '440513', '潮阳区', '', '', '', '', 3, 1, ''), ('440514', '4405', '00,44,4405', '潮南区', '44', '广东省', '4405', '汕头市', '440514', '潮南区', '', '', '', '', 3, 1, ''), ('440515', '4405', '00,44,4405', '澄海区', '44', '广东省', '4405', '汕头市', '440515', '澄海区', '', '', '', '', 3, 1, ''), ('440523', '4405', '00,44,4405', '南澳县', '44', '广东省', '4405', '汕头市', '440523', '南澳县', '', '', '', '', 3, 1, ''), ('4406', '44', '00,44', '佛山市', '44', '广东省', '4406', '佛山市', '', '', '', '', '', '', 2, 1, ''), ('440604', '4406', '00,44,4406', '禅城区', '44', '广东省', '4406', '佛山市', '440604', '禅城区', '', '', '', '', 3, 1, ''), ('440605', '4406', '00,44,4406', '南海区', '44', '广东省', '4406', '佛山市', '440605', '南海区', '', '', '', '', 3, 1, ''), ('440606', '4406', '00,44,4406', '顺德区', '44', '广东省', '4406', '佛山市', '440606', '顺德区', '', '', '', '', 3, 1, ''), ('440607', '4406', '00,44,4406', '三水区', '44', '广东省', '4406', '佛山市', '440607', '三水区', '', '', '', '', 3, 1, ''), ('440608', '4406', '00,44,4406', '高明区', '44', '广东省', '4406', '佛山市', '440608', '高明区', '', '', '', '', 3, 1, ''), ('4407', '44', '00,44', '江门市', '44', '广东省', '4407', '江门市', '', '', '', '', '', '', 2, 1, ''), ('440703', '4407', '00,44,4407', '蓬江区', '44', '广东省', '4407', '江门市', '440703', '蓬江区', '', '', '', '', 3, 1, ''), ('440704', '4407', '00,44,4407', '江海区', '44', '广东省', '4407', '江门市', '440704', '江海区', '', '', '', '', 3, 1, ''), ('440705', '4407', '00,44,4407', '新会区', '44', '广东省', '4407', '江门市', '440705', '新会区', '', '', '', '', 3, 1, ''), ('440781', '4407', '00,44,4407', '台山市', '44', '广东省', '4407', '江门市', '440781', '台山市', '', '', '', '', 3, 1, ''), ('440783', '4407', '00,44,4407', '开平市', '44', '广东省', '4407', '江门市', '440783', '开平市', '', '', '', '', 3, 1, ''), ('440784', '4407', '00,44,4407', '鹤山市', '44', '广东省', '4407', '江门市', '440784', '鹤山市', '', '', '', '', 3, 1, ''), ('440785', '4407', '00,44,4407', '恩平市', '44', '广东省', '4407', '江门市', '440785', '恩平市', '', '', '', '', 3, 1, ''), ('4408', '44', '00,44', '湛江市', '44', '广东省', '4408', '湛江市', '', '', '', '', '', '', 2, 1, ''), ('440802', '4408', '00,44,4408', '赤坎区', '44', '广东省', '4408', '湛江市', '440802', '赤坎区', '', '', '', '', 3, 1, ''), ('440803', '4408', '00,44,4408', '霞山区', '44', '广东省', '4408', '湛江市', '440803', '霞山区', '', '', '', '', 3, 1, ''), ('440804', '4408', '00,44,4408', '坡头区', '44', '广东省', '4408', '湛江市', '440804', '坡头区', '', '', '', '', 3, 1, ''), ('440811', '4408', '00,44,4408', '麻章区', '44', '广东省', '4408', '湛江市', '440811', '麻章区', '', '', '', '', 3, 1, ''), ('440823', '4408', '00,44,4408', '遂溪县', '44', '广东省', '4408', '湛江市', '440823', '遂溪县', '', '', '', '', 3, 1, ''), ('440825', '4408', '00,44,4408', '徐闻县', '44', '广东省', '4408', '湛江市', '440825', '徐闻县', '', '', '', '', 3, 1, ''), ('440881', '4408', '00,44,4408', '廉江市', '44', '广东省', '4408', '湛江市', '440881', '廉江市', '', '', '', '', 3, 1, ''), ('440882', '4408', '00,44,4408', '雷州市', '44', '广东省', '4408', '湛江市', '440882', '雷州市', '', '', '', '', 3, 1, ''), ('440883', '4408', '00,44,4408', '吴川市', '44', '广东省', '4408', '湛江市', '440883', '吴川市', '', '', '', '', 3, 1, ''), ('4409', '44', '00,44', '茂名市', '44', '广东省', '4409', '茂名市', '', '', '', '', '', '', 2, 1, ''), ('440902', '4409', '00,44,4409', '茂南区', '44', '广东省', '4409', '茂名市', '440902', '茂南区', '', '', '', '', 3, 1, ''), ('440904', '4409', '00,44,4409', '电白区', '44', '广东省', '4409', '茂名市', '440904', '电白区', '', '', '', '', 3, 1, ''), ('440981', '4409', '00,44,4409', '高州市', '44', '广东省', '4409', '茂名市', '440981', '高州市', '', '', '', '', 3, 1, ''), ('440982', '4409', '00,44,4409', '化州市', '44', '广东省', '4409', '茂名市', '440982', '化州市', '', '', '', '', 3, 1, ''), ('440983', '4409', '00,44,4409', '信宜市', '44', '广东省', '4409', '茂名市', '440983', '信宜市', '', '', '', '', 3, 1, ''), ('4412', '44', '00,44', '肇庆市', '44', '广东省', '4412', '肇庆市', '', '', '', '', '', '', 2, 1, ''), ('441202', '4412', '00,44,4412', '端州区', '44', '广东省', '4412', '肇庆市', '441202', '端州区', '', '', '', '', 3, 1, ''), ('441203', '4412', '00,44,4412', '鼎湖区', '44', '广东省', '4412', '肇庆市', '441203', '鼎湖区', '', '', '', '', 3, 1, ''), ('441204', '4412', '00,44,4412', '高要区', '44', '广东省', '4412', '肇庆市', '441204', '高要区', '', '', '', '', 3, 1, ''), ('441223', '4412', '00,44,4412', '广宁县', '44', '广东省', '4412', '肇庆市', '441223', '广宁县', '', '', '', '', 3, 1, ''), ('441224', '4412', '00,44,4412', '怀集县', '44', '广东省', '4412', '肇庆市', '441224', '怀集县', '', '', '', '', 3, 1, ''), ('441225', '4412', '00,44,4412', '封开县', '44', '广东省', '4412', '肇庆市', '441225', '封开县', '', '', '', '', 3, 1, ''), ('441226', '4412', '00,44,4412', '德庆县', '44', '广东省', '4412', '肇庆市', '441226', '德庆县', '', '', '', '', 3, 1, ''), ('441284', '4412', '00,44,4412', '四会市', '44', '广东省', '4412', '肇庆市', '441284', '四会市', '', '', '', '', 3, 1, ''), ('4413', '44', '00,44', '惠州市', '44', '广东省', '4413', '惠州市', '', '', '', '', '', '', 2, 1, ''), ('441302', '4413', '00,44,4413', '惠城区', '44', '广东省', '4413', '惠州市', '441302', '惠城区', '', '', '', '', 3, 1, ''), ('441303', '4413', '00,44,4413', '惠阳区', '44', '广东省', '4413', '惠州市', '441303', '惠阳区', '', '', '', '', 3, 1, ''), ('441322', '4413', '00,44,4413', '博罗县', '44', '广东省', '4413', '惠州市', '441322', '博罗县', '', '', '', '', 3, 1, ''), ('441323', '4413', '00,44,4413', '惠东县', '44', '广东省', '4413', '惠州市', '441323', '惠东县', '', '', '', '', 3, 1, ''), ('441324', '4413', '00,44,4413', '龙门县', '44', '广东省', '4413', '惠州市', '441324', '龙门县', '', '', '', '', 3, 1, ''), ('4414', '44', '00,44', '梅州市', '44', '广东省', '4414', '梅州市', '', '', '', '', '', '', 2, 1, ''), ('441402', '4414', '00,44,4414', '梅江区', '44', '广东省', '4414', '梅州市', '441402', '梅江区', '', '', '', '', 3, 1, ''), ('441403', '4414', '00,44,4414', '梅县区', '44', '广东省', '4414', '梅州市', '441403', '梅县区', '', '', '', '', 3, 1, ''), ('441422', '4414', '00,44,4414', '大埔县', '44', '广东省', '4414', '梅州市', '441422', '大埔县', '', '', '', '', 3, 1, ''), ('441423', '4414', '00,44,4414', '丰顺县', '44', '广东省', '4414', '梅州市', '441423', '丰顺县', '', '', '', '', 3, 1, ''), ('441424', '4414', '00,44,4414', '五华县', '44', '广东省', '4414', '梅州市', '441424', '五华县', '', '', '', '', 3, 1, ''), ('441426', '4414', '00,44,4414', '平远县', '44', '广东省', '4414', '梅州市', '441426', '平远县', '', '', '', '', 3, 1, ''), ('441427', '4414', '00,44,4414', '蕉岭县', '44', '广东省', '4414', '梅州市', '441427', '蕉岭县', '', '', '', '', 3, 1, ''), ('441481', '4414', '00,44,4414', '兴宁市', '44', '广东省', '4414', '梅州市', '441481', '兴宁市', '', '', '', '', 3, 1, ''), ('4415', '44', '00,44', '汕尾市', '44', '广东省', '4415', '汕尾市', '', '', '', '', '', '', 2, 1, ''), ('441502', '4415', '00,44,4415', '城区', '44', '广东省', '4415', '汕尾市', '441502', '城区', '', '', '', '', 3, 1, ''), ('441521', '4415', '00,44,4415', '海丰县', '44', '广东省', '4415', '汕尾市', '441521', '海丰县', '', '', '', '', 3, 1, ''), ('441523', '4415', '00,44,4415', '陆河县', '44', '广东省', '4415', '汕尾市', '441523', '陆河县', '', '', '', '', 3, 1, ''), ('441581', '4415', '00,44,4415', '陆丰市', '44', '广东省', '4415', '汕尾市', '441581', '陆丰市', '', '', '', '', 3, 1, ''), ('4416', '44', '00,44', '河源市', '44', '广东省', '4416', '河源市', '', '', '', '', '', '', 2, 1, ''), ('441602', '4416', '00,44,4416', '源城区', '44', '广东省', '4416', '河源市', '441602', '源城区', '', '', '', '', 3, 1, ''), ('441621', '4416', '00,44,4416', '紫金县', '44', '广东省', '4416', '河源市', '441621', '紫金县', '', '', '', '', 3, 1, ''), ('441622', '4416', '00,44,4416', '龙川县', '44', '广东省', '4416', '河源市', '441622', '龙川县', '', '', '', '', 3, 1, ''), ('441623', '4416', '00,44,4416', '连平县', '44', '广东省', '4416', '河源市', '441623', '连平县', '', '', '', '', 3, 1, ''), ('441624', '4416', '00,44,4416', '和平县', '44', '广东省', '4416', '河源市', '441624', '和平县', '', '', '', '', 3, 1, ''), ('441625', '4416', '00,44,4416', '东源县', '44', '广东省', '4416', '河源市', '441625', '东源县', '', '', '', '', 3, 1, ''), ('4417', '44', '00,44', '阳江市', '44', '广东省', '4417', '阳江市', '', '', '', '', '', '', 2, 1, ''), ('441702', '4417', '00,44,4417', '江城区', '44', '广东省', '4417', '阳江市', '441702', '江城区', '', '', '', '', 3, 1, ''), ('441704', '4417', '00,44,4417', '阳东区', '44', '广东省', '4417', '阳江市', '441704', '阳东区', '', '', '', '', 3, 1, ''), ('441721', '4417', '00,44,4417', '阳西县', '44', '广东省', '4417', '阳江市', '441721', '阳西县', '', '', '', '', 3, 1, ''), ('441781', '4417', '00,44,4417', '阳春市', '44', '广东省', '4417', '阳江市', '441781', '阳春市', '', '', '', '', 3, 1, ''), ('4418', '44', '00,44', '清远市', '44', '广东省', '4418', '清远市', '', '', '', '', '', '', 2, 1, ''), ('441802', '4418', '00,44,4418', '清城区', '44', '广东省', '4418', '清远市', '441802', '清城区', '', '', '', '', 3, 1, ''), ('441803', '4418', '00,44,4418', '清新区', '44', '广东省', '4418', '清远市', '441803', '清新区', '', '', '', '', 3, 1, ''), ('441821', '4418', '00,44,4418', '佛冈县', '44', '广东省', '4418', '清远市', '441821', '佛冈县', '', '', '', '', 3, 1, ''), ('441823', '4418', '00,44,4418', '阳山县', '44', '广东省', '4418', '清远市', '441823', '阳山县', '', '', '', '', 3, 1, ''), ('441825', '4418', '00,44,4418', '连山壮族瑶族自治县', '44', '广东省', '4418', '清远市', '441825', '连山壮族瑶族自治县', '', '', '', '', 3, 1, ''), ('441826', '4418', '00,44,4418', '连南瑶族自治县', '44', '广东省', '4418', '清远市', '441826', '连南瑶族自治县', '', '', '', '', 3, 1, ''), ('441881', '4418', '00,44,4418', '英德市', '44', '广东省', '4418', '清远市', '441881', '英德市', '', '', '', '', 3, 1, ''), ('441882', '4418', '00,44,4418', '连州市', '44', '广东省', '4418', '清远市', '441882', '连州市', '', '', '', '', 3, 1, ''), ('4419', '44', '00,44', '东莞市', '44', '广东省', '4419', '东莞市', '', '', '', '', '', '', 2, 1, ''), ('441900', '4419', '00,44,4419', '东莞市', '44', '广东省', '4419', '东莞市', '441900', '东莞市', '', '', '', '', 3, 1, ''), ('4420', '44', '00,44', '中山市', '44', '广东省', '4420', '中山市', '', '', '', '', '', '', 2, 1, ''), ('442000', '4420', '00,44,4420', '中山市', '44', '广东省', '4420', '中山市', '442000', '中山市', '', '', '', '', 3, 1, ''), ('4451', '44', '00,44', '潮州市', '44', '广东省', '4451', '潮州市', '', '', '', '', '', '', 2, 1, ''), ('445102', '4451', '00,44,4451', '湘桥区', '44', '广东省', '4451', '潮州市', '445102', '湘桥区', '', '', '', '', 3, 1, ''), ('445103', '4451', '00,44,4451', '潮安区', '44', '广东省', '4451', '潮州市', '445103', '潮安区', '', '', '', '', 3, 1, ''), ('445122', '4451', '00,44,4451', '饶平县', '44', '广东省', '4451', '潮州市', '445122', '饶平县', '', '', '', '', 3, 1, ''), ('4452', '44', '00,44', '揭阳市', '44', '广东省', '4452', '揭阳市', '', '', '', '', '', '', 2, 1, ''), ('445202', '4452', '00,44,4452', '榕城区', '44', '广东省', '4452', '揭阳市', '445202', '榕城区', '', '', '', '', 3, 1, ''), ('445203', '4452', '00,44,4452', '揭东区', '44', '广东省', '4452', '揭阳市', '445203', '揭东区', '', '', '', '', 3, 1, ''), ('445222', '4452', '00,44,4452', '揭西县', '44', '广东省', '4452', '揭阳市', '445222', '揭西县', '', '', '', '', 3, 1, ''), ('445224', '4452', '00,44,4452', '惠来县', '44', '广东省', '4452', '揭阳市', '445224', '惠来县', '', '', '', '', 3, 1, ''), ('445281', '4452', '00,44,4452', '普宁市', '44', '广东省', '4452', '揭阳市', '445281', '普宁市', '', '', '', '', 3, 1, ''), ('4453', '44', '00,44', '云浮市', '44', '广东省', '4453', '云浮市', '', '', '', '', '', '', 2, 1, ''), ('445302', '4453', '00,44,4453', '云城区', '44', '广东省', '4453', '云浮市', '445302', '云城区', '', '', '', '', 3, 1, ''), ('445303', '4453', '00,44,4453', '云安区', '44', '广东省', '4453', '云浮市', '445303', '云安区', '', '', '', '', 3, 1, ''), ('445321', '4453', '00,44,4453', '新兴县', '44', '广东省', '4453', '云浮市', '445321', '新兴县', '', '', '', '', 3, 1, ''), ('445322', '4453', '00,44,4453', '郁南县', '44', '广东省', '4453', '云浮市', '445322', '郁南县', '', '', '', '', 3, 1, ''), ('445381', '4453', '00,44,4453', '罗定市', '44', '广东省', '4453', '云浮市', '445381', '罗定市', '', '', '', '', 3, 1, ''), ('45', '00', '00', '广西壮族自治区', '45', '广西壮族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('4501', '45', '00,45', '南宁市', '45', '广西壮族自治区', '4501', '南宁市', '', '', '', '', '', '', 2, 1, ''), ('450102', '4501', '00,45,4501', '兴宁区', '45', '广西壮族自治区', '4501', '南宁市', '450102', '兴宁区', '', '', '', '', 3, 1, ''), ('450103', '4501', '00,45,4501', '青秀区', '45', '广西壮族自治区', '4501', '南宁市', '450103', '青秀区', '', '', '', '', 3, 1, ''), ('450105', '4501', '00,45,4501', '江南区', '45', '广西壮族自治区', '4501', '南宁市', '450105', '江南区', '', '', '', '', 3, 1, ''), ('450107', '4501', '00,45,4501', '西乡塘区', '45', '广西壮族自治区', '4501', '南宁市', '450107', '西乡塘区', '', '', '', '', 3, 1, ''), ('450108', '4501', '00,45,4501', '良庆区', '45', '广西壮族自治区', '4501', '南宁市', '450108', '良庆区', '', '', '', '', 3, 1, ''), ('450109', '4501', '00,45,4501', '邕宁区', '45', '广西壮族自治区', '4501', '南宁市', '450109', '邕宁区', '', '', '', '', 3, 1, ''), ('450110', '4501', '00,45,4501', '武鸣区', '45', '广西壮族自治区', '4501', '南宁市', '450110', '武鸣区', '', '', '', '', 3, 1, ''), ('450123', '4501', '00,45,4501', '隆安县', '45', '广西壮族自治区', '4501', '南宁市', '450123', '隆安县', '', '', '', '', 3, 1, ''), ('450124', '4501', '00,45,4501', '马山县', '45', '广西壮族自治区', '4501', '南宁市', '450124', '马山县', '', '', '', '', 3, 1, ''), ('450125', '4501', '00,45,4501', '上林县', '45', '广西壮族自治区', '4501', '南宁市', '450125', '上林县', '', '', '', '', 3, 1, ''), ('450126', '4501', '00,45,4501', '宾阳县', '45', '广西壮族自治区', '4501', '南宁市', '450126', '宾阳县', '', '', '', '', 3, 1, ''), ('450127', '4501', '00,45,4501', '横县', '45', '广西壮族自治区', '4501', '南宁市', '450127', '横县', '', '', '', '', 3, 1, ''), ('4502', '45', '00,45', '柳州市', '45', '广西壮族自治区', '4502', '柳州市', '', '', '', '', '', '', 2, 1, ''), ('450202', '4502', '00,45,4502', '城中区', '45', '广西壮族自治区', '4502', '柳州市', '450202', '城中区', '', '', '', '', 3, 1, ''), ('450203', '4502', '00,45,4502', '鱼峰区', '45', '广西壮族自治区', '4502', '柳州市', '450203', '鱼峰区', '', '', '', '', 3, 1, ''), ('450204', '4502', '00,45,4502', '柳南区', '45', '广西壮族自治区', '4502', '柳州市', '450204', '柳南区', '', '', '', '', 3, 1, ''), ('450205', '4502', '00,45,4502', '柳北区', '45', '广西壮族自治区', '4502', '柳州市', '450205', '柳北区', '', '', '', '', 3, 1, ''), ('450206', '4502', '00,45,4502', '柳江区', '45', '广西壮族自治区', '4502', '柳州市', '450206', '柳江区', '', '', '', '', 3, 1, ''), ('450222', '4502', '00,45,4502', '柳城县', '45', '广西壮族自治区', '4502', '柳州市', '450222', '柳城县', '', '', '', '', 3, 1, ''), ('450223', '4502', '00,45,4502', '鹿寨县', '45', '广西壮族自治区', '4502', '柳州市', '450223', '鹿寨县', '', '', '', '', 3, 1, ''), ('450224', '4502', '00,45,4502', '融安县', '45', '广西壮族自治区', '4502', '柳州市', '450224', '融安县', '', '', '', '', 3, 1, ''), ('450225', '4502', '00,45,4502', '融水苗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450225', '融水苗族自治县', '', '', '', '', 3, 1, ''), ('450226', '4502', '00,45,4502', '三江侗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450226', '三江侗族自治县', '', '', '', '', 3, 1, ''), ('4503', '45', '00,45', '桂林市', '45', '广西壮族自治区', '4503', '桂林市', '', '', '', '', '', '', 2, 1, ''), ('450302', '4503', '00,45,4503', '秀峰区', '45', '广西壮族自治区', '4503', '桂林市', '450302', '秀峰区', '', '', '', '', 3, 1, ''), ('450303', '4503', '00,45,4503', '叠彩区', '45', '广西壮族自治区', '4503', '桂林市', '450303', '叠彩区', '', '', '', '', 3, 1, ''), ('450304', '4503', '00,45,4503', '象山区', '45', '广西壮族自治区', '4503', '桂林市', '450304', '象山区', '', '', '', '', 3, 1, ''), ('450305', '4503', '00,45,4503', '七星区', '45', '广西壮族自治区', '4503', '桂林市', '450305', '七星区', '', '', '', '', 3, 1, ''), ('450311', '4503', '00,45,4503', '雁山区', '45', '广西壮族自治区', '4503', '桂林市', '450311', '雁山区', '', '', '', '', 3, 1, ''), ('450312', '4503', '00,45,4503', '临桂区', '45', '广西壮族自治区', '4503', '桂林市', '450312', '临桂区', '', '', '', '', 3, 1, ''), ('450321', '4503', '00,45,4503', '阳朔县', '45', '广西壮族自治区', '4503', '桂林市', '450321', '阳朔县', '', '', '', '', 3, 1, ''), ('450323', '4503', '00,45,4503', '灵川县', '45', '广西壮族自治区', '4503', '桂林市', '450323', '灵川县', '', '', '', '', 3, 1, ''), ('450324', '4503', '00,45,4503', '全州县', '45', '广西壮族自治区', '4503', '桂林市', '450324', '全州县', '', '', '', '', 3, 1, ''), ('450325', '4503', '00,45,4503', '兴安县', '45', '广西壮族自治区', '4503', '桂林市', '450325', '兴安县', '', '', '', '', 3, 1, ''), ('450326', '4503', '00,45,4503', '永福县', '45', '广西壮族自治区', '4503', '桂林市', '450326', '永福县', '', '', '', '', 3, 1, ''), ('450327', '4503', '00,45,4503', '灌阳县', '45', '广西壮族自治区', '4503', '桂林市', '450327', '灌阳县', '', '', '', '', 3, 1, ''), ('450328', '4503', '00,45,4503', '龙胜各族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450328', '龙胜各族自治县', '', '', '', '', 3, 1, ''), ('450329', '4503', '00,45,4503', '资源县', '45', '广西壮族自治区', '4503', '桂林市', '450329', '资源县', '', '', '', '', 3, 1, ''), ('450330', '4503', '00,45,4503', '平乐县', '45', '广西壮族自治区', '4503', '桂林市', '450330', '平乐县', '', '', '', '', 3, 1, ''), ('450332', '4503', '00,45,4503', '恭城瑶族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450332', '恭城瑶族自治县', '', '', '', '', 3, 1, ''), ('450381', '4503', '00,45,4503', '荔浦市', '45', '广西壮族自治区', '4503', '桂林市', '450381', '荔浦市', '', '', '', '', 3, 1, ''), ('4504', '45', '00,45', '梧州市', '45', '广西壮族自治区', '4504', '梧州市', '', '', '', '', '', '', 2, 1, ''), ('450403', '4504', '00,45,4504', '万秀区', '45', '广西壮族自治区', '4504', '梧州市', '450403', '万秀区', '', '', '', '', 3, 1, ''), ('450405', '4504', '00,45,4504', '长洲区', '45', '广西壮族自治区', '4504', '梧州市', '450405', '长洲区', '', '', '', '', 3, 1, ''), ('450406', '4504', '00,45,4504', '龙圩区', '45', '广西壮族自治区', '4504', '梧州市', '450406', '龙圩区', '', '', '', '', 3, 1, ''), ('450421', '4504', '00,45,4504', '苍梧县', '45', '广西壮族自治区', '4504', '梧州市', '450421', '苍梧县', '', '', '', '', 3, 1, ''), ('450422', '4504', '00,45,4504', '藤县', '45', '广西壮族自治区', '4504', '梧州市', '450422', '藤县', '', '', '', '', 3, 1, ''), ('450423', '4504', '00,45,4504', '蒙山县', '45', '广西壮族自治区', '4504', '梧州市', '450423', '蒙山县', '', '', '', '', 3, 1, ''), ('450481', '4504', '00,45,4504', '岑溪市', '45', '广西壮族自治区', '4504', '梧州市', '450481', '岑溪市', '', '', '', '', 3, 1, ''), ('4505', '45', '00,45', '北海市', '45', '广西壮族自治区', '4505', '北海市', '', '', '', '', '', '', 2, 1, ''), ('450502', '4505', '00,45,4505', '海城区', '45', '广西壮族自治区', '4505', '北海市', '450502', '海城区', '', '', '', '', 3, 1, ''), ('450503', '4505', '00,45,4505', '银海区', '45', '广西壮族自治区', '4505', '北海市', '450503', '银海区', '', '', '', '', 3, 1, ''), ('450512', '4505', '00,45,4505', '铁山港区', '45', '广西壮族自治区', '4505', '北海市', '450512', '铁山港区', '', '', '', '', 3, 1, ''), ('450521', '4505', '00,45,4505', '合浦县', '45', '广西壮族自治区', '4505', '北海市', '450521', '合浦县', '', '', '', '', 3, 1, ''), ('4506', '45', '00,45', '防城港市', '45', '广西壮族自治区', '4506', '防城港市', '', '', '', '', '', '', 2, 1, ''), ('450602', '4506', '00,45,4506', '港口区', '45', '广西壮族自治区', '4506', '防城港市', '450602', '港口区', '', '', '', '', 3, 1, ''), ('450603', '4506', '00,45,4506', '防城区', '45', '广西壮族自治区', '4506', '防城港市', '450603', '防城区', '', '', '', '', 3, 1, ''), ('450621', '4506', '00,45,4506', '上思县', '45', '广西壮族自治区', '4506', '防城港市', '450621', '上思县', '', '', '', '', 3, 1, ''), ('450681', '4506', '00,45,4506', '东兴市', '45', '广西壮族自治区', '4506', '防城港市', '450681', '东兴市', '', '', '', '', 3, 1, ''), ('4507', '45', '00,45', '钦州市', '45', '广西壮族自治区', '4507', '钦州市', '', '', '', '', '', '', 2, 1, ''), ('450702', '4507', '00,45,4507', '钦南区', '45', '广西壮族自治区', '4507', '钦州市', '450702', '钦南区', '', '', '', '', 3, 1, ''), ('450703', '4507', '00,45,4507', '钦北区', '45', '广西壮族自治区', '4507', '钦州市', '450703', '钦北区', '', '', '', '', 3, 1, ''), ('450721', '4507', '00,45,4507', '灵山县', '45', '广西壮族自治区', '4507', '钦州市', '450721', '灵山县', '', '', '', '', 3, 1, ''), ('450722', '4507', '00,45,4507', '浦北县', '45', '广西壮族自治区', '4507', '钦州市', '450722', '浦北县', '', '', '', '', 3, 1, ''), ('4508', '45', '00,45', '贵港市', '45', '广西壮族自治区', '4508', '贵港市', '', '', '', '', '', '', 2, 1, ''), ('450802', '4508', '00,45,4508', '港北区', '45', '广西壮族自治区', '4508', '贵港市', '450802', '港北区', '', '', '', '', 3, 1, ''), ('450803', '4508', '00,45,4508', '港南区', '45', '广西壮族自治区', '4508', '贵港市', '450803', '港南区', '', '', '', '', 3, 1, ''), ('450804', '4508', '00,45,4508', '覃塘区', '45', '广西壮族自治区', '4508', '贵港市', '450804', '覃塘区', '', '', '', '', 3, 1, ''), ('450821', '4508', '00,45,4508', '平南县', '45', '广西壮族自治区', '4508', '贵港市', '450821', '平南县', '', '', '', '', 3, 1, ''), ('450881', '4508', '00,45,4508', '桂平市', '45', '广西壮族自治区', '4508', '贵港市', '450881', '桂平市', '', '', '', '', 3, 1, ''), ('4509', '45', '00,45', '玉林市', '45', '广西壮族自治区', '4509', '玉林市', '', '', '', '', '', '', 2, 1, ''), ('450902', '4509', '00,45,4509', '玉州区', '45', '广西壮族自治区', '4509', '玉林市', '450902', '玉州区', '', '', '', '', 3, 1, ''), ('450903', '4509', '00,45,4509', '福绵区', '45', '广西壮族自治区', '4509', '玉林市', '450903', '福绵区', '', '', '', '', 3, 1, ''), ('450921', '4509', '00,45,4509', '容县', '45', '广西壮族自治区', '4509', '玉林市', '450921', '容县', '', '', '', '', 3, 1, ''), ('450922', '4509', '00,45,4509', '陆川县', '45', '广西壮族自治区', '4509', '玉林市', '450922', '陆川县', '', '', '', '', 3, 1, ''), ('450923', '4509', '00,45,4509', '博白县', '45', '广西壮族自治区', '4509', '玉林市', '450923', '博白县', '', '', '', '', 3, 1, ''), ('450924', '4509', '00,45,4509', '兴业县', '45', '广西壮族自治区', '4509', '玉林市', '450924', '兴业县', '', '', '', '', 3, 1, ''), ('450981', '4509', '00,45,4509', '北流市', '45', '广西壮族自治区', '4509', '玉林市', '450981', '北流市', '', '', '', '', 3, 1, ''), ('4510', '45', '00,45', '百色市', '45', '广西壮族自治区', '4510', '百色市', '', '', '', '', '', '', 2, 1, ''), ('451002', '4510', '00,45,4510', '右江区', '45', '广西壮族自治区', '4510', '百色市', '451002', '右江区', '', '', '', '', 3, 1, ''), ('451003', '4510', '00,45,4510', '田阳区', '45', '广西壮族自治区', '4510', '百色市', '451003', '田阳区', '', '', '', '', 3, 1, ''), ('451022', '4510', '00,45,4510', '田东县', '45', '广西壮族自治区', '4510', '百色市', '451022', '田东县', '', '', '', '', 3, 1, ''), ('451024', '4510', '00,45,4510', '德保县', '45', '广西壮族自治区', '4510', '百色市', '451024', '德保县', '', '', '', '', 3, 1, ''), ('451026', '4510', '00,45,4510', '那坡县', '45', '广西壮族自治区', '4510', '百色市', '451026', '那坡县', '', '', '', '', 3, 1, ''), ('451027', '4510', '00,45,4510', '凌云县', '45', '广西壮族自治区', '4510', '百色市', '451027', '凌云县', '', '', '', '', 3, 1, ''), ('451028', '4510', '00,45,4510', '乐业县', '45', '广西壮族自治区', '4510', '百色市', '451028', '乐业县', '', '', '', '', 3, 1, ''), ('451029', '4510', '00,45,4510', '田林县', '45', '广西壮族自治区', '4510', '百色市', '451029', '田林县', '', '', '', '', 3, 1, ''), ('451030', '4510', '00,45,4510', '西林县', '45', '广西壮族自治区', '4510', '百色市', '451030', '西林县', '', '', '', '', 3, 1, ''), ('451031', '4510', '00,45,4510', '隆林各族自治县', '45', '广西壮族自治区', '4510', '百色市', '451031', '隆林各族自治县', '', '', '', '', 3, 1, ''), ('451081', '4510', '00,45,4510', '靖西市', '45', '广西壮族自治区', '4510', '百色市', '451081', '靖西市', '', '', '', '', 3, 1, ''), ('451082', '4510', '00,45,4510', '平果市', '45', '广西壮族自治区', '4510', '百色市', '451082', '平果市', '', '', '', '', 3, 1, ''), ('4511', '45', '00,45', '贺州市', '45', '广西壮族自治区', '4511', '贺州市', '', '', '', '', '', '', 2, 1, ''), ('451102', '4511', '00,45,4511', '八步区', '45', '广西壮族自治区', '4511', '贺州市', '451102', '八步区', '', '', '', '', 3, 1, ''), ('451103', '4511', '00,45,4511', '平桂区', '45', '广西壮族自治区', '4511', '贺州市', '451103', '平桂区', '', '', '', '', 3, 1, ''), ('451121', '4511', '00,45,4511', '昭平县', '45', '广西壮族自治区', '4511', '贺州市', '451121', '昭平县', '', '', '', '', 3, 1, ''), ('451122', '4511', '00,45,4511', '钟山县', '45', '广西壮族自治区', '4511', '贺州市', '451122', '钟山县', '', '', '', '', 3, 1, ''), ('451123', '4511', '00,45,4511', '富川瑶族自治县', '45', '广西壮族自治区', '4511', '贺州市', '451123', '富川瑶族自治县', '', '', '', '', 3, 1, ''), ('4512', '45', '00,45', '河池市', '45', '广西壮族自治区', '4512', '河池市', '', '', '', '', '', '', 2, 1, ''), ('451202', '4512', '00,45,4512', '金城江区', '45', '广西壮族自治区', '4512', '河池市', '451202', '金城江区', '', '', '', '', 3, 1, ''), ('451203', '4512', '00,45,4512', '宜州区', '45', '广西壮族自治区', '4512', '河池市', '451203', '宜州区', '', '', '', '', 3, 1, ''), ('451221', '4512', '00,45,4512', '南丹县', '45', '广西壮族自治区', '4512', '河池市', '451221', '南丹县', '', '', '', '', 3, 1, ''), ('451222', '4512', '00,45,4512', '天峨县', '45', '广西壮族自治区', '4512', '河池市', '451222', '天峨县', '', '', '', '', 3, 1, ''), ('451223', '4512', '00,45,4512', '凤山县', '45', '广西壮族自治区', '4512', '河池市', '451223', '凤山县', '', '', '', '', 3, 1, ''), ('451224', '4512', '00,45,4512', '东兰县', '45', '广西壮族自治区', '4512', '河池市', '451224', '东兰县', '', '', '', '', 3, 1, ''), ('451225', '4512', '00,45,4512', '罗城仫佬族自治县', '45', '广西壮族自治区', '4512', '河池市', '451225', '罗城仫佬族自治县', '', '', '', '', 3, 1, ''), ('451226', '4512', '00,45,4512', '环江毛南族自治县', '45', '广西壮族自治区', '4512', '河池市', '451226', '环江毛南族自治县', '', '', '', '', 3, 1, ''), ('451227', '4512', '00,45,4512', '巴马瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451227', '巴马瑶族自治县', '', '', '', '', 3, 1, ''), ('451228', '4512', '00,45,4512', '都安瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451228', '都安瑶族自治县', '', '', '', '', 3, 1, ''), ('451229', '4512', '00,45,4512', '大化瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451229', '大化瑶族自治县', '', '', '', '', 3, 1, ''), ('4513', '45', '00,45', '来宾市', '45', '广西壮族自治区', '4513', '来宾市', '', '', '', '', '', '', 2, 1, ''), ('451302', '4513', '00,45,4513', '兴宾区', '45', '广西壮族自治区', '4513', '来宾市', '451302', '兴宾区', '', '', '', '', 3, 1, ''), ('451321', '4513', '00,45,4513', '忻城县', '45', '广西壮族自治区', '4513', '来宾市', '451321', '忻城县', '', '', '', '', 3, 1, ''), ('451322', '4513', '00,45,4513', '象州县', '45', '广西壮族自治区', '4513', '来宾市', '451322', '象州县', '', '', '', '', 3, 1, ''), ('451323', '4513', '00,45,4513', '武宣县', '45', '广西壮族自治区', '4513', '来宾市', '451323', '武宣县', '', '', '', '', 3, 1, ''), ('451324', '4513', '00,45,4513', '金秀瑶族自治县', '45', '广西壮族自治区', '4513', '来宾市', '451324', '金秀瑶族自治县', '', '', '', '', 3, 1, ''), ('451381', '4513', '00,45,4513', '合山市', '45', '广西壮族自治区', '4513', '来宾市', '451381', '合山市', '', '', '', '', 3, 1, ''), ('4514', '45', '00,45', '崇左市', '45', '广西壮族自治区', '4514', '崇左市', '', '', '', '', '', '', 2, 1, ''), ('451402', '4514', '00,45,4514', '江州区', '45', '广西壮族自治区', '4514', '崇左市', '451402', '江州区', '', '', '', '', 3, 1, ''), ('451421', '4514', '00,45,4514', '扶绥县', '45', '广西壮族自治区', '4514', '崇左市', '451421', '扶绥县', '', '', '', '', 3, 1, ''), ('451422', '4514', '00,45,4514', '宁明县', '45', '广西壮族自治区', '4514', '崇左市', '451422', '宁明县', '', '', '', '', 3, 1, ''), ('451423', '4514', '00,45,4514', '龙州县', '45', '广西壮族自治区', '4514', '崇左市', '451423', '龙州县', '', '', '', '', 3, 1, ''), ('451424', '4514', '00,45,4514', '大新县', '45', '广西壮族自治区', '4514', '崇左市', '451424', '大新县', '', '', '', '', 3, 1, ''), ('451425', '4514', '00,45,4514', '天等县', '45', '广西壮族自治区', '4514', '崇左市', '451425', '天等县', '', '', '', '', 3, 1, ''), ('451481', '4514', '00,45,4514', '凭祥市', '45', '广西壮族自治区', '4514', '崇左市', '451481', '凭祥市', '', '', '', '', 3, 1, ''), ('46', '00', '00', '海南省', '46', '海南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4601', '46', '00,46', '海口市', '46', '海南省', '4601', '海口市', '', '', '', '', '', '', 2, 1, ''), ('460105', '4601', '00,46,4601', '秀英区', '46', '海南省', '4601', '海口市', '460105', '秀英区', '', '', '', '', 3, 1, ''), ('460106', '4601', '00,46,4601', '龙华区', '46', '海南省', '4601', '海口市', '460106', '龙华区', '', '', '', '', 3, 1, ''), ('460107', '4601', '00,46,4601', '琼山区', '46', '海南省', '4601', '海口市', '460107', '琼山区', '', '', '', '', 3, 1, ''), ('460108', '4601', '00,46,4601', '美兰区', '46', '海南省', '4601', '海口市', '460108', '美兰区', '', '', '', '', 3, 1, ''), ('4602', '46', '00,46', '三亚市', '46', '海南省', '4602', '三亚市', '', '', '', '', '', '', 2, 1, ''), ('460202', '4602', '00,46,4602', '海棠区', '46', '海南省', '4602', '三亚市', '460202', '海棠区', '', '', '', '', 3, 1, ''), ('460203', '4602', '00,46,4602', '吉阳区', '46', '海南省', '4602', '三亚市', '460203', '吉阳区', '', '', '', '', 3, 1, ''), ('460204', '4602', '00,46,4602', '天涯区', '46', '海南省', '4602', '三亚市', '460204', '天涯区', '', '', '', '', 3, 1, ''), ('460205', '4602', '00,46,4602', '崖州区', '46', '海南省', '4602', '三亚市', '460205', '崖州区', '', '', '', '', 3, 1, ''), ('4603', '46', '00,46', '三沙市', '46', '海南省', '4603', '三沙市', '', '', '', '', '', '', 2, 1, ''), ('460300', '4603', '00,46,4603', '三沙市', '46', '海南省', '4603', '三沙市', '460300', '三沙市', '', '', '', '', 3, 1, ''), ('4604', '46', '00,46', '儋州市', '46', '海南省', '4604', '儋州市', '', '', '', '', '', '', 2, 1, ''), ('460400', '4604', '00,46,4604', '儋州市', '46', '海南省', '4604', '儋州市', '460400', '儋州市', '', '', '', '', 3, 1, ''), ('4690', '46', '00,46', '省直辖县级行政区', '46', '海南省', '4690', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('469001', '4690', '00,46,4690', '五指山市', '46', '海南省', '4690', '省直辖县级行政区', '469001', '五指山市', '', '', '', '', 3, 1, ''), ('469002', '4690', '00,46,4690', '琼海市', '46', '海南省', '4690', '省直辖县级行政区', '469002', '琼海市', '', '', '', '', 3, 1, ''), ('469005', '4690', '00,46,4690', '文昌市', '46', '海南省', '4690', '省直辖县级行政区', '469005', '文昌市', '', '', '', '', 3, 1, ''), ('469006', '4690', '00,46,4690', '万宁市', '46', '海南省', '4690', '省直辖县级行政区', '469006', '万宁市', '', '', '', '', 3, 1, ''), ('469007', '4690', '00,46,4690', '东方市', '46', '海南省', '4690', '省直辖县级行政区', '469007', '东方市', '', '', '', '', 3, 1, ''), ('469021', '4690', '00,46,4690', '定安县', '46', '海南省', '4690', '省直辖县级行政区', '469021', '定安县', '', '', '', '', 3, 1, ''), ('469022', '4690', '00,46,4690', '屯昌县', '46', '海南省', '4690', '省直辖县级行政区', '469022', '屯昌县', '', '', '', '', 3, 1, ''), ('469023', '4690', '00,46,4690', '澄迈县', '46', '海南省', '4690', '省直辖县级行政区', '469023', '澄迈县', '', '', '', '', 3, 1, ''), ('469024', '4690', '00,46,4690', '临高县', '46', '海南省', '4690', '省直辖县级行政区', '469024', '临高县', '', '', '', '', 3, 1, ''), ('469025', '4690', '00,46,4690', '白沙黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469025', '白沙黎族自治县', '', '', '', '', 3, 1, ''), ('469026', '4690', '00,46,4690', '昌江黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469026', '昌江黎族自治县', '', '', '', '', 3, 1, ''), ('469027', '4690', '00,46,4690', '乐东黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469027', '乐东黎族自治县', '', '', '', '', 3, 1, ''), ('469028', '4690', '00,46,4690', '陵水黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469028', '陵水黎族自治县', '', '', '', '', 3, 1, ''), ('469029', '4690', '00,46,4690', '保亭黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469029', '保亭黎族苗族自治县', '', '', '', '', 3, 1, ''), ('469030', '4690', '00,46,4690', '琼中黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469030', '琼中黎族苗族自治县', '', '', '', '', 3, 1, ''), ('50', '00', '00', '重庆市', '50', '重庆市', '', '', '', '', '', '', '', '', 1, 1, ''), ('5001', '50', '00,50', '重庆市', '50', '重庆市', '5001', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500101', '5001', '00,50,5001', '万州区', '50', '重庆市', '5001', '重庆市', '500101', '万州区', '', '', '', '', 3, 1, ''), ('500102', '5001', '00,50,5001', '涪陵区', '50', '重庆市', '5001', '重庆市', '500102', '涪陵区', '', '', '', '', 3, 1, ''), ('500103', '5001', '00,50,5001', '渝中区', '50', '重庆市', '5001', '重庆市', '500103', '渝中区', '', '', '', '', 3, 1, ''), ('500104', '5001', '00,50,5001', '大渡口区', '50', '重庆市', '5001', '重庆市', '500104', '大渡口区', '', '', '', '', 3, 1, ''), ('500105', '5001', '00,50,5001', '江北区', '50', '重庆市', '5001', '重庆市', '500105', '江北区', '', '', '', '', 3, 1, ''), ('500106', '5001', '00,50,5001', '沙坪坝区', '50', '重庆市', '5001', '重庆市', '500106', '沙坪坝区', '', '', '', '', 3, 1, ''), ('500107', '5001', '00,50,5001', '九龙坡区', '50', '重庆市', '5001', '重庆市', '500107', '九龙坡区', '', '', '', '', 3, 1, ''), ('500108', '5001', '00,50,5001', '南岸区', '50', '重庆市', '5001', '重庆市', '500108', '南岸区', '', '', '', '', 3, 1, ''), ('500109', '5001', '00,50,5001', '北碚区', '50', '重庆市', '5001', '重庆市', '500109', '北碚区', '', '', '', '', 3, 1, ''), ('500110', '5001', '00,50,5001', '綦江区', '50', '重庆市', '5001', '重庆市', '500110', '綦江区', '', '', '', '', 3, 1, ''), ('500111', '5001', '00,50,5001', '大足区', '50', '重庆市', '5001', '重庆市', '500111', '大足区', '', '', '', '', 3, 1, ''), ('500112', '5001', '00,50,5001', '渝北区', '50', '重庆市', '5001', '重庆市', '500112', '渝北区', '', '', '', '', 3, 1, ''), ('500113', '5001', '00,50,5001', '巴南区', '50', '重庆市', '5001', '重庆市', '500113', '巴南区', '', '', '', '', 3, 1, ''), ('500114', '5001', '00,50,5001', '黔江区', '50', '重庆市', '5001', '重庆市', '500114', '黔江区', '', '', '', '', 3, 1, ''), ('500115', '5001', '00,50,5001', '长寿区', '50', '重庆市', '5001', '重庆市', '500115', '长寿区', '', '', '', '', 3, 1, ''), ('500116', '5001', '00,50,5001', '江津区', '50', '重庆市', '5001', '重庆市', '500116', '江津区', '', '', '', '', 3, 1, ''), ('500117', '5001', '00,50,5001', '合川区', '50', '重庆市', '5001', '重庆市', '500117', '合川区', '', '', '', '', 3, 1, ''), ('500118', '5001', '00,50,5001', '永川区', '50', '重庆市', '5001', '重庆市', '500118', '永川区', '', '', '', '', 3, 1, ''), ('500119', '5001', '00,50,5001', '南川区', '50', '重庆市', '5001', '重庆市', '500119', '南川区', '', '', '', '', 3, 1, ''), ('500120', '5001', '00,50,5001', '璧山区', '50', '重庆市', '5001', '重庆市', '500120', '璧山区', '', '', '', '', 3, 1, ''), ('500151', '5001', '00,50,5001', '铜梁区', '50', '重庆市', '5001', '重庆市', '500151', '铜梁区', '', '', '', '', 3, 1, ''), ('500152', '5001', '00,50,5001', '潼南区', '50', '重庆市', '5001', '重庆市', '500152', '潼南区', '', '', '', '', 3, 1, ''), ('500153', '5001', '00,50,5001', '荣昌区', '50', '重庆市', '5001', '重庆市', '500153', '荣昌区', '', '', '', '', 3, 1, ''), ('500154', '5001', '00,50,5001', '开州区', '50', '重庆市', '5001', '重庆市', '500154', '开州区', '', '', '', '', 3, 1, ''), ('500155', '5001', '00,50,5001', '梁平区', '50', '重庆市', '5001', '重庆市', '500155', '梁平区', '', '', '', '', 3, 1, ''), ('500156', '5001', '00,50,5001', '武隆区', '50', '重庆市', '5001', '重庆市', '500156', '武隆区', '', '', '', '', 3, 1, ''), ('5002', '50', '00,50', '重庆市', '50', '重庆市', '5002', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500229', '5002', '00,50,5002', '城口县', '50', '重庆市', '5002', '重庆市', '500229', '城口县', '', '', '', '', 3, 1, ''), ('500230', '5002', '00,50,5002', '丰都县', '50', '重庆市', '5002', '重庆市', '500230', '丰都县', '', '', '', '', 3, 1, ''), ('500231', '5002', '00,50,5002', '垫江县', '50', '重庆市', '5002', '重庆市', '500231', '垫江县', '', '', '', '', 3, 1, ''), ('500233', '5002', '00,50,5002', '忠县', '50', '重庆市', '5002', '重庆市', '500233', '忠县', '', '', '', '', 3, 1, ''), ('500235', '5002', '00,50,5002', '云阳县', '50', '重庆市', '5002', '重庆市', '500235', '云阳县', '', '', '', '', 3, 1, ''), ('500236', '5002', '00,50,5002', '奉节县', '50', '重庆市', '5002', '重庆市', '500236', '奉节县', '', '', '', '', 3, 1, ''), ('500237', '5002', '00,50,5002', '巫山县', '50', '重庆市', '5002', '重庆市', '500237', '巫山县', '', '', '', '', 3, 1, ''), ('500238', '5002', '00,50,5002', '巫溪县', '50', '重庆市', '5002', '重庆市', '500238', '巫溪县', '', '', '', '', 3, 1, ''), ('500240', '5002', '00,50,5002', '石柱土家族自治县', '50', '重庆市', '5002', '重庆市', '500240', '石柱土家族自治县', '', '', '', '', 3, 1, ''), ('500241', '5002', '00,50,5002', '秀山土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500241', '秀山土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500242', '5002', '00,50,5002', '酉阳土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500242', '酉阳土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500243', '5002', '00,50,5002', '彭水苗族土家族自治县', '50', '重庆市', '5002', '重庆市', '500243', '彭水苗族土家族自治县', '', '', '', '', 3, 1, ''), ('51', '00', '00', '四川省', '51', '四川省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5101', '51', '00,51', '成都市', '51', '四川省', '5101', '成都市', '', '', '', '', '', '', 2, 1, ''), ('510104', '5101', '00,51,5101', '锦江区', '51', '四川省', '5101', '成都市', '510104', '锦江区', '', '', '', '', 3, 1, ''), ('510105', '5101', '00,51,5101', '青羊区', '51', '四川省', '5101', '成都市', '510105', '青羊区', '', '', '', '', 3, 1, ''), ('510106', '5101', '00,51,5101', '金牛区', '51', '四川省', '5101', '成都市', '510106', '金牛区', '', '', '', '', 3, 1, ''), ('510107', '5101', '00,51,5101', '武侯区', '51', '四川省', '5101', '成都市', '510107', '武侯区', '', '', '', '', 3, 1, ''), ('510108', '5101', '00,51,5101', '成华区', '51', '四川省', '5101', '成都市', '510108', '成华区', '', '', '', '', 3, 1, ''), ('510112', '5101', '00,51,5101', '龙泉驿区', '51', '四川省', '5101', '成都市', '510112', '龙泉驿区', '', '', '', '', 3, 1, ''), ('510113', '5101', '00,51,5101', '青白江区', '51', '四川省', '5101', '成都市', '510113', '青白江区', '', '', '', '', 3, 1, ''), ('510114', '5101', '00,51,5101', '新都区', '51', '四川省', '5101', '成都市', '510114', '新都区', '', '', '', '', 3, 1, ''), ('510115', '5101', '00,51,5101', '温江区', '51', '四川省', '5101', '成都市', '510115', '温江区', '', '', '', '', 3, 1, ''), ('510116', '5101', '00,51,5101', '双流区', '51', '四川省', '5101', '成都市', '510116', '双流区', '', '', '', '', 3, 1, ''), ('510117', '5101', '00,51,5101', '郫都区', '51', '四川省', '5101', '成都市', '510117', '郫都区', '', '', '', '', 3, 1, ''), ('510121', '5101', '00,51,5101', '金堂县', '51', '四川省', '5101', '成都市', '510121', '金堂县', '', '', '', '', 3, 1, ''), ('510129', '5101', '00,51,5101', '大邑县', '51', '四川省', '5101', '成都市', '510129', '大邑县', '', '', '', '', 3, 1, ''), ('510131', '5101', '00,51,5101', '蒲江县', '51', '四川省', '5101', '成都市', '510131', '蒲江县', '', '', '', '', 3, 1, ''), ('510132', '5101', '00,51,5101', '新津县', '51', '四川省', '5101', '成都市', '510132', '新津县', '', '', '', '', 3, 1, ''), ('510181', '5101', '00,51,5101', '都江堰市', '51', '四川省', '5101', '成都市', '510181', '都江堰市', '', '', '', '', 3, 1, ''), ('510182', '5101', '00,51,5101', '彭州市', '51', '四川省', '5101', '成都市', '510182', '彭州市', '', '', '', '', 3, 1, ''), ('510183', '5101', '00,51,5101', '邛崃市', '51', '四川省', '5101', '成都市', '510183', '邛崃市', '', '', '', '', 3, 1, ''), ('510184', '5101', '00,51,5101', '崇州市', '51', '四川省', '5101', '成都市', '510184', '崇州市', '', '', '', '', 3, 1, ''), ('510185', '5101', '00,51,5101', '简阳市', '51', '四川省', '5101', '成都市', '510185', '简阳市', '', '', '', '', 3, 1, ''), ('5103', '51', '00,51', '自贡市', '51', '四川省', '5103', '自贡市', '', '', '', '', '', '', 2, 1, ''), ('510302', '5103', '00,51,5103', '自流井区', '51', '四川省', '5103', '自贡市', '510302', '自流井区', '', '', '', '', 3, 1, ''), ('510303', '5103', '00,51,5103', '贡井区', '51', '四川省', '5103', '自贡市', '510303', '贡井区', '', '', '', '', 3, 1, ''), ('510304', '5103', '00,51,5103', '大安区', '51', '四川省', '5103', '自贡市', '510304', '大安区', '', '', '', '', 3, 1, ''), ('510311', '5103', '00,51,5103', '沿滩区', '51', '四川省', '5103', '自贡市', '510311', '沿滩区', '', '', '', '', 3, 1, ''), ('510321', '5103', '00,51,5103', '荣县', '51', '四川省', '5103', '自贡市', '510321', '荣县', '', '', '', '', 3, 1, ''), ('510322', '5103', '00,51,5103', '富顺县', '51', '四川省', '5103', '自贡市', '510322', '富顺县', '', '', '', '', 3, 1, ''), ('5104', '51', '00,51', '攀枝花市', '51', '四川省', '5104', '攀枝花市', '', '', '', '', '', '', 2, 1, ''), ('510402', '5104', '00,51,5104', '东区', '51', '四川省', '5104', '攀枝花市', '510402', '东区', '', '', '', '', 3, 1, ''), ('510403', '5104', '00,51,5104', '西区', '51', '四川省', '5104', '攀枝花市', '510403', '西区', '', '', '', '', 3, 1, ''), ('510411', '5104', '00,51,5104', '仁和区', '51', '四川省', '5104', '攀枝花市', '510411', '仁和区', '', '', '', '', 3, 1, ''), ('510421', '5104', '00,51,5104', '米易县', '51', '四川省', '5104', '攀枝花市', '510421', '米易县', '', '', '', '', 3, 1, ''), ('510422', '5104', '00,51,5104', '盐边县', '51', '四川省', '5104', '攀枝花市', '510422', '盐边县', '', '', '', '', 3, 1, ''), ('5105', '51', '00,51', '泸州市', '51', '四川省', '5105', '泸州市', '', '', '', '', '', '', 2, 1, ''), ('510502', '5105', '00,51,5105', '江阳区', '51', '四川省', '5105', '泸州市', '510502', '江阳区', '', '', '', '', 3, 1, ''), ('510503', '5105', '00,51,5105', '纳溪区', '51', '四川省', '5105', '泸州市', '510503', '纳溪区', '', '', '', '', 3, 1, ''), ('510504', '5105', '00,51,5105', '龙马潭区', '51', '四川省', '5105', '泸州市', '510504', '龙马潭区', '', '', '', '', 3, 1, ''), ('510521', '5105', '00,51,5105', '泸县', '51', '四川省', '5105', '泸州市', '510521', '泸县', '', '', '', '', 3, 1, ''), ('510522', '5105', '00,51,5105', '合江县', '51', '四川省', '5105', '泸州市', '510522', '合江县', '', '', '', '', 3, 1, ''), ('510524', '5105', '00,51,5105', '叙永县', '51', '四川省', '5105', '泸州市', '510524', '叙永县', '', '', '', '', 3, 1, ''), ('510525', '5105', '00,51,5105', '古蔺县', '51', '四川省', '5105', '泸州市', '510525', '古蔺县', '', '', '', '', 3, 1, ''), ('5106', '51', '00,51', '德阳市', '51', '四川省', '5106', '德阳市', '', '', '', '', '', '', 2, 1, ''), ('510603', '5106', '00,51,5106', '旌阳区', '51', '四川省', '5106', '德阳市', '510603', '旌阳区', '', '', '', '', 3, 1, ''), ('510604', '5106', '00,51,5106', '罗江区', '51', '四川省', '5106', '德阳市', '510604', '罗江区', '', '', '', '', 3, 1, ''), ('510623', '5106', '00,51,5106', '中江县', '51', '四川省', '5106', '德阳市', '510623', '中江县', '', '', '', '', 3, 1, ''), ('510681', '5106', '00,51,5106', '广汉市', '51', '四川省', '5106', '德阳市', '510681', '广汉市', '', '', '', '', 3, 1, ''), ('510682', '5106', '00,51,5106', '什邡市', '51', '四川省', '5106', '德阳市', '510682', '什邡市', '', '', '', '', 3, 1, ''), ('510683', '5106', '00,51,5106', '绵竹市', '51', '四川省', '5106', '德阳市', '510683', '绵竹市', '', '', '', '', 3, 1, ''), ('5107', '51', '00,51', '绵阳市', '51', '四川省', '5107', '绵阳市', '', '', '', '', '', '', 2, 1, ''), ('510703', '5107', '00,51,5107', '涪城区', '51', '四川省', '5107', '绵阳市', '510703', '涪城区', '', '', '', '', 3, 1, ''), ('510704', '5107', '00,51,5107', '游仙区', '51', '四川省', '5107', '绵阳市', '510704', '游仙区', '', '', '', '', 3, 1, ''), ('510705', '5107', '00,51,5107', '安州区', '51', '四川省', '5107', '绵阳市', '510705', '安州区', '', '', '', '', 3, 1, ''), ('510722', '5107', '00,51,5107', '三台县', '51', '四川省', '5107', '绵阳市', '510722', '三台县', '', '', '', '', 3, 1, ''), ('510723', '5107', '00,51,5107', '盐亭县', '51', '四川省', '5107', '绵阳市', '510723', '盐亭县', '', '', '', '', 3, 1, ''), ('510725', '5107', '00,51,5107', '梓潼县', '51', '四川省', '5107', '绵阳市', '510725', '梓潼县', '', '', '', '', 3, 1, ''), ('510726', '5107', '00,51,5107', '北川羌族自治县', '51', '四川省', '5107', '绵阳市', '510726', '北川羌族自治县', '', '', '', '', 3, 1, ''), ('510727', '5107', '00,51,5107', '平武县', '51', '四川省', '5107', '绵阳市', '510727', '平武县', '', '', '', '', 3, 1, ''), ('510781', '5107', '00,51,5107', '江油市', '51', '四川省', '5107', '绵阳市', '510781', '江油市', '', '', '', '', 3, 1, ''), ('5108', '51', '00,51', '广元市', '51', '四川省', '5108', '广元市', '', '', '', '', '', '', 2, 1, ''), ('510802', '5108', '00,51,5108', '利州区', '51', '四川省', '5108', '广元市', '510802', '利州区', '', '', '', '', 3, 1, ''), ('510811', '5108', '00,51,5108', '昭化区', '51', '四川省', '5108', '广元市', '510811', '昭化区', '', '', '', '', 3, 1, ''), ('510812', '5108', '00,51,5108', '朝天区', '51', '四川省', '5108', '广元市', '510812', '朝天区', '', '', '', '', 3, 1, ''), ('510821', '5108', '00,51,5108', '旺苍县', '51', '四川省', '5108', '广元市', '510821', '旺苍县', '', '', '', '', 3, 1, ''), ('510822', '5108', '00,51,5108', '青川县', '51', '四川省', '5108', '广元市', '510822', '青川县', '', '', '', '', 3, 1, ''), ('510823', '5108', '00,51,5108', '剑阁县', '51', '四川省', '5108', '广元市', '510823', '剑阁县', '', '', '', '', 3, 1, ''), ('510824', '5108', '00,51,5108', '苍溪县', '51', '四川省', '5108', '广元市', '510824', '苍溪县', '', '', '', '', 3, 1, ''), ('5109', '51', '00,51', '遂宁市', '51', '四川省', '5109', '遂宁市', '', '', '', '', '', '', 2, 1, ''), ('510903', '5109', '00,51,5109', '船山区', '51', '四川省', '5109', '遂宁市', '510903', '船山区', '', '', '', '', 3, 1, ''), ('510904', '5109', '00,51,5109', '安居区', '51', '四川省', '5109', '遂宁市', '510904', '安居区', '', '', '', '', 3, 1, ''), ('510921', '5109', '00,51,5109', '蓬溪县', '51', '四川省', '5109', '遂宁市', '510921', '蓬溪县', '', '', '', '', 3, 1, ''), ('510923', '5109', '00,51,5109', '大英县', '51', '四川省', '5109', '遂宁市', '510923', '大英县', '', '', '', '', 3, 1, ''), ('510981', '5109', '00,51,5109', '射洪市', '51', '四川省', '5109', '遂宁市', '510981', '射洪市', '', '', '', '', 3, 1, ''), ('5110', '51', '00,51', '内江市', '51', '四川省', '5110', '内江市', '', '', '', '', '', '', 2, 1, ''), ('511002', '5110', '00,51,5110', '市中区', '51', '四川省', '5110', '内江市', '511002', '市中区', '', '', '', '', 3, 1, ''), ('511011', '5110', '00,51,5110', '东兴区', '51', '四川省', '5110', '内江市', '511011', '东兴区', '', '', '', '', 3, 1, ''), ('511024', '5110', '00,51,5110', '威远县', '51', '四川省', '5110', '内江市', '511024', '威远县', '', '', '', '', 3, 1, ''), ('511025', '5110', '00,51,5110', '资中县', '51', '四川省', '5110', '内江市', '511025', '资中县', '', '', '', '', 3, 1, ''), ('511083', '5110', '00,51,5110', '隆昌市', '51', '四川省', '5110', '内江市', '511083', '隆昌市', '', '', '', '', 3, 1, ''), ('5111', '51', '00,51', '乐山市', '51', '四川省', '5111', '乐山市', '', '', '', '', '', '', 2, 1, ''), ('511102', '5111', '00,51,5111', '市中区', '51', '四川省', '5111', '乐山市', '511102', '市中区', '', '', '', '', 3, 1, ''), ('511111', '5111', '00,51,5111', '沙湾区', '51', '四川省', '5111', '乐山市', '511111', '沙湾区', '', '', '', '', 3, 1, ''), ('511112', '5111', '00,51,5111', '五通桥区', '51', '四川省', '5111', '乐山市', '511112', '五通桥区', '', '', '', '', 3, 1, ''), ('511113', '5111', '00,51,5111', '金口河区', '51', '四川省', '5111', '乐山市', '511113', '金口河区', '', '', '', '', 3, 1, ''), ('511123', '5111', '00,51,5111', '犍为县', '51', '四川省', '5111', '乐山市', '511123', '犍为县', '', '', '', '', 3, 1, ''), ('511124', '5111', '00,51,5111', '井研县', '51', '四川省', '5111', '乐山市', '511124', '井研县', '', '', '', '', 3, 1, ''), ('511126', '5111', '00,51,5111', '夹江县', '51', '四川省', '5111', '乐山市', '511126', '夹江县', '', '', '', '', 3, 1, ''), ('511129', '5111', '00,51,5111', '沐川县', '51', '四川省', '5111', '乐山市', '511129', '沐川县', '', '', '', '', 3, 1, ''), ('511132', '5111', '00,51,5111', '峨边彝族自治县', '51', '四川省', '5111', '乐山市', '511132', '峨边彝族自治县', '', '', '', '', 3, 1, ''), ('511133', '5111', '00,51,5111', '马边彝族自治县', '51', '四川省', '5111', '乐山市', '511133', '马边彝族自治县', '', '', '', '', 3, 1, ''), ('511181', '5111', '00,51,5111', '峨眉山市', '51', '四川省', '5111', '乐山市', '511181', '峨眉山市', '', '', '', '', 3, 1, ''), ('5113', '51', '00,51', '南充市', '51', '四川省', '5113', '南充市', '', '', '', '', '', '', 2, 1, ''), ('511302', '5113', '00,51,5113', '顺庆区', '51', '四川省', '5113', '南充市', '511302', '顺庆区', '', '', '', '', 3, 1, ''), ('511303', '5113', '00,51,5113', '高坪区', '51', '四川省', '5113', '南充市', '511303', '高坪区', '', '', '', '', 3, 1, ''), ('511304', '5113', '00,51,5113', '嘉陵区', '51', '四川省', '5113', '南充市', '511304', '嘉陵区', '', '', '', '', 3, 1, ''), ('511321', '5113', '00,51,5113', '南部县', '51', '四川省', '5113', '南充市', '511321', '南部县', '', '', '', '', 3, 1, ''), ('511322', '5113', '00,51,5113', '营山县', '51', '四川省', '5113', '南充市', '511322', '营山县', '', '', '', '', 3, 1, ''), ('511323', '5113', '00,51,5113', '蓬安县', '51', '四川省', '5113', '南充市', '511323', '蓬安县', '', '', '', '', 3, 1, ''), ('511324', '5113', '00,51,5113', '仪陇县', '51', '四川省', '5113', '南充市', '511324', '仪陇县', '', '', '', '', 3, 1, ''), ('511325', '5113', '00,51,5113', '西充县', '51', '四川省', '5113', '南充市', '511325', '西充县', '', '', '', '', 3, 1, ''), ('511381', '5113', '00,51,5113', '阆中市', '51', '四川省', '5113', '南充市', '511381', '阆中市', '', '', '', '', 3, 1, ''), ('5114', '51', '00,51', '眉山市', '51', '四川省', '5114', '眉山市', '', '', '', '', '', '', 2, 1, ''), ('511402', '5114', '00,51,5114', '东坡区', '51', '四川省', '5114', '眉山市', '511402', '东坡区', '', '', '', '', 3, 1, ''), ('511403', '5114', '00,51,5114', '彭山区', '51', '四川省', '5114', '眉山市', '511403', '彭山区', '', '', '', '', 3, 1, ''), ('511421', '5114', '00,51,5114', '仁寿县', '51', '四川省', '5114', '眉山市', '511421', '仁寿县', '', '', '', '', 3, 1, ''), ('511423', '5114', '00,51,5114', '洪雅县', '51', '四川省', '5114', '眉山市', '511423', '洪雅县', '', '', '', '', 3, 1, ''), ('511424', '5114', '00,51,5114', '丹棱县', '51', '四川省', '5114', '眉山市', '511424', '丹棱县', '', '', '', '', 3, 1, ''), ('511425', '5114', '00,51,5114', '青神县', '51', '四川省', '5114', '眉山市', '511425', '青神县', '', '', '', '', 3, 1, ''), ('5115', '51', '00,51', '宜宾市', '51', '四川省', '5115', '宜宾市', '', '', '', '', '', '', 2, 1, ''), ('511502', '5115', '00,51,5115', '翠屏区', '51', '四川省', '5115', '宜宾市', '511502', '翠屏区', '', '', '', '', 3, 1, ''), ('511503', '5115', '00,51,5115', '南溪区', '51', '四川省', '5115', '宜宾市', '511503', '南溪区', '', '', '', '', 3, 1, ''), ('511504', '5115', '00,51,5115', '叙州区', '51', '四川省', '5115', '宜宾市', '511504', '叙州区', '', '', '', '', 3, 1, ''), ('511523', '5115', '00,51,5115', '江安县', '51', '四川省', '5115', '宜宾市', '511523', '江安县', '', '', '', '', 3, 1, ''), ('511524', '5115', '00,51,5115', '长宁县', '51', '四川省', '5115', '宜宾市', '511524', '长宁县', '', '', '', '', 3, 1, ''), ('511525', '5115', '00,51,5115', '高县', '51', '四川省', '5115', '宜宾市', '511525', '高县', '', '', '', '', 3, 1, ''), ('511526', '5115', '00,51,5115', '珙县', '51', '四川省', '5115', '宜宾市', '511526', '珙县', '', '', '', '', 3, 1, ''), ('511527', '5115', '00,51,5115', '筠连县', '51', '四川省', '5115', '宜宾市', '511527', '筠连县', '', '', '', '', 3, 1, ''), ('511528', '5115', '00,51,5115', '兴文县', '51', '四川省', '5115', '宜宾市', '511528', '兴文县', '', '', '', '', 3, 1, ''), ('511529', '5115', '00,51,5115', '屏山县', '51', '四川省', '5115', '宜宾市', '511529', '屏山县', '', '', '', '', 3, 1, ''), ('5116', '51', '00,51', '广安市', '51', '四川省', '5116', '广安市', '', '', '', '', '', '', 2, 1, ''), ('511602', '5116', '00,51,5116', '广安区', '51', '四川省', '5116', '广安市', '511602', '广安区', '', '', '', '', 3, 1, ''), ('511603', '5116', '00,51,5116', '前锋区', '51', '四川省', '5116', '广安市', '511603', '前锋区', '', '', '', '', 3, 1, ''), ('511621', '5116', '00,51,5116', '岳池县', '51', '四川省', '5116', '广安市', '511621', '岳池县', '', '', '', '', 3, 1, ''), ('511622', '5116', '00,51,5116', '武胜县', '51', '四川省', '5116', '广安市', '511622', '武胜县', '', '', '', '', 3, 1, ''), ('511623', '5116', '00,51,5116', '邻水县', '51', '四川省', '5116', '广安市', '511623', '邻水县', '', '', '', '', 3, 1, ''), ('511681', '5116', '00,51,5116', '华蓥市', '51', '四川省', '5116', '广安市', '511681', '华蓥市', '', '', '', '', 3, 1, ''), ('5117', '51', '00,51', '达州市', '51', '四川省', '5117', '达州市', '', '', '', '', '', '', 2, 1, ''), ('511702', '5117', '00,51,5117', '通川区', '51', '四川省', '5117', '达州市', '511702', '通川区', '', '', '', '', 3, 1, ''), ('511703', '5117', '00,51,5117', '达川区', '51', '四川省', '5117', '达州市', '511703', '达川区', '', '', '', '', 3, 1, ''), ('511722', '5117', '00,51,5117', '宣汉县', '51', '四川省', '5117', '达州市', '511722', '宣汉县', '', '', '', '', 3, 1, ''), ('511723', '5117', '00,51,5117', '开江县', '51', '四川省', '5117', '达州市', '511723', '开江县', '', '', '', '', 3, 1, ''), ('511724', '5117', '00,51,5117', '大竹县', '51', '四川省', '5117', '达州市', '511724', '大竹县', '', '', '', '', 3, 1, ''), ('511725', '5117', '00,51,5117', '渠县', '51', '四川省', '5117', '达州市', '511725', '渠县', '', '', '', '', 3, 1, ''), ('511781', '5117', '00,51,5117', '万源市', '51', '四川省', '5117', '达州市', '511781', '万源市', '', '', '', '', 3, 1, ''), ('5118', '51', '00,51', '雅安市', '51', '四川省', '5118', '雅安市', '', '', '', '', '', '', 2, 1, ''); +INSERT INTO `sys_region` VALUES ('511802', '5118', '00,51,5118', '雨城区', '51', '四川省', '5118', '雅安市', '511802', '雨城区', '', '', '', '', 3, 1, ''), ('511803', '5118', '00,51,5118', '名山区', '51', '四川省', '5118', '雅安市', '511803', '名山区', '', '', '', '', 3, 1, ''), ('511822', '5118', '00,51,5118', '荥经县', '51', '四川省', '5118', '雅安市', '511822', '荥经县', '', '', '', '', 3, 1, ''), ('511823', '5118', '00,51,5118', '汉源县', '51', '四川省', '5118', '雅安市', '511823', '汉源县', '', '', '', '', 3, 1, ''), ('511824', '5118', '00,51,5118', '石棉县', '51', '四川省', '5118', '雅安市', '511824', '石棉县', '', '', '', '', 3, 1, ''), ('511825', '5118', '00,51,5118', '天全县', '51', '四川省', '5118', '雅安市', '511825', '天全县', '', '', '', '', 3, 1, ''), ('511826', '5118', '00,51,5118', '芦山县', '51', '四川省', '5118', '雅安市', '511826', '芦山县', '', '', '', '', 3, 1, ''), ('511827', '5118', '00,51,5118', '宝兴县', '51', '四川省', '5118', '雅安市', '511827', '宝兴县', '', '', '', '', 3, 1, ''), ('5119', '51', '00,51', '巴中市', '51', '四川省', '5119', '巴中市', '', '', '', '', '', '', 2, 1, ''), ('511902', '5119', '00,51,5119', '巴州区', '51', '四川省', '5119', '巴中市', '511902', '巴州区', '', '', '', '', 3, 1, ''), ('511903', '5119', '00,51,5119', '恩阳区', '51', '四川省', '5119', '巴中市', '511903', '恩阳区', '', '', '', '', 3, 1, ''), ('511921', '5119', '00,51,5119', '通江县', '51', '四川省', '5119', '巴中市', '511921', '通江县', '', '', '', '', 3, 1, ''), ('511922', '5119', '00,51,5119', '南江县', '51', '四川省', '5119', '巴中市', '511922', '南江县', '', '', '', '', 3, 1, ''), ('511923', '5119', '00,51,5119', '平昌县', '51', '四川省', '5119', '巴中市', '511923', '平昌县', '', '', '', '', 3, 1, ''), ('5120', '51', '00,51', '资阳市', '51', '四川省', '5120', '资阳市', '', '', '', '', '', '', 2, 1, ''), ('512002', '5120', '00,51,5120', '雁江区', '51', '四川省', '5120', '资阳市', '512002', '雁江区', '', '', '', '', 3, 1, ''), ('512021', '5120', '00,51,5120', '安岳县', '51', '四川省', '5120', '资阳市', '512021', '安岳县', '', '', '', '', 3, 1, ''), ('512022', '5120', '00,51,5120', '乐至县', '51', '四川省', '5120', '资阳市', '512022', '乐至县', '', '', '', '', 3, 1, ''), ('5132', '51', '00,51', '阿坝藏族羌族自治州', '51', '四川省', '5132', '阿坝藏族羌族自治州', '', '', '', '', '', '', 2, 1, ''), ('513201', '5132', '00,51,5132', '马尔康市', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513201', '马尔康市', '', '', '', '', 3, 1, ''), ('513221', '5132', '00,51,5132', '汶川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513221', '汶川县', '', '', '', '', 3, 1, ''), ('513222', '5132', '00,51,5132', '理县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513222', '理县', '', '', '', '', 3, 1, ''), ('513223', '5132', '00,51,5132', '茂县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513223', '茂县', '', '', '', '', 3, 1, ''), ('513224', '5132', '00,51,5132', '松潘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513224', '松潘县', '', '', '', '', 3, 1, ''), ('513225', '5132', '00,51,5132', '九寨沟县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513225', '九寨沟县', '', '', '', '', 3, 1, ''), ('513226', '5132', '00,51,5132', '金川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513226', '金川县', '', '', '', '', 3, 1, ''), ('513227', '5132', '00,51,5132', '小金县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513227', '小金县', '', '', '', '', 3, 1, ''), ('513228', '5132', '00,51,5132', '黑水县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513228', '黑水县', '', '', '', '', 3, 1, ''), ('513230', '5132', '00,51,5132', '壤塘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513230', '壤塘县', '', '', '', '', 3, 1, ''), ('513231', '5132', '00,51,5132', '阿坝县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513231', '阿坝县', '', '', '', '', 3, 1, ''), ('513232', '5132', '00,51,5132', '若尔盖县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513232', '若尔盖县', '', '', '', '', 3, 1, ''), ('513233', '5132', '00,51,5132', '红原县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513233', '红原县', '', '', '', '', 3, 1, ''), ('5133', '51', '00,51', '甘孜藏族自治州', '51', '四川省', '5133', '甘孜藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('513301', '5133', '00,51,5133', '康定市', '51', '四川省', '5133', '甘孜藏族自治州', '513301', '康定市', '', '', '', '', 3, 1, ''), ('513322', '5133', '00,51,5133', '泸定县', '51', '四川省', '5133', '甘孜藏族自治州', '513322', '泸定县', '', '', '', '', 3, 1, ''), ('513323', '5133', '00,51,5133', '丹巴县', '51', '四川省', '5133', '甘孜藏族自治州', '513323', '丹巴县', '', '', '', '', 3, 1, ''), ('513324', '5133', '00,51,5133', '九龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513324', '九龙县', '', '', '', '', 3, 1, ''), ('513325', '5133', '00,51,5133', '雅江县', '51', '四川省', '5133', '甘孜藏族自治州', '513325', '雅江县', '', '', '', '', 3, 1, ''), ('513326', '5133', '00,51,5133', '道孚县', '51', '四川省', '5133', '甘孜藏族自治州', '513326', '道孚县', '', '', '', '', 3, 1, ''), ('513327', '5133', '00,51,5133', '炉霍县', '51', '四川省', '5133', '甘孜藏族自治州', '513327', '炉霍县', '', '', '', '', 3, 1, ''), ('513328', '5133', '00,51,5133', '甘孜县', '51', '四川省', '5133', '甘孜藏族自治州', '513328', '甘孜县', '', '', '', '', 3, 1, ''), ('513329', '5133', '00,51,5133', '新龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513329', '新龙县', '', '', '', '', 3, 1, ''), ('513330', '5133', '00,51,5133', '德格县', '51', '四川省', '5133', '甘孜藏族自治州', '513330', '德格县', '', '', '', '', 3, 1, ''), ('513331', '5133', '00,51,5133', '白玉县', '51', '四川省', '5133', '甘孜藏族自治州', '513331', '白玉县', '', '', '', '', 3, 1, ''), ('513332', '5133', '00,51,5133', '石渠县', '51', '四川省', '5133', '甘孜藏族自治州', '513332', '石渠县', '', '', '', '', 3, 1, ''), ('513333', '5133', '00,51,5133', '色达县', '51', '四川省', '5133', '甘孜藏族自治州', '513333', '色达县', '', '', '', '', 3, 1, ''), ('513334', '5133', '00,51,5133', '理塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513334', '理塘县', '', '', '', '', 3, 1, ''), ('513335', '5133', '00,51,5133', '巴塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513335', '巴塘县', '', '', '', '', 3, 1, ''), ('513336', '5133', '00,51,5133', '乡城县', '51', '四川省', '5133', '甘孜藏族自治州', '513336', '乡城县', '', '', '', '', 3, 1, ''), ('513337', '5133', '00,51,5133', '稻城县', '51', '四川省', '5133', '甘孜藏族自治州', '513337', '稻城县', '', '', '', '', 3, 1, ''), ('513338', '5133', '00,51,5133', '得荣县', '51', '四川省', '5133', '甘孜藏族自治州', '513338', '得荣县', '', '', '', '', 3, 1, ''), ('5134', '51', '00,51', '凉山彝族自治州', '51', '四川省', '5134', '凉山彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('513401', '5134', '00,51,5134', '西昌市', '51', '四川省', '5134', '凉山彝族自治州', '513401', '西昌市', '', '', '', '', 3, 1, ''), ('513422', '5134', '00,51,5134', '木里藏族自治县', '51', '四川省', '5134', '凉山彝族自治州', '513422', '木里藏族自治县', '', '', '', '', 3, 1, ''), ('513423', '5134', '00,51,5134', '盐源县', '51', '四川省', '5134', '凉山彝族自治州', '513423', '盐源县', '', '', '', '', 3, 1, ''), ('513424', '5134', '00,51,5134', '德昌县', '51', '四川省', '5134', '凉山彝族自治州', '513424', '德昌县', '', '', '', '', 3, 1, ''), ('513425', '5134', '00,51,5134', '会理县', '51', '四川省', '5134', '凉山彝族自治州', '513425', '会理县', '', '', '', '', 3, 1, ''), ('513426', '5134', '00,51,5134', '会东县', '51', '四川省', '5134', '凉山彝族自治州', '513426', '会东县', '', '', '', '', 3, 1, ''), ('513427', '5134', '00,51,5134', '宁南县', '51', '四川省', '5134', '凉山彝族自治州', '513427', '宁南县', '', '', '', '', 3, 1, ''), ('513428', '5134', '00,51,5134', '普格县', '51', '四川省', '5134', '凉山彝族自治州', '513428', '普格县', '', '', '', '', 3, 1, ''), ('513429', '5134', '00,51,5134', '布拖县', '51', '四川省', '5134', '凉山彝族自治州', '513429', '布拖县', '', '', '', '', 3, 1, ''), ('513430', '5134', '00,51,5134', '金阳县', '51', '四川省', '5134', '凉山彝族自治州', '513430', '金阳县', '', '', '', '', 3, 1, ''), ('513431', '5134', '00,51,5134', '昭觉县', '51', '四川省', '5134', '凉山彝族自治州', '513431', '昭觉县', '', '', '', '', 3, 1, ''), ('513432', '5134', '00,51,5134', '喜德县', '51', '四川省', '5134', '凉山彝族自治州', '513432', '喜德县', '', '', '', '', 3, 1, ''), ('513433', '5134', '00,51,5134', '冕宁县', '51', '四川省', '5134', '凉山彝族自治州', '513433', '冕宁县', '', '', '', '', 3, 1, ''), ('513434', '5134', '00,51,5134', '越西县', '51', '四川省', '5134', '凉山彝族自治州', '513434', '越西县', '', '', '', '', 3, 1, ''), ('513435', '5134', '00,51,5134', '甘洛县', '51', '四川省', '5134', '凉山彝族自治州', '513435', '甘洛县', '', '', '', '', 3, 1, ''), ('513436', '5134', '00,51,5134', '美姑县', '51', '四川省', '5134', '凉山彝族自治州', '513436', '美姑县', '', '', '', '', 3, 1, ''), ('513437', '5134', '00,51,5134', '雷波县', '51', '四川省', '5134', '凉山彝族自治州', '513437', '雷波县', '', '', '', '', 3, 1, ''), ('52', '00', '00', '贵州省', '52', '贵州省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5201', '52', '00,52', '贵阳市', '52', '贵州省', '5201', '贵阳市', '', '', '', '', '', '', 2, 1, ''), ('520102', '5201', '00,52,5201', '南明区', '52', '贵州省', '5201', '贵阳市', '520102', '南明区', '', '', '', '', 3, 1, ''), ('520103', '5201', '00,52,5201', '云岩区', '52', '贵州省', '5201', '贵阳市', '520103', '云岩区', '', '', '', '', 3, 1, ''), ('520111', '5201', '00,52,5201', '花溪区', '52', '贵州省', '5201', '贵阳市', '520111', '花溪区', '', '', '', '', 3, 1, ''), ('520112', '5201', '00,52,5201', '乌当区', '52', '贵州省', '5201', '贵阳市', '520112', '乌当区', '', '', '', '', 3, 1, ''), ('520113', '5201', '00,52,5201', '白云区', '52', '贵州省', '5201', '贵阳市', '520113', '白云区', '', '', '', '', 3, 1, ''), ('520115', '5201', '00,52,5201', '观山湖区', '52', '贵州省', '5201', '贵阳市', '520115', '观山湖区', '', '', '', '', 3, 1, ''), ('520121', '5201', '00,52,5201', '开阳县', '52', '贵州省', '5201', '贵阳市', '520121', '开阳县', '', '', '', '', 3, 1, ''), ('520122', '5201', '00,52,5201', '息烽县', '52', '贵州省', '5201', '贵阳市', '520122', '息烽县', '', '', '', '', 3, 1, ''), ('520123', '5201', '00,52,5201', '修文县', '52', '贵州省', '5201', '贵阳市', '520123', '修文县', '', '', '', '', 3, 1, ''), ('520181', '5201', '00,52,5201', '清镇市', '52', '贵州省', '5201', '贵阳市', '520181', '清镇市', '', '', '', '', 3, 1, ''), ('5202', '52', '00,52', '六盘水市', '52', '贵州省', '5202', '六盘水市', '', '', '', '', '', '', 2, 1, ''), ('520201', '5202', '00,52,5202', '钟山区', '52', '贵州省', '5202', '六盘水市', '520201', '钟山区', '', '', '', '', 3, 1, ''), ('520203', '5202', '00,52,5202', '六枝特区', '52', '贵州省', '5202', '六盘水市', '520203', '六枝特区', '', '', '', '', 3, 1, ''), ('520221', '5202', '00,52,5202', '水城县', '52', '贵州省', '5202', '六盘水市', '520221', '水城县', '', '', '', '', 3, 1, ''), ('520281', '5202', '00,52,5202', '盘州市', '52', '贵州省', '5202', '六盘水市', '520281', '盘州市', '', '', '', '', 3, 1, ''), ('5203', '52', '00,52', '遵义市', '52', '贵州省', '5203', '遵义市', '', '', '', '', '', '', 2, 1, ''), ('520302', '5203', '00,52,5203', '红花岗区', '52', '贵州省', '5203', '遵义市', '520302', '红花岗区', '', '', '', '', 3, 1, ''), ('520303', '5203', '00,52,5203', '汇川区', '52', '贵州省', '5203', '遵义市', '520303', '汇川区', '', '', '', '', 3, 1, ''), ('520304', '5203', '00,52,5203', '播州区', '52', '贵州省', '5203', '遵义市', '520304', '播州区', '', '', '', '', 3, 1, ''), ('520322', '5203', '00,52,5203', '桐梓县', '52', '贵州省', '5203', '遵义市', '520322', '桐梓县', '', '', '', '', 3, 1, ''), ('520323', '5203', '00,52,5203', '绥阳县', '52', '贵州省', '5203', '遵义市', '520323', '绥阳县', '', '', '', '', 3, 1, ''), ('520324', '5203', '00,52,5203', '正安县', '52', '贵州省', '5203', '遵义市', '520324', '正安县', '', '', '', '', 3, 1, ''), ('520325', '5203', '00,52,5203', '道真仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520325', '道真仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520326', '5203', '00,52,5203', '务川仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520326', '务川仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520327', '5203', '00,52,5203', '凤冈县', '52', '贵州省', '5203', '遵义市', '520327', '凤冈县', '', '', '', '', 3, 1, ''), ('520328', '5203', '00,52,5203', '湄潭县', '52', '贵州省', '5203', '遵义市', '520328', '湄潭县', '', '', '', '', 3, 1, ''), ('520329', '5203', '00,52,5203', '余庆县', '52', '贵州省', '5203', '遵义市', '520329', '余庆县', '', '', '', '', 3, 1, ''), ('520330', '5203', '00,52,5203', '习水县', '52', '贵州省', '5203', '遵义市', '520330', '习水县', '', '', '', '', 3, 1, ''), ('520381', '5203', '00,52,5203', '赤水市', '52', '贵州省', '5203', '遵义市', '520381', '赤水市', '', '', '', '', 3, 1, ''), ('520382', '5203', '00,52,5203', '仁怀市', '52', '贵州省', '5203', '遵义市', '520382', '仁怀市', '', '', '', '', 3, 1, ''), ('5204', '52', '00,52', '安顺市', '52', '贵州省', '5204', '安顺市', '', '', '', '', '', '', 2, 1, ''), ('520402', '5204', '00,52,5204', '西秀区', '52', '贵州省', '5204', '安顺市', '520402', '西秀区', '', '', '', '', 3, 1, ''), ('520403', '5204', '00,52,5204', '平坝区', '52', '贵州省', '5204', '安顺市', '520403', '平坝区', '', '', '', '', 3, 1, ''), ('520422', '5204', '00,52,5204', '普定县', '52', '贵州省', '5204', '安顺市', '520422', '普定县', '', '', '', '', 3, 1, ''), ('520423', '5204', '00,52,5204', '镇宁布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520423', '镇宁布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520424', '5204', '00,52,5204', '关岭布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520424', '关岭布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520425', '5204', '00,52,5204', '紫云苗族布依族自治县', '52', '贵州省', '5204', '安顺市', '520425', '紫云苗族布依族自治县', '', '', '', '', 3, 1, ''), ('5205', '52', '00,52', '毕节市', '52', '贵州省', '5205', '毕节市', '', '', '', '', '', '', 2, 1, ''), ('520502', '5205', '00,52,5205', '七星关区', '52', '贵州省', '5205', '毕节市', '520502', '七星关区', '', '', '', '', 3, 1, ''), ('520521', '5205', '00,52,5205', '大方县', '52', '贵州省', '5205', '毕节市', '520521', '大方县', '', '', '', '', 3, 1, ''), ('520522', '5205', '00,52,5205', '黔西县', '52', '贵州省', '5205', '毕节市', '520522', '黔西县', '', '', '', '', 3, 1, ''), ('520523', '5205', '00,52,5205', '金沙县', '52', '贵州省', '5205', '毕节市', '520523', '金沙县', '', '', '', '', 3, 1, ''), ('520524', '5205', '00,52,5205', '织金县', '52', '贵州省', '5205', '毕节市', '520524', '织金县', '', '', '', '', 3, 1, ''), ('520525', '5205', '00,52,5205', '纳雍县', '52', '贵州省', '5205', '毕节市', '520525', '纳雍县', '', '', '', '', 3, 1, ''), ('520526', '5205', '00,52,5205', '威宁彝族回族苗族自治县', '52', '贵州省', '5205', '毕节市', '520526', '威宁彝族回族苗族自治县', '', '', '', '', 3, 1, ''), ('520527', '5205', '00,52,5205', '赫章县', '52', '贵州省', '5205', '毕节市', '520527', '赫章县', '', '', '', '', 3, 1, ''), ('5206', '52', '00,52', '铜仁市', '52', '贵州省', '5206', '铜仁市', '', '', '', '', '', '', 2, 1, ''), ('520602', '5206', '00,52,5206', '碧江区', '52', '贵州省', '5206', '铜仁市', '520602', '碧江区', '', '', '', '', 3, 1, ''), ('520603', '5206', '00,52,5206', '万山区', '52', '贵州省', '5206', '铜仁市', '520603', '万山区', '', '', '', '', 3, 1, ''), ('520621', '5206', '00,52,5206', '江口县', '52', '贵州省', '5206', '铜仁市', '520621', '江口县', '', '', '', '', 3, 1, ''), ('520622', '5206', '00,52,5206', '玉屏侗族自治县', '52', '贵州省', '5206', '铜仁市', '520622', '玉屏侗族自治县', '', '', '', '', 3, 1, ''), ('520623', '5206', '00,52,5206', '石阡县', '52', '贵州省', '5206', '铜仁市', '520623', '石阡县', '', '', '', '', 3, 1, ''), ('520624', '5206', '00,52,5206', '思南县', '52', '贵州省', '5206', '铜仁市', '520624', '思南县', '', '', '', '', 3, 1, ''), ('520625', '5206', '00,52,5206', '印江土家族苗族自治县', '52', '贵州省', '5206', '铜仁市', '520625', '印江土家族苗族自治县', '', '', '', '', 3, 1, ''), ('520626', '5206', '00,52,5206', '德江县', '52', '贵州省', '5206', '铜仁市', '520626', '德江县', '', '', '', '', 3, 1, ''), ('520627', '5206', '00,52,5206', '沿河土家族自治县', '52', '贵州省', '5206', '铜仁市', '520627', '沿河土家族自治县', '', '', '', '', 3, 1, ''), ('520628', '5206', '00,52,5206', '松桃苗族自治县', '52', '贵州省', '5206', '铜仁市', '520628', '松桃苗族自治县', '', '', '', '', 3, 1, ''), ('5223', '52', '00,52', '黔西南布依族苗族自治州', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522301', '5223', '00,52,5223', '兴义市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522301', '兴义市', '', '', '', '', 3, 1, ''), ('522302', '5223', '00,52,5223', '兴仁市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522302', '兴仁市', '', '', '', '', 3, 1, ''), ('522323', '5223', '00,52,5223', '普安县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522323', '普安县', '', '', '', '', 3, 1, ''), ('522324', '5223', '00,52,5223', '晴隆县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522324', '晴隆县', '', '', '', '', 3, 1, ''), ('522325', '5223', '00,52,5223', '贞丰县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522325', '贞丰县', '', '', '', '', 3, 1, ''), ('522326', '5223', '00,52,5223', '望谟县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522326', '望谟县', '', '', '', '', 3, 1, ''), ('522327', '5223', '00,52,5223', '册亨县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522327', '册亨县', '', '', '', '', 3, 1, ''), ('522328', '5223', '00,52,5223', '安龙县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522328', '安龙县', '', '', '', '', 3, 1, ''), ('5226', '52', '00,52', '黔东南苗族侗族自治州', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522601', '5226', '00,52,5226', '凯里市', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522601', '凯里市', '', '', '', '', 3, 1, ''), ('522622', '5226', '00,52,5226', '黄平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522622', '黄平县', '', '', '', '', 3, 1, ''), ('522623', '5226', '00,52,5226', '施秉县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522623', '施秉县', '', '', '', '', 3, 1, ''), ('522624', '5226', '00,52,5226', '三穗县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522624', '三穗县', '', '', '', '', 3, 1, ''), ('522625', '5226', '00,52,5226', '镇远县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522625', '镇远县', '', '', '', '', 3, 1, ''), ('522626', '5226', '00,52,5226', '岑巩县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522626', '岑巩县', '', '', '', '', 3, 1, ''), ('522627', '5226', '00,52,5226', '天柱县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522627', '天柱县', '', '', '', '', 3, 1, ''), ('522628', '5226', '00,52,5226', '锦屏县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522628', '锦屏县', '', '', '', '', 3, 1, ''), ('522629', '5226', '00,52,5226', '剑河县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522629', '剑河县', '', '', '', '', 3, 1, ''), ('522630', '5226', '00,52,5226', '台江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522630', '台江县', '', '', '', '', 3, 1, ''), ('522631', '5226', '00,52,5226', '黎平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522631', '黎平县', '', '', '', '', 3, 1, ''), ('522632', '5226', '00,52,5226', '榕江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522632', '榕江县', '', '', '', '', 3, 1, ''), ('522633', '5226', '00,52,5226', '从江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522633', '从江县', '', '', '', '', 3, 1, ''), ('522634', '5226', '00,52,5226', '雷山县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522634', '雷山县', '', '', '', '', 3, 1, ''), ('522635', '5226', '00,52,5226', '麻江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522635', '麻江县', '', '', '', '', 3, 1, ''), ('522636', '5226', '00,52,5226', '丹寨县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522636', '丹寨县', '', '', '', '', 3, 1, ''), ('5227', '52', '00,52', '黔南布依族苗族自治州', '52', '贵州省', '5227', '黔南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522701', '5227', '00,52,5227', '都匀市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522701', '都匀市', '', '', '', '', 3, 1, ''), ('522702', '5227', '00,52,5227', '福泉市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522702', '福泉市', '', '', '', '', 3, 1, ''), ('522722', '5227', '00,52,5227', '荔波县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522722', '荔波县', '', '', '', '', 3, 1, ''), ('522723', '5227', '00,52,5227', '贵定县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522723', '贵定县', '', '', '', '', 3, 1, ''), ('522725', '5227', '00,52,5227', '瓮安县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522725', '瓮安县', '', '', '', '', 3, 1, ''), ('522726', '5227', '00,52,5227', '独山县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522726', '独山县', '', '', '', '', 3, 1, ''), ('522727', '5227', '00,52,5227', '平塘县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522727', '平塘县', '', '', '', '', 3, 1, ''), ('522728', '5227', '00,52,5227', '罗甸县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522728', '罗甸县', '', '', '', '', 3, 1, ''), ('522729', '5227', '00,52,5227', '长顺县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522729', '长顺县', '', '', '', '', 3, 1, ''), ('522730', '5227', '00,52,5227', '龙里县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522730', '龙里县', '', '', '', '', 3, 1, ''), ('522731', '5227', '00,52,5227', '惠水县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522731', '惠水县', '', '', '', '', 3, 1, ''), ('522732', '5227', '00,52,5227', '三都水族自治县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522732', '三都水族自治县', '', '', '', '', 3, 1, ''), ('53', '00', '00', '云南省', '53', '云南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5301', '53', '00,53', '昆明市', '53', '云南省', '5301', '昆明市', '', '', '', '', '', '', 2, 1, ''), ('530102', '5301', '00,53,5301', '五华区', '53', '云南省', '5301', '昆明市', '530102', '五华区', '', '', '', '', 3, 1, ''), ('530103', '5301', '00,53,5301', '盘龙区', '53', '云南省', '5301', '昆明市', '530103', '盘龙区', '', '', '', '', 3, 1, ''), ('530111', '5301', '00,53,5301', '官渡区', '53', '云南省', '5301', '昆明市', '530111', '官渡区', '', '', '', '', 3, 1, ''), ('530112', '5301', '00,53,5301', '西山区', '53', '云南省', '5301', '昆明市', '530112', '西山区', '', '', '', '', 3, 1, ''), ('530113', '5301', '00,53,5301', '东川区', '53', '云南省', '5301', '昆明市', '530113', '东川区', '', '', '', '', 3, 1, ''), ('530114', '5301', '00,53,5301', '呈贡区', '53', '云南省', '5301', '昆明市', '530114', '呈贡区', '', '', '', '', 3, 1, ''), ('530115', '5301', '00,53,5301', '晋宁区', '53', '云南省', '5301', '昆明市', '530115', '晋宁区', '', '', '', '', 3, 1, ''), ('530124', '5301', '00,53,5301', '富民县', '53', '云南省', '5301', '昆明市', '530124', '富民县', '', '', '', '', 3, 1, ''), ('530125', '5301', '00,53,5301', '宜良县', '53', '云南省', '5301', '昆明市', '530125', '宜良县', '', '', '', '', 3, 1, ''), ('530126', '5301', '00,53,5301', '石林彝族自治县', '53', '云南省', '5301', '昆明市', '530126', '石林彝族自治县', '', '', '', '', 3, 1, ''), ('530127', '5301', '00,53,5301', '嵩明县', '53', '云南省', '5301', '昆明市', '530127', '嵩明县', '', '', '', '', 3, 1, ''), ('530128', '5301', '00,53,5301', '禄劝彝族苗族自治县', '53', '云南省', '5301', '昆明市', '530128', '禄劝彝族苗族自治县', '', '', '', '', 3, 1, ''), ('530129', '5301', '00,53,5301', '寻甸回族彝族自治县', '53', '云南省', '5301', '昆明市', '530129', '寻甸回族彝族自治县', '', '', '', '', 3, 1, ''), ('530181', '5301', '00,53,5301', '安宁市', '53', '云南省', '5301', '昆明市', '530181', '安宁市', '', '', '', '', 3, 1, ''), ('5303', '53', '00,53', '曲靖市', '53', '云南省', '5303', '曲靖市', '', '', '', '', '', '', 2, 1, ''), ('530302', '5303', '00,53,5303', '麒麟区', '53', '云南省', '5303', '曲靖市', '530302', '麒麟区', '', '', '', '', 3, 1, ''), ('530303', '5303', '00,53,5303', '沾益区', '53', '云南省', '5303', '曲靖市', '530303', '沾益区', '', '', '', '', 3, 1, ''), ('530304', '5303', '00,53,5303', '马龙区', '53', '云南省', '5303', '曲靖市', '530304', '马龙区', '', '', '', '', 3, 1, ''), ('530322', '5303', '00,53,5303', '陆良县', '53', '云南省', '5303', '曲靖市', '530322', '陆良县', '', '', '', '', 3, 1, ''), ('530323', '5303', '00,53,5303', '师宗县', '53', '云南省', '5303', '曲靖市', '530323', '师宗县', '', '', '', '', 3, 1, ''), ('530324', '5303', '00,53,5303', '罗平县', '53', '云南省', '5303', '曲靖市', '530324', '罗平县', '', '', '', '', 3, 1, ''), ('530325', '5303', '00,53,5303', '富源县', '53', '云南省', '5303', '曲靖市', '530325', '富源县', '', '', '', '', 3, 1, ''), ('530326', '5303', '00,53,5303', '会泽县', '53', '云南省', '5303', '曲靖市', '530326', '会泽县', '', '', '', '', 3, 1, ''), ('530381', '5303', '00,53,5303', '宣威市', '53', '云南省', '5303', '曲靖市', '530381', '宣威市', '', '', '', '', 3, 1, ''), ('5304', '53', '00,53', '玉溪市', '53', '云南省', '5304', '玉溪市', '', '', '', '', '', '', 2, 1, ''), ('530402', '5304', '00,53,5304', '红塔区', '53', '云南省', '5304', '玉溪市', '530402', '红塔区', '', '', '', '', 3, 1, ''), ('530403', '5304', '00,53,5304', '江川区', '53', '云南省', '5304', '玉溪市', '530403', '江川区', '', '', '', '', 3, 1, ''), ('530423', '5304', '00,53,5304', '通海县', '53', '云南省', '5304', '玉溪市', '530423', '通海县', '', '', '', '', 3, 1, ''), ('530424', '5304', '00,53,5304', '华宁县', '53', '云南省', '5304', '玉溪市', '530424', '华宁县', '', '', '', '', 3, 1, ''), ('530425', '5304', '00,53,5304', '易门县', '53', '云南省', '5304', '玉溪市', '530425', '易门县', '', '', '', '', 3, 1, ''), ('530426', '5304', '00,53,5304', '峨山彝族自治县', '53', '云南省', '5304', '玉溪市', '530426', '峨山彝族自治县', '', '', '', '', 3, 1, ''), ('530427', '5304', '00,53,5304', '新平彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530427', '新平彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530428', '5304', '00,53,5304', '元江哈尼族彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530428', '元江哈尼族彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530481', '5304', '00,53,5304', '澄江市', '53', '云南省', '5304', '玉溪市', '530481', '澄江市', '', '', '', '', 3, 1, ''), ('5305', '53', '00,53', '保山市', '53', '云南省', '5305', '保山市', '', '', '', '', '', '', 2, 1, ''), ('530502', '5305', '00,53,5305', '隆阳区', '53', '云南省', '5305', '保山市', '530502', '隆阳区', '', '', '', '', 3, 1, ''), ('530521', '5305', '00,53,5305', '施甸县', '53', '云南省', '5305', '保山市', '530521', '施甸县', '', '', '', '', 3, 1, ''), ('530523', '5305', '00,53,5305', '龙陵县', '53', '云南省', '5305', '保山市', '530523', '龙陵县', '', '', '', '', 3, 1, ''), ('530524', '5305', '00,53,5305', '昌宁县', '53', '云南省', '5305', '保山市', '530524', '昌宁县', '', '', '', '', 3, 1, ''), ('530581', '5305', '00,53,5305', '腾冲市', '53', '云南省', '5305', '保山市', '530581', '腾冲市', '', '', '', '', 3, 1, ''), ('5306', '53', '00,53', '昭通市', '53', '云南省', '5306', '昭通市', '', '', '', '', '', '', 2, 1, ''), ('530602', '5306', '00,53,5306', '昭阳区', '53', '云南省', '5306', '昭通市', '530602', '昭阳区', '', '', '', '', 3, 1, ''), ('530621', '5306', '00,53,5306', '鲁甸县', '53', '云南省', '5306', '昭通市', '530621', '鲁甸县', '', '', '', '', 3, 1, ''), ('530622', '5306', '00,53,5306', '巧家县', '53', '云南省', '5306', '昭通市', '530622', '巧家县', '', '', '', '', 3, 1, ''), ('530623', '5306', '00,53,5306', '盐津县', '53', '云南省', '5306', '昭通市', '530623', '盐津县', '', '', '', '', 3, 1, ''), ('530624', '5306', '00,53,5306', '大关县', '53', '云南省', '5306', '昭通市', '530624', '大关县', '', '', '', '', 3, 1, ''), ('530625', '5306', '00,53,5306', '永善县', '53', '云南省', '5306', '昭通市', '530625', '永善县', '', '', '', '', 3, 1, ''), ('530626', '5306', '00,53,5306', '绥江县', '53', '云南省', '5306', '昭通市', '530626', '绥江县', '', '', '', '', 3, 1, ''), ('530627', '5306', '00,53,5306', '镇雄县', '53', '云南省', '5306', '昭通市', '530627', '镇雄县', '', '', '', '', 3, 1, ''), ('530628', '5306', '00,53,5306', '彝良县', '53', '云南省', '5306', '昭通市', '530628', '彝良县', '', '', '', '', 3, 1, ''), ('530629', '5306', '00,53,5306', '威信县', '53', '云南省', '5306', '昭通市', '530629', '威信县', '', '', '', '', 3, 1, ''), ('530681', '5306', '00,53,5306', '水富市', '53', '云南省', '5306', '昭通市', '530681', '水富市', '', '', '', '', 3, 1, ''), ('5307', '53', '00,53', '丽江市', '53', '云南省', '5307', '丽江市', '', '', '', '', '', '', 2, 1, ''), ('530702', '5307', '00,53,5307', '古城区', '53', '云南省', '5307', '丽江市', '530702', '古城区', '', '', '', '', 3, 1, ''), ('530721', '5307', '00,53,5307', '玉龙纳西族自治县', '53', '云南省', '5307', '丽江市', '530721', '玉龙纳西族自治县', '', '', '', '', 3, 1, ''), ('530722', '5307', '00,53,5307', '永胜县', '53', '云南省', '5307', '丽江市', '530722', '永胜县', '', '', '', '', 3, 1, ''), ('530723', '5307', '00,53,5307', '华坪县', '53', '云南省', '5307', '丽江市', '530723', '华坪县', '', '', '', '', 3, 1, ''), ('530724', '5307', '00,53,5307', '宁蒗彝族自治县', '53', '云南省', '5307', '丽江市', '530724', '宁蒗彝族自治县', '', '', '', '', 3, 1, ''), ('5308', '53', '00,53', '普洱市', '53', '云南省', '5308', '普洱市', '', '', '', '', '', '', 2, 1, ''), ('530802', '5308', '00,53,5308', '思茅区', '53', '云南省', '5308', '普洱市', '530802', '思茅区', '', '', '', '', 3, 1, ''), ('530821', '5308', '00,53,5308', '宁洱哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530821', '宁洱哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530822', '5308', '00,53,5308', '墨江哈尼族自治县', '53', '云南省', '5308', '普洱市', '530822', '墨江哈尼族自治县', '', '', '', '', 3, 1, ''), ('530823', '5308', '00,53,5308', '景东彝族自治县', '53', '云南省', '5308', '普洱市', '530823', '景东彝族自治县', '', '', '', '', 3, 1, ''), ('530824', '5308', '00,53,5308', '景谷傣族彝族自治县', '53', '云南省', '5308', '普洱市', '530824', '景谷傣族彝族自治县', '', '', '', '', 3, 1, ''), ('530825', '5308', '00,53,5308', '镇沅彝族哈尼族拉祜族自治县', '53', '云南省', '5308', '普洱市', '530825', '镇沅彝族哈尼族拉祜族自治县', '', '', '', '', 3, 1, ''), ('530826', '5308', '00,53,5308', '江城哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530826', '江城哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530827', '5308', '00,53,5308', '孟连傣族拉祜族佤族自治县', '53', '云南省', '5308', '普洱市', '530827', '孟连傣族拉祜族佤族自治县', '', '', '', '', 3, 1, ''), ('530828', '5308', '00,53,5308', '澜沧拉祜族自治县', '53', '云南省', '5308', '普洱市', '530828', '澜沧拉祜族自治县', '', '', '', '', 3, 1, ''), ('530829', '5308', '00,53,5308', '西盟佤族自治县', '53', '云南省', '5308', '普洱市', '530829', '西盟佤族自治县', '', '', '', '', 3, 1, ''), ('5309', '53', '00,53', '临沧市', '53', '云南省', '5309', '临沧市', '', '', '', '', '', '', 2, 1, ''), ('530902', '5309', '00,53,5309', '临翔区', '53', '云南省', '5309', '临沧市', '530902', '临翔区', '', '', '', '', 3, 1, ''), ('530921', '5309', '00,53,5309', '凤庆县', '53', '云南省', '5309', '临沧市', '530921', '凤庆县', '', '', '', '', 3, 1, ''), ('530922', '5309', '00,53,5309', '云县', '53', '云南省', '5309', '临沧市', '530922', '云县', '', '', '', '', 3, 1, ''), ('530923', '5309', '00,53,5309', '永德县', '53', '云南省', '5309', '临沧市', '530923', '永德县', '', '', '', '', 3, 1, ''), ('530924', '5309', '00,53,5309', '镇康县', '53', '云南省', '5309', '临沧市', '530924', '镇康县', '', '', '', '', 3, 1, ''), ('530925', '5309', '00,53,5309', '双江拉祜族佤族布朗族傣族自治县', '53', '云南省', '5309', '临沧市', '530925', '双江拉祜族佤族布朗族傣族自治县', '', '', '', '', 3, 1, ''), ('530926', '5309', '00,53,5309', '耿马傣族佤族自治县', '53', '云南省', '5309', '临沧市', '530926', '耿马傣族佤族自治县', '', '', '', '', 3, 1, ''), ('530927', '5309', '00,53,5309', '沧源佤族自治县', '53', '云南省', '5309', '临沧市', '530927', '沧源佤族自治县', '', '', '', '', 3, 1, ''), ('5323', '53', '00,53', '楚雄彝族自治州', '53', '云南省', '5323', '楚雄彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532301', '5323', '00,53,5323', '楚雄市', '53', '云南省', '5323', '楚雄彝族自治州', '532301', '楚雄市', '', '', '', '', 3, 1, ''), ('532322', '5323', '00,53,5323', '双柏县', '53', '云南省', '5323', '楚雄彝族自治州', '532322', '双柏县', '', '', '', '', 3, 1, ''), ('532323', '5323', '00,53,5323', '牟定县', '53', '云南省', '5323', '楚雄彝族自治州', '532323', '牟定县', '', '', '', '', 3, 1, ''), ('532324', '5323', '00,53,5323', '南华县', '53', '云南省', '5323', '楚雄彝族自治州', '532324', '南华县', '', '', '', '', 3, 1, ''), ('532325', '5323', '00,53,5323', '姚安县', '53', '云南省', '5323', '楚雄彝族自治州', '532325', '姚安县', '', '', '', '', 3, 1, ''), ('532326', '5323', '00,53,5323', '大姚县', '53', '云南省', '5323', '楚雄彝族自治州', '532326', '大姚县', '', '', '', '', 3, 1, ''), ('532327', '5323', '00,53,5323', '永仁县', '53', '云南省', '5323', '楚雄彝族自治州', '532327', '永仁县', '', '', '', '', 3, 1, ''), ('532328', '5323', '00,53,5323', '元谋县', '53', '云南省', '5323', '楚雄彝族自治州', '532328', '元谋县', '', '', '', '', 3, 1, ''), ('532329', '5323', '00,53,5323', '武定县', '53', '云南省', '5323', '楚雄彝族自治州', '532329', '武定县', '', '', '', '', 3, 1, ''), ('532331', '5323', '00,53,5323', '禄丰县', '53', '云南省', '5323', '楚雄彝族自治州', '532331', '禄丰县', '', '', '', '', 3, 1, ''), ('5325', '53', '00,53', '红河哈尼族彝族自治州', '53', '云南省', '5325', '红河哈尼族彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532501', '5325', '00,53,5325', '个旧市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532501', '个旧市', '', '', '', '', 3, 1, ''), ('532502', '5325', '00,53,5325', '开远市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532502', '开远市', '', '', '', '', 3, 1, ''), ('532503', '5325', '00,53,5325', '蒙自市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532503', '蒙自市', '', '', '', '', 3, 1, ''), ('532504', '5325', '00,53,5325', '弥勒市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532504', '弥勒市', '', '', '', '', 3, 1, ''), ('532523', '5325', '00,53,5325', '屏边苗族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532523', '屏边苗族自治县', '', '', '', '', 3, 1, ''), ('532524', '5325', '00,53,5325', '建水县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532524', '建水县', '', '', '', '', 3, 1, ''), ('532525', '5325', '00,53,5325', '石屏县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532525', '石屏县', '', '', '', '', 3, 1, ''), ('532527', '5325', '00,53,5325', '泸西县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532527', '泸西县', '', '', '', '', 3, 1, ''), ('532528', '5325', '00,53,5325', '元阳县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532528', '元阳县', '', '', '', '', 3, 1, ''), ('532529', '5325', '00,53,5325', '红河县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532529', '红河县', '', '', '', '', 3, 1, ''), ('532530', '5325', '00,53,5325', '金平苗族瑶族傣族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532530', '金平苗族瑶族傣族自治县', '', '', '', '', 3, 1, ''), ('532531', '5325', '00,53,5325', '绿春县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532531', '绿春县', '', '', '', '', 3, 1, ''), ('532532', '5325', '00,53,5325', '河口瑶族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532532', '河口瑶族自治县', '', '', '', '', 3, 1, ''), ('5326', '53', '00,53', '文山壮族苗族自治州', '53', '云南省', '5326', '文山壮族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('532601', '5326', '00,53,5326', '文山市', '53', '云南省', '5326', '文山壮族苗族自治州', '532601', '文山市', '', '', '', '', 3, 1, ''), ('532622', '5326', '00,53,5326', '砚山县', '53', '云南省', '5326', '文山壮族苗族自治州', '532622', '砚山县', '', '', '', '', 3, 1, ''), ('532623', '5326', '00,53,5326', '西畴县', '53', '云南省', '5326', '文山壮族苗族自治州', '532623', '西畴县', '', '', '', '', 3, 1, ''), ('532624', '5326', '00,53,5326', '麻栗坡县', '53', '云南省', '5326', '文山壮族苗族自治州', '532624', '麻栗坡县', '', '', '', '', 3, 1, ''), ('532625', '5326', '00,53,5326', '马关县', '53', '云南省', '5326', '文山壮族苗族自治州', '532625', '马关县', '', '', '', '', 3, 1, ''), ('532626', '5326', '00,53,5326', '丘北县', '53', '云南省', '5326', '文山壮族苗族自治州', '532626', '丘北县', '', '', '', '', 3, 1, ''), ('532627', '5326', '00,53,5326', '广南县', '53', '云南省', '5326', '文山壮族苗族自治州', '532627', '广南县', '', '', '', '', 3, 1, ''), ('532628', '5326', '00,53,5326', '富宁县', '53', '云南省', '5326', '文山壮族苗族自治州', '532628', '富宁县', '', '', '', '', 3, 1, ''), ('5328', '53', '00,53', '西双版纳傣族自治州', '53', '云南省', '5328', '西双版纳傣族自治州', '', '', '', '', '', '', 2, 1, ''), ('532801', '5328', '00,53,5328', '景洪市', '53', '云南省', '5328', '西双版纳傣族自治州', '532801', '景洪市', '', '', '', '', 3, 1, ''), ('532822', '5328', '00,53,5328', '勐海县', '53', '云南省', '5328', '西双版纳傣族自治州', '532822', '勐海县', '', '', '', '', 3, 1, ''), ('532823', '5328', '00,53,5328', '勐腊县', '53', '云南省', '5328', '西双版纳傣族自治州', '532823', '勐腊县', '', '', '', '', 3, 1, ''), ('5329', '53', '00,53', '大理白族自治州', '53', '云南省', '5329', '大理白族自治州', '', '', '', '', '', '', 2, 1, ''), ('532901', '5329', '00,53,5329', '大理市', '53', '云南省', '5329', '大理白族自治州', '532901', '大理市', '', '', '', '', 3, 1, ''), ('532922', '5329', '00,53,5329', '漾濞彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532922', '漾濞彝族自治县', '', '', '', '', 3, 1, ''), ('532923', '5329', '00,53,5329', '祥云县', '53', '云南省', '5329', '大理白族自治州', '532923', '祥云县', '', '', '', '', 3, 1, ''), ('532924', '5329', '00,53,5329', '宾川县', '53', '云南省', '5329', '大理白族自治州', '532924', '宾川县', '', '', '', '', 3, 1, ''), ('532925', '5329', '00,53,5329', '弥渡县', '53', '云南省', '5329', '大理白族自治州', '532925', '弥渡县', '', '', '', '', 3, 1, ''), ('532926', '5329', '00,53,5329', '南涧彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532926', '南涧彝族自治县', '', '', '', '', 3, 1, ''), ('532927', '5329', '00,53,5329', '巍山彝族回族自治县', '53', '云南省', '5329', '大理白族自治州', '532927', '巍山彝族回族自治县', '', '', '', '', 3, 1, ''), ('532928', '5329', '00,53,5329', '永平县', '53', '云南省', '5329', '大理白族自治州', '532928', '永平县', '', '', '', '', 3, 1, ''), ('532929', '5329', '00,53,5329', '云龙县', '53', '云南省', '5329', '大理白族自治州', '532929', '云龙县', '', '', '', '', 3, 1, ''), ('532930', '5329', '00,53,5329', '洱源县', '53', '云南省', '5329', '大理白族自治州', '532930', '洱源县', '', '', '', '', 3, 1, ''), ('532931', '5329', '00,53,5329', '剑川县', '53', '云南省', '5329', '大理白族自治州', '532931', '剑川县', '', '', '', '', 3, 1, ''), ('532932', '5329', '00,53,5329', '鹤庆县', '53', '云南省', '5329', '大理白族自治州', '532932', '鹤庆县', '', '', '', '', 3, 1, ''), ('5331', '53', '00,53', '德宏傣族景颇族自治州', '53', '云南省', '5331', '德宏傣族景颇族自治州', '', '', '', '', '', '', 2, 1, ''), ('533102', '5331', '00,53,5331', '瑞丽市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533102', '瑞丽市', '', '', '', '', 3, 1, ''), ('533103', '5331', '00,53,5331', '芒市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533103', '芒市', '', '', '', '', 3, 1, ''), ('533122', '5331', '00,53,5331', '梁河县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533122', '梁河县', '', '', '', '', 3, 1, ''), ('533123', '5331', '00,53,5331', '盈江县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533123', '盈江县', '', '', '', '', 3, 1, ''), ('533124', '5331', '00,53,5331', '陇川县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533124', '陇川县', '', '', '', '', 3, 1, ''), ('5333', '53', '00,53', '怒江傈僳族自治州', '53', '云南省', '5333', '怒江傈僳族自治州', '', '', '', '', '', '', 2, 1, ''), ('533301', '5333', '00,53,5333', '泸水市', '53', '云南省', '5333', '怒江傈僳族自治州', '533301', '泸水市', '', '', '', '', 3, 1, ''), ('533323', '5333', '00,53,5333', '福贡县', '53', '云南省', '5333', '怒江傈僳族自治州', '533323', '福贡县', '', '', '', '', 3, 1, ''), ('533324', '5333', '00,53,5333', '贡山独龙族怒族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533324', '贡山独龙族怒族自治县', '', '', '', '', 3, 1, ''), ('533325', '5333', '00,53,5333', '兰坪白族普米族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533325', '兰坪白族普米族自治县', '', '', '', '', 3, 1, ''), ('5334', '53', '00,53', '迪庆藏族自治州', '53', '云南省', '5334', '迪庆藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('533401', '5334', '00,53,5334', '香格里拉市', '53', '云南省', '5334', '迪庆藏族自治州', '533401', '香格里拉市', '', '', '', '', 3, 1, ''), ('533422', '5334', '00,53,5334', '德钦县', '53', '云南省', '5334', '迪庆藏族自治州', '533422', '德钦县', '', '', '', '', 3, 1, ''), ('533423', '5334', '00,53,5334', '维西傈僳族自治县', '53', '云南省', '5334', '迪庆藏族自治州', '533423', '维西傈僳族自治县', '', '', '', '', 3, 1, ''), ('54', '00', '00', '西藏自治区', '54', '西藏自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('5401', '54', '00,54', '拉萨市', '54', '西藏自治区', '5401', '拉萨市', '', '', '', '', '', '', 2, 1, ''), ('540102', '5401', '00,54,5401', '城关区', '54', '西藏自治区', '5401', '拉萨市', '540102', '城关区', '', '', '', '', 3, 1, ''), ('540103', '5401', '00,54,5401', '堆龙德庆区', '54', '西藏自治区', '5401', '拉萨市', '540103', '堆龙德庆区', '', '', '', '', 3, 1, ''), ('540104', '5401', '00,54,5401', '达孜区', '54', '西藏自治区', '5401', '拉萨市', '540104', '达孜区', '', '', '', '', 3, 1, ''), ('540121', '5401', '00,54,5401', '林周县', '54', '西藏自治区', '5401', '拉萨市', '540121', '林周县', '', '', '', '', 3, 1, ''), ('540122', '5401', '00,54,5401', '当雄县', '54', '西藏自治区', '5401', '拉萨市', '540122', '当雄县', '', '', '', '', 3, 1, ''), ('540123', '5401', '00,54,5401', '尼木县', '54', '西藏自治区', '5401', '拉萨市', '540123', '尼木县', '', '', '', '', 3, 1, ''), ('540124', '5401', '00,54,5401', '曲水县', '54', '西藏自治区', '5401', '拉萨市', '540124', '曲水县', '', '', '', '', 3, 1, ''), ('540127', '5401', '00,54,5401', '墨竹工卡县', '54', '西藏自治区', '5401', '拉萨市', '540127', '墨竹工卡县', '', '', '', '', 3, 1, ''), ('5402', '54', '00,54', '日喀则市', '54', '西藏自治区', '5402', '日喀则市', '', '', '', '', '', '', 2, 1, ''), ('540202', '5402', '00,54,5402', '桑珠孜区', '54', '西藏自治区', '5402', '日喀则市', '540202', '桑珠孜区', '', '', '', '', 3, 1, ''), ('540221', '5402', '00,54,5402', '南木林县', '54', '西藏自治区', '5402', '日喀则市', '540221', '南木林县', '', '', '', '', 3, 1, ''), ('540222', '5402', '00,54,5402', '江孜县', '54', '西藏自治区', '5402', '日喀则市', '540222', '江孜县', '', '', '', '', 3, 1, ''), ('540223', '5402', '00,54,5402', '定日县', '54', '西藏自治区', '5402', '日喀则市', '540223', '定日县', '', '', '', '', 3, 1, ''), ('540224', '5402', '00,54,5402', '萨迦县', '54', '西藏自治区', '5402', '日喀则市', '540224', '萨迦县', '', '', '', '', 3, 1, ''), ('540225', '5402', '00,54,5402', '拉孜县', '54', '西藏自治区', '5402', '日喀则市', '540225', '拉孜县', '', '', '', '', 3, 1, ''), ('540226', '5402', '00,54,5402', '昂仁县', '54', '西藏自治区', '5402', '日喀则市', '540226', '昂仁县', '', '', '', '', 3, 1, ''), ('540227', '5402', '00,54,5402', '谢通门县', '54', '西藏自治区', '5402', '日喀则市', '540227', '谢通门县', '', '', '', '', 3, 1, ''), ('540228', '5402', '00,54,5402', '白朗县', '54', '西藏自治区', '5402', '日喀则市', '540228', '白朗县', '', '', '', '', 3, 1, ''), ('540229', '5402', '00,54,5402', '仁布县', '54', '西藏自治区', '5402', '日喀则市', '540229', '仁布县', '', '', '', '', 3, 1, ''), ('540230', '5402', '00,54,5402', '康马县', '54', '西藏自治区', '5402', '日喀则市', '540230', '康马县', '', '', '', '', 3, 1, ''), ('540231', '5402', '00,54,5402', '定结县', '54', '西藏自治区', '5402', '日喀则市', '540231', '定结县', '', '', '', '', 3, 1, ''), ('540232', '5402', '00,54,5402', '仲巴县', '54', '西藏自治区', '5402', '日喀则市', '540232', '仲巴县', '', '', '', '', 3, 1, ''), ('540233', '5402', '00,54,5402', '亚东县', '54', '西藏自治区', '5402', '日喀则市', '540233', '亚东县', '', '', '', '', 3, 1, ''), ('540234', '5402', '00,54,5402', '吉隆县', '54', '西藏自治区', '5402', '日喀则市', '540234', '吉隆县', '', '', '', '', 3, 1, ''), ('540235', '5402', '00,54,5402', '聂拉木县', '54', '西藏自治区', '5402', '日喀则市', '540235', '聂拉木县', '', '', '', '', 3, 1, ''), ('540236', '5402', '00,54,5402', '萨嘎县', '54', '西藏自治区', '5402', '日喀则市', '540236', '萨嘎县', '', '', '', '', 3, 1, ''), ('540237', '5402', '00,54,5402', '岗巴县', '54', '西藏自治区', '5402', '日喀则市', '540237', '岗巴县', '', '', '', '', 3, 1, ''), ('5403', '54', '00,54', '昌都市', '54', '西藏自治区', '5403', '昌都市', '', '', '', '', '', '', 2, 1, ''), ('540302', '5403', '00,54,5403', '卡若区', '54', '西藏自治区', '5403', '昌都市', '540302', '卡若区', '', '', '', '', 3, 1, ''), ('540321', '5403', '00,54,5403', '江达县', '54', '西藏自治区', '5403', '昌都市', '540321', '江达县', '', '', '', '', 3, 1, ''), ('540322', '5403', '00,54,5403', '贡觉县', '54', '西藏自治区', '5403', '昌都市', '540322', '贡觉县', '', '', '', '', 3, 1, ''), ('540323', '5403', '00,54,5403', '类乌齐县', '54', '西藏自治区', '5403', '昌都市', '540323', '类乌齐县', '', '', '', '', 3, 1, ''), ('540324', '5403', '00,54,5403', '丁青县', '54', '西藏自治区', '5403', '昌都市', '540324', '丁青县', '', '', '', '', 3, 1, ''), ('540325', '5403', '00,54,5403', '察雅县', '54', '西藏自治区', '5403', '昌都市', '540325', '察雅县', '', '', '', '', 3, 1, ''), ('540326', '5403', '00,54,5403', '八宿县', '54', '西藏自治区', '5403', '昌都市', '540326', '八宿县', '', '', '', '', 3, 1, ''), ('540327', '5403', '00,54,5403', '左贡县', '54', '西藏自治区', '5403', '昌都市', '540327', '左贡县', '', '', '', '', 3, 1, ''), ('540328', '5403', '00,54,5403', '芒康县', '54', '西藏自治区', '5403', '昌都市', '540328', '芒康县', '', '', '', '', 3, 1, ''), ('540329', '5403', '00,54,5403', '洛隆县', '54', '西藏自治区', '5403', '昌都市', '540329', '洛隆县', '', '', '', '', 3, 1, ''), ('540330', '5403', '00,54,5403', '边坝县', '54', '西藏自治区', '5403', '昌都市', '540330', '边坝县', '', '', '', '', 3, 1, ''), ('5404', '54', '00,54', '林芝市', '54', '西藏自治区', '5404', '林芝市', '', '', '', '', '', '', 2, 1, ''), ('540402', '5404', '00,54,5404', '巴宜区', '54', '西藏自治区', '5404', '林芝市', '540402', '巴宜区', '', '', '', '', 3, 1, ''), ('540421', '5404', '00,54,5404', '工布江达县', '54', '西藏自治区', '5404', '林芝市', '540421', '工布江达县', '', '', '', '', 3, 1, ''), ('540422', '5404', '00,54,5404', '米林县', '54', '西藏自治区', '5404', '林芝市', '540422', '米林县', '', '', '', '', 3, 1, ''), ('540423', '5404', '00,54,5404', '墨脱县', '54', '西藏自治区', '5404', '林芝市', '540423', '墨脱县', '', '', '', '', 3, 1, ''), ('540424', '5404', '00,54,5404', '波密县', '54', '西藏自治区', '5404', '林芝市', '540424', '波密县', '', '', '', '', 3, 1, ''), ('540425', '5404', '00,54,5404', '察隅县', '54', '西藏自治区', '5404', '林芝市', '540425', '察隅县', '', '', '', '', 3, 1, ''), ('540426', '5404', '00,54,5404', '朗县', '54', '西藏自治区', '5404', '林芝市', '540426', '朗县', '', '', '', '', 3, 1, ''), ('5405', '54', '00,54', '山南市', '54', '西藏自治区', '5405', '山南市', '', '', '', '', '', '', 2, 1, ''), ('540502', '5405', '00,54,5405', '乃东区', '54', '西藏自治区', '5405', '山南市', '540502', '乃东区', '', '', '', '', 3, 1, ''), ('540521', '5405', '00,54,5405', '扎囊县', '54', '西藏自治区', '5405', '山南市', '540521', '扎囊县', '', '', '', '', 3, 1, ''), ('540522', '5405', '00,54,5405', '贡嘎县', '54', '西藏自治区', '5405', '山南市', '540522', '贡嘎县', '', '', '', '', 3, 1, ''), ('540523', '5405', '00,54,5405', '桑日县', '54', '西藏自治区', '5405', '山南市', '540523', '桑日县', '', '', '', '', 3, 1, ''), ('540524', '5405', '00,54,5405', '琼结县', '54', '西藏自治区', '5405', '山南市', '540524', '琼结县', '', '', '', '', 3, 1, ''), ('540525', '5405', '00,54,5405', '曲松县', '54', '西藏自治区', '5405', '山南市', '540525', '曲松县', '', '', '', '', 3, 1, ''), ('540526', '5405', '00,54,5405', '措美县', '54', '西藏自治区', '5405', '山南市', '540526', '措美县', '', '', '', '', 3, 1, ''), ('540527', '5405', '00,54,5405', '洛扎县', '54', '西藏自治区', '5405', '山南市', '540527', '洛扎县', '', '', '', '', 3, 1, ''), ('540528', '5405', '00,54,5405', '加查县', '54', '西藏自治区', '5405', '山南市', '540528', '加查县', '', '', '', '', 3, 1, ''), ('540529', '5405', '00,54,5405', '隆子县', '54', '西藏自治区', '5405', '山南市', '540529', '隆子县', '', '', '', '', 3, 1, ''), ('540530', '5405', '00,54,5405', '错那县', '54', '西藏自治区', '5405', '山南市', '540530', '错那县', '', '', '', '', 3, 1, ''), ('540531', '5405', '00,54,5405', '浪卡子县', '54', '西藏自治区', '5405', '山南市', '540531', '浪卡子县', '', '', '', '', 3, 1, ''), ('5406', '54', '00,54', '那曲市', '54', '西藏自治区', '5406', '那曲市', '', '', '', '', '', '', 2, 1, ''), ('540602', '5406', '00,54,5406', '色尼区', '54', '西藏自治区', '5406', '那曲市', '540602', '色尼区', '', '', '', '', 3, 1, ''), ('540621', '5406', '00,54,5406', '嘉黎县', '54', '西藏自治区', '5406', '那曲市', '540621', '嘉黎县', '', '', '', '', 3, 1, ''), ('540622', '5406', '00,54,5406', '比如县', '54', '西藏自治区', '5406', '那曲市', '540622', '比如县', '', '', '', '', 3, 1, ''), ('540623', '5406', '00,54,5406', '聂荣县', '54', '西藏自治区', '5406', '那曲市', '540623', '聂荣县', '', '', '', '', 3, 1, ''), ('540624', '5406', '00,54,5406', '安多县', '54', '西藏自治区', '5406', '那曲市', '540624', '安多县', '', '', '', '', 3, 1, ''), ('540625', '5406', '00,54,5406', '申扎县', '54', '西藏自治区', '5406', '那曲市', '540625', '申扎县', '', '', '', '', 3, 1, ''), ('540626', '5406', '00,54,5406', '索县', '54', '西藏自治区', '5406', '那曲市', '540626', '索县', '', '', '', '', 3, 1, ''), ('540627', '5406', '00,54,5406', '班戈县', '54', '西藏自治区', '5406', '那曲市', '540627', '班戈县', '', '', '', '', 3, 1, ''), ('540628', '5406', '00,54,5406', '巴青县', '54', '西藏自治区', '5406', '那曲市', '540628', '巴青县', '', '', '', '', 3, 1, ''), ('540629', '5406', '00,54,5406', '尼玛县', '54', '西藏自治区', '5406', '那曲市', '540629', '尼玛县', '', '', '', '', 3, 1, ''), ('540630', '5406', '00,54,5406', '双湖县', '54', '西藏自治区', '5406', '那曲市', '540630', '双湖县', '', '', '', '', 3, 1, ''), ('5425', '54', '00,54', '阿里地区', '54', '西藏自治区', '5425', '阿里地区', '', '', '', '', '', '', 2, 1, ''), ('542521', '5425', '00,54,5425', '普兰县', '54', '西藏自治区', '5425', '阿里地区', '542521', '普兰县', '', '', '', '', 3, 1, ''), ('542522', '5425', '00,54,5425', '札达县', '54', '西藏自治区', '5425', '阿里地区', '542522', '札达县', '', '', '', '', 3, 1, ''), ('542523', '5425', '00,54,5425', '噶尔县', '54', '西藏自治区', '5425', '阿里地区', '542523', '噶尔县', '', '', '', '', 3, 1, ''), ('542524', '5425', '00,54,5425', '日土县', '54', '西藏自治区', '5425', '阿里地区', '542524', '日土县', '', '', '', '', 3, 1, ''), ('542525', '5425', '00,54,5425', '革吉县', '54', '西藏自治区', '5425', '阿里地区', '542525', '革吉县', '', '', '', '', 3, 1, ''), ('542526', '5425', '00,54,5425', '改则县', '54', '西藏自治区', '5425', '阿里地区', '542526', '改则县', '', '', '', '', 3, 1, ''), ('542527', '5425', '00,54,5425', '措勤县', '54', '西藏自治区', '5425', '阿里地区', '542527', '措勤县', '', '', '', '', 3, 1, ''), ('61', '00', '00', '陕西省', '61', '陕西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6101', '61', '00,61', '西安市', '61', '陕西省', '6101', '西安市', '', '', '', '', '', '', 2, 1, ''), ('610102', '6101', '00,61,6101', '新城区', '61', '陕西省', '6101', '西安市', '610102', '新城区', '', '', '', '', 3, 1, ''), ('610103', '6101', '00,61,6101', '碑林区', '61', '陕西省', '6101', '西安市', '610103', '碑林区', '', '', '', '', 3, 1, ''), ('610104', '6101', '00,61,6101', '莲湖区', '61', '陕西省', '6101', '西安市', '610104', '莲湖区', '', '', '', '', 3, 1, ''), ('610111', '6101', '00,61,6101', '灞桥区', '61', '陕西省', '6101', '西安市', '610111', '灞桥区', '', '', '', '', 3, 1, ''), ('610112', '6101', '00,61,6101', '未央区', '61', '陕西省', '6101', '西安市', '610112', '未央区', '', '', '', '', 3, 1, ''), ('610113', '6101', '00,61,6101', '雁塔区', '61', '陕西省', '6101', '西安市', '610113', '雁塔区', '', '', '', '', 3, 1, ''), ('610114', '6101', '00,61,6101', '阎良区', '61', '陕西省', '6101', '西安市', '610114', '阎良区', '', '', '', '', 3, 1, ''), ('610115', '6101', '00,61,6101', '临潼区', '61', '陕西省', '6101', '西安市', '610115', '临潼区', '', '', '', '', 3, 1, ''), ('610116', '6101', '00,61,6101', '长安区', '61', '陕西省', '6101', '西安市', '610116', '长安区', '', '', '', '', 3, 1, ''), ('610117', '6101', '00,61,6101', '高陵区', '61', '陕西省', '6101', '西安市', '610117', '高陵区', '', '', '', '', 3, 1, ''), ('610118', '6101', '00,61,6101', '鄠邑区', '61', '陕西省', '6101', '西安市', '610118', '鄠邑区', '', '', '', '', 3, 1, ''), ('610122', '6101', '00,61,6101', '蓝田县', '61', '陕西省', '6101', '西安市', '610122', '蓝田县', '', '', '', '', 3, 1, ''), ('610124', '6101', '00,61,6101', '周至县', '61', '陕西省', '6101', '西安市', '610124', '周至县', '', '', '', '', 3, 1, ''), ('6102', '61', '00,61', '铜川市', '61', '陕西省', '6102', '铜川市', '', '', '', '', '', '', 2, 1, ''), ('610202', '6102', '00,61,6102', '王益区', '61', '陕西省', '6102', '铜川市', '610202', '王益区', '', '', '', '', 3, 1, ''), ('610203', '6102', '00,61,6102', '印台区', '61', '陕西省', '6102', '铜川市', '610203', '印台区', '', '', '', '', 3, 1, ''), ('610204', '6102', '00,61,6102', '耀州区', '61', '陕西省', '6102', '铜川市', '610204', '耀州区', '', '', '', '', 3, 1, ''), ('610222', '6102', '00,61,6102', '宜君县', '61', '陕西省', '6102', '铜川市', '610222', '宜君县', '', '', '', '', 3, 1, ''), ('6103', '61', '00,61', '宝鸡市', '61', '陕西省', '6103', '宝鸡市', '', '', '', '', '', '', 2, 1, ''), ('610302', '6103', '00,61,6103', '渭滨区', '61', '陕西省', '6103', '宝鸡市', '610302', '渭滨区', '', '', '', '', 3, 1, ''), ('610303', '6103', '00,61,6103', '金台区', '61', '陕西省', '6103', '宝鸡市', '610303', '金台区', '', '', '', '', 3, 1, ''), ('610304', '6103', '00,61,6103', '陈仓区', '61', '陕西省', '6103', '宝鸡市', '610304', '陈仓区', '', '', '', '', 3, 1, ''), ('610322', '6103', '00,61,6103', '凤翔县', '61', '陕西省', '6103', '宝鸡市', '610322', '凤翔县', '', '', '', '', 3, 1, ''), ('610323', '6103', '00,61,6103', '岐山县', '61', '陕西省', '6103', '宝鸡市', '610323', '岐山县', '', '', '', '', 3, 1, ''), ('610324', '6103', '00,61,6103', '扶风县', '61', '陕西省', '6103', '宝鸡市', '610324', '扶风县', '', '', '', '', 3, 1, ''), ('610326', '6103', '00,61,6103', '眉县', '61', '陕西省', '6103', '宝鸡市', '610326', '眉县', '', '', '', '', 3, 1, ''), ('610327', '6103', '00,61,6103', '陇县', '61', '陕西省', '6103', '宝鸡市', '610327', '陇县', '', '', '', '', 3, 1, ''), ('610328', '6103', '00,61,6103', '千阳县', '61', '陕西省', '6103', '宝鸡市', '610328', '千阳县', '', '', '', '', 3, 1, ''), ('610329', '6103', '00,61,6103', '麟游县', '61', '陕西省', '6103', '宝鸡市', '610329', '麟游县', '', '', '', '', 3, 1, ''), ('610330', '6103', '00,61,6103', '凤县', '61', '陕西省', '6103', '宝鸡市', '610330', '凤县', '', '', '', '', 3, 1, ''), ('610331', '6103', '00,61,6103', '太白县', '61', '陕西省', '6103', '宝鸡市', '610331', '太白县', '', '', '', '', 3, 1, ''), ('6104', '61', '00,61', '咸阳市', '61', '陕西省', '6104', '咸阳市', '', '', '', '', '', '', 2, 1, ''), ('610402', '6104', '00,61,6104', '秦都区', '61', '陕西省', '6104', '咸阳市', '610402', '秦都区', '', '', '', '', 3, 1, ''), ('610403', '6104', '00,61,6104', '杨陵区', '61', '陕西省', '6104', '咸阳市', '610403', '杨陵区', '', '', '', '', 3, 1, ''), ('610404', '6104', '00,61,6104', '渭城区', '61', '陕西省', '6104', '咸阳市', '610404', '渭城区', '', '', '', '', 3, 1, ''), ('610422', '6104', '00,61,6104', '三原县', '61', '陕西省', '6104', '咸阳市', '610422', '三原县', '', '', '', '', 3, 1, ''), ('610423', '6104', '00,61,6104', '泾阳县', '61', '陕西省', '6104', '咸阳市', '610423', '泾阳县', '', '', '', '', 3, 1, ''), ('610424', '6104', '00,61,6104', '乾县', '61', '陕西省', '6104', '咸阳市', '610424', '乾县', '', '', '', '', 3, 1, ''), ('610425', '6104', '00,61,6104', '礼泉县', '61', '陕西省', '6104', '咸阳市', '610425', '礼泉县', '', '', '', '', 3, 1, ''), ('610426', '6104', '00,61,6104', '永寿县', '61', '陕西省', '6104', '咸阳市', '610426', '永寿县', '', '', '', '', 3, 1, ''), ('610428', '6104', '00,61,6104', '长武县', '61', '陕西省', '6104', '咸阳市', '610428', '长武县', '', '', '', '', 3, 1, ''), ('610429', '6104', '00,61,6104', '旬邑县', '61', '陕西省', '6104', '咸阳市', '610429', '旬邑县', '', '', '', '', 3, 1, ''), ('610430', '6104', '00,61,6104', '淳化县', '61', '陕西省', '6104', '咸阳市', '610430', '淳化县', '', '', '', '', 3, 1, ''), ('610431', '6104', '00,61,6104', '武功县', '61', '陕西省', '6104', '咸阳市', '610431', '武功县', '', '', '', '', 3, 1, ''), ('610481', '6104', '00,61,6104', '兴平市', '61', '陕西省', '6104', '咸阳市', '610481', '兴平市', '', '', '', '', 3, 1, ''), ('610482', '6104', '00,61,6104', '彬州市', '61', '陕西省', '6104', '咸阳市', '610482', '彬州市', '', '', '', '', 3, 1, ''), ('6105', '61', '00,61', '渭南市', '61', '陕西省', '6105', '渭南市', '', '', '', '', '', '', 2, 1, ''), ('610502', '6105', '00,61,6105', '临渭区', '61', '陕西省', '6105', '渭南市', '610502', '临渭区', '', '', '', '', 3, 1, ''), ('610503', '6105', '00,61,6105', '华州区', '61', '陕西省', '6105', '渭南市', '610503', '华州区', '', '', '', '', 3, 1, ''), ('610522', '6105', '00,61,6105', '潼关县', '61', '陕西省', '6105', '渭南市', '610522', '潼关县', '', '', '', '', 3, 1, ''), ('610523', '6105', '00,61,6105', '大荔县', '61', '陕西省', '6105', '渭南市', '610523', '大荔县', '', '', '', '', 3, 1, ''), ('610524', '6105', '00,61,6105', '合阳县', '61', '陕西省', '6105', '渭南市', '610524', '合阳县', '', '', '', '', 3, 1, ''), ('610525', '6105', '00,61,6105', '澄城县', '61', '陕西省', '6105', '渭南市', '610525', '澄城县', '', '', '', '', 3, 1, ''), ('610526', '6105', '00,61,6105', '蒲城县', '61', '陕西省', '6105', '渭南市', '610526', '蒲城县', '', '', '', '', 3, 1, ''), ('610527', '6105', '00,61,6105', '白水县', '61', '陕西省', '6105', '渭南市', '610527', '白水县', '', '', '', '', 3, 1, ''), ('610528', '6105', '00,61,6105', '富平县', '61', '陕西省', '6105', '渭南市', '610528', '富平县', '', '', '', '', 3, 1, ''), ('610581', '6105', '00,61,6105', '韩城市', '61', '陕西省', '6105', '渭南市', '610581', '韩城市', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('610582', '6105', '00,61,6105', '华阴市', '61', '陕西省', '6105', '渭南市', '610582', '华阴市', '', '', '', '', 3, 1, ''), ('6106', '61', '00,61', '延安市', '61', '陕西省', '6106', '延安市', '', '', '', '', '', '', 2, 1, ''), ('610602', '6106', '00,61,6106', '宝塔区', '61', '陕西省', '6106', '延安市', '610602', '宝塔区', '', '', '', '', 3, 1, ''), ('610603', '6106', '00,61,6106', '安塞区', '61', '陕西省', '6106', '延安市', '610603', '安塞区', '', '', '', '', 3, 1, ''), ('610621', '6106', '00,61,6106', '延长县', '61', '陕西省', '6106', '延安市', '610621', '延长县', '', '', '', '', 3, 1, ''), ('610622', '6106', '00,61,6106', '延川县', '61', '陕西省', '6106', '延安市', '610622', '延川县', '', '', '', '', 3, 1, ''), ('610625', '6106', '00,61,6106', '志丹县', '61', '陕西省', '6106', '延安市', '610625', '志丹县', '', '', '', '', 3, 1, ''), ('610626', '6106', '00,61,6106', '吴起县', '61', '陕西省', '6106', '延安市', '610626', '吴起县', '', '', '', '', 3, 1, ''), ('610627', '6106', '00,61,6106', '甘泉县', '61', '陕西省', '6106', '延安市', '610627', '甘泉县', '', '', '', '', 3, 1, ''), ('610628', '6106', '00,61,6106', '富县', '61', '陕西省', '6106', '延安市', '610628', '富县', '', '', '', '', 3, 1, ''), ('610629', '6106', '00,61,6106', '洛川县', '61', '陕西省', '6106', '延安市', '610629', '洛川县', '', '', '', '', 3, 1, ''), ('610630', '6106', '00,61,6106', '宜川县', '61', '陕西省', '6106', '延安市', '610630', '宜川县', '', '', '', '', 3, 1, ''), ('610631', '6106', '00,61,6106', '黄龙县', '61', '陕西省', '6106', '延安市', '610631', '黄龙县', '', '', '', '', 3, 1, ''), ('610632', '6106', '00,61,6106', '黄陵县', '61', '陕西省', '6106', '延安市', '610632', '黄陵县', '', '', '', '', 3, 1, ''), ('610681', '6106', '00,61,6106', '子长市', '61', '陕西省', '6106', '延安市', '610681', '子长市', '', '', '', '', 3, 1, ''), ('6107', '61', '00,61', '汉中市', '61', '陕西省', '6107', '汉中市', '', '', '', '', '', '', 2, 1, ''), ('610702', '6107', '00,61,6107', '汉台区', '61', '陕西省', '6107', '汉中市', '610702', '汉台区', '', '', '', '', 3, 1, ''), ('610703', '6107', '00,61,6107', '南郑区', '61', '陕西省', '6107', '汉中市', '610703', '南郑区', '', '', '', '', 3, 1, ''), ('610722', '6107', '00,61,6107', '城固县', '61', '陕西省', '6107', '汉中市', '610722', '城固县', '', '', '', '', 3, 1, ''), ('610723', '6107', '00,61,6107', '洋县', '61', '陕西省', '6107', '汉中市', '610723', '洋县', '', '', '', '', 3, 1, ''), ('610724', '6107', '00,61,6107', '西乡县', '61', '陕西省', '6107', '汉中市', '610724', '西乡县', '', '', '', '', 3, 1, ''), ('610725', '6107', '00,61,6107', '勉县', '61', '陕西省', '6107', '汉中市', '610725', '勉县', '', '', '', '', 3, 1, ''), ('610726', '6107', '00,61,6107', '宁强县', '61', '陕西省', '6107', '汉中市', '610726', '宁强县', '', '', '', '', 3, 1, ''), ('610727', '6107', '00,61,6107', '略阳县', '61', '陕西省', '6107', '汉中市', '610727', '略阳县', '', '', '', '', 3, 1, ''), ('610728', '6107', '00,61,6107', '镇巴县', '61', '陕西省', '6107', '汉中市', '610728', '镇巴县', '', '', '', '', 3, 1, ''), ('610729', '6107', '00,61,6107', '留坝县', '61', '陕西省', '6107', '汉中市', '610729', '留坝县', '', '', '', '', 3, 1, ''), ('610730', '6107', '00,61,6107', '佛坪县', '61', '陕西省', '6107', '汉中市', '610730', '佛坪县', '', '', '', '', 3, 1, ''), ('6108', '61', '00,61', '榆林市', '61', '陕西省', '6108', '榆林市', '', '', '', '', '', '', 2, 1, ''), ('610802', '6108', '00,61,6108', '榆阳区', '61', '陕西省', '6108', '榆林市', '610802', '榆阳区', '', '', '', '', 3, 1, ''), ('610803', '6108', '00,61,6108', '横山区', '61', '陕西省', '6108', '榆林市', '610803', '横山区', '', '', '', '', 3, 1, ''), ('610822', '6108', '00,61,6108', '府谷县', '61', '陕西省', '6108', '榆林市', '610822', '府谷县', '', '', '', '', 3, 1, ''), ('610824', '6108', '00,61,6108', '靖边县', '61', '陕西省', '6108', '榆林市', '610824', '靖边县', '', '', '', '', 3, 1, ''), ('610825', '6108', '00,61,6108', '定边县', '61', '陕西省', '6108', '榆林市', '610825', '定边县', '', '', '', '', 3, 1, ''), ('610826', '6108', '00,61,6108', '绥德县', '61', '陕西省', '6108', '榆林市', '610826', '绥德县', '', '', '', '', 3, 1, ''), ('610827', '6108', '00,61,6108', '米脂县', '61', '陕西省', '6108', '榆林市', '610827', '米脂县', '', '', '', '', 3, 1, ''), ('610828', '6108', '00,61,6108', '佳县', '61', '陕西省', '6108', '榆林市', '610828', '佳县', '', '', '', '', 3, 1, ''), ('610829', '6108', '00,61,6108', '吴堡县', '61', '陕西省', '6108', '榆林市', '610829', '吴堡县', '', '', '', '', 3, 1, ''), ('610830', '6108', '00,61,6108', '清涧县', '61', '陕西省', '6108', '榆林市', '610830', '清涧县', '', '', '', '', 3, 1, ''), ('610831', '6108', '00,61,6108', '子洲县', '61', '陕西省', '6108', '榆林市', '610831', '子洲县', '', '', '', '', 3, 1, ''), ('610881', '6108', '00,61,6108', '神木市', '61', '陕西省', '6108', '榆林市', '610881', '神木市', '', '', '', '', 3, 1, ''), ('6109', '61', '00,61', '安康市', '61', '陕西省', '6109', '安康市', '', '', '', '', '', '', 2, 1, ''), ('610902', '6109', '00,61,6109', '汉滨区', '61', '陕西省', '6109', '安康市', '610902', '汉滨区', '', '', '', '', 3, 1, ''), ('610921', '6109', '00,61,6109', '汉阴县', '61', '陕西省', '6109', '安康市', '610921', '汉阴县', '', '', '', '', 3, 1, ''), ('610922', '6109', '00,61,6109', '石泉县', '61', '陕西省', '6109', '安康市', '610922', '石泉县', '', '', '', '', 3, 1, ''), ('610923', '6109', '00,61,6109', '宁陕县', '61', '陕西省', '6109', '安康市', '610923', '宁陕县', '', '', '', '', 3, 1, ''), ('610924', '6109', '00,61,6109', '紫阳县', '61', '陕西省', '6109', '安康市', '610924', '紫阳县', '', '', '', '', 3, 1, ''), ('610925', '6109', '00,61,6109', '岚皋县', '61', '陕西省', '6109', '安康市', '610925', '岚皋县', '', '', '', '', 3, 1, ''), ('610926', '6109', '00,61,6109', '平利县', '61', '陕西省', '6109', '安康市', '610926', '平利县', '', '', '', '', 3, 1, ''), ('610927', '6109', '00,61,6109', '镇坪县', '61', '陕西省', '6109', '安康市', '610927', '镇坪县', '', '', '', '', 3, 1, ''), ('610928', '6109', '00,61,6109', '旬阳县', '61', '陕西省', '6109', '安康市', '610928', '旬阳县', '', '', '', '', 3, 1, ''), ('610929', '6109', '00,61,6109', '白河县', '61', '陕西省', '6109', '安康市', '610929', '白河县', '', '', '', '', 3, 1, ''), ('6110', '61', '00,61', '商洛市', '61', '陕西省', '6110', '商洛市', '', '', '', '', '', '', 2, 1, ''), ('611002', '6110', '00,61,6110', '商州区', '61', '陕西省', '6110', '商洛市', '611002', '商州区', '', '', '', '', 3, 1, ''), ('611021', '6110', '00,61,6110', '洛南县', '61', '陕西省', '6110', '商洛市', '611021', '洛南县', '', '', '', '', 3, 1, ''), ('611022', '6110', '00,61,6110', '丹凤县', '61', '陕西省', '6110', '商洛市', '611022', '丹凤县', '', '', '', '', 3, 1, ''), ('611023', '6110', '00,61,6110', '商南县', '61', '陕西省', '6110', '商洛市', '611023', '商南县', '', '', '', '', 3, 1, ''), ('611024', '6110', '00,61,6110', '山阳县', '61', '陕西省', '6110', '商洛市', '611024', '山阳县', '', '', '', '', 3, 1, ''), ('611025', '6110', '00,61,6110', '镇安县', '61', '陕西省', '6110', '商洛市', '611025', '镇安县', '', '', '', '', 3, 1, ''), ('611026', '6110', '00,61,6110', '柞水县', '61', '陕西省', '6110', '商洛市', '611026', '柞水县', '', '', '', '', 3, 1, ''), ('62', '00', '00', '甘肃省', '62', '甘肃省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6201', '62', '00,62', '兰州市', '62', '甘肃省', '6201', '兰州市', '', '', '', '', '', '', 2, 1, ''), ('620102', '6201', '00,62,6201', '城关区', '62', '甘肃省', '6201', '兰州市', '620102', '城关区', '', '', '', '', 3, 1, ''), ('620103', '6201', '00,62,6201', '七里河区', '62', '甘肃省', '6201', '兰州市', '620103', '七里河区', '', '', '', '', 3, 1, ''), ('620104', '6201', '00,62,6201', '西固区', '62', '甘肃省', '6201', '兰州市', '620104', '西固区', '', '', '', '', 3, 1, ''), ('620105', '6201', '00,62,6201', '安宁区', '62', '甘肃省', '6201', '兰州市', '620105', '安宁区', '', '', '', '', 3, 1, ''), ('620111', '6201', '00,62,6201', '红古区', '62', '甘肃省', '6201', '兰州市', '620111', '红古区', '', '', '', '', 3, 1, ''), ('620121', '6201', '00,62,6201', '永登县', '62', '甘肃省', '6201', '兰州市', '620121', '永登县', '', '', '', '', 3, 1, ''), ('620122', '6201', '00,62,6201', '皋兰县', '62', '甘肃省', '6201', '兰州市', '620122', '皋兰县', '', '', '', '', 3, 1, ''), ('620123', '6201', '00,62,6201', '榆中县', '62', '甘肃省', '6201', '兰州市', '620123', '榆中县', '', '', '', '', 3, 1, ''), ('6202', '62', '00,62', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '', '', '', '', '', '', 2, 1, ''), ('620200', '6202', '00,62,6202', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '620200', '嘉峪关市', '', '', '', '', 3, 1, ''), ('6203', '62', '00,62', '金昌市', '62', '甘肃省', '6203', '金昌市', '', '', '', '', '', '', 2, 1, ''), ('620302', '6203', '00,62,6203', '金川区', '62', '甘肃省', '6203', '金昌市', '620302', '金川区', '', '', '', '', 3, 1, ''), ('620321', '6203', '00,62,6203', '永昌县', '62', '甘肃省', '6203', '金昌市', '620321', '永昌县', '', '', '', '', 3, 1, ''), ('6204', '62', '00,62', '白银市', '62', '甘肃省', '6204', '白银市', '', '', '', '', '', '', 2, 1, ''), ('620402', '6204', '00,62,6204', '白银区', '62', '甘肃省', '6204', '白银市', '620402', '白银区', '', '', '', '', 3, 1, ''), ('620403', '6204', '00,62,6204', '平川区', '62', '甘肃省', '6204', '白银市', '620403', '平川区', '', '', '', '', 3, 1, ''), ('620421', '6204', '00,62,6204', '靖远县', '62', '甘肃省', '6204', '白银市', '620421', '靖远县', '', '', '', '', 3, 1, ''), ('620422', '6204', '00,62,6204', '会宁县', '62', '甘肃省', '6204', '白银市', '620422', '会宁县', '', '', '', '', 3, 1, ''), ('620423', '6204', '00,62,6204', '景泰县', '62', '甘肃省', '6204', '白银市', '620423', '景泰县', '', '', '', '', 3, 1, ''), ('6205', '62', '00,62', '天水市', '62', '甘肃省', '6205', '天水市', '', '', '', '', '', '', 2, 1, ''), ('620502', '6205', '00,62,6205', '秦州区', '62', '甘肃省', '6205', '天水市', '620502', '秦州区', '', '', '', '', 3, 1, ''), ('620503', '6205', '00,62,6205', '麦积区', '62', '甘肃省', '6205', '天水市', '620503', '麦积区', '', '', '', '', 3, 1, ''), ('620521', '6205', '00,62,6205', '清水县', '62', '甘肃省', '6205', '天水市', '620521', '清水县', '', '', '', '', 3, 1, ''), ('620522', '6205', '00,62,6205', '秦安县', '62', '甘肃省', '6205', '天水市', '620522', '秦安县', '', '', '', '', 3, 1, ''), ('620523', '6205', '00,62,6205', '甘谷县', '62', '甘肃省', '6205', '天水市', '620523', '甘谷县', '', '', '', '', 3, 1, ''), ('620524', '6205', '00,62,6205', '武山县', '62', '甘肃省', '6205', '天水市', '620524', '武山县', '', '', '', '', 3, 1, ''), ('620525', '6205', '00,62,6205', '张家川回族自治县', '62', '甘肃省', '6205', '天水市', '620525', '张家川回族自治县', '', '', '', '', 3, 1, ''), ('6206', '62', '00,62', '武威市', '62', '甘肃省', '6206', '武威市', '', '', '', '', '', '', 2, 1, ''), ('620602', '6206', '00,62,6206', '凉州区', '62', '甘肃省', '6206', '武威市', '620602', '凉州区', '', '', '', '', 3, 1, ''), ('620621', '6206', '00,62,6206', '民勤县', '62', '甘肃省', '6206', '武威市', '620621', '民勤县', '', '', '', '', 3, 1, ''), ('620622', '6206', '00,62,6206', '古浪县', '62', '甘肃省', '6206', '武威市', '620622', '古浪县', '', '', '', '', 3, 1, ''), ('620623', '6206', '00,62,6206', '天祝藏族自治县', '62', '甘肃省', '6206', '武威市', '620623', '天祝藏族自治县', '', '', '', '', 3, 1, ''), ('6207', '62', '00,62', '张掖市', '62', '甘肃省', '6207', '张掖市', '', '', '', '', '', '', 2, 1, ''), ('620702', '6207', '00,62,6207', '甘州区', '62', '甘肃省', '6207', '张掖市', '620702', '甘州区', '', '', '', '', 3, 1, ''), ('620721', '6207', '00,62,6207', '肃南裕固族自治县', '62', '甘肃省', '6207', '张掖市', '620721', '肃南裕固族自治县', '', '', '', '', 3, 1, ''), ('620722', '6207', '00,62,6207', '民乐县', '62', '甘肃省', '6207', '张掖市', '620722', '民乐县', '', '', '', '', 3, 1, ''), ('620723', '6207', '00,62,6207', '临泽县', '62', '甘肃省', '6207', '张掖市', '620723', '临泽县', '', '', '', '', 3, 1, ''), ('620724', '6207', '00,62,6207', '高台县', '62', '甘肃省', '6207', '张掖市', '620724', '高台县', '', '', '', '', 3, 1, ''), ('620725', '6207', '00,62,6207', '山丹县', '62', '甘肃省', '6207', '张掖市', '620725', '山丹县', '', '', '', '', 3, 1, ''), ('6208', '62', '00,62', '平凉市', '62', '甘肃省', '6208', '平凉市', '', '', '', '', '', '', 2, 1, ''), ('620802', '6208', '00,62,6208', '崆峒区', '62', '甘肃省', '6208', '平凉市', '620802', '崆峒区', '', '', '', '', 3, 1, ''), ('620821', '6208', '00,62,6208', '泾川县', '62', '甘肃省', '6208', '平凉市', '620821', '泾川县', '', '', '', '', 3, 1, ''), ('620822', '6208', '00,62,6208', '灵台县', '62', '甘肃省', '6208', '平凉市', '620822', '灵台县', '', '', '', '', 3, 1, ''), ('620823', '6208', '00,62,6208', '崇信县', '62', '甘肃省', '6208', '平凉市', '620823', '崇信县', '', '', '', '', 3, 1, ''), ('620825', '6208', '00,62,6208', '庄浪县', '62', '甘肃省', '6208', '平凉市', '620825', '庄浪县', '', '', '', '', 3, 1, ''), ('620826', '6208', '00,62,6208', '静宁县', '62', '甘肃省', '6208', '平凉市', '620826', '静宁县', '', '', '', '', 3, 1, ''), ('620881', '6208', '00,62,6208', '华亭市', '62', '甘肃省', '6208', '平凉市', '620881', '华亭市', '', '', '', '', 3, 1, ''), ('6209', '62', '00,62', '酒泉市', '62', '甘肃省', '6209', '酒泉市', '', '', '', '', '', '', 2, 1, ''), ('620902', '6209', '00,62,6209', '肃州区', '62', '甘肃省', '6209', '酒泉市', '620902', '肃州区', '', '', '', '', 3, 1, ''), ('620921', '6209', '00,62,6209', '金塔县', '62', '甘肃省', '6209', '酒泉市', '620921', '金塔县', '', '', '', '', 3, 1, ''), ('620922', '6209', '00,62,6209', '瓜州县', '62', '甘肃省', '6209', '酒泉市', '620922', '瓜州县', '', '', '', '', 3, 1, ''), ('620923', '6209', '00,62,6209', '肃北蒙古族自治县', '62', '甘肃省', '6209', '酒泉市', '620923', '肃北蒙古族自治县', '', '', '', '', 3, 1, ''), ('620924', '6209', '00,62,6209', '阿克塞哈萨克族自治县', '62', '甘肃省', '6209', '酒泉市', '620924', '阿克塞哈萨克族自治县', '', '', '', '', 3, 1, ''), ('620981', '6209', '00,62,6209', '玉门市', '62', '甘肃省', '6209', '酒泉市', '620981', '玉门市', '', '', '', '', 3, 1, ''), ('620982', '6209', '00,62,6209', '敦煌市', '62', '甘肃省', '6209', '酒泉市', '620982', '敦煌市', '', '', '', '', 3, 1, ''), ('6210', '62', '00,62', '庆阳市', '62', '甘肃省', '6210', '庆阳市', '', '', '', '', '', '', 2, 1, ''), ('621002', '6210', '00,62,6210', '西峰区', '62', '甘肃省', '6210', '庆阳市', '621002', '西峰区', '', '', '', '', 3, 1, ''), ('621021', '6210', '00,62,6210', '庆城县', '62', '甘肃省', '6210', '庆阳市', '621021', '庆城县', '', '', '', '', 3, 1, ''), ('621022', '6210', '00,62,6210', '环县', '62', '甘肃省', '6210', '庆阳市', '621022', '环县', '', '', '', '', 3, 1, ''), ('621023', '6210', '00,62,6210', '华池县', '62', '甘肃省', '6210', '庆阳市', '621023', '华池县', '', '', '', '', 3, 1, ''), ('621024', '6210', '00,62,6210', '合水县', '62', '甘肃省', '6210', '庆阳市', '621024', '合水县', '', '', '', '', 3, 1, ''), ('621025', '6210', '00,62,6210', '正宁县', '62', '甘肃省', '6210', '庆阳市', '621025', '正宁县', '', '', '', '', 3, 1, ''), ('621026', '6210', '00,62,6210', '宁县', '62', '甘肃省', '6210', '庆阳市', '621026', '宁县', '', '', '', '', 3, 1, ''), ('621027', '6210', '00,62,6210', '镇原县', '62', '甘肃省', '6210', '庆阳市', '621027', '镇原县', '', '', '', '', 3, 1, ''), ('6211', '62', '00,62', '定西市', '62', '甘肃省', '6211', '定西市', '', '', '', '', '', '', 2, 1, ''), ('621102', '6211', '00,62,6211', '安定区', '62', '甘肃省', '6211', '定西市', '621102', '安定区', '', '', '', '', 3, 1, ''), ('621121', '6211', '00,62,6211', '通渭县', '62', '甘肃省', '6211', '定西市', '621121', '通渭县', '', '', '', '', 3, 1, ''), ('621122', '6211', '00,62,6211', '陇西县', '62', '甘肃省', '6211', '定西市', '621122', '陇西县', '', '', '', '', 3, 1, ''), ('621123', '6211', '00,62,6211', '渭源县', '62', '甘肃省', '6211', '定西市', '621123', '渭源县', '', '', '', '', 3, 1, ''), ('621124', '6211', '00,62,6211', '临洮县', '62', '甘肃省', '6211', '定西市', '621124', '临洮县', '', '', '', '', 3, 1, ''), ('621125', '6211', '00,62,6211', '漳县', '62', '甘肃省', '6211', '定西市', '621125', '漳县', '', '', '', '', 3, 1, ''), ('621126', '6211', '00,62,6211', '岷县', '62', '甘肃省', '6211', '定西市', '621126', '岷县', '', '', '', '', 3, 1, ''), ('6212', '62', '00,62', '陇南市', '62', '甘肃省', '6212', '陇南市', '', '', '', '', '', '', 2, 1, ''), ('621202', '6212', '00,62,6212', '武都区', '62', '甘肃省', '6212', '陇南市', '621202', '武都区', '', '', '', '', 3, 1, ''), ('621221', '6212', '00,62,6212', '成县', '62', '甘肃省', '6212', '陇南市', '621221', '成县', '', '', '', '', 3, 1, ''), ('621222', '6212', '00,62,6212', '文县', '62', '甘肃省', '6212', '陇南市', '621222', '文县', '', '', '', '', 3, 1, ''), ('621223', '6212', '00,62,6212', '宕昌县', '62', '甘肃省', '6212', '陇南市', '621223', '宕昌县', '', '', '', '', 3, 1, ''), ('621224', '6212', '00,62,6212', '康县', '62', '甘肃省', '6212', '陇南市', '621224', '康县', '', '', '', '', 3, 1, ''), ('621225', '6212', '00,62,6212', '西和县', '62', '甘肃省', '6212', '陇南市', '621225', '西和县', '', '', '', '', 3, 1, ''), ('621226', '6212', '00,62,6212', '礼县', '62', '甘肃省', '6212', '陇南市', '621226', '礼县', '', '', '', '', 3, 1, ''), ('621227', '6212', '00,62,6212', '徽县', '62', '甘肃省', '6212', '陇南市', '621227', '徽县', '', '', '', '', 3, 1, ''), ('621228', '6212', '00,62,6212', '两当县', '62', '甘肃省', '6212', '陇南市', '621228', '两当县', '', '', '', '', 3, 1, ''), ('6229', '62', '00,62', '临夏回族自治州', '62', '甘肃省', '6229', '临夏回族自治州', '', '', '', '', '', '', 2, 1, ''), ('622901', '6229', '00,62,6229', '临夏市', '62', '甘肃省', '6229', '临夏回族自治州', '622901', '临夏市', '', '', '', '', 3, 1, ''), ('622921', '6229', '00,62,6229', '临夏县', '62', '甘肃省', '6229', '临夏回族自治州', '622921', '临夏县', '', '', '', '', 3, 1, ''), ('622922', '6229', '00,62,6229', '康乐县', '62', '甘肃省', '6229', '临夏回族自治州', '622922', '康乐县', '', '', '', '', 3, 1, ''), ('622923', '6229', '00,62,6229', '永靖县', '62', '甘肃省', '6229', '临夏回族自治州', '622923', '永靖县', '', '', '', '', 3, 1, ''), ('622924', '6229', '00,62,6229', '广河县', '62', '甘肃省', '6229', '临夏回族自治州', '622924', '广河县', '', '', '', '', 3, 1, ''), ('622925', '6229', '00,62,6229', '和政县', '62', '甘肃省', '6229', '临夏回族自治州', '622925', '和政县', '', '', '', '', 3, 1, ''), ('622926', '6229', '00,62,6229', '东乡族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622926', '东乡族自治县', '', '', '', '', 3, 1, ''), ('622927', '6229', '00,62,6229', '积石山保安族东乡族撒拉族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622927', '积石山保安族东乡族撒拉族自治县', '', '', '', '', 3, 1, ''), ('6230', '62', '00,62', '甘南藏族自治州', '62', '甘肃省', '6230', '甘南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('623001', '6230', '00,62,6230', '合作市', '62', '甘肃省', '6230', '甘南藏族自治州', '623001', '合作市', '', '', '', '', 3, 1, ''), ('623021', '6230', '00,62,6230', '临潭县', '62', '甘肃省', '6230', '甘南藏族自治州', '623021', '临潭县', '', '', '', '', 3, 1, ''), ('623022', '6230', '00,62,6230', '卓尼县', '62', '甘肃省', '6230', '甘南藏族自治州', '623022', '卓尼县', '', '', '', '', 3, 1, ''), ('623023', '6230', '00,62,6230', '舟曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623023', '舟曲县', '', '', '', '', 3, 1, ''), ('623024', '6230', '00,62,6230', '迭部县', '62', '甘肃省', '6230', '甘南藏族自治州', '623024', '迭部县', '', '', '', '', 3, 1, ''), ('623025', '6230', '00,62,6230', '玛曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623025', '玛曲县', '', '', '', '', 3, 1, ''), ('623026', '6230', '00,62,6230', '碌曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623026', '碌曲县', '', '', '', '', 3, 1, ''), ('623027', '6230', '00,62,6230', '夏河县', '62', '甘肃省', '6230', '甘南藏族自治州', '623027', '夏河县', '', '', '', '', 3, 1, ''), ('63', '00', '00', '青海省', '63', '青海省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6301', '63', '00,63', '西宁市', '63', '青海省', '6301', '西宁市', '', '', '', '', '', '', 2, 1, ''), ('630102', '6301', '00,63,6301', '城东区', '63', '青海省', '6301', '西宁市', '630102', '城东区', '', '', '', '', 3, 1, ''), ('630103', '6301', '00,63,6301', '城中区', '63', '青海省', '6301', '西宁市', '630103', '城中区', '', '', '', '', 3, 1, ''), ('630104', '6301', '00,63,6301', '城西区', '63', '青海省', '6301', '西宁市', '630104', '城西区', '', '', '', '', 3, 1, ''), ('630105', '6301', '00,63,6301', '城北区', '63', '青海省', '6301', '西宁市', '630105', '城北区', '', '', '', '', 3, 1, ''), ('630106', '6301', '00,63,6301', '湟中区', '63', '青海省', '6301', '西宁市', '630106', '湟中区', '', '', '', '', 3, 1, ''), ('630121', '6301', '00,63,6301', '大通回族土族自治县', '63', '青海省', '6301', '西宁市', '630121', '大通回族土族自治县', '', '', '', '', 3, 1, ''), ('630123', '6301', '00,63,6301', '湟源县', '63', '青海省', '6301', '西宁市', '630123', '湟源县', '', '', '', '', 3, 1, ''), ('6302', '63', '00,63', '海东市', '63', '青海省', '6302', '海东市', '', '', '', '', '', '', 2, 1, ''), ('630202', '6302', '00,63,6302', '乐都区', '63', '青海省', '6302', '海东市', '630202', '乐都区', '', '', '', '', 3, 1, ''), ('630203', '6302', '00,63,6302', '平安区', '63', '青海省', '6302', '海东市', '630203', '平安区', '', '', '', '', 3, 1, ''), ('630222', '6302', '00,63,6302', '民和回族土族自治县', '63', '青海省', '6302', '海东市', '630222', '民和回族土族自治县', '', '', '', '', 3, 1, ''), ('630223', '6302', '00,63,6302', '互助土族自治县', '63', '青海省', '6302', '海东市', '630223', '互助土族自治县', '', '', '', '', 3, 1, ''), ('630224', '6302', '00,63,6302', '化隆回族自治县', '63', '青海省', '6302', '海东市', '630224', '化隆回族自治县', '', '', '', '', 3, 1, ''), ('630225', '6302', '00,63,6302', '循化撒拉族自治县', '63', '青海省', '6302', '海东市', '630225', '循化撒拉族自治县', '', '', '', '', 3, 1, ''), ('6322', '63', '00,63', '海北藏族自治州', '63', '青海省', '6322', '海北藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632221', '6322', '00,63,6322', '门源回族自治县', '63', '青海省', '6322', '海北藏族自治州', '632221', '门源回族自治县', '', '', '', '', 3, 1, ''), ('632222', '6322', '00,63,6322', '祁连县', '63', '青海省', '6322', '海北藏族自治州', '632222', '祁连县', '', '', '', '', 3, 1, ''), ('632223', '6322', '00,63,6322', '海晏县', '63', '青海省', '6322', '海北藏族自治州', '632223', '海晏县', '', '', '', '', 3, 1, ''), ('632224', '6322', '00,63,6322', '刚察县', '63', '青海省', '6322', '海北藏族自治州', '632224', '刚察县', '', '', '', '', 3, 1, ''), ('6323', '63', '00,63', '黄南藏族自治州', '63', '青海省', '6323', '黄南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632321', '6323', '00,63,6323', '同仁县', '63', '青海省', '6323', '黄南藏族自治州', '632321', '同仁县', '', '', '', '', 3, 1, ''), ('632322', '6323', '00,63,6323', '尖扎县', '63', '青海省', '6323', '黄南藏族自治州', '632322', '尖扎县', '', '', '', '', 3, 1, ''), ('632323', '6323', '00,63,6323', '泽库县', '63', '青海省', '6323', '黄南藏族自治州', '632323', '泽库县', '', '', '', '', 3, 1, ''), ('632324', '6323', '00,63,6323', '河南蒙古族自治县', '63', '青海省', '6323', '黄南藏族自治州', '632324', '河南蒙古族自治县', '', '', '', '', 3, 1, ''), ('6325', '63', '00,63', '海南藏族自治州', '63', '青海省', '6325', '海南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632521', '6325', '00,63,6325', '共和县', '63', '青海省', '6325', '海南藏族自治州', '632521', '共和县', '', '', '', '', 3, 1, ''), ('632522', '6325', '00,63,6325', '同德县', '63', '青海省', '6325', '海南藏族自治州', '632522', '同德县', '', '', '', '', 3, 1, ''), ('632523', '6325', '00,63,6325', '贵德县', '63', '青海省', '6325', '海南藏族自治州', '632523', '贵德县', '', '', '', '', 3, 1, ''), ('632524', '6325', '00,63,6325', '兴海县', '63', '青海省', '6325', '海南藏族自治州', '632524', '兴海县', '', '', '', '', 3, 1, ''), ('632525', '6325', '00,63,6325', '贵南县', '63', '青海省', '6325', '海南藏族自治州', '632525', '贵南县', '', '', '', '', 3, 1, ''), ('6326', '63', '00,63', '果洛藏族自治州', '63', '青海省', '6326', '果洛藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632621', '6326', '00,63,6326', '玛沁县', '63', '青海省', '6326', '果洛藏族自治州', '632621', '玛沁县', '', '', '', '', 3, 1, ''), ('632622', '6326', '00,63,6326', '班玛县', '63', '青海省', '6326', '果洛藏族自治州', '632622', '班玛县', '', '', '', '', 3, 1, ''), ('632623', '6326', '00,63,6326', '甘德县', '63', '青海省', '6326', '果洛藏族自治州', '632623', '甘德县', '', '', '', '', 3, 1, ''), ('632624', '6326', '00,63,6326', '达日县', '63', '青海省', '6326', '果洛藏族自治州', '632624', '达日县', '', '', '', '', 3, 1, ''), ('632625', '6326', '00,63,6326', '久治县', '63', '青海省', '6326', '果洛藏族自治州', '632625', '久治县', '', '', '', '', 3, 1, ''), ('632626', '6326', '00,63,6326', '玛多县', '63', '青海省', '6326', '果洛藏族自治州', '632626', '玛多县', '', '', '', '', 3, 1, ''), ('6327', '63', '00,63', '玉树藏族自治州', '63', '青海省', '6327', '玉树藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632701', '6327', '00,63,6327', '玉树市', '63', '青海省', '6327', '玉树藏族自治州', '632701', '玉树市', '', '', '', '', 3, 1, ''), ('632722', '6327', '00,63,6327', '杂多县', '63', '青海省', '6327', '玉树藏族自治州', '632722', '杂多县', '', '', '', '', 3, 1, ''), ('632723', '6327', '00,63,6327', '称多县', '63', '青海省', '6327', '玉树藏族自治州', '632723', '称多县', '', '', '', '', 3, 1, ''), ('632724', '6327', '00,63,6327', '治多县', '63', '青海省', '6327', '玉树藏族自治州', '632724', '治多县', '', '', '', '', 3, 1, ''), ('632725', '6327', '00,63,6327', '囊谦县', '63', '青海省', '6327', '玉树藏族自治州', '632725', '囊谦县', '', '', '', '', 3, 1, ''), ('632726', '6327', '00,63,6327', '曲麻莱县', '63', '青海省', '6327', '玉树藏族自治州', '632726', '曲麻莱县', '', '', '', '', 3, 1, ''), ('6328', '63', '00,63', '海西蒙古族藏族自治州', '63', '青海省', '6328', '海西蒙古族藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632801', '6328', '00,63,6328', '格尔木市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632801', '格尔木市', '', '', '', '', 3, 1, ''), ('632802', '6328', '00,63,6328', '德令哈市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632802', '德令哈市', '', '', '', '', 3, 1, ''), ('632803', '6328', '00,63,6328', '茫崖市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632803', '茫崖市', '', '', '', '', 3, 1, ''), ('632821', '6328', '00,63,6328', '乌兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632821', '乌兰县', '', '', '', '', 3, 1, ''), ('632822', '6328', '00,63,6328', '都兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632822', '都兰县', '', '', '', '', 3, 1, ''), ('632823', '6328', '00,63,6328', '天峻县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632823', '天峻县', '', '', '', '', 3, 1, ''), ('64', '00', '00', '宁夏回族自治区', '64', '宁夏回族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6401', '64', '00,64', '银川市', '64', '宁夏回族自治区', '6401', '银川市', '', '', '', '', '', '', 2, 1, ''), ('640104', '6401', '00,64,6401', '兴庆区', '64', '宁夏回族自治区', '6401', '银川市', '640104', '兴庆区', '', '', '', '', 3, 1, ''), ('640105', '6401', '00,64,6401', '西夏区', '64', '宁夏回族自治区', '6401', '银川市', '640105', '西夏区', '', '', '', '', 3, 1, ''), ('640106', '6401', '00,64,6401', '金凤区', '64', '宁夏回族自治区', '6401', '银川市', '640106', '金凤区', '', '', '', '', 3, 1, ''), ('640121', '6401', '00,64,6401', '永宁县', '64', '宁夏回族自治区', '6401', '银川市', '640121', '永宁县', '', '', '', '', 3, 1, ''), ('640122', '6401', '00,64,6401', '贺兰县', '64', '宁夏回族自治区', '6401', '银川市', '640122', '贺兰县', '', '', '', '', 3, 1, ''), ('640181', '6401', '00,64,6401', '灵武市', '64', '宁夏回族自治区', '6401', '银川市', '640181', '灵武市', '', '', '', '', 3, 1, ''), ('6402', '64', '00,64', '石嘴山市', '64', '宁夏回族自治区', '6402', '石嘴山市', '', '', '', '', '', '', 2, 1, ''), ('640202', '6402', '00,64,6402', '大武口区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640202', '大武口区', '', '', '', '', 3, 1, ''), ('640205', '6402', '00,64,6402', '惠农区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640205', '惠农区', '', '', '', '', 3, 1, ''), ('640221', '6402', '00,64,6402', '平罗县', '64', '宁夏回族自治区', '6402', '石嘴山市', '640221', '平罗县', '', '', '', '', 3, 1, ''), ('6403', '64', '00,64', '吴忠市', '64', '宁夏回族自治区', '6403', '吴忠市', '', '', '', '', '', '', 2, 1, ''), ('640302', '6403', '00,64,6403', '利通区', '64', '宁夏回族自治区', '6403', '吴忠市', '640302', '利通区', '', '', '', '', 3, 1, ''), ('640303', '6403', '00,64,6403', '红寺堡区', '64', '宁夏回族自治区', '6403', '吴忠市', '640303', '红寺堡区', '', '', '', '', 3, 1, ''), ('640323', '6403', '00,64,6403', '盐池县', '64', '宁夏回族自治区', '6403', '吴忠市', '640323', '盐池县', '', '', '', '', 3, 1, ''), ('640324', '6403', '00,64,6403', '同心县', '64', '宁夏回族自治区', '6403', '吴忠市', '640324', '同心县', '', '', '', '', 3, 1, ''), ('640381', '6403', '00,64,6403', '青铜峡市', '64', '宁夏回族自治区', '6403', '吴忠市', '640381', '青铜峡市', '', '', '', '', 3, 1, ''), ('6404', '64', '00,64', '固原市', '64', '宁夏回族自治区', '6404', '固原市', '', '', '', '', '', '', 2, 1, ''), ('640402', '6404', '00,64,6404', '原州区', '64', '宁夏回族自治区', '6404', '固原市', '640402', '原州区', '', '', '', '', 3, 1, ''), ('640422', '6404', '00,64,6404', '西吉县', '64', '宁夏回族自治区', '6404', '固原市', '640422', '西吉县', '', '', '', '', 3, 1, ''), ('640423', '6404', '00,64,6404', '隆德县', '64', '宁夏回族自治区', '6404', '固原市', '640423', '隆德县', '', '', '', '', 3, 1, ''), ('640424', '6404', '00,64,6404', '泾源县', '64', '宁夏回族自治区', '6404', '固原市', '640424', '泾源县', '', '', '', '', 3, 1, ''), ('640425', '6404', '00,64,6404', '彭阳县', '64', '宁夏回族自治区', '6404', '固原市', '640425', '彭阳县', '', '', '', '', 3, 1, ''), ('6405', '64', '00,64', '中卫市', '64', '宁夏回族自治区', '6405', '中卫市', '', '', '', '', '', '', 2, 1, ''), ('640502', '6405', '00,64,6405', '沙坡头区', '64', '宁夏回族自治区', '6405', '中卫市', '640502', '沙坡头区', '', '', '', '', 3, 1, ''), ('640521', '6405', '00,64,6405', '中宁县', '64', '宁夏回族自治区', '6405', '中卫市', '640521', '中宁县', '', '', '', '', 3, 1, ''), ('640522', '6405', '00,64,6405', '海原县', '64', '宁夏回族自治区', '6405', '中卫市', '640522', '海原县', '', '', '', '', 3, 1, ''), ('65', '00', '00', '新疆维吾尔自治区', '65', '新疆维吾尔自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6501', '65', '00,65', '乌鲁木齐市', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '', '', '', '', '', '', 2, 1, ''), ('650102', '6501', '00,65,6501', '天山区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650102', '天山区', '', '', '', '', 3, 1, ''), ('650103', '6501', '00,65,6501', '沙依巴克区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650103', '沙依巴克区', '', '', '', '', 3, 1, ''), ('650104', '6501', '00,65,6501', '新市区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650104', '新市区', '', '', '', '', 3, 1, ''), ('650105', '6501', '00,65,6501', '水磨沟区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650105', '水磨沟区', '', '', '', '', 3, 1, ''), ('650106', '6501', '00,65,6501', '头屯河区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650106', '头屯河区', '', '', '', '', 3, 1, ''), ('650107', '6501', '00,65,6501', '达坂城区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650107', '达坂城区', '', '', '', '', 3, 1, ''), ('650109', '6501', '00,65,6501', '米东区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650109', '米东区', '', '', '', '', 3, 1, ''), ('650121', '6501', '00,65,6501', '乌鲁木齐县', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650121', '乌鲁木齐县', '', '', '', '', 3, 1, ''), ('6502', '65', '00,65', '克拉玛依市', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '', '', '', '', '', '', 2, 1, ''), ('650202', '6502', '00,65,6502', '独山子区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650202', '独山子区', '', '', '', '', 3, 1, ''), ('650203', '6502', '00,65,6502', '克拉玛依区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650203', '克拉玛依区', '', '', '', '', 3, 1, ''), ('650204', '6502', '00,65,6502', '白碱滩区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650204', '白碱滩区', '', '', '', '', 3, 1, ''), ('650205', '6502', '00,65,6502', '乌尔禾区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650205', '乌尔禾区', '', '', '', '', 3, 1, ''), ('6504', '65', '00,65', '吐鲁番市', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '', '', '', '', '', '', 2, 1, ''), ('650402', '6504', '00,65,6504', '高昌区', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650402', '高昌区', '', '', '', '', 3, 1, ''), ('650421', '6504', '00,65,6504', '鄯善县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650421', '鄯善县', '', '', '', '', 3, 1, ''), ('650422', '6504', '00,65,6504', '托克逊县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650422', '托克逊县', '', '', '', '', 3, 1, ''), ('6505', '65', '00,65', '哈密市', '65', '新疆维吾尔自治区', '6505', '哈密市', '', '', '', '', '', '', 2, 1, ''), ('650502', '6505', '00,65,6505', '伊州区', '65', '新疆维吾尔自治区', '6505', '哈密市', '650502', '伊州区', '', '', '', '', 3, 1, ''), ('650521', '6505', '00,65,6505', '巴里坤哈萨克自治县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650521', '巴里坤哈萨克自治县', '', '', '', '', 3, 1, ''), ('650522', '6505', '00,65,6505', '伊吾县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650522', '伊吾县', '', '', '', '', 3, 1, ''), ('6523', '65', '00,65', '昌吉回族自治州', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '', '', '', '', '', '', 2, 1, ''), ('652301', '6523', '00,65,6523', '昌吉市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652301', '昌吉市', '', '', '', '', 3, 1, ''), ('652302', '6523', '00,65,6523', '阜康市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652302', '阜康市', '', '', '', '', 3, 1, ''), ('652323', '6523', '00,65,6523', '呼图壁县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652323', '呼图壁县', '', '', '', '', 3, 1, ''), ('652324', '6523', '00,65,6523', '玛纳斯县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652324', '玛纳斯县', '', '', '', '', 3, 1, ''), ('652325', '6523', '00,65,6523', '奇台县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652325', '奇台县', '', '', '', '', 3, 1, ''), ('652327', '6523', '00,65,6523', '吉木萨尔县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652327', '吉木萨尔县', '', '', '', '', 3, 1, ''), ('652328', '6523', '00,65,6523', '木垒哈萨克自治县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652328', '木垒哈萨克自治县', '', '', '', '', 3, 1, ''), ('6527', '65', '00,65', '博尔塔拉蒙古自治州', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652701', '6527', '00,65,6527', '博乐市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652701', '博乐市', '', '', '', '', 3, 1, ''), ('652702', '6527', '00,65,6527', '阿拉山口市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652702', '阿拉山口市', '', '', '', '', 3, 1, ''), ('652722', '6527', '00,65,6527', '精河县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652722', '精河县', '', '', '', '', 3, 1, ''), ('652723', '6527', '00,65,6527', '温泉县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652723', '温泉县', '', '', '', '', 3, 1, ''), ('6528', '65', '00,65', '巴音郭楞蒙古自治州', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652801', '6528', '00,65,6528', '库尔勒市', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652801', '库尔勒市', '', '', '', '', 3, 1, ''), ('652822', '6528', '00,65,6528', '轮台县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652822', '轮台县', '', '', '', '', 3, 1, ''), ('652823', '6528', '00,65,6528', '尉犁县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652823', '尉犁县', '', '', '', '', 3, 1, ''), ('652824', '6528', '00,65,6528', '若羌县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652824', '若羌县', '', '', '', '', 3, 1, ''), ('652825', '6528', '00,65,6528', '且末县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652825', '且末县', '', '', '', '', 3, 1, ''), ('652826', '6528', '00,65,6528', '焉耆回族自治县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652826', '焉耆回族自治县', '', '', '', '', 3, 1, ''), ('652827', '6528', '00,65,6528', '和静县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652827', '和静县', '', '', '', '', 3, 1, ''), ('652828', '6528', '00,65,6528', '和硕县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652828', '和硕县', '', '', '', '', 3, 1, ''), ('652829', '6528', '00,65,6528', '博湖县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652829', '博湖县', '', '', '', '', 3, 1, ''), ('6529', '65', '00,65', '阿克苏地区', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '', '', '', '', '', '', 2, 1, ''), ('652901', '6529', '00,65,6529', '阿克苏市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652901', '阿克苏市', '', '', '', '', 3, 1, ''), ('652902', '6529', '00,65,6529', '库车市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652902', '库车市', '', '', '', '', 3, 1, ''), ('652922', '6529', '00,65,6529', '温宿县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652922', '温宿县', '', '', '', '', 3, 1, ''), ('652924', '6529', '00,65,6529', '沙雅县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652924', '沙雅县', '', '', '', '', 3, 1, ''), ('652925', '6529', '00,65,6529', '新和县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652925', '新和县', '', '', '', '', 3, 1, ''), ('652926', '6529', '00,65,6529', '拜城县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652926', '拜城县', '', '', '', '', 3, 1, ''), ('652927', '6529', '00,65,6529', '乌什县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652927', '乌什县', '', '', '', '', 3, 1, ''), ('652928', '6529', '00,65,6529', '阿瓦提县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652928', '阿瓦提县', '', '', '', '', 3, 1, ''), ('652929', '6529', '00,65,6529', '柯坪县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652929', '柯坪县', '', '', '', '', 3, 1, ''), ('6530', '65', '00,65', '克孜勒苏柯尔克孜自治州', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '', '', '', '', '', '', 2, 1, ''), ('653001', '6530', '00,65,6530', '阿图什市', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653001', '阿图什市', '', '', '', '', 3, 1, ''), ('653022', '6530', '00,65,6530', '阿克陶县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653022', '阿克陶县', '', '', '', '', 3, 1, ''), ('653023', '6530', '00,65,6530', '阿合奇县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653023', '阿合奇县', '', '', '', '', 3, 1, ''), ('653024', '6530', '00,65,6530', '乌恰县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653024', '乌恰县', '', '', '', '', 3, 1, ''), ('6531', '65', '00,65', '喀什地区', '65', '新疆维吾尔自治区', '6531', '喀什地区', '', '', '', '', '', '', 2, 1, ''), ('653101', '6531', '00,65,6531', '喀什市', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653101', '喀什市', '', '', '', '', 3, 1, ''), ('653121', '6531', '00,65,6531', '疏附县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653121', '疏附县', '', '', '', '', 3, 1, ''), ('653122', '6531', '00,65,6531', '疏勒县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653122', '疏勒县', '', '', '', '', 3, 1, ''), ('653123', '6531', '00,65,6531', '英吉沙县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653123', '英吉沙县', '', '', '', '', 3, 1, ''), ('653124', '6531', '00,65,6531', '泽普县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653124', '泽普县', '', '', '', '', 3, 1, ''), ('653125', '6531', '00,65,6531', '莎车县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653125', '莎车县', '', '', '', '', 3, 1, ''), ('653126', '6531', '00,65,6531', '叶城县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653126', '叶城县', '', '', '', '', 3, 1, ''), ('653127', '6531', '00,65,6531', '麦盖提县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653127', '麦盖提县', '', '', '', '', 3, 1, ''), ('653128', '6531', '00,65,6531', '岳普湖县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653128', '岳普湖县', '', '', '', '', 3, 1, ''), ('653129', '6531', '00,65,6531', '伽师县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653129', '伽师县', '', '', '', '', 3, 1, ''), ('653130', '6531', '00,65,6531', '巴楚县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653130', '巴楚县', '', '', '', '', 3, 1, ''), ('653131', '6531', '00,65,6531', '塔什库尔干塔吉克自治县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653131', '塔什库尔干塔吉克自治县', '', '', '', '', 3, 1, ''), ('6532', '65', '00,65', '和田地区', '65', '新疆维吾尔自治区', '6532', '和田地区', '', '', '', '', '', '', 2, 1, ''), ('653201', '6532', '00,65,6532', '和田市', '65', '新疆维吾尔自治区', '6532', '和田地区', '653201', '和田市', '', '', '', '', 3, 1, ''), ('653221', '6532', '00,65,6532', '和田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653221', '和田县', '', '', '', '', 3, 1, ''), ('653222', '6532', '00,65,6532', '墨玉县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653222', '墨玉县', '', '', '', '', 3, 1, ''), ('653223', '6532', '00,65,6532', '皮山县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653223', '皮山县', '', '', '', '', 3, 1, ''), ('653224', '6532', '00,65,6532', '洛浦县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653224', '洛浦县', '', '', '', '', 3, 1, ''), ('653225', '6532', '00,65,6532', '策勒县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653225', '策勒县', '', '', '', '', 3, 1, ''), ('653226', '6532', '00,65,6532', '于田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653226', '于田县', '', '', '', '', 3, 1, ''), ('653227', '6532', '00,65,6532', '民丰县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653227', '民丰县', '', '', '', '', 3, 1, ''), ('6540', '65', '00,65', '伊犁哈萨克自治州', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '', '', '', '', '', '', 2, 1, ''), ('654002', '6540', '00,65,6540', '伊宁市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654002', '伊宁市', '', '', '', '', 3, 1, ''), ('654003', '6540', '00,65,6540', '奎屯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654003', '奎屯市', '', '', '', '', 3, 1, ''), ('654004', '6540', '00,65,6540', '霍尔果斯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654004', '霍尔果斯市', '', '', '', '', 3, 1, ''), ('654021', '6540', '00,65,6540', '伊宁县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654021', '伊宁县', '', '', '', '', 3, 1, ''), ('654022', '6540', '00,65,6540', '察布查尔锡伯自治县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654022', '察布查尔锡伯自治县', '', '', '', '', 3, 1, ''), ('654023', '6540', '00,65,6540', '霍城县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654023', '霍城县', '', '', '', '', 3, 1, ''), ('654024', '6540', '00,65,6540', '巩留县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654024', '巩留县', '', '', '', '', 3, 1, ''), ('654025', '6540', '00,65,6540', '新源县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654025', '新源县', '', '', '', '', 3, 1, ''), ('654026', '6540', '00,65,6540', '昭苏县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654026', '昭苏县', '', '', '', '', 3, 1, ''), ('654027', '6540', '00,65,6540', '特克斯县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654027', '特克斯县', '', '', '', '', 3, 1, ''), ('654028', '6540', '00,65,6540', '尼勒克县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654028', '尼勒克县', '', '', '', '', 3, 1, ''), ('6542', '65', '00,65', '塔城地区', '65', '新疆维吾尔自治区', '6542', '塔城地区', '', '', '', '', '', '', 2, 1, ''), ('654201', '6542', '00,65,6542', '塔城市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654201', '塔城市', '', '', '', '', 3, 1, ''), ('654202', '6542', '00,65,6542', '乌苏市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654202', '乌苏市', '', '', '', '', 3, 1, ''), ('654221', '6542', '00,65,6542', '额敏县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654221', '额敏县', '', '', '', '', 3, 1, ''), ('654223', '6542', '00,65,6542', '沙湾县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654223', '沙湾县', '', '', '', '', 3, 1, ''), ('654224', '6542', '00,65,6542', '托里县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654224', '托里县', '', '', '', '', 3, 1, ''), ('654225', '6542', '00,65,6542', '裕民县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654225', '裕民县', '', '', '', '', 3, 1, ''), ('654226', '6542', '00,65,6542', '和布克赛尔蒙古自治县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654226', '和布克赛尔蒙古自治县', '', '', '', '', 3, 1, ''), ('6543', '65', '00,65', '阿勒泰地区', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '', '', '', '', '', '', 2, 1, ''), ('654301', '6543', '00,65,6543', '阿勒泰市', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654301', '阿勒泰市', '', '', '', '', 3, 1, ''), ('654321', '6543', '00,65,6543', '布尔津县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654321', '布尔津县', '', '', '', '', 3, 1, ''), ('654322', '6543', '00,65,6543', '富蕴县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654322', '富蕴县', '', '', '', '', 3, 1, ''), ('654323', '6543', '00,65,6543', '福海县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654323', '福海县', '', '', '', '', 3, 1, ''), ('654324', '6543', '00,65,6543', '哈巴河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654324', '哈巴河县', '', '', '', '', 3, 1, ''), ('654325', '6543', '00,65,6543', '青河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654325', '青河县', '', '', '', '', 3, 1, ''), ('654326', '6543', '00,65,6543', '吉木乃县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654326', '吉木乃县', '', '', '', '', 3, 1, ''), ('6590', '65', '00,65', '自治区直辖县级行政区', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('659001', '6590', '00,65,6590', '石河子市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659001', '石河子市', '', '', '', '', 3, 1, ''), ('659002', '6590', '00,65,6590', '阿拉尔市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659002', '阿拉尔市', '', '', '', '', 3, 1, ''), ('659003', '6590', '00,65,6590', '图木舒克市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659003', '图木舒克市', '', '', '', '', 3, 1, ''), ('659004', '6590', '00,65,6590', '五家渠市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659004', '五家渠市', '', '', '', '', 3, 1, ''), ('659005', '6590', '00,65,6590', '北屯市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659005', '北屯市', '', '', '', '', 3, 1, ''), ('659006', '6590', '00,65,6590', '铁门关市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659006', '铁门关市', '', '', '', '', 3, 1, ''), ('659007', '6590', '00,65,6590', '双河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659007', '双河市', '', '', '', '', 3, 1, ''), ('659008', '6590', '00,65,6590', '可克达拉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659008', '可克达拉市', '', '', '', '', 3, 1, ''), ('659009', '6590', '00,65,6590', '昆玉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659009', '昆玉市', '', '', '', '', 3, 1, ''), ('659010', '6590', '00,65,6590', '胡杨河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659010', '胡杨河市', '', '', '', '', 3, 1, ''), ('71', '00', '00', '台湾省', '71', '台湾省', '', '', '', '', '', '', '', '', 1, 1, ''), ('81', '00', '00', '香港特别行政区', '81', '香港特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''), ('82', '00', '00', '澳门特别行政区', '82', '澳门特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_report_file +-- ---------------------------- +DROP TABLE IF EXISTS `sys_report_file`; +CREATE TABLE `sys_report_file` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名', + `content` mediumblob NULL COMMENT '文件内容', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '报表文件表'; + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `role_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色别名', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表'; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +BEGIN; +INSERT INTO `sys_role` VALUES (1123598816738675201, '000000', 0, '超级管理员', 1, 'administrator', 0), (1123598816738675202, '000000', 0, '用户', 2, 'user', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_menu`; +CREATE TABLE `sys_role_menu` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单id', + `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表'; + +-- ---------------------------- +-- Records of sys_role_menu +-- ---------------------------- +BEGIN; +INSERT INTO `sys_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030340342616066, 1123598815738675201, 1123598816738675202), (1296030340367781890, 1123598815738675202, 1123598816738675202), (1296030340384559105, 1123598815738675219, 1123598816738675202), (1296030340401336321, 1123598815738675220, 1123598816738675202), (1296030340413919233, 1123598815738675221, 1123598816738675202), (1296030340434890753, 1123598815738675222, 1123598816738675202), (1455363615489028098, 1123598815738675307, 1123598816738675201), (1455363615505805313, 1123598815738675309, 1123598816738675201), (1455363615518388225, 1123598815738675310, 1123598816738675201); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_role_scope +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_scope`; +CREATE TABLE `sys_role_scope` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id', + `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; + +-- ---------------------------- +-- Table structure for sys_scope_data +-- ---------------------------- +DROP TABLE IF EXISTS `sys_scope_data`; +CREATE TABLE `sys_scope_data` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键', + `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号', + `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称', + `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名', + `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型', + `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表'; + +-- ---------------------------- +-- Table structure for sys_tenant +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant`; +CREATE TABLE `sys_tenant` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID', + `tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称', + `domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '域名地址', + `linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人', + `contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户表'; + +-- ---------------------------- +-- Records of sys_tenant +-- ---------------------------- +BEGIN; +INSERT INTO `sys_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户编号', + `account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号', + `password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称', + `real_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真名', + `avatar` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `email` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机', + `birthday` datetime(0) NULL DEFAULT NULL COMMENT '生日', + `sex` smallint(6) NULL DEFAULT NULL COMMENT '性别', + `role_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id', + `dept_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id', + `post_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位id', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表'; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +BEGIN; +INSERT INTO `sys_user` +VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', + 'admin@dafx.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', + '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, + '2018-08-08 00:00:00', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_user_oauth +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_oauth`; +CREATE TABLE `sys_user_oauth` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', + `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方系统用户ID', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID', + `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号', + `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名', + `avatar` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `blog` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用主页', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司名', + `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `gender` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别', + `source` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户第三方认证表'; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/doc/sql/blade-sword-mysql.sql b/doc/sql/blade-sword-mysql.sql new file mode 100644 index 0000000..b0a9006 --- /dev/null +++ b/doc/sql/blade-sword-mysql.sql @@ -0,0 +1,737 @@ +/* + Navicat Premium Data Transfer + + Source Server : mysql_localhost + Source Server Type : MySQL + Source Server Version : 50729 + Source Host : localhost:3306 + Source Schema : daf + + Target Server Type : MySQL + Target Server Version : 50729 + File Encoding : 65001 + + Date: 02/11/2021 16:58:38 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_client +-- ---------------------------- +DROP TABLE IF EXISTS `sys_client`; +CREATE TABLE `sys_client` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `client_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端id', + `client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端密钥', + `resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源集合', + `scope` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权范围', + `authorized_grant_types` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权类型', + `web_server_redirect_uri` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '回调地址', + `authorities` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限', + `access_token_validity` int(11) NOT NULL COMMENT '令牌过期秒数', + `refresh_token_validity` int(11) NOT NULL COMMENT '刷新令牌过期秒数', + `additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加说明', + `autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动授权', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NOT NULL COMMENT '状态', + `is_deleted` int(2) NOT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '客户端表'; + +-- ---------------------------- +-- Records of sys_client +-- ---------------------------- +BEGIN; +INSERT INTO `sys_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_code +-- ---------------------------- +DROP TABLE IF EXISTS `sys_code`; +CREATE TABLE `sys_code` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `datasource_id` bigint(20) NULL DEFAULT NULL COMMENT '数据源主键', + `service_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称', + `code_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模块名称', + `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表名', + `table_prefix` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表前缀', + `pk_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主键名', + `package_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端包名', + `base_mode` int(2) NULL DEFAULT NULL COMMENT '基础业务模式', + `wrap_mode` int(2) NULL DEFAULT NULL COMMENT '包装器模式', + `api_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端路径', + `web_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '前端路径', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成表'; + +-- ---------------------------- +-- Records of sys_code +-- ---------------------------- +BEGIN; +INSERT INTO `sys_code` +VALUES (1123598812738675201, 1123598812738675201, 'daf-demo', '通知公告', 'sys_notice', 'sys_', 'id', + 'com.dayu.daf.desktop', 1, 1, 'D:\\Develop\\WorkSpace\\Git\\SpringDaf\\daf-ops\\daf-develop', + 'D:\\Develop\\WorkSpace\\Git\\Sword', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_datasource +-- ---------------------------- +DROP TABLE IF EXISTS `sys_datasource`; +CREATE TABLE `sys_datasource` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称', + `driver_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驱动类', + `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接地址', + `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名', + `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据源配置表'; + +-- ---------------------------- +-- Records of sys_datasource +-- ---------------------------- +BEGIN; +INSERT INTO `sys_datasource` +VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', + 'jdbc:mysql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', + 'root', 'root', 'mysql', 1, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), + (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/daf', 'postgres', + '123456', 'postgresql', 1, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), + (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', + 'daf', 'oracle', 1, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `ancestors` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表', + `dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名', + `full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表'; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +BEGIN; +INSERT INTO `sys_dept` VALUES (1123598813738675201, '000000', 0, '0', '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '0,1123598813738675201', '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '0,1123598813738675201', '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_dict +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict`; +CREATE TABLE `sys_dict` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码', + `dict_key` int(2) NULL DEFAULT NULL COMMENT '字典值', + `dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表'; + +-- ---------------------------- +-- Records of sys_dict +-- ---------------------------- +BEGIN; +INSERT INTO `sys_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0), (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0), (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0), (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0), (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0), (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_log_api +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_api`; +CREATE TABLE `sys_log_api` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器环境', + `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '日志类型', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志标题', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '接口日志表'; + +-- ---------------------------- +-- Table structure for sys_log_error +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_error`; +CREATE TABLE `sys_log_error` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '堆栈', + `exception_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异常名', + `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异常信息', + `line_number` int(11) NULL DEFAULT NULL COMMENT '错误行数', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `file_name` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '错误日志表'; + +-- ---------------------------- +-- Table structure for sys_log_usual +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log_usual`; +CREATE TABLE `sys_log_usual` ( + `id` bigint(20) NOT NULL COMMENT '编号', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID', + `server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `log_level` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志级别', + `log_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志业务id', + `log_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '日志数据', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` datetime(0) NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通用日志表'; + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父级菜单', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单编号', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称', + `alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单别名', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求地址', + `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单资源', + `sort` int(2) NULL DEFAULT NULL COMMENT '排序', + `category` int(2) NULL DEFAULT NULL COMMENT '菜单类型', + `action` int(2) NULL DEFAULT 0 COMMENT '操作按钮类型', + `is_open` int(2) NULL DEFAULT 1 COMMENT '是否打开新页面', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表'; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +BEGIN; +INSERT INTO `sys_menu` +VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'desktop', 1, 1, 0, 1, NULL, 0), + (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', NULL, 1, 1, 0, 1, NULL, 0), + (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'setting', 99, 1, 0, 1, NULL, 0), + (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', NULL, 1, 1, 0, 1, NULL, 0), + (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', NULL, 2, 1, 0, 1, NULL, 0), + (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', NULL, 3, 1, 0, 1, NULL, 0), + (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', NULL, 4, 1, 0, 1, NULL, 0), + (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', NULL, 6, 1, 0, 1, NULL, 0), + (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'fund', 3, 1, 0, 1, NULL, 0), + (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', NULL, 1, 1, 0, 2, + NULL, 0), + (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', NULL, 2, 1, 0, 2, + NULL, 0), + (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', NULL, 3, 1, 0, 1, NULL, 0), + (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, + NULL, 0), + (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, + 0), + (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, + NULL, 0), + (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'tool', 4, 1, 0, 1, NULL, 0), + (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', NULL, 1, 1, 0, 1, NULL, 0), + (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/daf-desk/notice/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/daf-user/remove', 'delete', 3, 2, + 3, 1, NULL, 0), + (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), + (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', + '/api/daf-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), + (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, + 1, NULL, 0), + (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/daf-system/dept/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/daf-system/dict/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/daf-system/menu/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/daf-system/role/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/daf-system/param/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', + 'file-text', 4, 2, 2, 1, NULL, 0), + (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, + 2, 2, 1, NULL, 0), + (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', + 'file-text', 4, 2, 2, 1, NULL, 0), + (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/daf-system/code/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, + NULL, 0), + (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', NULL, 7, 1, 0, 1, NULL, + 0), + (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, + 1, NULL, 0), + (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/daf-system/tenant/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, + 2, 1, NULL, 0), + (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', NULL, 8, 1, 0, 1, NULL, + 0), + (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, + NULL, 0), + (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, + 2, NULL, 0), + (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/daf-system/client/remove', + 'delete', 3, 2, 3, 3, NULL, 0), + (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, + 2, 2, NULL, 0), + (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', '', 2, 1, 0, 1, + NULL, 0), + (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, + 1, 1, NULL, 0), + (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, + 2, 2, 2, NULL, 0), + (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', + '/api/daf-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), + (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', + 4, 2, 2, 2, NULL, 0), + (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'safety-certificate', 98, 1, 0, 1, '', 0), + (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', '', 1, 1, 0, 1, NULL, 0), + (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', '', 2, 1, 0, 1, + '', 0), + (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, + NULL, 0), + (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', '', 2, 1, 0, 1, NULL, 0), + (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, + 0), + (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, + NULL, 0), + (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/daf-system/post/remove', + 'delete', 3, 2, 3, 1, NULL, 0), + (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, + 1, NULL, 0), + (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'sliders', 97, 1, 0, 1, NULL, 0), + (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', '', 1, 1, 0, 1, NULL, 0), + (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), + (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/daf-system/region/remove', '', + 2, 2, 2, 1, NULL, 0), + (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), + (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), + (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), + (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'bar-chart', 5, 1, 0, 1, NULL, 0), + (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', + 'http://localhost:8108/ureport/designer', '', 1, 1, 0, 1, NULL, 0), + (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', '', 2, 1, 0, 1, + NULL, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_notice +-- ---------------------------- +DROP TABLE IF EXISTS `sys_notice`; +CREATE TABLE `sys_notice` +( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题', + `category` int(11) NULL DEFAULT NULL COMMENT '类型', + `release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间', + `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知公告表'; + +-- ---------------------------- +-- Records of sys_notice +-- ---------------------------- +BEGIN; +INSERT INTO `sys_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, 1123598813738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, 1123598813738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, 1123598813738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_param +-- ---------------------------- +DROP TABLE IF EXISTS `sys_param`; +CREATE TABLE `sys_param` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `param_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名', + `param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键', + `param_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参数表'; + +-- ---------------------------- +-- Records of sys_param +-- ---------------------------- +BEGIN; +INSERT INTO `sys_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_post +-- ---------------------------- +DROP TABLE IF EXISTS `sys_post`; +CREATE TABLE `sys_post` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `category` int(11) NULL DEFAULT NULL COMMENT '岗位类型', + `post_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位编号', + `post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称', + `sort` int(2) NULL DEFAULT NULL COMMENT '岗位排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位描述', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位表'; + +-- ---------------------------- +-- Records of sys_post +-- ---------------------------- +BEGIN; +INSERT INTO `sys_post` VALUES (1123598817738675201, '000000', 1, 'ceo', '首席执行官', 1, '总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675202, '000000', 1, 'coo', '首席运营官', 2, '常务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675203, '000000', 1, 'cfo', '首席财务官', 3, '财务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675204, '000000', 1, 'cto', '首席技术官', 4, '技术总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675205, '000000', 1, 'cio', '首席信息官', 5, '信息总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675206, '000000', 2, 'pm', '技术经理', 6, '研发和产品是永远的朋友', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675207, '000000', 2, 'hrm', '人力经理', 7, '人力资源部门工作管理者', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675208, '000000', 3, 'staff', '普通员工', 8, '普通员工', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_region +-- ---------------------------- +DROP TABLE IF EXISTS `sys_region`; +CREATE TABLE `sys_region` ( + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '区划编号', + `parent_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父区划编号', + `ancestors` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖区划编号', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区划名称', + `province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级区划编号', + `province_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级名称', + `city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级区划编号', + `city_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级名称', + `district_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级区划编号', + `district_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级名称', + `town_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级区划编号', + `town_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级名称', + `village_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级区划编号', + `village_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级名称', + `level` int(2) NULL DEFAULT NULL COMMENT '层级', + `sort` int(2) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`code`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '行政区划表'; + +-- ---------------------------- +-- Records of sys_region +-- ---------------------------- +BEGIN; +INSERT INTO `sys_region` VALUES ('00', '0', '0', '中华人民共和国', '', '', '', '', '', '', '', '', '', '', 0, 1, ''), ('11', '00', '00', '北京市', '11', '北京市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1101', '11', '00,11', '北京市', '11', '北京市', '1101', '北京市', '', '', '', '', '', '', 2, 1, ''), ('110101', '1101', '00,11,1101', '东城区', '11', '北京市', '1101', '北京市', '110101', '东城区', '', '', '', '', 3, 1, ''), ('110102', '1101', '00,11,1101', '西城区', '11', '北京市', '1101', '北京市', '110102', '西城区', '', '', '', '', 3, 1, ''), ('110105', '1101', '00,11,1101', '朝阳区', '11', '北京市', '1101', '北京市', '110105', '朝阳区', '', '', '', '', 3, 1, ''), ('110106', '1101', '00,11,1101', '丰台区', '11', '北京市', '1101', '北京市', '110106', '丰台区', '', '', '', '', 3, 1, ''), ('110107', '1101', '00,11,1101', '石景山区', '11', '北京市', '1101', '北京市', '110107', '石景山区', '', '', '', '', 3, 1, ''), ('110108', '1101', '00,11,1101', '海淀区', '11', '北京市', '1101', '北京市', '110108', '海淀区', '', '', '', '', 3, 1, ''), ('110109', '1101', '00,11,1101', '门头沟区', '11', '北京市', '1101', '北京市', '110109', '门头沟区', '', '', '', '', 3, 1, ''), ('110111', '1101', '00,11,1101', '房山区', '11', '北京市', '1101', '北京市', '110111', '房山区', '', '', '', '', 3, 1, ''), ('110112', '1101', '00,11,1101', '通州区', '11', '北京市', '1101', '北京市', '110112', '通州区', '', '', '', '', 3, 1, ''), ('110113', '1101', '00,11,1101', '顺义区', '11', '北京市', '1101', '北京市', '110113', '顺义区', '', '', '', '', 3, 1, ''), ('110114', '1101', '00,11,1101', '昌平区', '11', '北京市', '1101', '北京市', '110114', '昌平区', '', '', '', '', 3, 1, ''), ('110115', '1101', '00,11,1101', '大兴区', '11', '北京市', '1101', '北京市', '110115', '大兴区', '', '', '', '', 3, 1, ''), ('110116', '1101', '00,11,1101', '怀柔区', '11', '北京市', '1101', '北京市', '110116', '怀柔区', '', '', '', '', 3, 1, ''), ('110117', '1101', '00,11,1101', '平谷区', '11', '北京市', '1101', '北京市', '110117', '平谷区', '', '', '', '', 3, 1, ''), ('110118', '1101', '00,11,1101', '密云区', '11', '北京市', '1101', '北京市', '110118', '密云区', '', '', '', '', 3, 1, ''), ('110119', '1101', '00,11,1101', '延庆区', '11', '北京市', '1101', '北京市', '110119', '延庆区', '', '', '', '', 3, 1, ''), ('12', '00', '00', '天津市', '12', '天津市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1201', '12', '00,12', '天津市', '12', '天津市', '1201', '天津市', '', '', '', '', '', '', 2, 1, ''), ('120101', '1201', '00,12,1201', '和平区', '12', '天津市', '1201', '天津市', '120101', '和平区', '', '', '', '', 3, 1, ''), ('120102', '1201', '00,12,1201', '河东区', '12', '天津市', '1201', '天津市', '120102', '河东区', '', '', '', '', 3, 1, ''), ('120103', '1201', '00,12,1201', '河西区', '12', '天津市', '1201', '天津市', '120103', '河西区', '', '', '', '', 3, 1, ''), ('120104', '1201', '00,12,1201', '南开区', '12', '天津市', '1201', '天津市', '120104', '南开区', '', '', '', '', 3, 1, ''), ('120105', '1201', '00,12,1201', '河北区', '12', '天津市', '1201', '天津市', '120105', '河北区', '', '', '', '', 3, 1, ''), ('120106', '1201', '00,12,1201', '红桥区', '12', '天津市', '1201', '天津市', '120106', '红桥区', '', '', '', '', 3, 1, ''), ('120110', '1201', '00,12,1201', '东丽区', '12', '天津市', '1201', '天津市', '120110', '东丽区', '', '', '', '', 3, 1, ''), ('120111', '1201', '00,12,1201', '西青区', '12', '天津市', '1201', '天津市', '120111', '西青区', '', '', '', '', 3, 1, ''), ('120112', '1201', '00,12,1201', '津南区', '12', '天津市', '1201', '天津市', '120112', '津南区', '', '', '', '', 3, 1, ''), ('120113', '1201', '00,12,1201', '北辰区', '12', '天津市', '1201', '天津市', '120113', '北辰区', '', '', '', '', 3, 1, ''), ('120114', '1201', '00,12,1201', '武清区', '12', '天津市', '1201', '天津市', '120114', '武清区', '', '', '', '', 3, 1, ''), ('120115', '1201', '00,12,1201', '宝坻区', '12', '天津市', '1201', '天津市', '120115', '宝坻区', '', '', '', '', 3, 1, ''), ('120116', '1201', '00,12,1201', '滨海新区', '12', '天津市', '1201', '天津市', '120116', '滨海新区', '', '', '', '', 3, 1, ''), ('120117', '1201', '00,12,1201', '宁河区', '12', '天津市', '1201', '天津市', '120117', '宁河区', '', '', '', '', 3, 1, ''), ('120118', '1201', '00,12,1201', '静海区', '12', '天津市', '1201', '天津市', '120118', '静海区', '', '', '', '', 3, 1, ''), ('120119', '1201', '00,12,1201', '蓟州区', '12', '天津市', '1201', '天津市', '120119', '蓟州区', '', '', '', '', 3, 1, ''), ('13', '00', '00', '河北省', '13', '河北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1301', '13', '00,13', '石家庄市', '13', '河北省', '1301', '石家庄市', '', '', '', '', '', '', 2, 1, ''), ('130102', '1301', '00,13,1301', '长安区', '13', '河北省', '1301', '石家庄市', '130102', '长安区', '', '', '', '', 3, 1, ''), ('130104', '1301', '00,13,1301', '桥西区', '13', '河北省', '1301', '石家庄市', '130104', '桥西区', '', '', '', '', 3, 1, ''), ('130105', '1301', '00,13,1301', '新华区', '13', '河北省', '1301', '石家庄市', '130105', '新华区', '', '', '', '', 3, 1, ''), ('130107', '1301', '00,13,1301', '井陉矿区', '13', '河北省', '1301', '石家庄市', '130107', '井陉矿区', '', '', '', '', 3, 1, ''), ('130108', '1301', '00,13,1301', '裕华区', '13', '河北省', '1301', '石家庄市', '130108', '裕华区', '', '', '', '', 3, 1, ''), ('130109', '1301', '00,13,1301', '藁城区', '13', '河北省', '1301', '石家庄市', '130109', '藁城区', '', '', '', '', 3, 1, ''), ('130110', '1301', '00,13,1301', '鹿泉区', '13', '河北省', '1301', '石家庄市', '130110', '鹿泉区', '', '', '', '', 3, 1, ''), ('130111', '1301', '00,13,1301', '栾城区', '13', '河北省', '1301', '石家庄市', '130111', '栾城区', '', '', '', '', 3, 1, ''), ('130121', '1301', '00,13,1301', '井陉县', '13', '河北省', '1301', '石家庄市', '130121', '井陉县', '', '', '', '', 3, 1, ''), ('130123', '1301', '00,13,1301', '正定县', '13', '河北省', '1301', '石家庄市', '130123', '正定县', '', '', '', '', 3, 1, ''), ('130125', '1301', '00,13,1301', '行唐县', '13', '河北省', '1301', '石家庄市', '130125', '行唐县', '', '', '', '', 3, 1, ''), ('130126', '1301', '00,13,1301', '灵寿县', '13', '河北省', '1301', '石家庄市', '130126', '灵寿县', '', '', '', '', 3, 1, ''), ('130127', '1301', '00,13,1301', '高邑县', '13', '河北省', '1301', '石家庄市', '130127', '高邑县', '', '', '', '', 3, 1, ''), ('130128', '1301', '00,13,1301', '深泽县', '13', '河北省', '1301', '石家庄市', '130128', '深泽县', '', '', '', '', 3, 1, ''), ('130129', '1301', '00,13,1301', '赞皇县', '13', '河北省', '1301', '石家庄市', '130129', '赞皇县', '', '', '', '', 3, 1, ''), ('130130', '1301', '00,13,1301', '无极县', '13', '河北省', '1301', '石家庄市', '130130', '无极县', '', '', '', '', 3, 1, ''), ('130131', '1301', '00,13,1301', '平山县', '13', '河北省', '1301', '石家庄市', '130131', '平山县', '', '', '', '', 3, 1, ''), ('130132', '1301', '00,13,1301', '元氏县', '13', '河北省', '1301', '石家庄市', '130132', '元氏县', '', '', '', '', 3, 1, ''), ('130133', '1301', '00,13,1301', '赵县', '13', '河北省', '1301', '石家庄市', '130133', '赵县', '', '', '', '', 3, 1, ''), ('130181', '1301', '00,13,1301', '辛集市', '13', '河北省', '1301', '石家庄市', '130181', '辛集市', '', '', '', '', 3, 1, ''), ('130183', '1301', '00,13,1301', '晋州市', '13', '河北省', '1301', '石家庄市', '130183', '晋州市', '', '', '', '', 3, 1, ''), ('130184', '1301', '00,13,1301', '新乐市', '13', '河北省', '1301', '石家庄市', '130184', '新乐市', '', '', '', '', 3, 1, ''), ('1302', '13', '00,13', '唐山市', '13', '河北省', '1302', '唐山市', '', '', '', '', '', '', 2, 1, ''), ('130202', '1302', '00,13,1302', '路南区', '13', '河北省', '1302', '唐山市', '130202', '路南区', '', '', '', '', 3, 1, ''), ('130203', '1302', '00,13,1302', '路北区', '13', '河北省', '1302', '唐山市', '130203', '路北区', '', '', '', '', 3, 1, ''), ('130204', '1302', '00,13,1302', '古冶区', '13', '河北省', '1302', '唐山市', '130204', '古冶区', '', '', '', '', 3, 1, ''), ('130205', '1302', '00,13,1302', '开平区', '13', '河北省', '1302', '唐山市', '130205', '开平区', '', '', '', '', 3, 1, ''), ('130207', '1302', '00,13,1302', '丰南区', '13', '河北省', '1302', '唐山市', '130207', '丰南区', '', '', '', '', 3, 1, ''), ('130208', '1302', '00,13,1302', '丰润区', '13', '河北省', '1302', '唐山市', '130208', '丰润区', '', '', '', '', 3, 1, ''), ('130209', '1302', '00,13,1302', '曹妃甸区', '13', '河北省', '1302', '唐山市', '130209', '曹妃甸区', '', '', '', '', 3, 1, ''), ('130224', '1302', '00,13,1302', '滦南县', '13', '河北省', '1302', '唐山市', '130224', '滦南县', '', '', '', '', 3, 1, ''), ('130225', '1302', '00,13,1302', '乐亭县', '13', '河北省', '1302', '唐山市', '130225', '乐亭县', '', '', '', '', 3, 1, ''), ('130227', '1302', '00,13,1302', '迁西县', '13', '河北省', '1302', '唐山市', '130227', '迁西县', '', '', '', '', 3, 1, ''), ('130229', '1302', '00,13,1302', '玉田县', '13', '河北省', '1302', '唐山市', '130229', '玉田县', '', '', '', '', 3, 1, ''), ('130281', '1302', '00,13,1302', '遵化市', '13', '河北省', '1302', '唐山市', '130281', '遵化市', '', '', '', '', 3, 1, ''), ('130283', '1302', '00,13,1302', '迁安市', '13', '河北省', '1302', '唐山市', '130283', '迁安市', '', '', '', '', 3, 1, ''), ('130284', '1302', '00,13,1302', '滦州市', '13', '河北省', '1302', '唐山市', '130284', '滦州市', '', '', '', '', 3, 1, ''), ('1303', '13', '00,13', '秦皇岛市', '13', '河北省', '1303', '秦皇岛市', '', '', '', '', '', '', 2, 1, ''), ('130302', '1303', '00,13,1303', '海港区', '13', '河北省', '1303', '秦皇岛市', '130302', '海港区', '', '', '', '', 3, 1, ''), ('130303', '1303', '00,13,1303', '山海关区', '13', '河北省', '1303', '秦皇岛市', '130303', '山海关区', '', '', '', '', 3, 1, ''), ('130304', '1303', '00,13,1303', '北戴河区', '13', '河北省', '1303', '秦皇岛市', '130304', '北戴河区', '', '', '', '', 3, 1, ''), ('130306', '1303', '00,13,1303', '抚宁区', '13', '河北省', '1303', '秦皇岛市', '130306', '抚宁区', '', '', '', '', 3, 1, ''), ('130321', '1303', '00,13,1303', '青龙满族自治县', '13', '河北省', '1303', '秦皇岛市', '130321', '青龙满族自治县', '', '', '', '', 3, 1, ''), ('130322', '1303', '00,13,1303', '昌黎县', '13', '河北省', '1303', '秦皇岛市', '130322', '昌黎县', '', '', '', '', 3, 1, ''), ('130324', '1303', '00,13,1303', '卢龙县', '13', '河北省', '1303', '秦皇岛市', '130324', '卢龙县', '', '', '', '', 3, 1, ''), ('1304', '13', '00,13', '邯郸市', '13', '河北省', '1304', '邯郸市', '', '', '', '', '', '', 2, 1, ''), ('130402', '1304', '00,13,1304', '邯山区', '13', '河北省', '1304', '邯郸市', '130402', '邯山区', '', '', '', '', 3, 1, ''), ('130403', '1304', '00,13,1304', '丛台区', '13', '河北省', '1304', '邯郸市', '130403', '丛台区', '', '', '', '', 3, 1, ''), ('130404', '1304', '00,13,1304', '复兴区', '13', '河北省', '1304', '邯郸市', '130404', '复兴区', '', '', '', '', 3, 1, ''), ('130406', '1304', '00,13,1304', '峰峰矿区', '13', '河北省', '1304', '邯郸市', '130406', '峰峰矿区', '', '', '', '', 3, 1, ''), ('130407', '1304', '00,13,1304', '肥乡区', '13', '河北省', '1304', '邯郸市', '130407', '肥乡区', '', '', '', '', 3, 1, ''), ('130408', '1304', '00,13,1304', '永年区', '13', '河北省', '1304', '邯郸市', '130408', '永年区', '', '', '', '', 3, 1, ''), ('130423', '1304', '00,13,1304', '临漳县', '13', '河北省', '1304', '邯郸市', '130423', '临漳县', '', '', '', '', 3, 1, ''), ('130424', '1304', '00,13,1304', '成安县', '13', '河北省', '1304', '邯郸市', '130424', '成安县', '', '', '', '', 3, 1, ''), ('130425', '1304', '00,13,1304', '大名县', '13', '河北省', '1304', '邯郸市', '130425', '大名县', '', '', '', '', 3, 1, ''), ('130426', '1304', '00,13,1304', '涉县', '13', '河北省', '1304', '邯郸市', '130426', '涉县', '', '', '', '', 3, 1, ''), ('130427', '1304', '00,13,1304', '磁县', '13', '河北省', '1304', '邯郸市', '130427', '磁县', '', '', '', '', 3, 1, ''), ('130430', '1304', '00,13,1304', '邱县', '13', '河北省', '1304', '邯郸市', '130430', '邱县', '', '', '', '', 3, 1, ''), ('130431', '1304', '00,13,1304', '鸡泽县', '13', '河北省', '1304', '邯郸市', '130431', '鸡泽县', '', '', '', '', 3, 1, ''), ('130432', '1304', '00,13,1304', '广平县', '13', '河北省', '1304', '邯郸市', '130432', '广平县', '', '', '', '', 3, 1, ''), ('130433', '1304', '00,13,1304', '馆陶县', '13', '河北省', '1304', '邯郸市', '130433', '馆陶县', '', '', '', '', 3, 1, ''), ('130434', '1304', '00,13,1304', '魏县', '13', '河北省', '1304', '邯郸市', '130434', '魏县', '', '', '', '', 3, 1, ''), ('130435', '1304', '00,13,1304', '曲周县', '13', '河北省', '1304', '邯郸市', '130435', '曲周县', '', '', '', '', 3, 1, ''), ('130481', '1304', '00,13,1304', '武安市', '13', '河北省', '1304', '邯郸市', '130481', '武安市', '', '', '', '', 3, 1, ''), ('1305', '13', '00,13', '邢台市', '13', '河北省', '1305', '邢台市', '', '', '', '', '', '', 2, 1, ''), ('130502', '1305', '00,13,1305', '桥东区', '13', '河北省', '1305', '邢台市', '130502', '桥东区', '', '', '', '', 3, 1, ''), ('130503', '1305', '00,13,1305', '桥西区', '13', '河北省', '1305', '邢台市', '130503', '桥西区', '', '', '', '', 3, 1, ''), ('130521', '1305', '00,13,1305', '邢台县', '13', '河北省', '1305', '邢台市', '130521', '邢台县', '', '', '', '', 3, 1, ''), ('130522', '1305', '00,13,1305', '临城县', '13', '河北省', '1305', '邢台市', '130522', '临城县', '', '', '', '', 3, 1, ''), ('130523', '1305', '00,13,1305', '内丘县', '13', '河北省', '1305', '邢台市', '130523', '内丘县', '', '', '', '', 3, 1, ''), ('130524', '1305', '00,13,1305', '柏乡县', '13', '河北省', '1305', '邢台市', '130524', '柏乡县', '', '', '', '', 3, 1, ''), ('130525', '1305', '00,13,1305', '隆尧县', '13', '河北省', '1305', '邢台市', '130525', '隆尧县', '', '', '', '', 3, 1, ''), ('130526', '1305', '00,13,1305', '任县', '13', '河北省', '1305', '邢台市', '130526', '任县', '', '', '', '', 3, 1, ''), ('130527', '1305', '00,13,1305', '南和县', '13', '河北省', '1305', '邢台市', '130527', '南和县', '', '', '', '', 3, 1, ''), ('130528', '1305', '00,13,1305', '宁晋县', '13', '河北省', '1305', '邢台市', '130528', '宁晋县', '', '', '', '', 3, 1, ''), ('130529', '1305', '00,13,1305', '巨鹿县', '13', '河北省', '1305', '邢台市', '130529', '巨鹿县', '', '', '', '', 3, 1, ''), ('130530', '1305', '00,13,1305', '新河县', '13', '河北省', '1305', '邢台市', '130530', '新河县', '', '', '', '', 3, 1, ''), ('130531', '1305', '00,13,1305', '广宗县', '13', '河北省', '1305', '邢台市', '130531', '广宗县', '', '', '', '', 3, 1, ''), ('130532', '1305', '00,13,1305', '平乡县', '13', '河北省', '1305', '邢台市', '130532', '平乡县', '', '', '', '', 3, 1, ''), ('130533', '1305', '00,13,1305', '威县', '13', '河北省', '1305', '邢台市', '130533', '威县', '', '', '', '', 3, 1, ''), ('130534', '1305', '00,13,1305', '清河县', '13', '河北省', '1305', '邢台市', '130534', '清河县', '', '', '', '', 3, 1, ''), ('130535', '1305', '00,13,1305', '临西县', '13', '河北省', '1305', '邢台市', '130535', '临西县', '', '', '', '', 3, 1, ''), ('130581', '1305', '00,13,1305', '南宫市', '13', '河北省', '1305', '邢台市', '130581', '南宫市', '', '', '', '', 3, 1, ''), ('130582', '1305', '00,13,1305', '沙河市', '13', '河北省', '1305', '邢台市', '130582', '沙河市', '', '', '', '', 3, 1, ''), ('1306', '13', '00,13', '保定市', '13', '河北省', '1306', '保定市', '', '', '', '', '', '', 2, 1, ''), ('130602', '1306', '00,13,1306', '竞秀区', '13', '河北省', '1306', '保定市', '130602', '竞秀区', '', '', '', '', 3, 1, ''), ('130606', '1306', '00,13,1306', '莲池区', '13', '河北省', '1306', '保定市', '130606', '莲池区', '', '', '', '', 3, 1, ''), ('130607', '1306', '00,13,1306', '满城区', '13', '河北省', '1306', '保定市', '130607', '满城区', '', '', '', '', 3, 1, ''), ('130608', '1306', '00,13,1306', '清苑区', '13', '河北省', '1306', '保定市', '130608', '清苑区', '', '', '', '', 3, 1, ''), ('130609', '1306', '00,13,1306', '徐水区', '13', '河北省', '1306', '保定市', '130609', '徐水区', '', '', '', '', 3, 1, ''), ('130623', '1306', '00,13,1306', '涞水县', '13', '河北省', '1306', '保定市', '130623', '涞水县', '', '', '', '', 3, 1, ''), ('130624', '1306', '00,13,1306', '阜平县', '13', '河北省', '1306', '保定市', '130624', '阜平县', '', '', '', '', 3, 1, ''), ('130626', '1306', '00,13,1306', '定兴县', '13', '河北省', '1306', '保定市', '130626', '定兴县', '', '', '', '', 3, 1, ''), ('130627', '1306', '00,13,1306', '唐县', '13', '河北省', '1306', '保定市', '130627', '唐县', '', '', '', '', 3, 1, ''), ('130628', '1306', '00,13,1306', '高阳县', '13', '河北省', '1306', '保定市', '130628', '高阳县', '', '', '', '', 3, 1, ''), ('130629', '1306', '00,13,1306', '容城县', '13', '河北省', '1306', '保定市', '130629', '容城县', '', '', '', '', 3, 1, ''), ('130630', '1306', '00,13,1306', '涞源县', '13', '河北省', '1306', '保定市', '130630', '涞源县', '', '', '', '', 3, 1, ''), ('130631', '1306', '00,13,1306', '望都县', '13', '河北省', '1306', '保定市', '130631', '望都县', '', '', '', '', 3, 1, ''), ('130632', '1306', '00,13,1306', '安新县', '13', '河北省', '1306', '保定市', '130632', '安新县', '', '', '', '', 3, 1, ''), ('130633', '1306', '00,13,1306', '易县', '13', '河北省', '1306', '保定市', '130633', '易县', '', '', '', '', 3, 1, ''), ('130634', '1306', '00,13,1306', '曲阳县', '13', '河北省', '1306', '保定市', '130634', '曲阳县', '', '', '', '', 3, 1, ''), ('130635', '1306', '00,13,1306', '蠡县', '13', '河北省', '1306', '保定市', '130635', '蠡县', '', '', '', '', 3, 1, ''), ('130636', '1306', '00,13,1306', '顺平县', '13', '河北省', '1306', '保定市', '130636', '顺平县', '', '', '', '', 3, 1, ''), ('130637', '1306', '00,13,1306', '博野县', '13', '河北省', '1306', '保定市', '130637', '博野县', '', '', '', '', 3, 1, ''), ('130638', '1306', '00,13,1306', '雄县', '13', '河北省', '1306', '保定市', '130638', '雄县', '', '', '', '', 3, 1, ''), ('130681', '1306', '00,13,1306', '涿州市', '13', '河北省', '1306', '保定市', '130681', '涿州市', '', '', '', '', 3, 1, ''), ('130682', '1306', '00,13,1306', '定州市', '13', '河北省', '1306', '保定市', '130682', '定州市', '', '', '', '', 3, 1, ''), ('130683', '1306', '00,13,1306', '安国市', '13', '河北省', '1306', '保定市', '130683', '安国市', '', '', '', '', 3, 1, ''), ('130684', '1306', '00,13,1306', '高碑店市', '13', '河北省', '1306', '保定市', '130684', '高碑店市', '', '', '', '', 3, 1, ''), ('1307', '13', '00,13', '张家口市', '13', '河北省', '1307', '张家口市', '', '', '', '', '', '', 2, 1, ''), ('130702', '1307', '00,13,1307', '桥东区', '13', '河北省', '1307', '张家口市', '130702', '桥东区', '', '', '', '', 3, 1, ''), ('130703', '1307', '00,13,1307', '桥西区', '13', '河北省', '1307', '张家口市', '130703', '桥西区', '', '', '', '', 3, 1, ''), ('130705', '1307', '00,13,1307', '宣化区', '13', '河北省', '1307', '张家口市', '130705', '宣化区', '', '', '', '', 3, 1, ''), ('130706', '1307', '00,13,1307', '下花园区', '13', '河北省', '1307', '张家口市', '130706', '下花园区', '', '', '', '', 3, 1, ''), ('130708', '1307', '00,13,1307', '万全区', '13', '河北省', '1307', '张家口市', '130708', '万全区', '', '', '', '', 3, 1, ''), ('130709', '1307', '00,13,1307', '崇礼区', '13', '河北省', '1307', '张家口市', '130709', '崇礼区', '', '', '', '', 3, 1, ''), ('130722', '1307', '00,13,1307', '张北县', '13', '河北省', '1307', '张家口市', '130722', '张北县', '', '', '', '', 3, 1, ''), ('130723', '1307', '00,13,1307', '康保县', '13', '河北省', '1307', '张家口市', '130723', '康保县', '', '', '', '', 3, 1, ''), ('130724', '1307', '00,13,1307', '沽源县', '13', '河北省', '1307', '张家口市', '130724', '沽源县', '', '', '', '', 3, 1, ''), ('130725', '1307', '00,13,1307', '尚义县', '13', '河北省', '1307', '张家口市', '130725', '尚义县', '', '', '', '', 3, 1, ''), ('130726', '1307', '00,13,1307', '蔚县', '13', '河北省', '1307', '张家口市', '130726', '蔚县', '', '', '', '', 3, 1, ''), ('130727', '1307', '00,13,1307', '阳原县', '13', '河北省', '1307', '张家口市', '130727', '阳原县', '', '', '', '', 3, 1, ''), ('130728', '1307', '00,13,1307', '怀安县', '13', '河北省', '1307', '张家口市', '130728', '怀安县', '', '', '', '', 3, 1, ''), ('130730', '1307', '00,13,1307', '怀来县', '13', '河北省', '1307', '张家口市', '130730', '怀来县', '', '', '', '', 3, 1, ''), ('130731', '1307', '00,13,1307', '涿鹿县', '13', '河北省', '1307', '张家口市', '130731', '涿鹿县', '', '', '', '', 3, 1, ''), ('130732', '1307', '00,13,1307', '赤城县', '13', '河北省', '1307', '张家口市', '130732', '赤城县', '', '', '', '', 3, 1, ''), ('1308', '13', '00,13', '承德市', '13', '河北省', '1308', '承德市', '', '', '', '', '', '', 2, 1, ''), ('130802', '1308', '00,13,1308', '双桥区', '13', '河北省', '1308', '承德市', '130802', '双桥区', '', '', '', '', 3, 1, ''), ('130803', '1308', '00,13,1308', '双滦区', '13', '河北省', '1308', '承德市', '130803', '双滦区', '', '', '', '', 3, 1, ''), ('130804', '1308', '00,13,1308', '鹰手营子矿区', '13', '河北省', '1308', '承德市', '130804', '鹰手营子矿区', '', '', '', '', 3, 1, ''), ('130821', '1308', '00,13,1308', '承德县', '13', '河北省', '1308', '承德市', '130821', '承德县', '', '', '', '', 3, 1, ''), ('130822', '1308', '00,13,1308', '兴隆县', '13', '河北省', '1308', '承德市', '130822', '兴隆县', '', '', '', '', 3, 1, ''), ('130824', '1308', '00,13,1308', '滦平县', '13', '河北省', '1308', '承德市', '130824', '滦平县', '', '', '', '', 3, 1, ''), ('130825', '1308', '00,13,1308', '隆化县', '13', '河北省', '1308', '承德市', '130825', '隆化县', '', '', '', '', 3, 1, ''), ('130826', '1308', '00,13,1308', '丰宁满族自治县', '13', '河北省', '1308', '承德市', '130826', '丰宁满族自治县', '', '', '', '', 3, 1, ''), ('130827', '1308', '00,13,1308', '宽城满族自治县', '13', '河北省', '1308', '承德市', '130827', '宽城满族自治县', '', '', '', '', 3, 1, ''), ('130828', '1308', '00,13,1308', '围场满族蒙古族自治县', '13', '河北省', '1308', '承德市', '130828', '围场满族蒙古族自治县', '', '', '', '', 3, 1, ''), ('130881', '1308', '00,13,1308', '平泉市', '13', '河北省', '1308', '承德市', '130881', '平泉市', '', '', '', '', 3, 1, ''), ('1309', '13', '00,13', '沧州市', '13', '河北省', '1309', '沧州市', '', '', '', '', '', '', 2, 1, ''), ('130902', '1309', '00,13,1309', '新华区', '13', '河北省', '1309', '沧州市', '130902', '新华区', '', '', '', '', 3, 1, ''), ('130903', '1309', '00,13,1309', '运河区', '13', '河北省', '1309', '沧州市', '130903', '运河区', '', '', '', '', 3, 1, ''), ('130921', '1309', '00,13,1309', '沧县', '13', '河北省', '1309', '沧州市', '130921', '沧县', '', '', '', '', 3, 1, ''), ('130922', '1309', '00,13,1309', '青县', '13', '河北省', '1309', '沧州市', '130922', '青县', '', '', '', '', 3, 1, ''), ('130923', '1309', '00,13,1309', '东光县', '13', '河北省', '1309', '沧州市', '130923', '东光县', '', '', '', '', 3, 1, ''), ('130924', '1309', '00,13,1309', '海兴县', '13', '河北省', '1309', '沧州市', '130924', '海兴县', '', '', '', '', 3, 1, ''), ('130925', '1309', '00,13,1309', '盐山县', '13', '河北省', '1309', '沧州市', '130925', '盐山县', '', '', '', '', 3, 1, ''), ('130926', '1309', '00,13,1309', '肃宁县', '13', '河北省', '1309', '沧州市', '130926', '肃宁县', '', '', '', '', 3, 1, ''), ('130927', '1309', '00,13,1309', '南皮县', '13', '河北省', '1309', '沧州市', '130927', '南皮县', '', '', '', '', 3, 1, ''), ('130928', '1309', '00,13,1309', '吴桥县', '13', '河北省', '1309', '沧州市', '130928', '吴桥县', '', '', '', '', 3, 1, ''), ('130929', '1309', '00,13,1309', '献县', '13', '河北省', '1309', '沧州市', '130929', '献县', '', '', '', '', 3, 1, ''), ('130930', '1309', '00,13,1309', '孟村回族自治县', '13', '河北省', '1309', '沧州市', '130930', '孟村回族自治县', '', '', '', '', 3, 1, ''), ('130981', '1309', '00,13,1309', '泊头市', '13', '河北省', '1309', '沧州市', '130981', '泊头市', '', '', '', '', 3, 1, ''), ('130982', '1309', '00,13,1309', '任丘市', '13', '河北省', '1309', '沧州市', '130982', '任丘市', '', '', '', '', 3, 1, ''), ('130983', '1309', '00,13,1309', '黄骅市', '13', '河北省', '1309', '沧州市', '130983', '黄骅市', '', '', '', '', 3, 1, ''), ('130984', '1309', '00,13,1309', '河间市', '13', '河北省', '1309', '沧州市', '130984', '河间市', '', '', '', '', 3, 1, ''), ('1310', '13', '00,13', '廊坊市', '13', '河北省', '1310', '廊坊市', '', '', '', '', '', '', 2, 1, ''), ('131002', '1310', '00,13,1310', '安次区', '13', '河北省', '1310', '廊坊市', '131002', '安次区', '', '', '', '', 3, 1, ''), ('131003', '1310', '00,13,1310', '广阳区', '13', '河北省', '1310', '廊坊市', '131003', '广阳区', '', '', '', '', 3, 1, ''), ('131022', '1310', '00,13,1310', '固安县', '13', '河北省', '1310', '廊坊市', '131022', '固安县', '', '', '', '', 3, 1, ''), ('131023', '1310', '00,13,1310', '永清县', '13', '河北省', '1310', '廊坊市', '131023', '永清县', '', '', '', '', 3, 1, ''), ('131024', '1310', '00,13,1310', '香河县', '13', '河北省', '1310', '廊坊市', '131024', '香河县', '', '', '', '', 3, 1, ''), ('131025', '1310', '00,13,1310', '大城县', '13', '河北省', '1310', '廊坊市', '131025', '大城县', '', '', '', '', 3, 1, ''), ('131026', '1310', '00,13,1310', '文安县', '13', '河北省', '1310', '廊坊市', '131026', '文安县', '', '', '', '', 3, 1, ''), ('131028', '1310', '00,13,1310', '大厂回族自治县', '13', '河北省', '1310', '廊坊市', '131028', '大厂回族自治县', '', '', '', '', 3, 1, ''), ('131081', '1310', '00,13,1310', '霸州市', '13', '河北省', '1310', '廊坊市', '131081', '霸州市', '', '', '', '', 3, 1, ''), ('131082', '1310', '00,13,1310', '三河市', '13', '河北省', '1310', '廊坊市', '131082', '三河市', '', '', '', '', 3, 1, ''), ('1311', '13', '00,13', '衡水市', '13', '河北省', '1311', '衡水市', '', '', '', '', '', '', 2, 1, ''), ('131102', '1311', '00,13,1311', '桃城区', '13', '河北省', '1311', '衡水市', '131102', '桃城区', '', '', '', '', 3, 1, ''), ('131103', '1311', '00,13,1311', '冀州区', '13', '河北省', '1311', '衡水市', '131103', '冀州区', '', '', '', '', 3, 1, ''), ('131121', '1311', '00,13,1311', '枣强县', '13', '河北省', '1311', '衡水市', '131121', '枣强县', '', '', '', '', 3, 1, ''), ('131122', '1311', '00,13,1311', '武邑县', '13', '河北省', '1311', '衡水市', '131122', '武邑县', '', '', '', '', 3, 1, ''), ('131123', '1311', '00,13,1311', '武强县', '13', '河北省', '1311', '衡水市', '131123', '武强县', '', '', '', '', 3, 1, ''), ('131124', '1311', '00,13,1311', '饶阳县', '13', '河北省', '1311', '衡水市', '131124', '饶阳县', '', '', '', '', 3, 1, ''), ('131125', '1311', '00,13,1311', '安平县', '13', '河北省', '1311', '衡水市', '131125', '安平县', '', '', '', '', 3, 1, ''), ('131126', '1311', '00,13,1311', '故城县', '13', '河北省', '1311', '衡水市', '131126', '故城县', '', '', '', '', 3, 1, ''), ('131127', '1311', '00,13,1311', '景县', '13', '河北省', '1311', '衡水市', '131127', '景县', '', '', '', '', 3, 1, ''), ('131128', '1311', '00,13,1311', '阜城县', '13', '河北省', '1311', '衡水市', '131128', '阜城县', '', '', '', '', 3, 1, ''), ('131182', '1311', '00,13,1311', '深州市', '13', '河北省', '1311', '衡水市', '131182', '深州市', '', '', '', '', 3, 1, ''), ('14', '00', '00', '山西省', '14', '山西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1401', '14', '00,14', '太原市', '14', '山西省', '1401', '太原市', '', '', '', '', '', '', 2, 1, ''), ('140105', '1401', '00,14,1401', '小店区', '14', '山西省', '1401', '太原市', '140105', '小店区', '', '', '', '', 3, 1, ''), ('140106', '1401', '00,14,1401', '迎泽区', '14', '山西省', '1401', '太原市', '140106', '迎泽区', '', '', '', '', 3, 1, ''), ('140107', '1401', '00,14,1401', '杏花岭区', '14', '山西省', '1401', '太原市', '140107', '杏花岭区', '', '', '', '', 3, 1, ''), ('140108', '1401', '00,14,1401', '尖草坪区', '14', '山西省', '1401', '太原市', '140108', '尖草坪区', '', '', '', '', 3, 1, ''), ('140109', '1401', '00,14,1401', '万柏林区', '14', '山西省', '1401', '太原市', '140109', '万柏林区', '', '', '', '', 3, 1, ''), ('140110', '1401', '00,14,1401', '晋源区', '14', '山西省', '1401', '太原市', '140110', '晋源区', '', '', '', '', 3, 1, ''), ('140121', '1401', '00,14,1401', '清徐县', '14', '山西省', '1401', '太原市', '140121', '清徐县', '', '', '', '', 3, 1, ''), ('140122', '1401', '00,14,1401', '阳曲县', '14', '山西省', '1401', '太原市', '140122', '阳曲县', '', '', '', '', 3, 1, ''), ('140123', '1401', '00,14,1401', '娄烦县', '14', '山西省', '1401', '太原市', '140123', '娄烦县', '', '', '', '', 3, 1, ''), ('140181', '1401', '00,14,1401', '古交市', '14', '山西省', '1401', '太原市', '140181', '古交市', '', '', '', '', 3, 1, ''), ('1402', '14', '00,14', '大同市', '14', '山西省', '1402', '大同市', '', '', '', '', '', '', 2, 1, ''), ('140212', '1402', '00,14,1402', '新荣区', '14', '山西省', '1402', '大同市', '140212', '新荣区', '', '', '', '', 3, 1, ''), ('140213', '1402', '00,14,1402', '平城区', '14', '山西省', '1402', '大同市', '140213', '平城区', '', '', '', '', 3, 1, ''), ('140214', '1402', '00,14,1402', '云冈区', '14', '山西省', '1402', '大同市', '140214', '云冈区', '', '', '', '', 3, 1, ''), ('140215', '1402', '00,14,1402', '云州区', '14', '山西省', '1402', '大同市', '140215', '云州区', '', '', '', '', 3, 1, ''), ('140221', '1402', '00,14,1402', '阳高县', '14', '山西省', '1402', '大同市', '140221', '阳高县', '', '', '', '', 3, 1, ''), ('140222', '1402', '00,14,1402', '天镇县', '14', '山西省', '1402', '大同市', '140222', '天镇县', '', '', '', '', 3, 1, ''), ('140223', '1402', '00,14,1402', '广灵县', '14', '山西省', '1402', '大同市', '140223', '广灵县', '', '', '', '', 3, 1, ''), ('140224', '1402', '00,14,1402', '灵丘县', '14', '山西省', '1402', '大同市', '140224', '灵丘县', '', '', '', '', 3, 1, ''), ('140225', '1402', '00,14,1402', '浑源县', '14', '山西省', '1402', '大同市', '140225', '浑源县', '', '', '', '', 3, 1, ''), ('140226', '1402', '00,14,1402', '左云县', '14', '山西省', '1402', '大同市', '140226', '左云县', '', '', '', '', 3, 1, ''), ('1403', '14', '00,14', '阳泉市', '14', '山西省', '1403', '阳泉市', '', '', '', '', '', '', 2, 1, ''), ('140302', '1403', '00,14,1403', '城区', '14', '山西省', '1403', '阳泉市', '140302', '城区', '', '', '', '', 3, 1, ''), ('140303', '1403', '00,14,1403', '矿区', '14', '山西省', '1403', '阳泉市', '140303', '矿区', '', '', '', '', 3, 1, ''), ('140311', '1403', '00,14,1403', '郊区', '14', '山西省', '1403', '阳泉市', '140311', '郊区', '', '', '', '', 3, 1, ''), ('140321', '1403', '00,14,1403', '平定县', '14', '山西省', '1403', '阳泉市', '140321', '平定县', '', '', '', '', 3, 1, ''), ('140322', '1403', '00,14,1403', '盂县', '14', '山西省', '1403', '阳泉市', '140322', '盂县', '', '', '', '', 3, 1, ''), ('1404', '14', '00,14', '长治市', '14', '山西省', '1404', '长治市', '', '', '', '', '', '', 2, 1, ''), ('140403', '1404', '00,14,1404', '潞州区', '14', '山西省', '1404', '长治市', '140403', '潞州区', '', '', '', '', 3, 1, ''), ('140404', '1404', '00,14,1404', '上党区', '14', '山西省', '1404', '长治市', '140404', '上党区', '', '', '', '', 3, 1, ''), ('140405', '1404', '00,14,1404', '屯留区', '14', '山西省', '1404', '长治市', '140405', '屯留区', '', '', '', '', 3, 1, ''), ('140406', '1404', '00,14,1404', '潞城区', '14', '山西省', '1404', '长治市', '140406', '潞城区', '', '', '', '', 3, 1, ''), ('140423', '1404', '00,14,1404', '襄垣县', '14', '山西省', '1404', '长治市', '140423', '襄垣县', '', '', '', '', 3, 1, ''), ('140425', '1404', '00,14,1404', '平顺县', '14', '山西省', '1404', '长治市', '140425', '平顺县', '', '', '', '', 3, 1, ''), ('140426', '1404', '00,14,1404', '黎城县', '14', '山西省', '1404', '长治市', '140426', '黎城县', '', '', '', '', 3, 1, ''), ('140427', '1404', '00,14,1404', '壶关县', '14', '山西省', '1404', '长治市', '140427', '壶关县', '', '', '', '', 3, 1, ''), ('140428', '1404', '00,14,1404', '长子县', '14', '山西省', '1404', '长治市', '140428', '长子县', '', '', '', '', 3, 1, ''), ('140429', '1404', '00,14,1404', '武乡县', '14', '山西省', '1404', '长治市', '140429', '武乡县', '', '', '', '', 3, 1, ''), ('140430', '1404', '00,14,1404', '沁县', '14', '山西省', '1404', '长治市', '140430', '沁县', '', '', '', '', 3, 1, ''), ('140431', '1404', '00,14,1404', '沁源县', '14', '山西省', '1404', '长治市', '140431', '沁源县', '', '', '', '', 3, 1, ''), ('1405', '14', '00,14', '晋城市', '14', '山西省', '1405', '晋城市', '', '', '', '', '', '', 2, 1, ''), ('140502', '1405', '00,14,1405', '城区', '14', '山西省', '1405', '晋城市', '140502', '城区', '', '', '', '', 3, 1, ''), ('140521', '1405', '00,14,1405', '沁水县', '14', '山西省', '1405', '晋城市', '140521', '沁水县', '', '', '', '', 3, 1, ''), ('140522', '1405', '00,14,1405', '阳城县', '14', '山西省', '1405', '晋城市', '140522', '阳城县', '', '', '', '', 3, 1, ''), ('140524', '1405', '00,14,1405', '陵川县', '14', '山西省', '1405', '晋城市', '140524', '陵川县', '', '', '', '', 3, 1, ''), ('140525', '1405', '00,14,1405', '泽州县', '14', '山西省', '1405', '晋城市', '140525', '泽州县', '', '', '', '', 3, 1, ''), ('140581', '1405', '00,14,1405', '高平市', '14', '山西省', '1405', '晋城市', '140581', '高平市', '', '', '', '', 3, 1, ''), ('1406', '14', '00,14', '朔州市', '14', '山西省', '1406', '朔州市', '', '', '', '', '', '', 2, 1, ''), ('140602', '1406', '00,14,1406', '朔城区', '14', '山西省', '1406', '朔州市', '140602', '朔城区', '', '', '', '', 3, 1, ''), ('140603', '1406', '00,14,1406', '平鲁区', '14', '山西省', '1406', '朔州市', '140603', '平鲁区', '', '', '', '', 3, 1, ''), ('140621', '1406', '00,14,1406', '山阴县', '14', '山西省', '1406', '朔州市', '140621', '山阴县', '', '', '', '', 3, 1, ''), ('140622', '1406', '00,14,1406', '应县', '14', '山西省', '1406', '朔州市', '140622', '应县', '', '', '', '', 3, 1, ''), ('140623', '1406', '00,14,1406', '右玉县', '14', '山西省', '1406', '朔州市', '140623', '右玉县', '', '', '', '', 3, 1, ''), ('140681', '1406', '00,14,1406', '怀仁市', '14', '山西省', '1406', '朔州市', '140681', '怀仁市', '', '', '', '', 3, 1, ''), ('1407', '14', '00,14', '晋中市', '14', '山西省', '1407', '晋中市', '', '', '', '', '', '', 2, 1, ''), ('140702', '1407', '00,14,1407', '榆次区', '14', '山西省', '1407', '晋中市', '140702', '榆次区', '', '', '', '', 3, 1, ''), ('140703', '1407', '00,14,1407', '太谷区', '14', '山西省', '1407', '晋中市', '140703', '太谷区', '', '', '', '', 3, 1, ''), ('140721', '1407', '00,14,1407', '榆社县', '14', '山西省', '1407', '晋中市', '140721', '榆社县', '', '', '', '', 3, 1, ''), ('140722', '1407', '00,14,1407', '左权县', '14', '山西省', '1407', '晋中市', '140722', '左权县', '', '', '', '', 3, 1, ''), ('140723', '1407', '00,14,1407', '和顺县', '14', '山西省', '1407', '晋中市', '140723', '和顺县', '', '', '', '', 3, 1, ''), ('140724', '1407', '00,14,1407', '昔阳县', '14', '山西省', '1407', '晋中市', '140724', '昔阳县', '', '', '', '', 3, 1, ''), ('140725', '1407', '00,14,1407', '寿阳县', '14', '山西省', '1407', '晋中市', '140725', '寿阳县', '', '', '', '', 3, 1, ''), ('140727', '1407', '00,14,1407', '祁县', '14', '山西省', '1407', '晋中市', '140727', '祁县', '', '', '', '', 3, 1, ''), ('140728', '1407', '00,14,1407', '平遥县', '14', '山西省', '1407', '晋中市', '140728', '平遥县', '', '', '', '', 3, 1, ''), ('140729', '1407', '00,14,1407', '灵石县', '14', '山西省', '1407', '晋中市', '140729', '灵石县', '', '', '', '', 3, 1, ''), ('140781', '1407', '00,14,1407', '介休市', '14', '山西省', '1407', '晋中市', '140781', '介休市', '', '', '', '', 3, 1, ''), ('1408', '14', '00,14', '运城市', '14', '山西省', '1408', '运城市', '', '', '', '', '', '', 2, 1, ''), ('140802', '1408', '00,14,1408', '盐湖区', '14', '山西省', '1408', '运城市', '140802', '盐湖区', '', '', '', '', 3, 1, ''), ('140821', '1408', '00,14,1408', '临猗县', '14', '山西省', '1408', '运城市', '140821', '临猗县', '', '', '', '', 3, 1, ''), ('140822', '1408', '00,14,1408', '万荣县', '14', '山西省', '1408', '运城市', '140822', '万荣县', '', '', '', '', 3, 1, ''), ('140823', '1408', '00,14,1408', '闻喜县', '14', '山西省', '1408', '运城市', '140823', '闻喜县', '', '', '', '', 3, 1, ''), ('140824', '1408', '00,14,1408', '稷山县', '14', '山西省', '1408', '运城市', '140824', '稷山县', '', '', '', '', 3, 1, ''), ('140825', '1408', '00,14,1408', '新绛县', '14', '山西省', '1408', '运城市', '140825', '新绛县', '', '', '', '', 3, 1, ''), ('140826', '1408', '00,14,1408', '绛县', '14', '山西省', '1408', '运城市', '140826', '绛县', '', '', '', '', 3, 1, ''), ('140827', '1408', '00,14,1408', '垣曲县', '14', '山西省', '1408', '运城市', '140827', '垣曲县', '', '', '', '', 3, 1, ''), ('140828', '1408', '00,14,1408', '夏县', '14', '山西省', '1408', '运城市', '140828', '夏县', '', '', '', '', 3, 1, ''), ('140829', '1408', '00,14,1408', '平陆县', '14', '山西省', '1408', '运城市', '140829', '平陆县', '', '', '', '', 3, 1, ''), ('140830', '1408', '00,14,1408', '芮城县', '14', '山西省', '1408', '运城市', '140830', '芮城县', '', '', '', '', 3, 1, ''), ('140881', '1408', '00,14,1408', '永济市', '14', '山西省', '1408', '运城市', '140881', '永济市', '', '', '', '', 3, 1, ''), ('140882', '1408', '00,14,1408', '河津市', '14', '山西省', '1408', '运城市', '140882', '河津市', '', '', '', '', 3, 1, ''), ('1409', '14', '00,14', '忻州市', '14', '山西省', '1409', '忻州市', '', '', '', '', '', '', 2, 1, ''), ('140902', '1409', '00,14,1409', '忻府区', '14', '山西省', '1409', '忻州市', '140902', '忻府区', '', '', '', '', 3, 1, ''), ('140921', '1409', '00,14,1409', '定襄县', '14', '山西省', '1409', '忻州市', '140921', '定襄县', '', '', '', '', 3, 1, ''), ('140922', '1409', '00,14,1409', '五台县', '14', '山西省', '1409', '忻州市', '140922', '五台县', '', '', '', '', 3, 1, ''), ('140923', '1409', '00,14,1409', '代县', '14', '山西省', '1409', '忻州市', '140923', '代县', '', '', '', '', 3, 1, ''), ('140924', '1409', '00,14,1409', '繁峙县', '14', '山西省', '1409', '忻州市', '140924', '繁峙县', '', '', '', '', 3, 1, ''), ('140925', '1409', '00,14,1409', '宁武县', '14', '山西省', '1409', '忻州市', '140925', '宁武县', '', '', '', '', 3, 1, ''), ('140926', '1409', '00,14,1409', '静乐县', '14', '山西省', '1409', '忻州市', '140926', '静乐县', '', '', '', '', 3, 1, ''), ('140927', '1409', '00,14,1409', '神池县', '14', '山西省', '1409', '忻州市', '140927', '神池县', '', '', '', '', 3, 1, ''), ('140928', '1409', '00,14,1409', '五寨县', '14', '山西省', '1409', '忻州市', '140928', '五寨县', '', '', '', '', 3, 1, ''), ('140929', '1409', '00,14,1409', '岢岚县', '14', '山西省', '1409', '忻州市', '140929', '岢岚县', '', '', '', '', 3, 1, ''), ('140930', '1409', '00,14,1409', '河曲县', '14', '山西省', '1409', '忻州市', '140930', '河曲县', '', '', '', '', 3, 1, ''), ('140931', '1409', '00,14,1409', '保德县', '14', '山西省', '1409', '忻州市', '140931', '保德县', '', '', '', '', 3, 1, ''), ('140932', '1409', '00,14,1409', '偏关县', '14', '山西省', '1409', '忻州市', '140932', '偏关县', '', '', '', '', 3, 1, ''), ('140981', '1409', '00,14,1409', '原平市', '14', '山西省', '1409', '忻州市', '140981', '原平市', '', '', '', '', 3, 1, ''), ('1410', '14', '00,14', '临汾市', '14', '山西省', '1410', '临汾市', '', '', '', '', '', '', 2, 1, ''), ('141002', '1410', '00,14,1410', '尧都区', '14', '山西省', '1410', '临汾市', '141002', '尧都区', '', '', '', '', 3, 1, ''), ('141021', '1410', '00,14,1410', '曲沃县', '14', '山西省', '1410', '临汾市', '141021', '曲沃县', '', '', '', '', 3, 1, ''), ('141022', '1410', '00,14,1410', '翼城县', '14', '山西省', '1410', '临汾市', '141022', '翼城县', '', '', '', '', 3, 1, ''), ('141023', '1410', '00,14,1410', '襄汾县', '14', '山西省', '1410', '临汾市', '141023', '襄汾县', '', '', '', '', 3, 1, ''), ('141024', '1410', '00,14,1410', '洪洞县', '14', '山西省', '1410', '临汾市', '141024', '洪洞县', '', '', '', '', 3, 1, ''), ('141025', '1410', '00,14,1410', '古县', '14', '山西省', '1410', '临汾市', '141025', '古县', '', '', '', '', 3, 1, ''), ('141026', '1410', '00,14,1410', '安泽县', '14', '山西省', '1410', '临汾市', '141026', '安泽县', '', '', '', '', 3, 1, ''), ('141027', '1410', '00,14,1410', '浮山县', '14', '山西省', '1410', '临汾市', '141027', '浮山县', '', '', '', '', 3, 1, ''), ('141028', '1410', '00,14,1410', '吉县', '14', '山西省', '1410', '临汾市', '141028', '吉县', '', '', '', '', 3, 1, ''), ('141029', '1410', '00,14,1410', '乡宁县', '14', '山西省', '1410', '临汾市', '141029', '乡宁县', '', '', '', '', 3, 1, ''), ('141030', '1410', '00,14,1410', '大宁县', '14', '山西省', '1410', '临汾市', '141030', '大宁县', '', '', '', '', 3, 1, ''), ('141031', '1410', '00,14,1410', '隰县', '14', '山西省', '1410', '临汾市', '141031', '隰县', '', '', '', '', 3, 1, ''), ('141032', '1410', '00,14,1410', '永和县', '14', '山西省', '1410', '临汾市', '141032', '永和县', '', '', '', '', 3, 1, ''), ('141033', '1410', '00,14,1410', '蒲县', '14', '山西省', '1410', '临汾市', '141033', '蒲县', '', '', '', '', 3, 1, ''), ('141034', '1410', '00,14,1410', '汾西县', '14', '山西省', '1410', '临汾市', '141034', '汾西县', '', '', '', '', 3, 1, ''), ('141081', '1410', '00,14,1410', '侯马市', '14', '山西省', '1410', '临汾市', '141081', '侯马市', '', '', '', '', 3, 1, ''), ('141082', '1410', '00,14,1410', '霍州市', '14', '山西省', '1410', '临汾市', '141082', '霍州市', '', '', '', '', 3, 1, ''), ('1411', '14', '00,14', '吕梁市', '14', '山西省', '1411', '吕梁市', '', '', '', '', '', '', 2, 1, ''), ('141102', '1411', '00,14,1411', '离石区', '14', '山西省', '1411', '吕梁市', '141102', '离石区', '', '', '', '', 3, 1, ''), ('141121', '1411', '00,14,1411', '文水县', '14', '山西省', '1411', '吕梁市', '141121', '文水县', '', '', '', '', 3, 1, ''), ('141122', '1411', '00,14,1411', '交城县', '14', '山西省', '1411', '吕梁市', '141122', '交城县', '', '', '', '', 3, 1, ''), ('141123', '1411', '00,14,1411', '兴县', '14', '山西省', '1411', '吕梁市', '141123', '兴县', '', '', '', '', 3, 1, ''), ('141124', '1411', '00,14,1411', '临县', '14', '山西省', '1411', '吕梁市', '141124', '临县', '', '', '', '', 3, 1, ''), ('141125', '1411', '00,14,1411', '柳林县', '14', '山西省', '1411', '吕梁市', '141125', '柳林县', '', '', '', '', 3, 1, ''), ('141126', '1411', '00,14,1411', '石楼县', '14', '山西省', '1411', '吕梁市', '141126', '石楼县', '', '', '', '', 3, 1, ''), ('141127', '1411', '00,14,1411', '岚县', '14', '山西省', '1411', '吕梁市', '141127', '岚县', '', '', '', '', 3, 1, ''), ('141128', '1411', '00,14,1411', '方山县', '14', '山西省', '1411', '吕梁市', '141128', '方山县', '', '', '', '', 3, 1, ''), ('141129', '1411', '00,14,1411', '中阳县', '14', '山西省', '1411', '吕梁市', '141129', '中阳县', '', '', '', '', 3, 1, ''), ('141130', '1411', '00,14,1411', '交口县', '14', '山西省', '1411', '吕梁市', '141130', '交口县', '', '', '', '', 3, 1, ''), ('141181', '1411', '00,14,1411', '孝义市', '14', '山西省', '1411', '吕梁市', '141181', '孝义市', '', '', '', '', 3, 1, ''), ('141182', '1411', '00,14,1411', '汾阳市', '14', '山西省', '1411', '吕梁市', '141182', '汾阳市', '', '', '', '', 3, 1, ''), ('15', '00', '00', '内蒙古自治区', '15', '内蒙古自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('1501', '15', '00,15', '呼和浩特市', '15', '内蒙古自治区', '1501', '呼和浩特市', '', '', '', '', '', '', 2, 1, ''), ('150102', '1501', '00,15,1501', '新城区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150102', '新城区', '', '', '', '', 3, 1, ''), ('150103', '1501', '00,15,1501', '回民区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150103', '回民区', '', '', '', '', 3, 1, ''), ('150104', '1501', '00,15,1501', '玉泉区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150104', '玉泉区', '', '', '', '', 3, 1, ''), ('150105', '1501', '00,15,1501', '赛罕区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150105', '赛罕区', '', '', '', '', 3, 1, ''), ('150121', '1501', '00,15,1501', '土默特左旗', '15', '内蒙古自治区', '1501', '呼和浩特市', '150121', '土默特左旗', '', '', '', '', 3, 1, ''), ('150122', '1501', '00,15,1501', '托克托县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150122', '托克托县', '', '', '', '', 3, 1, ''), ('150123', '1501', '00,15,1501', '和林格尔县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150123', '和林格尔县', '', '', '', '', 3, 1, ''), ('150124', '1501', '00,15,1501', '清水河县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150124', '清水河县', '', '', '', '', 3, 1, ''), ('150125', '1501', '00,15,1501', '武川县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150125', '武川县', '', '', '', '', 3, 1, ''), ('1502', '15', '00,15', '包头市', '15', '内蒙古自治区', '1502', '包头市', '', '', '', '', '', '', 2, 1, ''), ('150202', '1502', '00,15,1502', '东河区', '15', '内蒙古自治区', '1502', '包头市', '150202', '东河区', '', '', '', '', 3, 1, ''), ('150203', '1502', '00,15,1502', '昆都仑区', '15', '内蒙古自治区', '1502', '包头市', '150203', '昆都仑区', '', '', '', '', 3, 1, ''), ('150204', '1502', '00,15,1502', '青山区', '15', '内蒙古自治区', '1502', '包头市', '150204', '青山区', '', '', '', '', 3, 1, ''), ('150205', '1502', '00,15,1502', '石拐区', '15', '内蒙古自治区', '1502', '包头市', '150205', '石拐区', '', '', '', '', 3, 1, ''), ('150206', '1502', '00,15,1502', '白云鄂博矿区', '15', '内蒙古自治区', '1502', '包头市', '150206', '白云鄂博矿区', '', '', '', '', 3, 1, ''), ('150207', '1502', '00,15,1502', '九原区', '15', '内蒙古自治区', '1502', '包头市', '150207', '九原区', '', '', '', '', 3, 1, ''), ('150221', '1502', '00,15,1502', '土默特右旗', '15', '内蒙古自治区', '1502', '包头市', '150221', '土默特右旗', '', '', '', '', 3, 1, ''), ('150222', '1502', '00,15,1502', '固阳县', '15', '内蒙古自治区', '1502', '包头市', '150222', '固阳县', '', '', '', '', 3, 1, ''), ('150223', '1502', '00,15,1502', '达尔罕茂明安联合旗', '15', '内蒙古自治区', '1502', '包头市', '150223', '达尔罕茂明安联合旗', '', '', '', '', 3, 1, ''), ('1503', '15', '00,15', '乌海市', '15', '内蒙古自治区', '1503', '乌海市', '', '', '', '', '', '', 2, 1, ''), ('150302', '1503', '00,15,1503', '海勃湾区', '15', '内蒙古自治区', '1503', '乌海市', '150302', '海勃湾区', '', '', '', '', 3, 1, ''), ('150303', '1503', '00,15,1503', '海南区', '15', '内蒙古自治区', '1503', '乌海市', '150303', '海南区', '', '', '', '', 3, 1, ''), ('150304', '1503', '00,15,1503', '乌达区', '15', '内蒙古自治区', '1503', '乌海市', '150304', '乌达区', '', '', '', '', 3, 1, ''), ('1504', '15', '00,15', '赤峰市', '15', '内蒙古自治区', '1504', '赤峰市', '', '', '', '', '', '', 2, 1, ''), ('150402', '1504', '00,15,1504', '红山区', '15', '内蒙古自治区', '1504', '赤峰市', '150402', '红山区', '', '', '', '', 3, 1, ''), ('150403', '1504', '00,15,1504', '元宝山区', '15', '内蒙古自治区', '1504', '赤峰市', '150403', '元宝山区', '', '', '', '', 3, 1, ''), ('150404', '1504', '00,15,1504', '松山区', '15', '内蒙古自治区', '1504', '赤峰市', '150404', '松山区', '', '', '', '', 3, 1, ''), ('150421', '1504', '00,15,1504', '阿鲁科尔沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150421', '阿鲁科尔沁旗', '', '', '', '', 3, 1, ''), ('150422', '1504', '00,15,1504', '巴林左旗', '15', '内蒙古自治区', '1504', '赤峰市', '150422', '巴林左旗', '', '', '', '', 3, 1, ''), ('150423', '1504', '00,15,1504', '巴林右旗', '15', '内蒙古自治区', '1504', '赤峰市', '150423', '巴林右旗', '', '', '', '', 3, 1, ''), ('150424', '1504', '00,15,1504', '林西县', '15', '内蒙古自治区', '1504', '赤峰市', '150424', '林西县', '', '', '', '', 3, 1, ''), ('150425', '1504', '00,15,1504', '克什克腾旗', '15', '内蒙古自治区', '1504', '赤峰市', '150425', '克什克腾旗', '', '', '', '', 3, 1, ''), ('150426', '1504', '00,15,1504', '翁牛特旗', '15', '内蒙古自治区', '1504', '赤峰市', '150426', '翁牛特旗', '', '', '', '', 3, 1, ''), ('150428', '1504', '00,15,1504', '喀喇沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150428', '喀喇沁旗', '', '', '', '', 3, 1, ''), ('150429', '1504', '00,15,1504', '宁城县', '15', '内蒙古自治区', '1504', '赤峰市', '150429', '宁城县', '', '', '', '', 3, 1, ''), ('150430', '1504', '00,15,1504', '敖汉旗', '15', '内蒙古自治区', '1504', '赤峰市', '150430', '敖汉旗', '', '', '', '', 3, 1, ''), ('1505', '15', '00,15', '通辽市', '15', '内蒙古自治区', '1505', '通辽市', '', '', '', '', '', '', 2, 1, ''), ('150502', '1505', '00,15,1505', '科尔沁区', '15', '内蒙古自治区', '1505', '通辽市', '150502', '科尔沁区', '', '', '', '', 3, 1, ''), ('150521', '1505', '00,15,1505', '科尔沁左翼中旗', '15', '内蒙古自治区', '1505', '通辽市', '150521', '科尔沁左翼中旗', '', '', '', '', 3, 1, ''), ('150522', '1505', '00,15,1505', '科尔沁左翼后旗', '15', '内蒙古自治区', '1505', '通辽市', '150522', '科尔沁左翼后旗', '', '', '', '', 3, 1, ''), ('150523', '1505', '00,15,1505', '开鲁县', '15', '内蒙古自治区', '1505', '通辽市', '150523', '开鲁县', '', '', '', '', 3, 1, ''), ('150524', '1505', '00,15,1505', '库伦旗', '15', '内蒙古自治区', '1505', '通辽市', '150524', '库伦旗', '', '', '', '', 3, 1, ''), ('150525', '1505', '00,15,1505', '奈曼旗', '15', '内蒙古自治区', '1505', '通辽市', '150525', '奈曼旗', '', '', '', '', 3, 1, ''), ('150526', '1505', '00,15,1505', '扎鲁特旗', '15', '内蒙古自治区', '1505', '通辽市', '150526', '扎鲁特旗', '', '', '', '', 3, 1, ''), ('150581', '1505', '00,15,1505', '霍林郭勒市', '15', '内蒙古自治区', '1505', '通辽市', '150581', '霍林郭勒市', '', '', '', '', 3, 1, ''), ('1506', '15', '00,15', '鄂尔多斯市', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '', '', '', '', '', '', 2, 1, ''), ('150602', '1506', '00,15,1506', '东胜区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150602', '东胜区', '', '', '', '', 3, 1, ''), ('150603', '1506', '00,15,1506', '康巴什区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150603', '康巴什区', '', '', '', '', 3, 1, ''), ('150621', '1506', '00,15,1506', '达拉特旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150621', '达拉特旗', '', '', '', '', 3, 1, ''), ('150622', '1506', '00,15,1506', '准格尔旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150622', '准格尔旗', '', '', '', '', 3, 1, ''), ('150623', '1506', '00,15,1506', '鄂托克前旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150623', '鄂托克前旗', '', '', '', '', 3, 1, ''), ('150624', '1506', '00,15,1506', '鄂托克旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150624', '鄂托克旗', '', '', '', '', 3, 1, ''), ('150625', '1506', '00,15,1506', '杭锦旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150625', '杭锦旗', '', '', '', '', 3, 1, ''), ('150626', '1506', '00,15,1506', '乌审旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150626', '乌审旗', '', '', '', '', 3, 1, ''), ('150627', '1506', '00,15,1506', '伊金霍洛旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150627', '伊金霍洛旗', '', '', '', '', 3, 1, ''), ('1507', '15', '00,15', '呼伦贝尔市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '', '', '', '', '', '', 2, 1, ''), ('150702', '1507', '00,15,1507', '海拉尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150702', '海拉尔区', '', '', '', '', 3, 1, ''), ('150703', '1507', '00,15,1507', '扎赉诺尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150703', '扎赉诺尔区', '', '', '', '', 3, 1, ''), ('150721', '1507', '00,15,1507', '阿荣旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150721', '阿荣旗', '', '', '', '', 3, 1, ''), ('150722', '1507', '00,15,1507', '莫力达瓦达斡尔族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150722', '莫力达瓦达斡尔族自治旗', '', '', '', '', 3, 1, ''), ('150723', '1507', '00,15,1507', '鄂伦春自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150723', '鄂伦春自治旗', '', '', '', '', 3, 1, ''), ('150724', '1507', '00,15,1507', '鄂温克族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150724', '鄂温克族自治旗', '', '', '', '', 3, 1, ''), ('150725', '1507', '00,15,1507', '陈巴尔虎旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150725', '陈巴尔虎旗', '', '', '', '', 3, 1, ''), ('150726', '1507', '00,15,1507', '新巴尔虎左旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150726', '新巴尔虎左旗', '', '', '', '', 3, 1, ''), ('150727', '1507', '00,15,1507', '新巴尔虎右旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150727', '新巴尔虎右旗', '', '', '', '', 3, 1, ''), ('150781', '1507', '00,15,1507', '满洲里市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150781', '满洲里市', '', '', '', '', 3, 1, ''), ('150782', '1507', '00,15,1507', '牙克石市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150782', '牙克石市', '', '', '', '', 3, 1, ''), ('150783', '1507', '00,15,1507', '扎兰屯市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150783', '扎兰屯市', '', '', '', '', 3, 1, ''), ('150784', '1507', '00,15,1507', '额尔古纳市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150784', '额尔古纳市', '', '', '', '', 3, 1, ''), ('150785', '1507', '00,15,1507', '根河市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150785', '根河市', '', '', '', '', 3, 1, ''), ('1508', '15', '00,15', '巴彦淖尔市', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '', '', '', '', '', '', 2, 1, ''), ('150802', '1508', '00,15,1508', '临河区', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150802', '临河区', '', '', '', '', 3, 1, ''), ('150821', '1508', '00,15,1508', '五原县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150821', '五原县', '', '', '', '', 3, 1, ''), ('150822', '1508', '00,15,1508', '磴口县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150822', '磴口县', '', '', '', '', 3, 1, ''), ('150823', '1508', '00,15,1508', '乌拉特前旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150823', '乌拉特前旗', '', '', '', '', 3, 1, ''), ('150824', '1508', '00,15,1508', '乌拉特中旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150824', '乌拉特中旗', '', '', '', '', 3, 1, ''), ('150825', '1508', '00,15,1508', '乌拉特后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150825', '乌拉特后旗', '', '', '', '', 3, 1, ''), ('150826', '1508', '00,15,1508', '杭锦后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150826', '杭锦后旗', '', '', '', '', 3, 1, ''), ('1509', '15', '00,15', '乌兰察布市', '15', '内蒙古自治区', '1509', '乌兰察布市', '', '', '', '', '', '', 2, 1, ''), ('150902', '1509', '00,15,1509', '集宁区', '15', '内蒙古自治区', '1509', '乌兰察布市', '150902', '集宁区', '', '', '', '', 3, 1, ''), ('150921', '1509', '00,15,1509', '卓资县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150921', '卓资县', '', '', '', '', 3, 1, ''), ('150922', '1509', '00,15,1509', '化德县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150922', '化德县', '', '', '', '', 3, 1, ''), ('150923', '1509', '00,15,1509', '商都县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150923', '商都县', '', '', '', '', 3, 1, ''), ('150924', '1509', '00,15,1509', '兴和县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150924', '兴和县', '', '', '', '', 3, 1, ''), ('150925', '1509', '00,15,1509', '凉城县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150925', '凉城县', '', '', '', '', 3, 1, ''), ('150926', '1509', '00,15,1509', '察哈尔右翼前旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150926', '察哈尔右翼前旗', '', '', '', '', 3, 1, ''), ('150927', '1509', '00,15,1509', '察哈尔右翼中旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150927', '察哈尔右翼中旗', '', '', '', '', 3, 1, ''), ('150928', '1509', '00,15,1509', '察哈尔右翼后旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150928', '察哈尔右翼后旗', '', '', '', '', 3, 1, ''), ('150929', '1509', '00,15,1509', '四子王旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150929', '四子王旗', '', '', '', '', 3, 1, ''), ('150981', '1509', '00,15,1509', '丰镇市', '15', '内蒙古自治区', '1509', '乌兰察布市', '150981', '丰镇市', '', '', '', '', 3, 1, ''), ('1522', '15', '00,15', '兴安盟', '15', '内蒙古自治区', '1522', '兴安盟', '', '', '', '', '', '', 2, 1, ''), ('152201', '1522', '00,15,1522', '乌兰浩特市', '15', '内蒙古自治区', '1522', '兴安盟', '152201', '乌兰浩特市', '', '', '', '', 3, 1, ''), ('152202', '1522', '00,15,1522', '阿尔山市', '15', '内蒙古自治区', '1522', '兴安盟', '152202', '阿尔山市', '', '', '', '', 3, 1, ''), ('152221', '1522', '00,15,1522', '科尔沁右翼前旗', '15', '内蒙古自治区', '1522', '兴安盟', '152221', '科尔沁右翼前旗', '', '', '', '', 3, 1, ''), ('152222', '1522', '00,15,1522', '科尔沁右翼中旗', '15', '内蒙古自治区', '1522', '兴安盟', '152222', '科尔沁右翼中旗', '', '', '', '', 3, 1, ''), ('152223', '1522', '00,15,1522', '扎赉特旗', '15', '内蒙古自治区', '1522', '兴安盟', '152223', '扎赉特旗', '', '', '', '', 3, 1, ''), ('152224', '1522', '00,15,1522', '突泉县', '15', '内蒙古自治区', '1522', '兴安盟', '152224', '突泉县', '', '', '', '', 3, 1, ''), ('1525', '15', '00,15', '锡林郭勒盟', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '', '', '', '', '', '', 2, 1, ''), ('152501', '1525', '00,15,1525', '二连浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152501', '二连浩特市', '', '', '', '', 3, 1, ''), ('152502', '1525', '00,15,1525', '锡林浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152502', '锡林浩特市', '', '', '', '', 3, 1, ''), ('152522', '1525', '00,15,1525', '阿巴嘎旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152522', '阿巴嘎旗', '', '', '', '', 3, 1, ''), ('152523', '1525', '00,15,1525', '苏尼特左旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152523', '苏尼特左旗', '', '', '', '', 3, 1, ''), ('152524', '1525', '00,15,1525', '苏尼特右旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152524', '苏尼特右旗', '', '', '', '', 3, 1, ''), ('152525', '1525', '00,15,1525', '东乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152525', '东乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152526', '1525', '00,15,1525', '西乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152526', '西乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152527', '1525', '00,15,1525', '太仆寺旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152527', '太仆寺旗', '', '', '', '', 3, 1, ''), ('152528', '1525', '00,15,1525', '镶黄旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152528', '镶黄旗', '', '', '', '', 3, 1, ''), ('152529', '1525', '00,15,1525', '正镶白旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152529', '正镶白旗', '', '', '', '', 3, 1, ''), ('152530', '1525', '00,15,1525', '正蓝旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152530', '正蓝旗', '', '', '', '', 3, 1, ''), ('152531', '1525', '00,15,1525', '多伦县', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152531', '多伦县', '', '', '', '', 3, 1, ''), ('1529', '15', '00,15', '阿拉善盟', '15', '内蒙古自治区', '1529', '阿拉善盟', '', '', '', '', '', '', 2, 1, ''), ('152921', '1529', '00,15,1529', '阿拉善左旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152921', '阿拉善左旗', '', '', '', '', 3, 1, ''), ('152922', '1529', '00,15,1529', '阿拉善右旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152922', '阿拉善右旗', '', '', '', '', 3, 1, ''), ('152923', '1529', '00,15,1529', '额济纳旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152923', '额济纳旗', '', '', '', '', 3, 1, ''), ('21', '00', '00', '辽宁省', '21', '辽宁省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2101', '21', '00,21', '沈阳市', '21', '辽宁省', '2101', '沈阳市', '', '', '', '', '', '', 2, 1, ''), ('210102', '2101', '00,21,2101', '和平区', '21', '辽宁省', '2101', '沈阳市', '210102', '和平区', '', '', '', '', 3, 1, ''), ('210103', '2101', '00,21,2101', '沈河区', '21', '辽宁省', '2101', '沈阳市', '210103', '沈河区', '', '', '', '', 3, 1, ''), ('210104', '2101', '00,21,2101', '大东区', '21', '辽宁省', '2101', '沈阳市', '210104', '大东区', '', '', '', '', 3, 1, ''), ('210105', '2101', '00,21,2101', '皇姑区', '21', '辽宁省', '2101', '沈阳市', '210105', '皇姑区', '', '', '', '', 3, 1, ''), ('210106', '2101', '00,21,2101', '铁西区', '21', '辽宁省', '2101', '沈阳市', '210106', '铁西区', '', '', '', '', 3, 1, ''), ('210111', '2101', '00,21,2101', '苏家屯区', '21', '辽宁省', '2101', '沈阳市', '210111', '苏家屯区', '', '', '', '', 3, 1, ''), ('210112', '2101', '00,21,2101', '浑南区', '21', '辽宁省', '2101', '沈阳市', '210112', '浑南区', '', '', '', '', 3, 1, ''), ('210113', '2101', '00,21,2101', '沈北新区', '21', '辽宁省', '2101', '沈阳市', '210113', '沈北新区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('210114', '2101', '00,21,2101', '于洪区', '21', '辽宁省', '2101', '沈阳市', '210114', '于洪区', '', '', '', '', 3, 1, ''), ('210115', '2101', '00,21,2101', '辽中区', '21', '辽宁省', '2101', '沈阳市', '210115', '辽中区', '', '', '', '', 3, 1, ''), ('210123', '2101', '00,21,2101', '康平县', '21', '辽宁省', '2101', '沈阳市', '210123', '康平县', '', '', '', '', 3, 1, ''), ('210124', '2101', '00,21,2101', '法库县', '21', '辽宁省', '2101', '沈阳市', '210124', '法库县', '', '', '', '', 3, 1, ''), ('210181', '2101', '00,21,2101', '新民市', '21', '辽宁省', '2101', '沈阳市', '210181', '新民市', '', '', '', '', 3, 1, ''), ('2102', '21', '00,21', '大连市', '21', '辽宁省', '2102', '大连市', '', '', '', '', '', '', 2, 1, ''), ('210202', '2102', '00,21,2102', '中山区', '21', '辽宁省', '2102', '大连市', '210202', '中山区', '', '', '', '', 3, 1, ''), ('210203', '2102', '00,21,2102', '西岗区', '21', '辽宁省', '2102', '大连市', '210203', '西岗区', '', '', '', '', 3, 1, ''), ('210204', '2102', '00,21,2102', '沙河口区', '21', '辽宁省', '2102', '大连市', '210204', '沙河口区', '', '', '', '', 3, 1, ''), ('210211', '2102', '00,21,2102', '甘井子区', '21', '辽宁省', '2102', '大连市', '210211', '甘井子区', '', '', '', '', 3, 1, ''), ('210212', '2102', '00,21,2102', '旅顺口区', '21', '辽宁省', '2102', '大连市', '210212', '旅顺口区', '', '', '', '', 3, 1, ''), ('210213', '2102', '00,21,2102', '金州区', '21', '辽宁省', '2102', '大连市', '210213', '金州区', '', '', '', '', 3, 1, ''), ('210214', '2102', '00,21,2102', '普兰店区', '21', '辽宁省', '2102', '大连市', '210214', '普兰店区', '', '', '', '', 3, 1, ''), ('210224', '2102', '00,21,2102', '长海县', '21', '辽宁省', '2102', '大连市', '210224', '长海县', '', '', '', '', 3, 1, ''), ('210281', '2102', '00,21,2102', '瓦房店市', '21', '辽宁省', '2102', '大连市', '210281', '瓦房店市', '', '', '', '', 3, 1, ''), ('210283', '2102', '00,21,2102', '庄河市', '21', '辽宁省', '2102', '大连市', '210283', '庄河市', '', '', '', '', 3, 1, ''), ('2103', '21', '00,21', '鞍山市', '21', '辽宁省', '2103', '鞍山市', '', '', '', '', '', '', 2, 1, ''), ('210302', '2103', '00,21,2103', '铁东区', '21', '辽宁省', '2103', '鞍山市', '210302', '铁东区', '', '', '', '', 3, 1, ''), ('210303', '2103', '00,21,2103', '铁西区', '21', '辽宁省', '2103', '鞍山市', '210303', '铁西区', '', '', '', '', 3, 1, ''), ('210304', '2103', '00,21,2103', '立山区', '21', '辽宁省', '2103', '鞍山市', '210304', '立山区', '', '', '', '', 3, 1, ''), ('210311', '2103', '00,21,2103', '千山区', '21', '辽宁省', '2103', '鞍山市', '210311', '千山区', '', '', '', '', 3, 1, ''), ('210321', '2103', '00,21,2103', '台安县', '21', '辽宁省', '2103', '鞍山市', '210321', '台安县', '', '', '', '', 3, 1, ''), ('210323', '2103', '00,21,2103', '岫岩满族自治县', '21', '辽宁省', '2103', '鞍山市', '210323', '岫岩满族自治县', '', '', '', '', 3, 1, ''), ('210381', '2103', '00,21,2103', '海城市', '21', '辽宁省', '2103', '鞍山市', '210381', '海城市', '', '', '', '', 3, 1, ''), ('2104', '21', '00,21', '抚顺市', '21', '辽宁省', '2104', '抚顺市', '', '', '', '', '', '', 2, 1, ''), ('210402', '2104', '00,21,2104', '新抚区', '21', '辽宁省', '2104', '抚顺市', '210402', '新抚区', '', '', '', '', 3, 1, ''), ('210403', '2104', '00,21,2104', '东洲区', '21', '辽宁省', '2104', '抚顺市', '210403', '东洲区', '', '', '', '', 3, 1, ''), ('210404', '2104', '00,21,2104', '望花区', '21', '辽宁省', '2104', '抚顺市', '210404', '望花区', '', '', '', '', 3, 1, ''), ('210411', '2104', '00,21,2104', '顺城区', '21', '辽宁省', '2104', '抚顺市', '210411', '顺城区', '', '', '', '', 3, 1, ''), ('210421', '2104', '00,21,2104', '抚顺县', '21', '辽宁省', '2104', '抚顺市', '210421', '抚顺县', '', '', '', '', 3, 1, ''), ('210422', '2104', '00,21,2104', '新宾满族自治县', '21', '辽宁省', '2104', '抚顺市', '210422', '新宾满族自治县', '', '', '', '', 3, 1, ''), ('210423', '2104', '00,21,2104', '清原满族自治县', '21', '辽宁省', '2104', '抚顺市', '210423', '清原满族自治县', '', '', '', '', 3, 1, ''), ('2105', '21', '00,21', '本溪市', '21', '辽宁省', '2105', '本溪市', '', '', '', '', '', '', 2, 1, ''), ('210502', '2105', '00,21,2105', '平山区', '21', '辽宁省', '2105', '本溪市', '210502', '平山区', '', '', '', '', 3, 1, ''), ('210503', '2105', '00,21,2105', '溪湖区', '21', '辽宁省', '2105', '本溪市', '210503', '溪湖区', '', '', '', '', 3, 1, ''), ('210504', '2105', '00,21,2105', '明山区', '21', '辽宁省', '2105', '本溪市', '210504', '明山区', '', '', '', '', 3, 1, ''), ('210505', '2105', '00,21,2105', '南芬区', '21', '辽宁省', '2105', '本溪市', '210505', '南芬区', '', '', '', '', 3, 1, ''), ('210521', '2105', '00,21,2105', '本溪满族自治县', '21', '辽宁省', '2105', '本溪市', '210521', '本溪满族自治县', '', '', '', '', 3, 1, ''), ('210522', '2105', '00,21,2105', '桓仁满族自治县', '21', '辽宁省', '2105', '本溪市', '210522', '桓仁满族自治县', '', '', '', '', 3, 1, ''), ('2106', '21', '00,21', '丹东市', '21', '辽宁省', '2106', '丹东市', '', '', '', '', '', '', 2, 1, ''), ('210602', '2106', '00,21,2106', '元宝区', '21', '辽宁省', '2106', '丹东市', '210602', '元宝区', '', '', '', '', 3, 1, ''), ('210603', '2106', '00,21,2106', '振兴区', '21', '辽宁省', '2106', '丹东市', '210603', '振兴区', '', '', '', '', 3, 1, ''), ('210604', '2106', '00,21,2106', '振安区', '21', '辽宁省', '2106', '丹东市', '210604', '振安区', '', '', '', '', 3, 1, ''), ('210624', '2106', '00,21,2106', '宽甸满族自治县', '21', '辽宁省', '2106', '丹东市', '210624', '宽甸满族自治县', '', '', '', '', 3, 1, ''), ('210681', '2106', '00,21,2106', '东港市', '21', '辽宁省', '2106', '丹东市', '210681', '东港市', '', '', '', '', 3, 1, ''), ('210682', '2106', '00,21,2106', '凤城市', '21', '辽宁省', '2106', '丹东市', '210682', '凤城市', '', '', '', '', 3, 1, ''), ('2107', '21', '00,21', '锦州市', '21', '辽宁省', '2107', '锦州市', '', '', '', '', '', '', 2, 1, ''), ('210702', '2107', '00,21,2107', '古塔区', '21', '辽宁省', '2107', '锦州市', '210702', '古塔区', '', '', '', '', 3, 1, ''), ('210703', '2107', '00,21,2107', '凌河区', '21', '辽宁省', '2107', '锦州市', '210703', '凌河区', '', '', '', '', 3, 1, ''), ('210711', '2107', '00,21,2107', '太和区', '21', '辽宁省', '2107', '锦州市', '210711', '太和区', '', '', '', '', 3, 1, ''), ('210726', '2107', '00,21,2107', '黑山县', '21', '辽宁省', '2107', '锦州市', '210726', '黑山县', '', '', '', '', 3, 1, ''), ('210727', '2107', '00,21,2107', '义县', '21', '辽宁省', '2107', '锦州市', '210727', '义县', '', '', '', '', 3, 1, ''), ('210781', '2107', '00,21,2107', '凌海市', '21', '辽宁省', '2107', '锦州市', '210781', '凌海市', '', '', '', '', 3, 1, ''), ('210782', '2107', '00,21,2107', '北镇市', '21', '辽宁省', '2107', '锦州市', '210782', '北镇市', '', '', '', '', 3, 1, ''), ('2108', '21', '00,21', '营口市', '21', '辽宁省', '2108', '营口市', '', '', '', '', '', '', 2, 1, ''), ('210802', '2108', '00,21,2108', '站前区', '21', '辽宁省', '2108', '营口市', '210802', '站前区', '', '', '', '', 3, 1, ''), ('210803', '2108', '00,21,2108', '西市区', '21', '辽宁省', '2108', '营口市', '210803', '西市区', '', '', '', '', 3, 1, ''), ('210804', '2108', '00,21,2108', '鲅鱼圈区', '21', '辽宁省', '2108', '营口市', '210804', '鲅鱼圈区', '', '', '', '', 3, 1, ''), ('210811', '2108', '00,21,2108', '老边区', '21', '辽宁省', '2108', '营口市', '210811', '老边区', '', '', '', '', 3, 1, ''), ('210881', '2108', '00,21,2108', '盖州市', '21', '辽宁省', '2108', '营口市', '210881', '盖州市', '', '', '', '', 3, 1, ''), ('210882', '2108', '00,21,2108', '大石桥市', '21', '辽宁省', '2108', '营口市', '210882', '大石桥市', '', '', '', '', 3, 1, ''), ('2109', '21', '00,21', '阜新市', '21', '辽宁省', '2109', '阜新市', '', '', '', '', '', '', 2, 1, ''), ('210902', '2109', '00,21,2109', '海州区', '21', '辽宁省', '2109', '阜新市', '210902', '海州区', '', '', '', '', 3, 1, ''), ('210903', '2109', '00,21,2109', '新邱区', '21', '辽宁省', '2109', '阜新市', '210903', '新邱区', '', '', '', '', 3, 1, ''), ('210904', '2109', '00,21,2109', '太平区', '21', '辽宁省', '2109', '阜新市', '210904', '太平区', '', '', '', '', 3, 1, ''), ('210905', '2109', '00,21,2109', '清河门区', '21', '辽宁省', '2109', '阜新市', '210905', '清河门区', '', '', '', '', 3, 1, ''), ('210911', '2109', '00,21,2109', '细河区', '21', '辽宁省', '2109', '阜新市', '210911', '细河区', '', '', '', '', 3, 1, ''), ('210921', '2109', '00,21,2109', '阜新蒙古族自治县', '21', '辽宁省', '2109', '阜新市', '210921', '阜新蒙古族自治县', '', '', '', '', 3, 1, ''), ('210922', '2109', '00,21,2109', '彰武县', '21', '辽宁省', '2109', '阜新市', '210922', '彰武县', '', '', '', '', 3, 1, ''), ('2110', '21', '00,21', '辽阳市', '21', '辽宁省', '2110', '辽阳市', '', '', '', '', '', '', 2, 1, ''), ('211002', '2110', '00,21,2110', '白塔区', '21', '辽宁省', '2110', '辽阳市', '211002', '白塔区', '', '', '', '', 3, 1, ''), ('211003', '2110', '00,21,2110', '文圣区', '21', '辽宁省', '2110', '辽阳市', '211003', '文圣区', '', '', '', '', 3, 1, ''), ('211004', '2110', '00,21,2110', '宏伟区', '21', '辽宁省', '2110', '辽阳市', '211004', '宏伟区', '', '', '', '', 3, 1, ''), ('211005', '2110', '00,21,2110', '弓长岭区', '21', '辽宁省', '2110', '辽阳市', '211005', '弓长岭区', '', '', '', '', 3, 1, ''), ('211011', '2110', '00,21,2110', '太子河区', '21', '辽宁省', '2110', '辽阳市', '211011', '太子河区', '', '', '', '', 3, 1, ''), ('211021', '2110', '00,21,2110', '辽阳县', '21', '辽宁省', '2110', '辽阳市', '211021', '辽阳县', '', '', '', '', 3, 1, ''), ('211081', '2110', '00,21,2110', '灯塔市', '21', '辽宁省', '2110', '辽阳市', '211081', '灯塔市', '', '', '', '', 3, 1, ''), ('2111', '21', '00,21', '盘锦市', '21', '辽宁省', '2111', '盘锦市', '', '', '', '', '', '', 2, 1, ''), ('211102', '2111', '00,21,2111', '双台子区', '21', '辽宁省', '2111', '盘锦市', '211102', '双台子区', '', '', '', '', 3, 1, ''), ('211103', '2111', '00,21,2111', '兴隆台区', '21', '辽宁省', '2111', '盘锦市', '211103', '兴隆台区', '', '', '', '', 3, 1, ''), ('211104', '2111', '00,21,2111', '大洼区', '21', '辽宁省', '2111', '盘锦市', '211104', '大洼区', '', '', '', '', 3, 1, ''), ('211122', '2111', '00,21,2111', '盘山县', '21', '辽宁省', '2111', '盘锦市', '211122', '盘山县', '', '', '', '', 3, 1, ''), ('2112', '21', '00,21', '铁岭市', '21', '辽宁省', '2112', '铁岭市', '', '', '', '', '', '', 2, 1, ''), ('211202', '2112', '00,21,2112', '银州区', '21', '辽宁省', '2112', '铁岭市', '211202', '银州区', '', '', '', '', 3, 1, ''), ('211204', '2112', '00,21,2112', '清河区', '21', '辽宁省', '2112', '铁岭市', '211204', '清河区', '', '', '', '', 3, 1, ''), ('211221', '2112', '00,21,2112', '铁岭县', '21', '辽宁省', '2112', '铁岭市', '211221', '铁岭县', '', '', '', '', 3, 1, ''), ('211223', '2112', '00,21,2112', '西丰县', '21', '辽宁省', '2112', '铁岭市', '211223', '西丰县', '', '', '', '', 3, 1, ''), ('211224', '2112', '00,21,2112', '昌图县', '21', '辽宁省', '2112', '铁岭市', '211224', '昌图县', '', '', '', '', 3, 1, ''), ('211281', '2112', '00,21,2112', '调兵山市', '21', '辽宁省', '2112', '铁岭市', '211281', '调兵山市', '', '', '', '', 3, 1, ''), ('211282', '2112', '00,21,2112', '开原市', '21', '辽宁省', '2112', '铁岭市', '211282', '开原市', '', '', '', '', 3, 1, ''), ('2113', '21', '00,21', '朝阳市', '21', '辽宁省', '2113', '朝阳市', '', '', '', '', '', '', 2, 1, ''), ('211302', '2113', '00,21,2113', '双塔区', '21', '辽宁省', '2113', '朝阳市', '211302', '双塔区', '', '', '', '', 3, 1, ''), ('211303', '2113', '00,21,2113', '龙城区', '21', '辽宁省', '2113', '朝阳市', '211303', '龙城区', '', '', '', '', 3, 1, ''), ('211321', '2113', '00,21,2113', '朝阳县', '21', '辽宁省', '2113', '朝阳市', '211321', '朝阳县', '', '', '', '', 3, 1, ''), ('211322', '2113', '00,21,2113', '建平县', '21', '辽宁省', '2113', '朝阳市', '211322', '建平县', '', '', '', '', 3, 1, ''), ('211324', '2113', '00,21,2113', '喀喇沁左翼蒙古族自治县', '21', '辽宁省', '2113', '朝阳市', '211324', '喀喇沁左翼蒙古族自治县', '', '', '', '', 3, 1, ''), ('211381', '2113', '00,21,2113', '北票市', '21', '辽宁省', '2113', '朝阳市', '211381', '北票市', '', '', '', '', 3, 1, ''), ('211382', '2113', '00,21,2113', '凌源市', '21', '辽宁省', '2113', '朝阳市', '211382', '凌源市', '', '', '', '', 3, 1, ''), ('2114', '21', '00,21', '葫芦岛市', '21', '辽宁省', '2114', '葫芦岛市', '', '', '', '', '', '', 2, 1, ''), ('211402', '2114', '00,21,2114', '连山区', '21', '辽宁省', '2114', '葫芦岛市', '211402', '连山区', '', '', '', '', 3, 1, ''), ('211403', '2114', '00,21,2114', '龙港区', '21', '辽宁省', '2114', '葫芦岛市', '211403', '龙港区', '', '', '', '', 3, 1, ''), ('211404', '2114', '00,21,2114', '南票区', '21', '辽宁省', '2114', '葫芦岛市', '211404', '南票区', '', '', '', '', 3, 1, ''), ('211421', '2114', '00,21,2114', '绥中县', '21', '辽宁省', '2114', '葫芦岛市', '211421', '绥中县', '', '', '', '', 3, 1, ''), ('211422', '2114', '00,21,2114', '建昌县', '21', '辽宁省', '2114', '葫芦岛市', '211422', '建昌县', '', '', '', '', 3, 1, ''), ('211481', '2114', '00,21,2114', '兴城市', '21', '辽宁省', '2114', '葫芦岛市', '211481', '兴城市', '', '', '', '', 3, 1, ''), ('22', '00', '00', '吉林省', '22', '吉林省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2201', '22', '00,22', '长春市', '22', '吉林省', '2201', '长春市', '', '', '', '', '', '', 2, 1, ''), ('220102', '2201', '00,22,2201', '南关区', '22', '吉林省', '2201', '长春市', '220102', '南关区', '', '', '', '', 3, 1, ''), ('220103', '2201', '00,22,2201', '宽城区', '22', '吉林省', '2201', '长春市', '220103', '宽城区', '', '', '', '', 3, 1, ''), ('220104', '2201', '00,22,2201', '朝阳区', '22', '吉林省', '2201', '长春市', '220104', '朝阳区', '', '', '', '', 3, 1, ''), ('220105', '2201', '00,22,2201', '二道区', '22', '吉林省', '2201', '长春市', '220105', '二道区', '', '', '', '', 3, 1, ''), ('220106', '2201', '00,22,2201', '绿园区', '22', '吉林省', '2201', '长春市', '220106', '绿园区', '', '', '', '', 3, 1, ''), ('220112', '2201', '00,22,2201', '双阳区', '22', '吉林省', '2201', '长春市', '220112', '双阳区', '', '', '', '', 3, 1, ''), ('220113', '2201', '00,22,2201', '九台区', '22', '吉林省', '2201', '长春市', '220113', '九台区', '', '', '', '', 3, 1, ''), ('220122', '2201', '00,22,2201', '农安县', '22', '吉林省', '2201', '长春市', '220122', '农安县', '', '', '', '', 3, 1, ''), ('220182', '2201', '00,22,2201', '榆树市', '22', '吉林省', '2201', '长春市', '220182', '榆树市', '', '', '', '', 3, 1, ''), ('220183', '2201', '00,22,2201', '德惠市', '22', '吉林省', '2201', '长春市', '220183', '德惠市', '', '', '', '', 3, 1, ''), ('2202', '22', '00,22', '吉林市', '22', '吉林省', '2202', '吉林市', '', '', '', '', '', '', 2, 1, ''), ('220202', '2202', '00,22,2202', '昌邑区', '22', '吉林省', '2202', '吉林市', '220202', '昌邑区', '', '', '', '', 3, 1, ''), ('220203', '2202', '00,22,2202', '龙潭区', '22', '吉林省', '2202', '吉林市', '220203', '龙潭区', '', '', '', '', 3, 1, ''), ('220204', '2202', '00,22,2202', '船营区', '22', '吉林省', '2202', '吉林市', '220204', '船营区', '', '', '', '', 3, 1, ''), ('220211', '2202', '00,22,2202', '丰满区', '22', '吉林省', '2202', '吉林市', '220211', '丰满区', '', '', '', '', 3, 1, ''), ('220221', '2202', '00,22,2202', '永吉县', '22', '吉林省', '2202', '吉林市', '220221', '永吉县', '', '', '', '', 3, 1, ''), ('220281', '2202', '00,22,2202', '蛟河市', '22', '吉林省', '2202', '吉林市', '220281', '蛟河市', '', '', '', '', 3, 1, ''), ('220282', '2202', '00,22,2202', '桦甸市', '22', '吉林省', '2202', '吉林市', '220282', '桦甸市', '', '', '', '', 3, 1, ''), ('220283', '2202', '00,22,2202', '舒兰市', '22', '吉林省', '2202', '吉林市', '220283', '舒兰市', '', '', '', '', 3, 1, ''), ('220284', '2202', '00,22,2202', '磐石市', '22', '吉林省', '2202', '吉林市', '220284', '磐石市', '', '', '', '', 3, 1, ''), ('2203', '22', '00,22', '四平市', '22', '吉林省', '2203', '四平市', '', '', '', '', '', '', 2, 1, ''), ('220302', '2203', '00,22,2203', '铁西区', '22', '吉林省', '2203', '四平市', '220302', '铁西区', '', '', '', '', 3, 1, ''), ('220303', '2203', '00,22,2203', '铁东区', '22', '吉林省', '2203', '四平市', '220303', '铁东区', '', '', '', '', 3, 1, ''), ('220322', '2203', '00,22,2203', '梨树县', '22', '吉林省', '2203', '四平市', '220322', '梨树县', '', '', '', '', 3, 1, ''), ('220323', '2203', '00,22,2203', '伊通满族自治县', '22', '吉林省', '2203', '四平市', '220323', '伊通满族自治县', '', '', '', '', 3, 1, ''), ('220381', '2203', '00,22,2203', '公主岭市', '22', '吉林省', '2203', '四平市', '220381', '公主岭市', '', '', '', '', 3, 1, ''), ('220382', '2203', '00,22,2203', '双辽市', '22', '吉林省', '2203', '四平市', '220382', '双辽市', '', '', '', '', 3, 1, ''), ('2204', '22', '00,22', '辽源市', '22', '吉林省', '2204', '辽源市', '', '', '', '', '', '', 2, 1, ''), ('220402', '2204', '00,22,2204', '龙山区', '22', '吉林省', '2204', '辽源市', '220402', '龙山区', '', '', '', '', 3, 1, ''), ('220403', '2204', '00,22,2204', '西安区', '22', '吉林省', '2204', '辽源市', '220403', '西安区', '', '', '', '', 3, 1, ''), ('220421', '2204', '00,22,2204', '东丰县', '22', '吉林省', '2204', '辽源市', '220421', '东丰县', '', '', '', '', 3, 1, ''), ('220422', '2204', '00,22,2204', '东辽县', '22', '吉林省', '2204', '辽源市', '220422', '东辽县', '', '', '', '', 3, 1, ''), ('2205', '22', '00,22', '通化市', '22', '吉林省', '2205', '通化市', '', '', '', '', '', '', 2, 1, ''), ('220502', '2205', '00,22,2205', '东昌区', '22', '吉林省', '2205', '通化市', '220502', '东昌区', '', '', '', '', 3, 1, ''), ('220503', '2205', '00,22,2205', '二道江区', '22', '吉林省', '2205', '通化市', '220503', '二道江区', '', '', '', '', 3, 1, ''), ('220521', '2205', '00,22,2205', '通化县', '22', '吉林省', '2205', '通化市', '220521', '通化县', '', '', '', '', 3, 1, ''), ('220523', '2205', '00,22,2205', '辉南县', '22', '吉林省', '2205', '通化市', '220523', '辉南县', '', '', '', '', 3, 1, ''), ('220524', '2205', '00,22,2205', '柳河县', '22', '吉林省', '2205', '通化市', '220524', '柳河县', '', '', '', '', 3, 1, ''), ('220581', '2205', '00,22,2205', '梅河口市', '22', '吉林省', '2205', '通化市', '220581', '梅河口市', '', '', '', '', 3, 1, ''), ('220582', '2205', '00,22,2205', '集安市', '22', '吉林省', '2205', '通化市', '220582', '集安市', '', '', '', '', 3, 1, ''), ('2206', '22', '00,22', '白山市', '22', '吉林省', '2206', '白山市', '', '', '', '', '', '', 2, 1, ''), ('220602', '2206', '00,22,2206', '浑江区', '22', '吉林省', '2206', '白山市', '220602', '浑江区', '', '', '', '', 3, 1, ''), ('220605', '2206', '00,22,2206', '江源区', '22', '吉林省', '2206', '白山市', '220605', '江源区', '', '', '', '', 3, 1, ''), ('220621', '2206', '00,22,2206', '抚松县', '22', '吉林省', '2206', '白山市', '220621', '抚松县', '', '', '', '', 3, 1, ''), ('220622', '2206', '00,22,2206', '靖宇县', '22', '吉林省', '2206', '白山市', '220622', '靖宇县', '', '', '', '', 3, 1, ''), ('220623', '2206', '00,22,2206', '长白朝鲜族自治县', '22', '吉林省', '2206', '白山市', '220623', '长白朝鲜族自治县', '', '', '', '', 3, 1, ''), ('220681', '2206', '00,22,2206', '临江市', '22', '吉林省', '2206', '白山市', '220681', '临江市', '', '', '', '', 3, 1, ''), ('2207', '22', '00,22', '松原市', '22', '吉林省', '2207', '松原市', '', '', '', '', '', '', 2, 1, ''), ('220702', '2207', '00,22,2207', '宁江区', '22', '吉林省', '2207', '松原市', '220702', '宁江区', '', '', '', '', 3, 1, ''), ('220721', '2207', '00,22,2207', '前郭尔罗斯蒙古族自治县', '22', '吉林省', '2207', '松原市', '220721', '前郭尔罗斯蒙古族自治县', '', '', '', '', 3, 1, ''), ('220722', '2207', '00,22,2207', '长岭县', '22', '吉林省', '2207', '松原市', '220722', '长岭县', '', '', '', '', 3, 1, ''), ('220723', '2207', '00,22,2207', '乾安县', '22', '吉林省', '2207', '松原市', '220723', '乾安县', '', '', '', '', 3, 1, ''), ('220781', '2207', '00,22,2207', '扶余市', '22', '吉林省', '2207', '松原市', '220781', '扶余市', '', '', '', '', 3, 1, ''), ('2208', '22', '00,22', '白城市', '22', '吉林省', '2208', '白城市', '', '', '', '', '', '', 2, 1, ''), ('220802', '2208', '00,22,2208', '洮北区', '22', '吉林省', '2208', '白城市', '220802', '洮北区', '', '', '', '', 3, 1, ''), ('220821', '2208', '00,22,2208', '镇赉县', '22', '吉林省', '2208', '白城市', '220821', '镇赉县', '', '', '', '', 3, 1, ''), ('220822', '2208', '00,22,2208', '通榆县', '22', '吉林省', '2208', '白城市', '220822', '通榆县', '', '', '', '', 3, 1, ''), ('220881', '2208', '00,22,2208', '洮南市', '22', '吉林省', '2208', '白城市', '220881', '洮南市', '', '', '', '', 3, 1, ''), ('220882', '2208', '00,22,2208', '大安市', '22', '吉林省', '2208', '白城市', '220882', '大安市', '', '', '', '', 3, 1, ''), ('2224', '22', '00,22', '延边朝鲜族自治州', '22', '吉林省', '2224', '延边朝鲜族自治州', '', '', '', '', '', '', 2, 1, ''), ('222401', '2224', '00,22,2224', '延吉市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222401', '延吉市', '', '', '', '', 3, 1, ''), ('222402', '2224', '00,22,2224', '图们市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222402', '图们市', '', '', '', '', 3, 1, ''), ('222403', '2224', '00,22,2224', '敦化市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222403', '敦化市', '', '', '', '', 3, 1, ''), ('222404', '2224', '00,22,2224', '珲春市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222404', '珲春市', '', '', '', '', 3, 1, ''), ('222405', '2224', '00,22,2224', '龙井市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222405', '龙井市', '', '', '', '', 3, 1, ''), ('222406', '2224', '00,22,2224', '和龙市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222406', '和龙市', '', '', '', '', 3, 1, ''), ('222424', '2224', '00,22,2224', '汪清县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222424', '汪清县', '', '', '', '', 3, 1, ''), ('222426', '2224', '00,22,2224', '安图县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222426', '安图县', '', '', '', '', 3, 1, ''), ('23', '00', '00', '黑龙江省', '23', '黑龙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2301', '23', '00,23', '哈尔滨市', '23', '黑龙江省', '2301', '哈尔滨市', '', '', '', '', '', '', 2, 1, ''), ('230102', '2301', '00,23,2301', '道里区', '23', '黑龙江省', '2301', '哈尔滨市', '230102', '道里区', '', '', '', '', 3, 1, ''), ('230103', '2301', '00,23,2301', '南岗区', '23', '黑龙江省', '2301', '哈尔滨市', '230103', '南岗区', '', '', '', '', 3, 1, ''), ('230104', '2301', '00,23,2301', '道外区', '23', '黑龙江省', '2301', '哈尔滨市', '230104', '道外区', '', '', '', '', 3, 1, ''), ('230108', '2301', '00,23,2301', '平房区', '23', '黑龙江省', '2301', '哈尔滨市', '230108', '平房区', '', '', '', '', 3, 1, ''), ('230109', '2301', '00,23,2301', '松北区', '23', '黑龙江省', '2301', '哈尔滨市', '230109', '松北区', '', '', '', '', 3, 1, ''), ('230110', '2301', '00,23,2301', '香坊区', '23', '黑龙江省', '2301', '哈尔滨市', '230110', '香坊区', '', '', '', '', 3, 1, ''), ('230111', '2301', '00,23,2301', '呼兰区', '23', '黑龙江省', '2301', '哈尔滨市', '230111', '呼兰区', '', '', '', '', 3, 1, ''), ('230112', '2301', '00,23,2301', '阿城区', '23', '黑龙江省', '2301', '哈尔滨市', '230112', '阿城区', '', '', '', '', 3, 1, ''), ('230113', '2301', '00,23,2301', '双城区', '23', '黑龙江省', '2301', '哈尔滨市', '230113', '双城区', '', '', '', '', 3, 1, ''), ('230123', '2301', '00,23,2301', '依兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230123', '依兰县', '', '', '', '', 3, 1, ''), ('230124', '2301', '00,23,2301', '方正县', '23', '黑龙江省', '2301', '哈尔滨市', '230124', '方正县', '', '', '', '', 3, 1, ''), ('230125', '2301', '00,23,2301', '宾县', '23', '黑龙江省', '2301', '哈尔滨市', '230125', '宾县', '', '', '', '', 3, 1, ''), ('230126', '2301', '00,23,2301', '巴彦县', '23', '黑龙江省', '2301', '哈尔滨市', '230126', '巴彦县', '', '', '', '', 3, 1, ''), ('230127', '2301', '00,23,2301', '木兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230127', '木兰县', '', '', '', '', 3, 1, ''), ('230128', '2301', '00,23,2301', '通河县', '23', '黑龙江省', '2301', '哈尔滨市', '230128', '通河县', '', '', '', '', 3, 1, ''), ('230129', '2301', '00,23,2301', '延寿县', '23', '黑龙江省', '2301', '哈尔滨市', '230129', '延寿县', '', '', '', '', 3, 1, ''), ('230183', '2301', '00,23,2301', '尚志市', '23', '黑龙江省', '2301', '哈尔滨市', '230183', '尚志市', '', '', '', '', 3, 1, ''), ('230184', '2301', '00,23,2301', '五常市', '23', '黑龙江省', '2301', '哈尔滨市', '230184', '五常市', '', '', '', '', 3, 1, ''), ('2302', '23', '00,23', '齐齐哈尔市', '23', '黑龙江省', '2302', '齐齐哈尔市', '', '', '', '', '', '', 2, 1, ''), ('230202', '2302', '00,23,2302', '龙沙区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230202', '龙沙区', '', '', '', '', 3, 1, ''), ('230203', '2302', '00,23,2302', '建华区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230203', '建华区', '', '', '', '', 3, 1, ''), ('230204', '2302', '00,23,2302', '铁锋区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230204', '铁锋区', '', '', '', '', 3, 1, ''), ('230205', '2302', '00,23,2302', '昂昂溪区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230205', '昂昂溪区', '', '', '', '', 3, 1, ''), ('230206', '2302', '00,23,2302', '富拉尔基区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230206', '富拉尔基区', '', '', '', '', 3, 1, ''), ('230207', '2302', '00,23,2302', '碾子山区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230207', '碾子山区', '', '', '', '', 3, 1, ''), ('230208', '2302', '00,23,2302', '梅里斯达斡尔族区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230208', '梅里斯达斡尔族区', '', '', '', '', 3, 1, ''), ('230221', '2302', '00,23,2302', '龙江县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230221', '龙江县', '', '', '', '', 3, 1, ''), ('230223', '2302', '00,23,2302', '依安县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230223', '依安县', '', '', '', '', 3, 1, ''), ('230224', '2302', '00,23,2302', '泰来县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230224', '泰来县', '', '', '', '', 3, 1, ''), ('230225', '2302', '00,23,2302', '甘南县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230225', '甘南县', '', '', '', '', 3, 1, ''), ('230227', '2302', '00,23,2302', '富裕县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230227', '富裕县', '', '', '', '', 3, 1, ''), ('230229', '2302', '00,23,2302', '克山县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230229', '克山县', '', '', '', '', 3, 1, ''), ('230230', '2302', '00,23,2302', '克东县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230230', '克东县', '', '', '', '', 3, 1, ''), ('230231', '2302', '00,23,2302', '拜泉县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230231', '拜泉县', '', '', '', '', 3, 1, ''), ('230281', '2302', '00,23,2302', '讷河市', '23', '黑龙江省', '2302', '齐齐哈尔市', '230281', '讷河市', '', '', '', '', 3, 1, ''), ('2303', '23', '00,23', '鸡西市', '23', '黑龙江省', '2303', '鸡西市', '', '', '', '', '', '', 2, 1, ''), ('230302', '2303', '00,23,2303', '鸡冠区', '23', '黑龙江省', '2303', '鸡西市', '230302', '鸡冠区', '', '', '', '', 3, 1, ''), ('230303', '2303', '00,23,2303', '恒山区', '23', '黑龙江省', '2303', '鸡西市', '230303', '恒山区', '', '', '', '', 3, 1, ''), ('230304', '2303', '00,23,2303', '滴道区', '23', '黑龙江省', '2303', '鸡西市', '230304', '滴道区', '', '', '', '', 3, 1, ''), ('230305', '2303', '00,23,2303', '梨树区', '23', '黑龙江省', '2303', '鸡西市', '230305', '梨树区', '', '', '', '', 3, 1, ''), ('230306', '2303', '00,23,2303', '城子河区', '23', '黑龙江省', '2303', '鸡西市', '230306', '城子河区', '', '', '', '', 3, 1, ''), ('230307', '2303', '00,23,2303', '麻山区', '23', '黑龙江省', '2303', '鸡西市', '230307', '麻山区', '', '', '', '', 3, 1, ''), ('230321', '2303', '00,23,2303', '鸡东县', '23', '黑龙江省', '2303', '鸡西市', '230321', '鸡东县', '', '', '', '', 3, 1, ''), ('230381', '2303', '00,23,2303', '虎林市', '23', '黑龙江省', '2303', '鸡西市', '230381', '虎林市', '', '', '', '', 3, 1, ''), ('230382', '2303', '00,23,2303', '密山市', '23', '黑龙江省', '2303', '鸡西市', '230382', '密山市', '', '', '', '', 3, 1, ''), ('2304', '23', '00,23', '鹤岗市', '23', '黑龙江省', '2304', '鹤岗市', '', '', '', '', '', '', 2, 1, ''), ('230402', '2304', '00,23,2304', '向阳区', '23', '黑龙江省', '2304', '鹤岗市', '230402', '向阳区', '', '', '', '', 3, 1, ''), ('230403', '2304', '00,23,2304', '工农区', '23', '黑龙江省', '2304', '鹤岗市', '230403', '工农区', '', '', '', '', 3, 1, ''), ('230404', '2304', '00,23,2304', '南山区', '23', '黑龙江省', '2304', '鹤岗市', '230404', '南山区', '', '', '', '', 3, 1, ''), ('230405', '2304', '00,23,2304', '兴安区', '23', '黑龙江省', '2304', '鹤岗市', '230405', '兴安区', '', '', '', '', 3, 1, ''), ('230406', '2304', '00,23,2304', '东山区', '23', '黑龙江省', '2304', '鹤岗市', '230406', '东山区', '', '', '', '', 3, 1, ''), ('230407', '2304', '00,23,2304', '兴山区', '23', '黑龙江省', '2304', '鹤岗市', '230407', '兴山区', '', '', '', '', 3, 1, ''), ('230421', '2304', '00,23,2304', '萝北县', '23', '黑龙江省', '2304', '鹤岗市', '230421', '萝北县', '', '', '', '', 3, 1, ''), ('230422', '2304', '00,23,2304', '绥滨县', '23', '黑龙江省', '2304', '鹤岗市', '230422', '绥滨县', '', '', '', '', 3, 1, ''), ('2305', '23', '00,23', '双鸭山市', '23', '黑龙江省', '2305', '双鸭山市', '', '', '', '', '', '', 2, 1, ''), ('230502', '2305', '00,23,2305', '尖山区', '23', '黑龙江省', '2305', '双鸭山市', '230502', '尖山区', '', '', '', '', 3, 1, ''), ('230503', '2305', '00,23,2305', '岭东区', '23', '黑龙江省', '2305', '双鸭山市', '230503', '岭东区', '', '', '', '', 3, 1, ''), ('230505', '2305', '00,23,2305', '四方台区', '23', '黑龙江省', '2305', '双鸭山市', '230505', '四方台区', '', '', '', '', 3, 1, ''), ('230506', '2305', '00,23,2305', '宝山区', '23', '黑龙江省', '2305', '双鸭山市', '230506', '宝山区', '', '', '', '', 3, 1, ''), ('230521', '2305', '00,23,2305', '集贤县', '23', '黑龙江省', '2305', '双鸭山市', '230521', '集贤县', '', '', '', '', 3, 1, ''), ('230522', '2305', '00,23,2305', '友谊县', '23', '黑龙江省', '2305', '双鸭山市', '230522', '友谊县', '', '', '', '', 3, 1, ''), ('230523', '2305', '00,23,2305', '宝清县', '23', '黑龙江省', '2305', '双鸭山市', '230523', '宝清县', '', '', '', '', 3, 1, ''), ('230524', '2305', '00,23,2305', '饶河县', '23', '黑龙江省', '2305', '双鸭山市', '230524', '饶河县', '', '', '', '', 3, 1, ''), ('2306', '23', '00,23', '大庆市', '23', '黑龙江省', '2306', '大庆市', '', '', '', '', '', '', 2, 1, ''), ('230602', '2306', '00,23,2306', '萨尔图区', '23', '黑龙江省', '2306', '大庆市', '230602', '萨尔图区', '', '', '', '', 3, 1, ''), ('230603', '2306', '00,23,2306', '龙凤区', '23', '黑龙江省', '2306', '大庆市', '230603', '龙凤区', '', '', '', '', 3, 1, ''), ('230604', '2306', '00,23,2306', '让胡路区', '23', '黑龙江省', '2306', '大庆市', '230604', '让胡路区', '', '', '', '', 3, 1, ''), ('230605', '2306', '00,23,2306', '红岗区', '23', '黑龙江省', '2306', '大庆市', '230605', '红岗区', '', '', '', '', 3, 1, ''), ('230606', '2306', '00,23,2306', '大同区', '23', '黑龙江省', '2306', '大庆市', '230606', '大同区', '', '', '', '', 3, 1, ''), ('230621', '2306', '00,23,2306', '肇州县', '23', '黑龙江省', '2306', '大庆市', '230621', '肇州县', '', '', '', '', 3, 1, ''), ('230622', '2306', '00,23,2306', '肇源县', '23', '黑龙江省', '2306', '大庆市', '230622', '肇源县', '', '', '', '', 3, 1, ''), ('230623', '2306', '00,23,2306', '林甸县', '23', '黑龙江省', '2306', '大庆市', '230623', '林甸县', '', '', '', '', 3, 1, ''), ('230624', '2306', '00,23,2306', '杜尔伯特蒙古族自治县', '23', '黑龙江省', '2306', '大庆市', '230624', '杜尔伯特蒙古族自治县', '', '', '', '', 3, 1, ''), ('2307', '23', '00,23', '伊春市', '23', '黑龙江省', '2307', '伊春市', '', '', '', '', '', '', 2, 1, ''), ('230717', '2307', '00,23,2307', '伊美区', '23', '黑龙江省', '2307', '伊春市', '230717', '伊美区', '', '', '', '', 3, 1, ''), ('230718', '2307', '00,23,2307', '乌翠区', '23', '黑龙江省', '2307', '伊春市', '230718', '乌翠区', '', '', '', '', 3, 1, ''), ('230719', '2307', '00,23,2307', '友好区', '23', '黑龙江省', '2307', '伊春市', '230719', '友好区', '', '', '', '', 3, 1, ''), ('230722', '2307', '00,23,2307', '嘉荫县', '23', '黑龙江省', '2307', '伊春市', '230722', '嘉荫县', '', '', '', '', 3, 1, ''), ('230723', '2307', '00,23,2307', '汤旺县', '23', '黑龙江省', '2307', '伊春市', '230723', '汤旺县', '', '', '', '', 3, 1, ''), ('230724', '2307', '00,23,2307', '丰林县', '23', '黑龙江省', '2307', '伊春市', '230724', '丰林县', '', '', '', '', 3, 1, ''), ('230725', '2307', '00,23,2307', '大箐山县', '23', '黑龙江省', '2307', '伊春市', '230725', '大箐山县', '', '', '', '', 3, 1, ''), ('230726', '2307', '00,23,2307', '南岔县', '23', '黑龙江省', '2307', '伊春市', '230726', '南岔县', '', '', '', '', 3, 1, ''), ('230751', '2307', '00,23,2307', '金林区', '23', '黑龙江省', '2307', '伊春市', '230751', '金林区', '', '', '', '', 3, 1, ''), ('230781', '2307', '00,23,2307', '铁力市', '23', '黑龙江省', '2307', '伊春市', '230781', '铁力市', '', '', '', '', 3, 1, ''), ('2308', '23', '00,23', '佳木斯市', '23', '黑龙江省', '2308', '佳木斯市', '', '', '', '', '', '', 2, 1, ''), ('230803', '2308', '00,23,2308', '向阳区', '23', '黑龙江省', '2308', '佳木斯市', '230803', '向阳区', '', '', '', '', 3, 1, ''), ('230804', '2308', '00,23,2308', '前进区', '23', '黑龙江省', '2308', '佳木斯市', '230804', '前进区', '', '', '', '', 3, 1, ''), ('230805', '2308', '00,23,2308', '东风区', '23', '黑龙江省', '2308', '佳木斯市', '230805', '东风区', '', '', '', '', 3, 1, ''), ('230811', '2308', '00,23,2308', '郊区', '23', '黑龙江省', '2308', '佳木斯市', '230811', '郊区', '', '', '', '', 3, 1, ''), ('230822', '2308', '00,23,2308', '桦南县', '23', '黑龙江省', '2308', '佳木斯市', '230822', '桦南县', '', '', '', '', 3, 1, ''), ('230826', '2308', '00,23,2308', '桦川县', '23', '黑龙江省', '2308', '佳木斯市', '230826', '桦川县', '', '', '', '', 3, 1, ''), ('230828', '2308', '00,23,2308', '汤原县', '23', '黑龙江省', '2308', '佳木斯市', '230828', '汤原县', '', '', '', '', 3, 1, ''), ('230881', '2308', '00,23,2308', '同江市', '23', '黑龙江省', '2308', '佳木斯市', '230881', '同江市', '', '', '', '', 3, 1, ''), ('230882', '2308', '00,23,2308', '富锦市', '23', '黑龙江省', '2308', '佳木斯市', '230882', '富锦市', '', '', '', '', 3, 1, ''), ('230883', '2308', '00,23,2308', '抚远市', '23', '黑龙江省', '2308', '佳木斯市', '230883', '抚远市', '', '', '', '', 3, 1, ''), ('2309', '23', '00,23', '七台河市', '23', '黑龙江省', '2309', '七台河市', '', '', '', '', '', '', 2, 1, ''), ('230902', '2309', '00,23,2309', '新兴区', '23', '黑龙江省', '2309', '七台河市', '230902', '新兴区', '', '', '', '', 3, 1, ''), ('230903', '2309', '00,23,2309', '桃山区', '23', '黑龙江省', '2309', '七台河市', '230903', '桃山区', '', '', '', '', 3, 1, ''), ('230904', '2309', '00,23,2309', '茄子河区', '23', '黑龙江省', '2309', '七台河市', '230904', '茄子河区', '', '', '', '', 3, 1, ''), ('230921', '2309', '00,23,2309', '勃利县', '23', '黑龙江省', '2309', '七台河市', '230921', '勃利县', '', '', '', '', 3, 1, ''), ('2310', '23', '00,23', '牡丹江市', '23', '黑龙江省', '2310', '牡丹江市', '', '', '', '', '', '', 2, 1, ''), ('231002', '2310', '00,23,2310', '东安区', '23', '黑龙江省', '2310', '牡丹江市', '231002', '东安区', '', '', '', '', 3, 1, ''), ('231003', '2310', '00,23,2310', '阳明区', '23', '黑龙江省', '2310', '牡丹江市', '231003', '阳明区', '', '', '', '', 3, 1, ''), ('231004', '2310', '00,23,2310', '爱民区', '23', '黑龙江省', '2310', '牡丹江市', '231004', '爱民区', '', '', '', '', 3, 1, ''), ('231005', '2310', '00,23,2310', '西安区', '23', '黑龙江省', '2310', '牡丹江市', '231005', '西安区', '', '', '', '', 3, 1, ''), ('231025', '2310', '00,23,2310', '林口县', '23', '黑龙江省', '2310', '牡丹江市', '231025', '林口县', '', '', '', '', 3, 1, ''), ('231081', '2310', '00,23,2310', '绥芬河市', '23', '黑龙江省', '2310', '牡丹江市', '231081', '绥芬河市', '', '', '', '', 3, 1, ''), ('231083', '2310', '00,23,2310', '海林市', '23', '黑龙江省', '2310', '牡丹江市', '231083', '海林市', '', '', '', '', 3, 1, ''), ('231084', '2310', '00,23,2310', '宁安市', '23', '黑龙江省', '2310', '牡丹江市', '231084', '宁安市', '', '', '', '', 3, 1, ''), ('231085', '2310', '00,23,2310', '穆棱市', '23', '黑龙江省', '2310', '牡丹江市', '231085', '穆棱市', '', '', '', '', 3, 1, ''), ('231086', '2310', '00,23,2310', '东宁市', '23', '黑龙江省', '2310', '牡丹江市', '231086', '东宁市', '', '', '', '', 3, 1, ''), ('2311', '23', '00,23', '黑河市', '23', '黑龙江省', '2311', '黑河市', '', '', '', '', '', '', 2, 1, ''), ('231102', '2311', '00,23,2311', '爱辉区', '23', '黑龙江省', '2311', '黑河市', '231102', '爱辉区', '', '', '', '', 3, 1, ''), ('231123', '2311', '00,23,2311', '逊克县', '23', '黑龙江省', '2311', '黑河市', '231123', '逊克县', '', '', '', '', 3, 1, ''), ('231124', '2311', '00,23,2311', '孙吴县', '23', '黑龙江省', '2311', '黑河市', '231124', '孙吴县', '', '', '', '', 3, 1, ''), ('231181', '2311', '00,23,2311', '北安市', '23', '黑龙江省', '2311', '黑河市', '231181', '北安市', '', '', '', '', 3, 1, ''), ('231182', '2311', '00,23,2311', '五大连池市', '23', '黑龙江省', '2311', '黑河市', '231182', '五大连池市', '', '', '', '', 3, 1, ''), ('231183', '2311', '00,23,2311', '嫩江市', '23', '黑龙江省', '2311', '黑河市', '231183', '嫩江市', '', '', '', '', 3, 1, ''), ('2312', '23', '00,23', '绥化市', '23', '黑龙江省', '2312', '绥化市', '', '', '', '', '', '', 2, 1, ''), ('231202', '2312', '00,23,2312', '北林区', '23', '黑龙江省', '2312', '绥化市', '231202', '北林区', '', '', '', '', 3, 1, ''), ('231221', '2312', '00,23,2312', '望奎县', '23', '黑龙江省', '2312', '绥化市', '231221', '望奎县', '', '', '', '', 3, 1, ''), ('231222', '2312', '00,23,2312', '兰西县', '23', '黑龙江省', '2312', '绥化市', '231222', '兰西县', '', '', '', '', 3, 1, ''), ('231223', '2312', '00,23,2312', '青冈县', '23', '黑龙江省', '2312', '绥化市', '231223', '青冈县', '', '', '', '', 3, 1, ''), ('231224', '2312', '00,23,2312', '庆安县', '23', '黑龙江省', '2312', '绥化市', '231224', '庆安县', '', '', '', '', 3, 1, ''), ('231225', '2312', '00,23,2312', '明水县', '23', '黑龙江省', '2312', '绥化市', '231225', '明水县', '', '', '', '', 3, 1, ''), ('231226', '2312', '00,23,2312', '绥棱县', '23', '黑龙江省', '2312', '绥化市', '231226', '绥棱县', '', '', '', '', 3, 1, ''), ('231281', '2312', '00,23,2312', '安达市', '23', '黑龙江省', '2312', '绥化市', '231281', '安达市', '', '', '', '', 3, 1, ''), ('231282', '2312', '00,23,2312', '肇东市', '23', '黑龙江省', '2312', '绥化市', '231282', '肇东市', '', '', '', '', 3, 1, ''), ('231283', '2312', '00,23,2312', '海伦市', '23', '黑龙江省', '2312', '绥化市', '231283', '海伦市', '', '', '', '', 3, 1, ''), ('2327', '23', '00,23', '大兴安岭地区', '23', '黑龙江省', '2327', '大兴安岭地区', '', '', '', '', '', '', 2, 1, ''), ('232701', '2327', '00,23,2327', '漠河市', '23', '黑龙江省', '2327', '大兴安岭地区', '232701', '漠河市', '', '', '', '', 3, 1, ''), ('232721', '2327', '00,23,2327', '呼玛县', '23', '黑龙江省', '2327', '大兴安岭地区', '232721', '呼玛县', '', '', '', '', 3, 1, ''), ('232722', '2327', '00,23,2327', '塔河县', '23', '黑龙江省', '2327', '大兴安岭地区', '232722', '塔河县', '', '', '', '', 3, 1, ''), ('31', '00', '00', '上海市', '31', '上海市', '', '', '', '', '', '', '', '', 1, 1, ''), ('3101', '31', '00,31', '上海市', '31', '上海市', '3101', '上海市', '', '', '', '', '', '', 2, 1, ''), ('310101', '3101', '00,31,3101', '黄浦区', '31', '上海市', '3101', '上海市', '310101', '黄浦区', '', '', '', '', 3, 1, ''), ('310104', '3101', '00,31,3101', '徐汇区', '31', '上海市', '3101', '上海市', '310104', '徐汇区', '', '', '', '', 3, 1, ''), ('310105', '3101', '00,31,3101', '长宁区', '31', '上海市', '3101', '上海市', '310105', '长宁区', '', '', '', '', 3, 1, ''), ('310106', '3101', '00,31,3101', '静安区', '31', '上海市', '3101', '上海市', '310106', '静安区', '', '', '', '', 3, 1, ''), ('310107', '3101', '00,31,3101', '普陀区', '31', '上海市', '3101', '上海市', '310107', '普陀区', '', '', '', '', 3, 1, ''), ('310109', '3101', '00,31,3101', '虹口区', '31', '上海市', '3101', '上海市', '310109', '虹口区', '', '', '', '', 3, 1, ''), ('310110', '3101', '00,31,3101', '杨浦区', '31', '上海市', '3101', '上海市', '310110', '杨浦区', '', '', '', '', 3, 1, ''), ('310112', '3101', '00,31,3101', '闵行区', '31', '上海市', '3101', '上海市', '310112', '闵行区', '', '', '', '', 3, 1, ''), ('310113', '3101', '00,31,3101', '宝山区', '31', '上海市', '3101', '上海市', '310113', '宝山区', '', '', '', '', 3, 1, ''), ('310114', '3101', '00,31,3101', '嘉定区', '31', '上海市', '3101', '上海市', '310114', '嘉定区', '', '', '', '', 3, 1, ''), ('310115', '3101', '00,31,3101', '浦东新区', '31', '上海市', '3101', '上海市', '310115', '浦东新区', '', '', '', '', 3, 1, ''), ('310116', '3101', '00,31,3101', '金山区', '31', '上海市', '3101', '上海市', '310116', '金山区', '', '', '', '', 3, 1, ''), ('310117', '3101', '00,31,3101', '松江区', '31', '上海市', '3101', '上海市', '310117', '松江区', '', '', '', '', 3, 1, ''), ('310118', '3101', '00,31,3101', '青浦区', '31', '上海市', '3101', '上海市', '310118', '青浦区', '', '', '', '', 3, 1, ''), ('310120', '3101', '00,31,3101', '奉贤区', '31', '上海市', '3101', '上海市', '310120', '奉贤区', '', '', '', '', 3, 1, ''), ('310151', '3101', '00,31,3101', '崇明区', '31', '上海市', '3101', '上海市', '310151', '崇明区', '', '', '', '', 3, 1, ''), ('32', '00', '00', '江苏省', '32', '江苏省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3201', '32', '00,32', '南京市', '32', '江苏省', '3201', '南京市', '', '', '', '', '', '', 2, 1, ''), ('320102', '3201', '00,32,3201', '玄武区', '32', '江苏省', '3201', '南京市', '320102', '玄武区', '', '', '', '', 3, 1, ''), ('320104', '3201', '00,32,3201', '秦淮区', '32', '江苏省', '3201', '南京市', '320104', '秦淮区', '', '', '', '', 3, 1, ''), ('320105', '3201', '00,32,3201', '建邺区', '32', '江苏省', '3201', '南京市', '320105', '建邺区', '', '', '', '', 3, 1, ''), ('320106', '3201', '00,32,3201', '鼓楼区', '32', '江苏省', '3201', '南京市', '320106', '鼓楼区', '', '', '', '', 3, 1, ''), ('320111', '3201', '00,32,3201', '浦口区', '32', '江苏省', '3201', '南京市', '320111', '浦口区', '', '', '', '', 3, 1, ''), ('320113', '3201', '00,32,3201', '栖霞区', '32', '江苏省', '3201', '南京市', '320113', '栖霞区', '', '', '', '', 3, 1, ''), ('320114', '3201', '00,32,3201', '雨花台区', '32', '江苏省', '3201', '南京市', '320114', '雨花台区', '', '', '', '', 3, 1, ''), ('320115', '3201', '00,32,3201', '江宁区', '32', '江苏省', '3201', '南京市', '320115', '江宁区', '', '', '', '', 3, 1, ''), ('320116', '3201', '00,32,3201', '六合区', '32', '江苏省', '3201', '南京市', '320116', '六合区', '', '', '', '', 3, 1, ''), ('320117', '3201', '00,32,3201', '溧水区', '32', '江苏省', '3201', '南京市', '320117', '溧水区', '', '', '', '', 3, 1, ''), ('320118', '3201', '00,32,3201', '高淳区', '32', '江苏省', '3201', '南京市', '320118', '高淳区', '', '', '', '', 3, 1, ''), ('3202', '32', '00,32', '无锡市', '32', '江苏省', '3202', '无锡市', '', '', '', '', '', '', 2, 1, ''), ('320205', '3202', '00,32,3202', '锡山区', '32', '江苏省', '3202', '无锡市', '320205', '锡山区', '', '', '', '', 3, 1, ''), ('320206', '3202', '00,32,3202', '惠山区', '32', '江苏省', '3202', '无锡市', '320206', '惠山区', '', '', '', '', 3, 1, ''), ('320211', '3202', '00,32,3202', '滨湖区', '32', '江苏省', '3202', '无锡市', '320211', '滨湖区', '', '', '', '', 3, 1, ''), ('320213', '3202', '00,32,3202', '梁溪区', '32', '江苏省', '3202', '无锡市', '320213', '梁溪区', '', '', '', '', 3, 1, ''), ('320214', '3202', '00,32,3202', '新吴区', '32', '江苏省', '3202', '无锡市', '320214', '新吴区', '', '', '', '', 3, 1, ''), ('320281', '3202', '00,32,3202', '江阴市', '32', '江苏省', '3202', '无锡市', '320281', '江阴市', '', '', '', '', 3, 1, ''), ('320282', '3202', '00,32,3202', '宜兴市', '32', '江苏省', '3202', '无锡市', '320282', '宜兴市', '', '', '', '', 3, 1, ''), ('3203', '32', '00,32', '徐州市', '32', '江苏省', '3203', '徐州市', '', '', '', '', '', '', 2, 1, ''), ('320302', '3203', '00,32,3203', '鼓楼区', '32', '江苏省', '3203', '徐州市', '320302', '鼓楼区', '', '', '', '', 3, 1, ''), ('320303', '3203', '00,32,3203', '云龙区', '32', '江苏省', '3203', '徐州市', '320303', '云龙区', '', '', '', '', 3, 1, ''), ('320305', '3203', '00,32,3203', '贾汪区', '32', '江苏省', '3203', '徐州市', '320305', '贾汪区', '', '', '', '', 3, 1, ''), ('320311', '3203', '00,32,3203', '泉山区', '32', '江苏省', '3203', '徐州市', '320311', '泉山区', '', '', '', '', 3, 1, ''), ('320312', '3203', '00,32,3203', '铜山区', '32', '江苏省', '3203', '徐州市', '320312', '铜山区', '', '', '', '', 3, 1, ''), ('320321', '3203', '00,32,3203', '丰县', '32', '江苏省', '3203', '徐州市', '320321', '丰县', '', '', '', '', 3, 1, ''), ('320322', '3203', '00,32,3203', '沛县', '32', '江苏省', '3203', '徐州市', '320322', '沛县', '', '', '', '', 3, 1, ''), ('320324', '3203', '00,32,3203', '睢宁县', '32', '江苏省', '3203', '徐州市', '320324', '睢宁县', '', '', '', '', 3, 1, ''), ('320381', '3203', '00,32,3203', '新沂市', '32', '江苏省', '3203', '徐州市', '320381', '新沂市', '', '', '', '', 3, 1, ''), ('320382', '3203', '00,32,3203', '邳州市', '32', '江苏省', '3203', '徐州市', '320382', '邳州市', '', '', '', '', 3, 1, ''), ('3204', '32', '00,32', '常州市', '32', '江苏省', '3204', '常州市', '', '', '', '', '', '', 2, 1, ''), ('320402', '3204', '00,32,3204', '天宁区', '32', '江苏省', '3204', '常州市', '320402', '天宁区', '', '', '', '', 3, 1, ''), ('320404', '3204', '00,32,3204', '钟楼区', '32', '江苏省', '3204', '常州市', '320404', '钟楼区', '', '', '', '', 3, 1, ''), ('320411', '3204', '00,32,3204', '新北区', '32', '江苏省', '3204', '常州市', '320411', '新北区', '', '', '', '', 3, 1, ''), ('320412', '3204', '00,32,3204', '武进区', '32', '江苏省', '3204', '常州市', '320412', '武进区', '', '', '', '', 3, 1, ''), ('320413', '3204', '00,32,3204', '金坛区', '32', '江苏省', '3204', '常州市', '320413', '金坛区', '', '', '', '', 3, 1, ''), ('320481', '3204', '00,32,3204', '溧阳市', '32', '江苏省', '3204', '常州市', '320481', '溧阳市', '', '', '', '', 3, 1, ''), ('3205', '32', '00,32', '苏州市', '32', '江苏省', '3205', '苏州市', '', '', '', '', '', '', 2, 1, ''), ('320505', '3205', '00,32,3205', '虎丘区', '32', '江苏省', '3205', '苏州市', '320505', '虎丘区', '', '', '', '', 3, 1, ''), ('320506', '3205', '00,32,3205', '吴中区', '32', '江苏省', '3205', '苏州市', '320506', '吴中区', '', '', '', '', 3, 1, ''), ('320507', '3205', '00,32,3205', '相城区', '32', '江苏省', '3205', '苏州市', '320507', '相城区', '', '', '', '', 3, 1, ''), ('320508', '3205', '00,32,3205', '姑苏区', '32', '江苏省', '3205', '苏州市', '320508', '姑苏区', '', '', '', '', 3, 1, ''), ('320509', '3205', '00,32,3205', '吴江区', '32', '江苏省', '3205', '苏州市', '320509', '吴江区', '', '', '', '', 3, 1, ''), ('320581', '3205', '00,32,3205', '常熟市', '32', '江苏省', '3205', '苏州市', '320581', '常熟市', '', '', '', '', 3, 1, ''), ('320582', '3205', '00,32,3205', '张家港市', '32', '江苏省', '3205', '苏州市', '320582', '张家港市', '', '', '', '', 3, 1, ''), ('320583', '3205', '00,32,3205', '昆山市', '32', '江苏省', '3205', '苏州市', '320583', '昆山市', '', '', '', '', 3, 1, ''), ('320585', '3205', '00,32,3205', '太仓市', '32', '江苏省', '3205', '苏州市', '320585', '太仓市', '', '', '', '', 3, 1, ''), ('3206', '32', '00,32', '南通市', '32', '江苏省', '3206', '南通市', '', '', '', '', '', '', 2, 1, ''), ('320602', '3206', '00,32,3206', '崇川区', '32', '江苏省', '3206', '南通市', '320602', '崇川区', '', '', '', '', 3, 1, ''), ('320611', '3206', '00,32,3206', '港闸区', '32', '江苏省', '3206', '南通市', '320611', '港闸区', '', '', '', '', 3, 1, ''), ('320612', '3206', '00,32,3206', '通州区', '32', '江苏省', '3206', '南通市', '320612', '通州区', '', '', '', '', 3, 1, ''), ('320623', '3206', '00,32,3206', '如东县', '32', '江苏省', '3206', '南通市', '320623', '如东县', '', '', '', '', 3, 1, ''), ('320681', '3206', '00,32,3206', '启东市', '32', '江苏省', '3206', '南通市', '320681', '启东市', '', '', '', '', 3, 1, ''), ('320682', '3206', '00,32,3206', '如皋市', '32', '江苏省', '3206', '南通市', '320682', '如皋市', '', '', '', '', 3, 1, ''), ('320684', '3206', '00,32,3206', '海门市', '32', '江苏省', '3206', '南通市', '320684', '海门市', '', '', '', '', 3, 1, ''), ('320685', '3206', '00,32,3206', '海安市', '32', '江苏省', '3206', '南通市', '320685', '海安市', '', '', '', '', 3, 1, ''), ('3207', '32', '00,32', '连云港市', '32', '江苏省', '3207', '连云港市', '', '', '', '', '', '', 2, 1, ''), ('320703', '3207', '00,32,3207', '连云区', '32', '江苏省', '3207', '连云港市', '320703', '连云区', '', '', '', '', 3, 1, ''), ('320706', '3207', '00,32,3207', '海州区', '32', '江苏省', '3207', '连云港市', '320706', '海州区', '', '', '', '', 3, 1, ''), ('320707', '3207', '00,32,3207', '赣榆区', '32', '江苏省', '3207', '连云港市', '320707', '赣榆区', '', '', '', '', 3, 1, ''), ('320722', '3207', '00,32,3207', '东海县', '32', '江苏省', '3207', '连云港市', '320722', '东海县', '', '', '', '', 3, 1, ''), ('320723', '3207', '00,32,3207', '灌云县', '32', '江苏省', '3207', '连云港市', '320723', '灌云县', '', '', '', '', 3, 1, ''), ('320724', '3207', '00,32,3207', '灌南县', '32', '江苏省', '3207', '连云港市', '320724', '灌南县', '', '', '', '', 3, 1, ''), ('3208', '32', '00,32', '淮安市', '32', '江苏省', '3208', '淮安市', '', '', '', '', '', '', 2, 1, ''), ('320803', '3208', '00,32,3208', '淮安区', '32', '江苏省', '3208', '淮安市', '320803', '淮安区', '', '', '', '', 3, 1, ''), ('320804', '3208', '00,32,3208', '淮阴区', '32', '江苏省', '3208', '淮安市', '320804', '淮阴区', '', '', '', '', 3, 1, ''), ('320812', '3208', '00,32,3208', '清江浦区', '32', '江苏省', '3208', '淮安市', '320812', '清江浦区', '', '', '', '', 3, 1, ''), ('320813', '3208', '00,32,3208', '洪泽区', '32', '江苏省', '3208', '淮安市', '320813', '洪泽区', '', '', '', '', 3, 1, ''), ('320826', '3208', '00,32,3208', '涟水县', '32', '江苏省', '3208', '淮安市', '320826', '涟水县', '', '', '', '', 3, 1, ''), ('320830', '3208', '00,32,3208', '盱眙县', '32', '江苏省', '3208', '淮安市', '320830', '盱眙县', '', '', '', '', 3, 1, ''), ('320831', '3208', '00,32,3208', '金湖县', '32', '江苏省', '3208', '淮安市', '320831', '金湖县', '', '', '', '', 3, 1, ''), ('3209', '32', '00,32', '盐城市', '32', '江苏省', '3209', '盐城市', '', '', '', '', '', '', 2, 1, ''), ('320902', '3209', '00,32,3209', '亭湖区', '32', '江苏省', '3209', '盐城市', '320902', '亭湖区', '', '', '', '', 3, 1, ''), ('320903', '3209', '00,32,3209', '盐都区', '32', '江苏省', '3209', '盐城市', '320903', '盐都区', '', '', '', '', 3, 1, ''), ('320904', '3209', '00,32,3209', '大丰区', '32', '江苏省', '3209', '盐城市', '320904', '大丰区', '', '', '', '', 3, 1, ''), ('320921', '3209', '00,32,3209', '响水县', '32', '江苏省', '3209', '盐城市', '320921', '响水县', '', '', '', '', 3, 1, ''), ('320922', '3209', '00,32,3209', '滨海县', '32', '江苏省', '3209', '盐城市', '320922', '滨海县', '', '', '', '', 3, 1, ''), ('320923', '3209', '00,32,3209', '阜宁县', '32', '江苏省', '3209', '盐城市', '320923', '阜宁县', '', '', '', '', 3, 1, ''), ('320924', '3209', '00,32,3209', '射阳县', '32', '江苏省', '3209', '盐城市', '320924', '射阳县', '', '', '', '', 3, 1, ''), ('320925', '3209', '00,32,3209', '建湖县', '32', '江苏省', '3209', '盐城市', '320925', '建湖县', '', '', '', '', 3, 1, ''), ('320981', '3209', '00,32,3209', '东台市', '32', '江苏省', '3209', '盐城市', '320981', '东台市', '', '', '', '', 3, 1, ''), ('3210', '32', '00,32', '扬州市', '32', '江苏省', '3210', '扬州市', '', '', '', '', '', '', 2, 1, ''), ('321002', '3210', '00,32,3210', '广陵区', '32', '江苏省', '3210', '扬州市', '321002', '广陵区', '', '', '', '', 3, 1, ''), ('321003', '3210', '00,32,3210', '邗江区', '32', '江苏省', '3210', '扬州市', '321003', '邗江区', '', '', '', '', 3, 1, ''), ('321012', '3210', '00,32,3210', '江都区', '32', '江苏省', '3210', '扬州市', '321012', '江都区', '', '', '', '', 3, 1, ''), ('321023', '3210', '00,32,3210', '宝应县', '32', '江苏省', '3210', '扬州市', '321023', '宝应县', '', '', '', '', 3, 1, ''), ('321081', '3210', '00,32,3210', '仪征市', '32', '江苏省', '3210', '扬州市', '321081', '仪征市', '', '', '', '', 3, 1, ''), ('321084', '3210', '00,32,3210', '高邮市', '32', '江苏省', '3210', '扬州市', '321084', '高邮市', '', '', '', '', 3, 1, ''), ('3211', '32', '00,32', '镇江市', '32', '江苏省', '3211', '镇江市', '', '', '', '', '', '', 2, 1, ''), ('321102', '3211', '00,32,3211', '京口区', '32', '江苏省', '3211', '镇江市', '321102', '京口区', '', '', '', '', 3, 1, ''), ('321111', '3211', '00,32,3211', '润州区', '32', '江苏省', '3211', '镇江市', '321111', '润州区', '', '', '', '', 3, 1, ''), ('321112', '3211', '00,32,3211', '丹徒区', '32', '江苏省', '3211', '镇江市', '321112', '丹徒区', '', '', '', '', 3, 1, ''), ('321181', '3211', '00,32,3211', '丹阳市', '32', '江苏省', '3211', '镇江市', '321181', '丹阳市', '', '', '', '', 3, 1, ''), ('321182', '3211', '00,32,3211', '扬中市', '32', '江苏省', '3211', '镇江市', '321182', '扬中市', '', '', '', '', 3, 1, ''), ('321183', '3211', '00,32,3211', '句容市', '32', '江苏省', '3211', '镇江市', '321183', '句容市', '', '', '', '', 3, 1, ''), ('3212', '32', '00,32', '泰州市', '32', '江苏省', '3212', '泰州市', '', '', '', '', '', '', 2, 1, ''), ('321202', '3212', '00,32,3212', '海陵区', '32', '江苏省', '3212', '泰州市', '321202', '海陵区', '', '', '', '', 3, 1, ''), ('321203', '3212', '00,32,3212', '高港区', '32', '江苏省', '3212', '泰州市', '321203', '高港区', '', '', '', '', 3, 1, ''), ('321204', '3212', '00,32,3212', '姜堰区', '32', '江苏省', '3212', '泰州市', '321204', '姜堰区', '', '', '', '', 3, 1, ''), ('321281', '3212', '00,32,3212', '兴化市', '32', '江苏省', '3212', '泰州市', '321281', '兴化市', '', '', '', '', 3, 1, ''), ('321282', '3212', '00,32,3212', '靖江市', '32', '江苏省', '3212', '泰州市', '321282', '靖江市', '', '', '', '', 3, 1, ''), ('321283', '3212', '00,32,3212', '泰兴市', '32', '江苏省', '3212', '泰州市', '321283', '泰兴市', '', '', '', '', 3, 1, ''), ('3213', '32', '00,32', '宿迁市', '32', '江苏省', '3213', '宿迁市', '', '', '', '', '', '', 2, 1, ''), ('321302', '3213', '00,32,3213', '宿城区', '32', '江苏省', '3213', '宿迁市', '321302', '宿城区', '', '', '', '', 3, 1, ''), ('321311', '3213', '00,32,3213', '宿豫区', '32', '江苏省', '3213', '宿迁市', '321311', '宿豫区', '', '', '', '', 3, 1, ''), ('321322', '3213', '00,32,3213', '沭阳县', '32', '江苏省', '3213', '宿迁市', '321322', '沭阳县', '', '', '', '', 3, 1, ''), ('321323', '3213', '00,32,3213', '泗阳县', '32', '江苏省', '3213', '宿迁市', '321323', '泗阳县', '', '', '', '', 3, 1, ''), ('321324', '3213', '00,32,3213', '泗洪县', '32', '江苏省', '3213', '宿迁市', '321324', '泗洪县', '', '', '', '', 3, 1, ''), ('33', '00', '00', '浙江省', '33', '浙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3301', '33', '00,33', '杭州市', '33', '浙江省', '3301', '杭州市', '', '', '', '', '', '', 2, 1, ''), ('330102', '3301', '00,33,3301', '上城区', '33', '浙江省', '3301', '杭州市', '330102', '上城区', '', '', '', '', 3, 1, ''), ('330103', '3301', '00,33,3301', '下城区', '33', '浙江省', '3301', '杭州市', '330103', '下城区', '', '', '', '', 3, 1, ''), ('330104', '3301', '00,33,3301', '江干区', '33', '浙江省', '3301', '杭州市', '330104', '江干区', '', '', '', '', 3, 1, ''), ('330105', '3301', '00,33,3301', '拱墅区', '33', '浙江省', '3301', '杭州市', '330105', '拱墅区', '', '', '', '', 3, 1, ''), ('330106', '3301', '00,33,3301', '西湖区', '33', '浙江省', '3301', '杭州市', '330106', '西湖区', '', '', '', '', 3, 1, ''), ('330108', '3301', '00,33,3301', '滨江区', '33', '浙江省', '3301', '杭州市', '330108', '滨江区', '', '', '', '', 3, 1, ''), ('330109', '3301', '00,33,3301', '萧山区', '33', '浙江省', '3301', '杭州市', '330109', '萧山区', '', '', '', '', 3, 1, ''), ('330110', '3301', '00,33,3301', '余杭区', '33', '浙江省', '3301', '杭州市', '330110', '余杭区', '', '', '', '', 3, 1, ''), ('330111', '3301', '00,33,3301', '富阳区', '33', '浙江省', '3301', '杭州市', '330111', '富阳区', '', '', '', '', 3, 1, ''), ('330112', '3301', '00,33,3301', '临安区', '33', '浙江省', '3301', '杭州市', '330112', '临安区', '', '', '', '', 3, 1, ''), ('330122', '3301', '00,33,3301', '桐庐县', '33', '浙江省', '3301', '杭州市', '330122', '桐庐县', '', '', '', '', 3, 1, ''), ('330127', '3301', '00,33,3301', '淳安县', '33', '浙江省', '3301', '杭州市', '330127', '淳安县', '', '', '', '', 3, 1, ''), ('330182', '3301', '00,33,3301', '建德市', '33', '浙江省', '3301', '杭州市', '330182', '建德市', '', '', '', '', 3, 1, ''), ('3302', '33', '00,33', '宁波市', '33', '浙江省', '3302', '宁波市', '', '', '', '', '', '', 2, 1, ''), ('330203', '3302', '00,33,3302', '海曙区', '33', '浙江省', '3302', '宁波市', '330203', '海曙区', '', '', '', '', 3, 1, ''), ('330205', '3302', '00,33,3302', '江北区', '33', '浙江省', '3302', '宁波市', '330205', '江北区', '', '', '', '', 3, 1, ''), ('330206', '3302', '00,33,3302', '北仑区', '33', '浙江省', '3302', '宁波市', '330206', '北仑区', '', '', '', '', 3, 1, ''), ('330211', '3302', '00,33,3302', '镇海区', '33', '浙江省', '3302', '宁波市', '330211', '镇海区', '', '', '', '', 3, 1, ''), ('330212', '3302', '00,33,3302', '鄞州区', '33', '浙江省', '3302', '宁波市', '330212', '鄞州区', '', '', '', '', 3, 1, ''), ('330213', '3302', '00,33,3302', '奉化区', '33', '浙江省', '3302', '宁波市', '330213', '奉化区', '', '', '', '', 3, 1, ''), ('330225', '3302', '00,33,3302', '象山县', '33', '浙江省', '3302', '宁波市', '330225', '象山县', '', '', '', '', 3, 1, ''), ('330226', '3302', '00,33,3302', '宁海县', '33', '浙江省', '3302', '宁波市', '330226', '宁海县', '', '', '', '', 3, 1, ''), ('330281', '3302', '00,33,3302', '余姚市', '33', '浙江省', '3302', '宁波市', '330281', '余姚市', '', '', '', '', 3, 1, ''), ('330282', '3302', '00,33,3302', '慈溪市', '33', '浙江省', '3302', '宁波市', '330282', '慈溪市', '', '', '', '', 3, 1, ''), ('3303', '33', '00,33', '温州市', '33', '浙江省', '3303', '温州市', '', '', '', '', '', '', 2, 1, ''), ('330302', '3303', '00,33,3303', '鹿城区', '33', '浙江省', '3303', '温州市', '330302', '鹿城区', '', '', '', '', 3, 1, ''), ('330303', '3303', '00,33,3303', '龙湾区', '33', '浙江省', '3303', '温州市', '330303', '龙湾区', '', '', '', '', 3, 1, ''), ('330304', '3303', '00,33,3303', '瓯海区', '33', '浙江省', '3303', '温州市', '330304', '瓯海区', '', '', '', '', 3, 1, ''), ('330305', '3303', '00,33,3303', '洞头区', '33', '浙江省', '3303', '温州市', '330305', '洞头区', '', '', '', '', 3, 1, ''), ('330324', '3303', '00,33,3303', '永嘉县', '33', '浙江省', '3303', '温州市', '330324', '永嘉县', '', '', '', '', 3, 1, ''), ('330326', '3303', '00,33,3303', '平阳县', '33', '浙江省', '3303', '温州市', '330326', '平阳县', '', '', '', '', 3, 1, ''), ('330327', '3303', '00,33,3303', '苍南县', '33', '浙江省', '3303', '温州市', '330327', '苍南县', '', '', '', '', 3, 1, ''), ('330328', '3303', '00,33,3303', '文成县', '33', '浙江省', '3303', '温州市', '330328', '文成县', '', '', '', '', 3, 1, ''), ('330329', '3303', '00,33,3303', '泰顺县', '33', '浙江省', '3303', '温州市', '330329', '泰顺县', '', '', '', '', 3, 1, ''), ('330381', '3303', '00,33,3303', '瑞安市', '33', '浙江省', '3303', '温州市', '330381', '瑞安市', '', '', '', '', 3, 1, ''), ('330382', '3303', '00,33,3303', '乐清市', '33', '浙江省', '3303', '温州市', '330382', '乐清市', '', '', '', '', 3, 1, ''), ('330383', '3303', '00,33,3303', '龙港市', '33', '浙江省', '3303', '温州市', '330383', '龙港市', '', '', '', '', 3, 1, ''), ('3304', '33', '00,33', '嘉兴市', '33', '浙江省', '3304', '嘉兴市', '', '', '', '', '', '', 2, 1, ''), ('330402', '3304', '00,33,3304', '南湖区', '33', '浙江省', '3304', '嘉兴市', '330402', '南湖区', '', '', '', '', 3, 1, ''), ('330411', '3304', '00,33,3304', '秀洲区', '33', '浙江省', '3304', '嘉兴市', '330411', '秀洲区', '', '', '', '', 3, 1, ''), ('330421', '3304', '00,33,3304', '嘉善县', '33', '浙江省', '3304', '嘉兴市', '330421', '嘉善县', '', '', '', '', 3, 1, ''), ('330424', '3304', '00,33,3304', '海盐县', '33', '浙江省', '3304', '嘉兴市', '330424', '海盐县', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('330481', '3304', '00,33,3304', '海宁市', '33', '浙江省', '3304', '嘉兴市', '330481', '海宁市', '', '', '', '', 3, 1, ''), ('330482', '3304', '00,33,3304', '平湖市', '33', '浙江省', '3304', '嘉兴市', '330482', '平湖市', '', '', '', '', 3, 1, ''), ('330483', '3304', '00,33,3304', '桐乡市', '33', '浙江省', '3304', '嘉兴市', '330483', '桐乡市', '', '', '', '', 3, 1, ''), ('3305', '33', '00,33', '湖州市', '33', '浙江省', '3305', '湖州市', '', '', '', '', '', '', 2, 1, ''), ('330502', '3305', '00,33,3305', '吴兴区', '33', '浙江省', '3305', '湖州市', '330502', '吴兴区', '', '', '', '', 3, 1, ''), ('330503', '3305', '00,33,3305', '南浔区', '33', '浙江省', '3305', '湖州市', '330503', '南浔区', '', '', '', '', 3, 1, ''), ('330521', '3305', '00,33,3305', '德清县', '33', '浙江省', '3305', '湖州市', '330521', '德清县', '', '', '', '', 3, 1, ''), ('330522', '3305', '00,33,3305', '长兴县', '33', '浙江省', '3305', '湖州市', '330522', '长兴县', '', '', '', '', 3, 1, ''), ('330523', '3305', '00,33,3305', '安吉县', '33', '浙江省', '3305', '湖州市', '330523', '安吉县', '', '', '', '', 3, 1, ''), ('3306', '33', '00,33', '绍兴市', '33', '浙江省', '3306', '绍兴市', '', '', '', '', '', '', 2, 1, ''), ('330602', '3306', '00,33,3306', '越城区', '33', '浙江省', '3306', '绍兴市', '330602', '越城区', '', '', '', '', 3, 1, ''), ('330603', '3306', '00,33,3306', '柯桥区', '33', '浙江省', '3306', '绍兴市', '330603', '柯桥区', '', '', '', '', 3, 1, ''), ('330604', '3306', '00,33,3306', '上虞区', '33', '浙江省', '3306', '绍兴市', '330604', '上虞区', '', '', '', '', 3, 1, ''), ('330624', '3306', '00,33,3306', '新昌县', '33', '浙江省', '3306', '绍兴市', '330624', '新昌县', '', '', '', '', 3, 1, ''), ('330681', '3306', '00,33,3306', '诸暨市', '33', '浙江省', '3306', '绍兴市', '330681', '诸暨市', '', '', '', '', 3, 1, ''), ('330683', '3306', '00,33,3306', '嵊州市', '33', '浙江省', '3306', '绍兴市', '330683', '嵊州市', '', '', '', '', 3, 1, ''), ('3307', '33', '00,33', '金华市', '33', '浙江省', '3307', '金华市', '', '', '', '', '', '', 2, 1, ''), ('330702', '3307', '00,33,3307', '婺城区', '33', '浙江省', '3307', '金华市', '330702', '婺城区', '', '', '', '', 3, 1, ''), ('330703', '3307', '00,33,3307', '金东区', '33', '浙江省', '3307', '金华市', '330703', '金东区', '', '', '', '', 3, 1, ''), ('330723', '3307', '00,33,3307', '武义县', '33', '浙江省', '3307', '金华市', '330723', '武义县', '', '', '', '', 3, 1, ''), ('330726', '3307', '00,33,3307', '浦江县', '33', '浙江省', '3307', '金华市', '330726', '浦江县', '', '', '', '', 3, 1, ''), ('330727', '3307', '00,33,3307', '磐安县', '33', '浙江省', '3307', '金华市', '330727', '磐安县', '', '', '', '', 3, 1, ''), ('330781', '3307', '00,33,3307', '兰溪市', '33', '浙江省', '3307', '金华市', '330781', '兰溪市', '', '', '', '', 3, 1, ''), ('330782', '3307', '00,33,3307', '义乌市', '33', '浙江省', '3307', '金华市', '330782', '义乌市', '', '', '', '', 3, 1, ''), ('330783', '3307', '00,33,3307', '东阳市', '33', '浙江省', '3307', '金华市', '330783', '东阳市', '', '', '', '', 3, 1, ''), ('330784', '3307', '00,33,3307', '永康市', '33', '浙江省', '3307', '金华市', '330784', '永康市', '', '', '', '', 3, 1, ''), ('3308', '33', '00,33', '衢州市', '33', '浙江省', '3308', '衢州市', '', '', '', '', '', '', 2, 1, ''), ('330802', '3308', '00,33,3308', '柯城区', '33', '浙江省', '3308', '衢州市', '330802', '柯城区', '', '', '', '', 3, 1, ''), ('330803', '3308', '00,33,3308', '衢江区', '33', '浙江省', '3308', '衢州市', '330803', '衢江区', '', '', '', '', 3, 1, ''), ('330822', '3308', '00,33,3308', '常山县', '33', '浙江省', '3308', '衢州市', '330822', '常山县', '', '', '', '', 3, 1, ''), ('330824', '3308', '00,33,3308', '开化县', '33', '浙江省', '3308', '衢州市', '330824', '开化县', '', '', '', '', 3, 1, ''), ('330825', '3308', '00,33,3308', '龙游县', '33', '浙江省', '3308', '衢州市', '330825', '龙游县', '', '', '', '', 3, 1, ''), ('330881', '3308', '00,33,3308', '江山市', '33', '浙江省', '3308', '衢州市', '330881', '江山市', '', '', '', '', 3, 1, ''), ('3309', '33', '00,33', '舟山市', '33', '浙江省', '3309', '舟山市', '', '', '', '', '', '', 2, 1, ''), ('330902', '3309', '00,33,3309', '定海区', '33', '浙江省', '3309', '舟山市', '330902', '定海区', '', '', '', '', 3, 1, ''), ('330903', '3309', '00,33,3309', '普陀区', '33', '浙江省', '3309', '舟山市', '330903', '普陀区', '', '', '', '', 3, 1, ''), ('330921', '3309', '00,33,3309', '岱山县', '33', '浙江省', '3309', '舟山市', '330921', '岱山县', '', '', '', '', 3, 1, ''), ('330922', '3309', '00,33,3309', '嵊泗县', '33', '浙江省', '3309', '舟山市', '330922', '嵊泗县', '', '', '', '', 3, 1, ''), ('3310', '33', '00,33', '台州市', '33', '浙江省', '3310', '台州市', '', '', '', '', '', '', 2, 1, ''), ('331002', '3310', '00,33,3310', '椒江区', '33', '浙江省', '3310', '台州市', '331002', '椒江区', '', '', '', '', 3, 1, ''), ('331003', '3310', '00,33,3310', '黄岩区', '33', '浙江省', '3310', '台州市', '331003', '黄岩区', '', '', '', '', 3, 1, ''), ('331004', '3310', '00,33,3310', '路桥区', '33', '浙江省', '3310', '台州市', '331004', '路桥区', '', '', '', '', 3, 1, ''), ('331022', '3310', '00,33,3310', '三门县', '33', '浙江省', '3310', '台州市', '331022', '三门县', '', '', '', '', 3, 1, ''), ('331023', '3310', '00,33,3310', '天台县', '33', '浙江省', '3310', '台州市', '331023', '天台县', '', '', '', '', 3, 1, ''), ('331024', '3310', '00,33,3310', '仙居县', '33', '浙江省', '3310', '台州市', '331024', '仙居县', '', '', '', '', 3, 1, ''), ('331081', '3310', '00,33,3310', '温岭市', '33', '浙江省', '3310', '台州市', '331081', '温岭市', '', '', '', '', 3, 1, ''), ('331082', '3310', '00,33,3310', '临海市', '33', '浙江省', '3310', '台州市', '331082', '临海市', '', '', '', '', 3, 1, ''), ('331083', '3310', '00,33,3310', '玉环市', '33', '浙江省', '3310', '台州市', '331083', '玉环市', '', '', '', '', 3, 1, ''), ('3311', '33', '00,33', '丽水市', '33', '浙江省', '3311', '丽水市', '', '', '', '', '', '', 2, 1, ''), ('331102', '3311', '00,33,3311', '莲都区', '33', '浙江省', '3311', '丽水市', '331102', '莲都区', '', '', '', '', 3, 1, ''), ('331121', '3311', '00,33,3311', '青田县', '33', '浙江省', '3311', '丽水市', '331121', '青田县', '', '', '', '', 3, 1, ''), ('331122', '3311', '00,33,3311', '缙云县', '33', '浙江省', '3311', '丽水市', '331122', '缙云县', '', '', '', '', 3, 1, ''), ('331123', '3311', '00,33,3311', '遂昌县', '33', '浙江省', '3311', '丽水市', '331123', '遂昌县', '', '', '', '', 3, 1, ''), ('331124', '3311', '00,33,3311', '松阳县', '33', '浙江省', '3311', '丽水市', '331124', '松阳县', '', '', '', '', 3, 1, ''), ('331125', '3311', '00,33,3311', '云和县', '33', '浙江省', '3311', '丽水市', '331125', '云和县', '', '', '', '', 3, 1, ''), ('331126', '3311', '00,33,3311', '庆元县', '33', '浙江省', '3311', '丽水市', '331126', '庆元县', '', '', '', '', 3, 1, ''), ('331127', '3311', '00,33,3311', '景宁畲族自治县', '33', '浙江省', '3311', '丽水市', '331127', '景宁畲族自治县', '', '', '', '', 3, 1, ''), ('331181', '3311', '00,33,3311', '龙泉市', '33', '浙江省', '3311', '丽水市', '331181', '龙泉市', '', '', '', '', 3, 1, ''), ('34', '00', '00', '安徽省', '34', '安徽省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3401', '34', '00,34', '合肥市', '34', '安徽省', '3401', '合肥市', '', '', '', '', '', '', 2, 1, ''), ('340102', '3401', '00,34,3401', '瑶海区', '34', '安徽省', '3401', '合肥市', '340102', '瑶海区', '', '', '', '', 3, 1, ''), ('340103', '3401', '00,34,3401', '庐阳区', '34', '安徽省', '3401', '合肥市', '340103', '庐阳区', '', '', '', '', 3, 1, ''), ('340104', '3401', '00,34,3401', '蜀山区', '34', '安徽省', '3401', '合肥市', '340104', '蜀山区', '', '', '', '', 3, 1, ''), ('340111', '3401', '00,34,3401', '包河区', '34', '安徽省', '3401', '合肥市', '340111', '包河区', '', '', '', '', 3, 1, ''), ('340121', '3401', '00,34,3401', '长丰县', '34', '安徽省', '3401', '合肥市', '340121', '长丰县', '', '', '', '', 3, 1, ''), ('340122', '3401', '00,34,3401', '肥东县', '34', '安徽省', '3401', '合肥市', '340122', '肥东县', '', '', '', '', 3, 1, ''), ('340123', '3401', '00,34,3401', '肥西县', '34', '安徽省', '3401', '合肥市', '340123', '肥西县', '', '', '', '', 3, 1, ''), ('340124', '3401', '00,34,3401', '庐江县', '34', '安徽省', '3401', '合肥市', '340124', '庐江县', '', '', '', '', 3, 1, ''), ('340181', '3401', '00,34,3401', '巢湖市', '34', '安徽省', '3401', '合肥市', '340181', '巢湖市', '', '', '', '', 3, 1, ''), ('3402', '34', '00,34', '芜湖市', '34', '安徽省', '3402', '芜湖市', '', '', '', '', '', '', 2, 1, ''), ('340202', '3402', '00,34,3402', '镜湖区', '34', '安徽省', '3402', '芜湖市', '340202', '镜湖区', '', '', '', '', 3, 1, ''), ('340203', '3402', '00,34,3402', '弋江区', '34', '安徽省', '3402', '芜湖市', '340203', '弋江区', '', '', '', '', 3, 1, ''), ('340207', '3402', '00,34,3402', '鸠江区', '34', '安徽省', '3402', '芜湖市', '340207', '鸠江区', '', '', '', '', 3, 1, ''), ('340208', '3402', '00,34,3402', '三山区', '34', '安徽省', '3402', '芜湖市', '340208', '三山区', '', '', '', '', 3, 1, ''), ('340221', '3402', '00,34,3402', '芜湖县', '34', '安徽省', '3402', '芜湖市', '340221', '芜湖县', '', '', '', '', 3, 1, ''), ('340222', '3402', '00,34,3402', '繁昌县', '34', '安徽省', '3402', '芜湖市', '340222', '繁昌县', '', '', '', '', 3, 1, ''), ('340223', '3402', '00,34,3402', '南陵县', '34', '安徽省', '3402', '芜湖市', '340223', '南陵县', '', '', '', '', 3, 1, ''), ('340281', '3402', '00,34,3402', '无为市', '34', '安徽省', '3402', '芜湖市', '340281', '无为市', '', '', '', '', 3, 1, ''), ('3403', '34', '00,34', '蚌埠市', '34', '安徽省', '3403', '蚌埠市', '', '', '', '', '', '', 2, 1, ''), ('340302', '3403', '00,34,3403', '龙子湖区', '34', '安徽省', '3403', '蚌埠市', '340302', '龙子湖区', '', '', '', '', 3, 1, ''), ('340303', '3403', '00,34,3403', '蚌山区', '34', '安徽省', '3403', '蚌埠市', '340303', '蚌山区', '', '', '', '', 3, 1, ''), ('340304', '3403', '00,34,3403', '禹会区', '34', '安徽省', '3403', '蚌埠市', '340304', '禹会区', '', '', '', '', 3, 1, ''), ('340311', '3403', '00,34,3403', '淮上区', '34', '安徽省', '3403', '蚌埠市', '340311', '淮上区', '', '', '', '', 3, 1, ''), ('340321', '3403', '00,34,3403', '怀远县', '34', '安徽省', '3403', '蚌埠市', '340321', '怀远县', '', '', '', '', 3, 1, ''), ('340322', '3403', '00,34,3403', '五河县', '34', '安徽省', '3403', '蚌埠市', '340322', '五河县', '', '', '', '', 3, 1, ''), ('340323', '3403', '00,34,3403', '固镇县', '34', '安徽省', '3403', '蚌埠市', '340323', '固镇县', '', '', '', '', 3, 1, ''), ('3404', '34', '00,34', '淮南市', '34', '安徽省', '3404', '淮南市', '', '', '', '', '', '', 2, 1, ''), ('340402', '3404', '00,34,3404', '大通区', '34', '安徽省', '3404', '淮南市', '340402', '大通区', '', '', '', '', 3, 1, ''), ('340403', '3404', '00,34,3404', '田家庵区', '34', '安徽省', '3404', '淮南市', '340403', '田家庵区', '', '', '', '', 3, 1, ''), ('340404', '3404', '00,34,3404', '谢家集区', '34', '安徽省', '3404', '淮南市', '340404', '谢家集区', '', '', '', '', 3, 1, ''), ('340405', '3404', '00,34,3404', '八公山区', '34', '安徽省', '3404', '淮南市', '340405', '八公山区', '', '', '', '', 3, 1, ''), ('340406', '3404', '00,34,3404', '潘集区', '34', '安徽省', '3404', '淮南市', '340406', '潘集区', '', '', '', '', 3, 1, ''), ('340421', '3404', '00,34,3404', '凤台县', '34', '安徽省', '3404', '淮南市', '340421', '凤台县', '', '', '', '', 3, 1, ''), ('340422', '3404', '00,34,3404', '寿县', '34', '安徽省', '3404', '淮南市', '340422', '寿县', '', '', '', '', 3, 1, ''), ('3405', '34', '00,34', '马鞍山市', '34', '安徽省', '3405', '马鞍山市', '', '', '', '', '', '', 2, 1, ''), ('340503', '3405', '00,34,3405', '花山区', '34', '安徽省', '3405', '马鞍山市', '340503', '花山区', '', '', '', '', 3, 1, ''), ('340504', '3405', '00,34,3405', '雨山区', '34', '安徽省', '3405', '马鞍山市', '340504', '雨山区', '', '', '', '', 3, 1, ''), ('340506', '3405', '00,34,3405', '博望区', '34', '安徽省', '3405', '马鞍山市', '340506', '博望区', '', '', '', '', 3, 1, ''), ('340521', '3405', '00,34,3405', '当涂县', '34', '安徽省', '3405', '马鞍山市', '340521', '当涂县', '', '', '', '', 3, 1, ''), ('340522', '3405', '00,34,3405', '含山县', '34', '安徽省', '3405', '马鞍山市', '340522', '含山县', '', '', '', '', 3, 1, ''), ('340523', '3405', '00,34,3405', '和县', '34', '安徽省', '3405', '马鞍山市', '340523', '和县', '', '', '', '', 3, 1, ''), ('3406', '34', '00,34', '淮北市', '34', '安徽省', '3406', '淮北市', '', '', '', '', '', '', 2, 1, ''), ('340602', '3406', '00,34,3406', '杜集区', '34', '安徽省', '3406', '淮北市', '340602', '杜集区', '', '', '', '', 3, 1, ''), ('340603', '3406', '00,34,3406', '相山区', '34', '安徽省', '3406', '淮北市', '340603', '相山区', '', '', '', '', 3, 1, ''), ('340604', '3406', '00,34,3406', '烈山区', '34', '安徽省', '3406', '淮北市', '340604', '烈山区', '', '', '', '', 3, 1, ''), ('340621', '3406', '00,34,3406', '濉溪县', '34', '安徽省', '3406', '淮北市', '340621', '濉溪县', '', '', '', '', 3, 1, ''), ('3407', '34', '00,34', '铜陵市', '34', '安徽省', '3407', '铜陵市', '', '', '', '', '', '', 2, 1, ''), ('340705', '3407', '00,34,3407', '铜官区', '34', '安徽省', '3407', '铜陵市', '340705', '铜官区', '', '', '', '', 3, 1, ''), ('340706', '3407', '00,34,3407', '义安区', '34', '安徽省', '3407', '铜陵市', '340706', '义安区', '', '', '', '', 3, 1, ''), ('340711', '3407', '00,34,3407', '郊区', '34', '安徽省', '3407', '铜陵市', '340711', '郊区', '', '', '', '', 3, 1, ''), ('340722', '3407', '00,34,3407', '枞阳县', '34', '安徽省', '3407', '铜陵市', '340722', '枞阳县', '', '', '', '', 3, 1, ''), ('3408', '34', '00,34', '安庆市', '34', '安徽省', '3408', '安庆市', '', '', '', '', '', '', 2, 1, ''), ('340802', '3408', '00,34,3408', '迎江区', '34', '安徽省', '3408', '安庆市', '340802', '迎江区', '', '', '', '', 3, 1, ''), ('340803', '3408', '00,34,3408', '大观区', '34', '安徽省', '3408', '安庆市', '340803', '大观区', '', '', '', '', 3, 1, ''), ('340811', '3408', '00,34,3408', '宜秀区', '34', '安徽省', '3408', '安庆市', '340811', '宜秀区', '', '', '', '', 3, 1, ''), ('340822', '3408', '00,34,3408', '怀宁县', '34', '安徽省', '3408', '安庆市', '340822', '怀宁县', '', '', '', '', 3, 1, ''), ('340825', '3408', '00,34,3408', '太湖县', '34', '安徽省', '3408', '安庆市', '340825', '太湖县', '', '', '', '', 3, 1, ''), ('340826', '3408', '00,34,3408', '宿松县', '34', '安徽省', '3408', '安庆市', '340826', '宿松县', '', '', '', '', 3, 1, ''), ('340827', '3408', '00,34,3408', '望江县', '34', '安徽省', '3408', '安庆市', '340827', '望江县', '', '', '', '', 3, 1, ''), ('340828', '3408', '00,34,3408', '岳西县', '34', '安徽省', '3408', '安庆市', '340828', '岳西县', '', '', '', '', 3, 1, ''), ('340881', '3408', '00,34,3408', '桐城市', '34', '安徽省', '3408', '安庆市', '340881', '桐城市', '', '', '', '', 3, 1, ''), ('340882', '3408', '00,34,3408', '潜山市', '34', '安徽省', '3408', '安庆市', '340882', '潜山市', '', '', '', '', 3, 1, ''), ('3410', '34', '00,34', '黄山市', '34', '安徽省', '3410', '黄山市', '', '', '', '', '', '', 2, 1, ''), ('341002', '3410', '00,34,3410', '屯溪区', '34', '安徽省', '3410', '黄山市', '341002', '屯溪区', '', '', '', '', 3, 1, ''), ('341003', '3410', '00,34,3410', '黄山区', '34', '安徽省', '3410', '黄山市', '341003', '黄山区', '', '', '', '', 3, 1, ''), ('341004', '3410', '00,34,3410', '徽州区', '34', '安徽省', '3410', '黄山市', '341004', '徽州区', '', '', '', '', 3, 1, ''), ('341021', '3410', '00,34,3410', '歙县', '34', '安徽省', '3410', '黄山市', '341021', '歙县', '', '', '', '', 3, 1, ''), ('341022', '3410', '00,34,3410', '休宁县', '34', '安徽省', '3410', '黄山市', '341022', '休宁县', '', '', '', '', 3, 1, ''), ('341023', '3410', '00,34,3410', '黟县', '34', '安徽省', '3410', '黄山市', '341023', '黟县', '', '', '', '', 3, 1, ''), ('341024', '3410', '00,34,3410', '祁门县', '34', '安徽省', '3410', '黄山市', '341024', '祁门县', '', '', '', '', 3, 1, ''), ('3411', '34', '00,34', '滁州市', '34', '安徽省', '3411', '滁州市', '', '', '', '', '', '', 2, 1, ''), ('341102', '3411', '00,34,3411', '琅琊区', '34', '安徽省', '3411', '滁州市', '341102', '琅琊区', '', '', '', '', 3, 1, ''), ('341103', '3411', '00,34,3411', '南谯区', '34', '安徽省', '3411', '滁州市', '341103', '南谯区', '', '', '', '', 3, 1, ''), ('341122', '3411', '00,34,3411', '来安县', '34', '安徽省', '3411', '滁州市', '341122', '来安县', '', '', '', '', 3, 1, ''), ('341124', '3411', '00,34,3411', '全椒县', '34', '安徽省', '3411', '滁州市', '341124', '全椒县', '', '', '', '', 3, 1, ''), ('341125', '3411', '00,34,3411', '定远县', '34', '安徽省', '3411', '滁州市', '341125', '定远县', '', '', '', '', 3, 1, ''), ('341126', '3411', '00,34,3411', '凤阳县', '34', '安徽省', '3411', '滁州市', '341126', '凤阳县', '', '', '', '', 3, 1, ''), ('341181', '3411', '00,34,3411', '天长市', '34', '安徽省', '3411', '滁州市', '341181', '天长市', '', '', '', '', 3, 1, ''), ('341182', '3411', '00,34,3411', '明光市', '34', '安徽省', '3411', '滁州市', '341182', '明光市', '', '', '', '', 3, 1, ''), ('3412', '34', '00,34', '阜阳市', '34', '安徽省', '3412', '阜阳市', '', '', '', '', '', '', 2, 1, ''), ('341202', '3412', '00,34,3412', '颍州区', '34', '安徽省', '3412', '阜阳市', '341202', '颍州区', '', '', '', '', 3, 1, ''), ('341203', '3412', '00,34,3412', '颍东区', '34', '安徽省', '3412', '阜阳市', '341203', '颍东区', '', '', '', '', 3, 1, ''), ('341204', '3412', '00,34,3412', '颍泉区', '34', '安徽省', '3412', '阜阳市', '341204', '颍泉区', '', '', '', '', 3, 1, ''), ('341221', '3412', '00,34,3412', '临泉县', '34', '安徽省', '3412', '阜阳市', '341221', '临泉县', '', '', '', '', 3, 1, ''), ('341222', '3412', '00,34,3412', '太和县', '34', '安徽省', '3412', '阜阳市', '341222', '太和县', '', '', '', '', 3, 1, ''), ('341225', '3412', '00,34,3412', '阜南县', '34', '安徽省', '3412', '阜阳市', '341225', '阜南县', '', '', '', '', 3, 1, ''), ('341226', '3412', '00,34,3412', '颍上县', '34', '安徽省', '3412', '阜阳市', '341226', '颍上县', '', '', '', '', 3, 1, ''), ('341282', '3412', '00,34,3412', '界首市', '34', '安徽省', '3412', '阜阳市', '341282', '界首市', '', '', '', '', 3, 1, ''), ('3413', '34', '00,34', '宿州市', '34', '安徽省', '3413', '宿州市', '', '', '', '', '', '', 2, 1, ''), ('341302', '3413', '00,34,3413', '埇桥区', '34', '安徽省', '3413', '宿州市', '341302', '埇桥区', '', '', '', '', 3, 1, ''), ('341321', '3413', '00,34,3413', '砀山县', '34', '安徽省', '3413', '宿州市', '341321', '砀山县', '', '', '', '', 3, 1, ''), ('341322', '3413', '00,34,3413', '萧县', '34', '安徽省', '3413', '宿州市', '341322', '萧县', '', '', '', '', 3, 1, ''), ('341323', '3413', '00,34,3413', '灵璧县', '34', '安徽省', '3413', '宿州市', '341323', '灵璧县', '', '', '', '', 3, 1, ''), ('341324', '3413', '00,34,3413', '泗县', '34', '安徽省', '3413', '宿州市', '341324', '泗县', '', '', '', '', 3, 1, ''), ('3415', '34', '00,34', '六安市', '34', '安徽省', '3415', '六安市', '', '', '', '', '', '', 2, 1, ''), ('341502', '3415', '00,34,3415', '金安区', '34', '安徽省', '3415', '六安市', '341502', '金安区', '', '', '', '', 3, 1, ''), ('341503', '3415', '00,34,3415', '裕安区', '34', '安徽省', '3415', '六安市', '341503', '裕安区', '', '', '', '', 3, 1, ''), ('341504', '3415', '00,34,3415', '叶集区', '34', '安徽省', '3415', '六安市', '341504', '叶集区', '', '', '', '', 3, 1, ''), ('341522', '3415', '00,34,3415', '霍邱县', '34', '安徽省', '3415', '六安市', '341522', '霍邱县', '', '', '', '', 3, 1, ''), ('341523', '3415', '00,34,3415', '舒城县', '34', '安徽省', '3415', '六安市', '341523', '舒城县', '', '', '', '', 3, 1, ''), ('341524', '3415', '00,34,3415', '金寨县', '34', '安徽省', '3415', '六安市', '341524', '金寨县', '', '', '', '', 3, 1, ''), ('341525', '3415', '00,34,3415', '霍山县', '34', '安徽省', '3415', '六安市', '341525', '霍山县', '', '', '', '', 3, 1, ''), ('3416', '34', '00,34', '亳州市', '34', '安徽省', '3416', '亳州市', '', '', '', '', '', '', 2, 1, ''), ('341602', '3416', '00,34,3416', '谯城区', '34', '安徽省', '3416', '亳州市', '341602', '谯城区', '', '', '', '', 3, 1, ''), ('341621', '3416', '00,34,3416', '涡阳县', '34', '安徽省', '3416', '亳州市', '341621', '涡阳县', '', '', '', '', 3, 1, ''), ('341622', '3416', '00,34,3416', '蒙城县', '34', '安徽省', '3416', '亳州市', '341622', '蒙城县', '', '', '', '', 3, 1, ''), ('341623', '3416', '00,34,3416', '利辛县', '34', '安徽省', '3416', '亳州市', '341623', '利辛县', '', '', '', '', 3, 1, ''), ('3417', '34', '00,34', '池州市', '34', '安徽省', '3417', '池州市', '', '', '', '', '', '', 2, 1, ''), ('341702', '3417', '00,34,3417', '贵池区', '34', '安徽省', '3417', '池州市', '341702', '贵池区', '', '', '', '', 3, 1, ''), ('341721', '3417', '00,34,3417', '东至县', '34', '安徽省', '3417', '池州市', '341721', '东至县', '', '', '', '', 3, 1, ''), ('341722', '3417', '00,34,3417', '石台县', '34', '安徽省', '3417', '池州市', '341722', '石台县', '', '', '', '', 3, 1, ''), ('341723', '3417', '00,34,3417', '青阳县', '34', '安徽省', '3417', '池州市', '341723', '青阳县', '', '', '', '', 3, 1, ''), ('3418', '34', '00,34', '宣城市', '34', '安徽省', '3418', '宣城市', '', '', '', '', '', '', 2, 1, ''), ('341802', '3418', '00,34,3418', '宣州区', '34', '安徽省', '3418', '宣城市', '341802', '宣州区', '', '', '', '', 3, 1, ''), ('341821', '3418', '00,34,3418', '郎溪县', '34', '安徽省', '3418', '宣城市', '341821', '郎溪县', '', '', '', '', 3, 1, ''), ('341823', '3418', '00,34,3418', '泾县', '34', '安徽省', '3418', '宣城市', '341823', '泾县', '', '', '', '', 3, 1, ''), ('341824', '3418', '00,34,3418', '绩溪县', '34', '安徽省', '3418', '宣城市', '341824', '绩溪县', '', '', '', '', 3, 1, ''), ('341825', '3418', '00,34,3418', '旌德县', '34', '安徽省', '3418', '宣城市', '341825', '旌德县', '', '', '', '', 3, 1, ''), ('341881', '3418', '00,34,3418', '宁国市', '34', '安徽省', '3418', '宣城市', '341881', '宁国市', '', '', '', '', 3, 1, ''), ('341882', '3418', '00,34,3418', '广德市', '34', '安徽省', '3418', '宣城市', '341882', '广德市', '', '', '', '', 3, 1, ''), ('35', '00', '00', '福建省', '35', '福建省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3501', '35', '00,35', '福州市', '35', '福建省', '3501', '福州市', '', '', '', '', '', '', 2, 1, ''), ('350102', '3501', '00,35,3501', '鼓楼区', '35', '福建省', '3501', '福州市', '350102', '鼓楼区', '', '', '', '', 3, 1, ''), ('350103', '3501', '00,35,3501', '台江区', '35', '福建省', '3501', '福州市', '350103', '台江区', '', '', '', '', 3, 1, ''), ('350104', '3501', '00,35,3501', '仓山区', '35', '福建省', '3501', '福州市', '350104', '仓山区', '', '', '', '', 3, 1, ''), ('350105', '3501', '00,35,3501', '马尾区', '35', '福建省', '3501', '福州市', '350105', '马尾区', '', '', '', '', 3, 1, ''), ('350111', '3501', '00,35,3501', '晋安区', '35', '福建省', '3501', '福州市', '350111', '晋安区', '', '', '', '', 3, 1, ''), ('350112', '3501', '00,35,3501', '长乐区', '35', '福建省', '3501', '福州市', '350112', '长乐区', '', '', '', '', 3, 1, ''), ('350121', '3501', '00,35,3501', '闽侯县', '35', '福建省', '3501', '福州市', '350121', '闽侯县', '', '', '', '', 3, 1, ''), ('350122', '3501', '00,35,3501', '连江县', '35', '福建省', '3501', '福州市', '350122', '连江县', '', '', '', '', 3, 1, ''), ('350123', '3501', '00,35,3501', '罗源县', '35', '福建省', '3501', '福州市', '350123', '罗源县', '', '', '', '', 3, 1, ''), ('350124', '3501', '00,35,3501', '闽清县', '35', '福建省', '3501', '福州市', '350124', '闽清县', '', '', '', '', 3, 1, ''), ('350125', '3501', '00,35,3501', '永泰县', '35', '福建省', '3501', '福州市', '350125', '永泰县', '', '', '', '', 3, 1, ''), ('350128', '3501', '00,35,3501', '平潭县', '35', '福建省', '3501', '福州市', '350128', '平潭县', '', '', '', '', 3, 1, ''), ('350181', '3501', '00,35,3501', '福清市', '35', '福建省', '3501', '福州市', '350181', '福清市', '', '', '', '', 3, 1, ''), ('3502', '35', '00,35', '厦门市', '35', '福建省', '3502', '厦门市', '', '', '', '', '', '', 2, 1, ''), ('350203', '3502', '00,35,3502', '思明区', '35', '福建省', '3502', '厦门市', '350203', '思明区', '', '', '', '', 3, 1, ''), ('350205', '3502', '00,35,3502', '海沧区', '35', '福建省', '3502', '厦门市', '350205', '海沧区', '', '', '', '', 3, 1, ''), ('350206', '3502', '00,35,3502', '湖里区', '35', '福建省', '3502', '厦门市', '350206', '湖里区', '', '', '', '', 3, 1, ''), ('350211', '3502', '00,35,3502', '集美区', '35', '福建省', '3502', '厦门市', '350211', '集美区', '', '', '', '', 3, 1, ''), ('350212', '3502', '00,35,3502', '同安区', '35', '福建省', '3502', '厦门市', '350212', '同安区', '', '', '', '', 3, 1, ''), ('350213', '3502', '00,35,3502', '翔安区', '35', '福建省', '3502', '厦门市', '350213', '翔安区', '', '', '', '', 3, 1, ''), ('3503', '35', '00,35', '莆田市', '35', '福建省', '3503', '莆田市', '', '', '', '', '', '', 2, 1, ''), ('350302', '3503', '00,35,3503', '城厢区', '35', '福建省', '3503', '莆田市', '350302', '城厢区', '', '', '', '', 3, 1, ''), ('350303', '3503', '00,35,3503', '涵江区', '35', '福建省', '3503', '莆田市', '350303', '涵江区', '', '', '', '', 3, 1, ''), ('350304', '3503', '00,35,3503', '荔城区', '35', '福建省', '3503', '莆田市', '350304', '荔城区', '', '', '', '', 3, 1, ''), ('350305', '3503', '00,35,3503', '秀屿区', '35', '福建省', '3503', '莆田市', '350305', '秀屿区', '', '', '', '', 3, 1, ''), ('350322', '3503', '00,35,3503', '仙游县', '35', '福建省', '3503', '莆田市', '350322', '仙游县', '', '', '', '', 3, 1, ''), ('3504', '35', '00,35', '三明市', '35', '福建省', '3504', '三明市', '', '', '', '', '', '', 2, 1, ''), ('350402', '3504', '00,35,3504', '梅列区', '35', '福建省', '3504', '三明市', '350402', '梅列区', '', '', '', '', 3, 1, ''), ('350403', '3504', '00,35,3504', '三元区', '35', '福建省', '3504', '三明市', '350403', '三元区', '', '', '', '', 3, 1, ''), ('350421', '3504', '00,35,3504', '明溪县', '35', '福建省', '3504', '三明市', '350421', '明溪县', '', '', '', '', 3, 1, ''), ('350423', '3504', '00,35,3504', '清流县', '35', '福建省', '3504', '三明市', '350423', '清流县', '', '', '', '', 3, 1, ''), ('350424', '3504', '00,35,3504', '宁化县', '35', '福建省', '3504', '三明市', '350424', '宁化县', '', '', '', '', 3, 1, ''), ('350425', '3504', '00,35,3504', '大田县', '35', '福建省', '3504', '三明市', '350425', '大田县', '', '', '', '', 3, 1, ''), ('350426', '3504', '00,35,3504', '尤溪县', '35', '福建省', '3504', '三明市', '350426', '尤溪县', '', '', '', '', 3, 1, ''), ('350427', '3504', '00,35,3504', '沙县', '35', '福建省', '3504', '三明市', '350427', '沙县', '', '', '', '', 3, 1, ''), ('350428', '3504', '00,35,3504', '将乐县', '35', '福建省', '3504', '三明市', '350428', '将乐县', '', '', '', '', 3, 1, ''), ('350429', '3504', '00,35,3504', '泰宁县', '35', '福建省', '3504', '三明市', '350429', '泰宁县', '', '', '', '', 3, 1, ''), ('350430', '3504', '00,35,3504', '建宁县', '35', '福建省', '3504', '三明市', '350430', '建宁县', '', '', '', '', 3, 1, ''), ('350481', '3504', '00,35,3504', '永安市', '35', '福建省', '3504', '三明市', '350481', '永安市', '', '', '', '', 3, 1, ''), ('3505', '35', '00,35', '泉州市', '35', '福建省', '3505', '泉州市', '', '', '', '', '', '', 2, 1, ''), ('350502', '3505', '00,35,3505', '鲤城区', '35', '福建省', '3505', '泉州市', '350502', '鲤城区', '', '', '', '', 3, 1, ''), ('350503', '3505', '00,35,3505', '丰泽区', '35', '福建省', '3505', '泉州市', '350503', '丰泽区', '', '', '', '', 3, 1, ''), ('350504', '3505', '00,35,3505', '洛江区', '35', '福建省', '3505', '泉州市', '350504', '洛江区', '', '', '', '', 3, 1, ''), ('350505', '3505', '00,35,3505', '泉港区', '35', '福建省', '3505', '泉州市', '350505', '泉港区', '', '', '', '', 3, 1, ''), ('350521', '3505', '00,35,3505', '惠安县', '35', '福建省', '3505', '泉州市', '350521', '惠安县', '', '', '', '', 3, 1, ''), ('350524', '3505', '00,35,3505', '安溪县', '35', '福建省', '3505', '泉州市', '350524', '安溪县', '', '', '', '', 3, 1, ''), ('350525', '3505', '00,35,3505', '永春县', '35', '福建省', '3505', '泉州市', '350525', '永春县', '', '', '', '', 3, 1, ''), ('350526', '3505', '00,35,3505', '德化县', '35', '福建省', '3505', '泉州市', '350526', '德化县', '', '', '', '', 3, 1, ''), ('350527', '3505', '00,35,3505', '金门县', '35', '福建省', '3505', '泉州市', '350527', '金门县', '', '', '', '', 3, 1, ''), ('350581', '3505', '00,35,3505', '石狮市', '35', '福建省', '3505', '泉州市', '350581', '石狮市', '', '', '', '', 3, 1, ''), ('350582', '3505', '00,35,3505', '晋江市', '35', '福建省', '3505', '泉州市', '350582', '晋江市', '', '', '', '', 3, 1, ''), ('350583', '3505', '00,35,3505', '南安市', '35', '福建省', '3505', '泉州市', '350583', '南安市', '', '', '', '', 3, 1, ''), ('3506', '35', '00,35', '漳州市', '35', '福建省', '3506', '漳州市', '', '', '', '', '', '', 2, 1, ''), ('350602', '3506', '00,35,3506', '芗城区', '35', '福建省', '3506', '漳州市', '350602', '芗城区', '', '', '', '', 3, 1, ''), ('350603', '3506', '00,35,3506', '龙文区', '35', '福建省', '3506', '漳州市', '350603', '龙文区', '', '', '', '', 3, 1, ''), ('350622', '3506', '00,35,3506', '云霄县', '35', '福建省', '3506', '漳州市', '350622', '云霄县', '', '', '', '', 3, 1, ''), ('350623', '3506', '00,35,3506', '漳浦县', '35', '福建省', '3506', '漳州市', '350623', '漳浦县', '', '', '', '', 3, 1, ''), ('350624', '3506', '00,35,3506', '诏安县', '35', '福建省', '3506', '漳州市', '350624', '诏安县', '', '', '', '', 3, 1, ''), ('350625', '3506', '00,35,3506', '长泰县', '35', '福建省', '3506', '漳州市', '350625', '长泰县', '', '', '', '', 3, 1, ''), ('350626', '3506', '00,35,3506', '东山县', '35', '福建省', '3506', '漳州市', '350626', '东山县', '', '', '', '', 3, 1, ''), ('350627', '3506', '00,35,3506', '南靖县', '35', '福建省', '3506', '漳州市', '350627', '南靖县', '', '', '', '', 3, 1, ''), ('350628', '3506', '00,35,3506', '平和县', '35', '福建省', '3506', '漳州市', '350628', '平和县', '', '', '', '', 3, 1, ''), ('350629', '3506', '00,35,3506', '华安县', '35', '福建省', '3506', '漳州市', '350629', '华安县', '', '', '', '', 3, 1, ''), ('350681', '3506', '00,35,3506', '龙海市', '35', '福建省', '3506', '漳州市', '350681', '龙海市', '', '', '', '', 3, 1, ''), ('3507', '35', '00,35', '南平市', '35', '福建省', '3507', '南平市', '', '', '', '', '', '', 2, 1, ''), ('350702', '3507', '00,35,3507', '延平区', '35', '福建省', '3507', '南平市', '350702', '延平区', '', '', '', '', 3, 1, ''), ('350703', '3507', '00,35,3507', '建阳区', '35', '福建省', '3507', '南平市', '350703', '建阳区', '', '', '', '', 3, 1, ''), ('350721', '3507', '00,35,3507', '顺昌县', '35', '福建省', '3507', '南平市', '350721', '顺昌县', '', '', '', '', 3, 1, ''), ('350722', '3507', '00,35,3507', '浦城县', '35', '福建省', '3507', '南平市', '350722', '浦城县', '', '', '', '', 3, 1, ''), ('350723', '3507', '00,35,3507', '光泽县', '35', '福建省', '3507', '南平市', '350723', '光泽县', '', '', '', '', 3, 1, ''), ('350724', '3507', '00,35,3507', '松溪县', '35', '福建省', '3507', '南平市', '350724', '松溪县', '', '', '', '', 3, 1, ''), ('350725', '3507', '00,35,3507', '政和县', '35', '福建省', '3507', '南平市', '350725', '政和县', '', '', '', '', 3, 1, ''), ('350781', '3507', '00,35,3507', '邵武市', '35', '福建省', '3507', '南平市', '350781', '邵武市', '', '', '', '', 3, 1, ''), ('350782', '3507', '00,35,3507', '武夷山市', '35', '福建省', '3507', '南平市', '350782', '武夷山市', '', '', '', '', 3, 1, ''), ('350783', '3507', '00,35,3507', '建瓯市', '35', '福建省', '3507', '南平市', '350783', '建瓯市', '', '', '', '', 3, 1, ''), ('3508', '35', '00,35', '龙岩市', '35', '福建省', '3508', '龙岩市', '', '', '', '', '', '', 2, 1, ''), ('350802', '3508', '00,35,3508', '新罗区', '35', '福建省', '3508', '龙岩市', '350802', '新罗区', '', '', '', '', 3, 1, ''), ('350803', '3508', '00,35,3508', '永定区', '35', '福建省', '3508', '龙岩市', '350803', '永定区', '', '', '', '', 3, 1, ''), ('350821', '3508', '00,35,3508', '长汀县', '35', '福建省', '3508', '龙岩市', '350821', '长汀县', '', '', '', '', 3, 1, ''), ('350823', '3508', '00,35,3508', '上杭县', '35', '福建省', '3508', '龙岩市', '350823', '上杭县', '', '', '', '', 3, 1, ''), ('350824', '3508', '00,35,3508', '武平县', '35', '福建省', '3508', '龙岩市', '350824', '武平县', '', '', '', '', 3, 1, ''), ('350825', '3508', '00,35,3508', '连城县', '35', '福建省', '3508', '龙岩市', '350825', '连城县', '', '', '', '', 3, 1, ''), ('350881', '3508', '00,35,3508', '漳平市', '35', '福建省', '3508', '龙岩市', '350881', '漳平市', '', '', '', '', 3, 1, ''), ('3509', '35', '00,35', '宁德市', '35', '福建省', '3509', '宁德市', '', '', '', '', '', '', 2, 1, ''), ('350902', '3509', '00,35,3509', '蕉城区', '35', '福建省', '3509', '宁德市', '350902', '蕉城区', '', '', '', '', 3, 1, ''), ('350921', '3509', '00,35,3509', '霞浦县', '35', '福建省', '3509', '宁德市', '350921', '霞浦县', '', '', '', '', 3, 1, ''), ('350922', '3509', '00,35,3509', '古田县', '35', '福建省', '3509', '宁德市', '350922', '古田县', '', '', '', '', 3, 1, ''), ('350923', '3509', '00,35,3509', '屏南县', '35', '福建省', '3509', '宁德市', '350923', '屏南县', '', '', '', '', 3, 1, ''), ('350924', '3509', '00,35,3509', '寿宁县', '35', '福建省', '3509', '宁德市', '350924', '寿宁县', '', '', '', '', 3, 1, ''), ('350925', '3509', '00,35,3509', '周宁县', '35', '福建省', '3509', '宁德市', '350925', '周宁县', '', '', '', '', 3, 1, ''), ('350926', '3509', '00,35,3509', '柘荣县', '35', '福建省', '3509', '宁德市', '350926', '柘荣县', '', '', '', '', 3, 1, ''), ('350981', '3509', '00,35,3509', '福安市', '35', '福建省', '3509', '宁德市', '350981', '福安市', '', '', '', '', 3, 1, ''), ('350982', '3509', '00,35,3509', '福鼎市', '35', '福建省', '3509', '宁德市', '350982', '福鼎市', '', '', '', '', 3, 1, ''), ('36', '00', '00', '江西省', '36', '江西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3601', '36', '00,36', '南昌市', '36', '江西省', '3601', '南昌市', '', '', '', '', '', '', 2, 1, ''), ('360102', '3601', '00,36,3601', '东湖区', '36', '江西省', '3601', '南昌市', '360102', '东湖区', '', '', '', '', 3, 1, ''), ('360103', '3601', '00,36,3601', '西湖区', '36', '江西省', '3601', '南昌市', '360103', '西湖区', '', '', '', '', 3, 1, ''), ('360104', '3601', '00,36,3601', '青云谱区', '36', '江西省', '3601', '南昌市', '360104', '青云谱区', '', '', '', '', 3, 1, ''), ('360111', '3601', '00,36,3601', '青山湖区', '36', '江西省', '3601', '南昌市', '360111', '青山湖区', '', '', '', '', 3, 1, ''), ('360112', '3601', '00,36,3601', '新建区', '36', '江西省', '3601', '南昌市', '360112', '新建区', '', '', '', '', 3, 1, ''), ('360113', '3601', '00,36,3601', '红谷滩区', '36', '江西省', '3601', '南昌市', '360113', '红谷滩区', '', '', '', '', 3, 1, ''), ('360121', '3601', '00,36,3601', '南昌县', '36', '江西省', '3601', '南昌市', '360121', '南昌县', '', '', '', '', 3, 1, ''), ('360123', '3601', '00,36,3601', '安义县', '36', '江西省', '3601', '南昌市', '360123', '安义县', '', '', '', '', 3, 1, ''), ('360124', '3601', '00,36,3601', '进贤县', '36', '江西省', '3601', '南昌市', '360124', '进贤县', '', '', '', '', 3, 1, ''), ('3602', '36', '00,36', '景德镇市', '36', '江西省', '3602', '景德镇市', '', '', '', '', '', '', 2, 1, ''), ('360202', '3602', '00,36,3602', '昌江区', '36', '江西省', '3602', '景德镇市', '360202', '昌江区', '', '', '', '', 3, 1, ''), ('360203', '3602', '00,36,3602', '珠山区', '36', '江西省', '3602', '景德镇市', '360203', '珠山区', '', '', '', '', 3, 1, ''), ('360222', '3602', '00,36,3602', '浮梁县', '36', '江西省', '3602', '景德镇市', '360222', '浮梁县', '', '', '', '', 3, 1, ''), ('360281', '3602', '00,36,3602', '乐平市', '36', '江西省', '3602', '景德镇市', '360281', '乐平市', '', '', '', '', 3, 1, ''), ('3603', '36', '00,36', '萍乡市', '36', '江西省', '3603', '萍乡市', '', '', '', '', '', '', 2, 1, ''), ('360302', '3603', '00,36,3603', '安源区', '36', '江西省', '3603', '萍乡市', '360302', '安源区', '', '', '', '', 3, 1, ''), ('360313', '3603', '00,36,3603', '湘东区', '36', '江西省', '3603', '萍乡市', '360313', '湘东区', '', '', '', '', 3, 1, ''), ('360321', '3603', '00,36,3603', '莲花县', '36', '江西省', '3603', '萍乡市', '360321', '莲花县', '', '', '', '', 3, 1, ''), ('360322', '3603', '00,36,3603', '上栗县', '36', '江西省', '3603', '萍乡市', '360322', '上栗县', '', '', '', '', 3, 1, ''), ('360323', '3603', '00,36,3603', '芦溪县', '36', '江西省', '3603', '萍乡市', '360323', '芦溪县', '', '', '', '', 3, 1, ''), ('3604', '36', '00,36', '九江市', '36', '江西省', '3604', '九江市', '', '', '', '', '', '', 2, 1, ''), ('360402', '3604', '00,36,3604', '濂溪区', '36', '江西省', '3604', '九江市', '360402', '濂溪区', '', '', '', '', 3, 1, ''), ('360403', '3604', '00,36,3604', '浔阳区', '36', '江西省', '3604', '九江市', '360403', '浔阳区', '', '', '', '', 3, 1, ''), ('360404', '3604', '00,36,3604', '柴桑区', '36', '江西省', '3604', '九江市', '360404', '柴桑区', '', '', '', '', 3, 1, ''), ('360423', '3604', '00,36,3604', '武宁县', '36', '江西省', '3604', '九江市', '360423', '武宁县', '', '', '', '', 3, 1, ''), ('360424', '3604', '00,36,3604', '修水县', '36', '江西省', '3604', '九江市', '360424', '修水县', '', '', '', '', 3, 1, ''), ('360425', '3604', '00,36,3604', '永修县', '36', '江西省', '3604', '九江市', '360425', '永修县', '', '', '', '', 3, 1, ''), ('360426', '3604', '00,36,3604', '德安县', '36', '江西省', '3604', '九江市', '360426', '德安县', '', '', '', '', 3, 1, ''), ('360428', '3604', '00,36,3604', '都昌县', '36', '江西省', '3604', '九江市', '360428', '都昌县', '', '', '', '', 3, 1, ''), ('360429', '3604', '00,36,3604', '湖口县', '36', '江西省', '3604', '九江市', '360429', '湖口县', '', '', '', '', 3, 1, ''), ('360430', '3604', '00,36,3604', '彭泽县', '36', '江西省', '3604', '九江市', '360430', '彭泽县', '', '', '', '', 3, 1, ''), ('360481', '3604', '00,36,3604', '瑞昌市', '36', '江西省', '3604', '九江市', '360481', '瑞昌市', '', '', '', '', 3, 1, ''), ('360482', '3604', '00,36,3604', '共青城市', '36', '江西省', '3604', '九江市', '360482', '共青城市', '', '', '', '', 3, 1, ''), ('360483', '3604', '00,36,3604', '庐山市', '36', '江西省', '3604', '九江市', '360483', '庐山市', '', '', '', '', 3, 1, ''), ('3605', '36', '00,36', '新余市', '36', '江西省', '3605', '新余市', '', '', '', '', '', '', 2, 1, ''), ('360502', '3605', '00,36,3605', '渝水区', '36', '江西省', '3605', '新余市', '360502', '渝水区', '', '', '', '', 3, 1, ''), ('360521', '3605', '00,36,3605', '分宜县', '36', '江西省', '3605', '新余市', '360521', '分宜县', '', '', '', '', 3, 1, ''), ('3606', '36', '00,36', '鹰潭市', '36', '江西省', '3606', '鹰潭市', '', '', '', '', '', '', 2, 1, ''), ('360602', '3606', '00,36,3606', '月湖区', '36', '江西省', '3606', '鹰潭市', '360602', '月湖区', '', '', '', '', 3, 1, ''), ('360603', '3606', '00,36,3606', '余江区', '36', '江西省', '3606', '鹰潭市', '360603', '余江区', '', '', '', '', 3, 1, ''), ('360681', '3606', '00,36,3606', '贵溪市', '36', '江西省', '3606', '鹰潭市', '360681', '贵溪市', '', '', '', '', 3, 1, ''), ('3607', '36', '00,36', '赣州市', '36', '江西省', '3607', '赣州市', '', '', '', '', '', '', 2, 1, ''), ('360702', '3607', '00,36,3607', '章贡区', '36', '江西省', '3607', '赣州市', '360702', '章贡区', '', '', '', '', 3, 1, ''), ('360703', '3607', '00,36,3607', '南康区', '36', '江西省', '3607', '赣州市', '360703', '南康区', '', '', '', '', 3, 1, ''), ('360704', '3607', '00,36,3607', '赣县区', '36', '江西省', '3607', '赣州市', '360704', '赣县区', '', '', '', '', 3, 1, ''), ('360722', '3607', '00,36,3607', '信丰县', '36', '江西省', '3607', '赣州市', '360722', '信丰县', '', '', '', '', 3, 1, ''), ('360723', '3607', '00,36,3607', '大余县', '36', '江西省', '3607', '赣州市', '360723', '大余县', '', '', '', '', 3, 1, ''), ('360724', '3607', '00,36,3607', '上犹县', '36', '江西省', '3607', '赣州市', '360724', '上犹县', '', '', '', '', 3, 1, ''), ('360725', '3607', '00,36,3607', '崇义县', '36', '江西省', '3607', '赣州市', '360725', '崇义县', '', '', '', '', 3, 1, ''), ('360726', '3607', '00,36,3607', '安远县', '36', '江西省', '3607', '赣州市', '360726', '安远县', '', '', '', '', 3, 1, ''), ('360727', '3607', '00,36,3607', '龙南县', '36', '江西省', '3607', '赣州市', '360727', '龙南县', '', '', '', '', 3, 1, ''), ('360728', '3607', '00,36,3607', '定南县', '36', '江西省', '3607', '赣州市', '360728', '定南县', '', '', '', '', 3, 1, ''), ('360729', '3607', '00,36,3607', '全南县', '36', '江西省', '3607', '赣州市', '360729', '全南县', '', '', '', '', 3, 1, ''), ('360730', '3607', '00,36,3607', '宁都县', '36', '江西省', '3607', '赣州市', '360730', '宁都县', '', '', '', '', 3, 1, ''), ('360731', '3607', '00,36,3607', '于都县', '36', '江西省', '3607', '赣州市', '360731', '于都县', '', '', '', '', 3, 1, ''), ('360732', '3607', '00,36,3607', '兴国县', '36', '江西省', '3607', '赣州市', '360732', '兴国县', '', '', '', '', 3, 1, ''), ('360733', '3607', '00,36,3607', '会昌县', '36', '江西省', '3607', '赣州市', '360733', '会昌县', '', '', '', '', 3, 1, ''), ('360734', '3607', '00,36,3607', '寻乌县', '36', '江西省', '3607', '赣州市', '360734', '寻乌县', '', '', '', '', 3, 1, ''), ('360735', '3607', '00,36,3607', '石城县', '36', '江西省', '3607', '赣州市', '360735', '石城县', '', '', '', '', 3, 1, ''), ('360781', '3607', '00,36,3607', '瑞金市', '36', '江西省', '3607', '赣州市', '360781', '瑞金市', '', '', '', '', 3, 1, ''), ('3608', '36', '00,36', '吉安市', '36', '江西省', '3608', '吉安市', '', '', '', '', '', '', 2, 1, ''), ('360802', '3608', '00,36,3608', '吉州区', '36', '江西省', '3608', '吉安市', '360802', '吉州区', '', '', '', '', 3, 1, ''), ('360803', '3608', '00,36,3608', '青原区', '36', '江西省', '3608', '吉安市', '360803', '青原区', '', '', '', '', 3, 1, ''), ('360821', '3608', '00,36,3608', '吉安县', '36', '江西省', '3608', '吉安市', '360821', '吉安县', '', '', '', '', 3, 1, ''), ('360822', '3608', '00,36,3608', '吉水县', '36', '江西省', '3608', '吉安市', '360822', '吉水县', '', '', '', '', 3, 1, ''), ('360823', '3608', '00,36,3608', '峡江县', '36', '江西省', '3608', '吉安市', '360823', '峡江县', '', '', '', '', 3, 1, ''), ('360824', '3608', '00,36,3608', '新干县', '36', '江西省', '3608', '吉安市', '360824', '新干县', '', '', '', '', 3, 1, ''), ('360825', '3608', '00,36,3608', '永丰县', '36', '江西省', '3608', '吉安市', '360825', '永丰县', '', '', '', '', 3, 1, ''), ('360826', '3608', '00,36,3608', '泰和县', '36', '江西省', '3608', '吉安市', '360826', '泰和县', '', '', '', '', 3, 1, ''), ('360827', '3608', '00,36,3608', '遂川县', '36', '江西省', '3608', '吉安市', '360827', '遂川县', '', '', '', '', 3, 1, ''), ('360828', '3608', '00,36,3608', '万安县', '36', '江西省', '3608', '吉安市', '360828', '万安县', '', '', '', '', 3, 1, ''), ('360829', '3608', '00,36,3608', '安福县', '36', '江西省', '3608', '吉安市', '360829', '安福县', '', '', '', '', 3, 1, ''), ('360830', '3608', '00,36,3608', '永新县', '36', '江西省', '3608', '吉安市', '360830', '永新县', '', '', '', '', 3, 1, ''), ('360881', '3608', '00,36,3608', '井冈山市', '36', '江西省', '3608', '吉安市', '360881', '井冈山市', '', '', '', '', 3, 1, ''), ('3609', '36', '00,36', '宜春市', '36', '江西省', '3609', '宜春市', '', '', '', '', '', '', 2, 1, ''), ('360902', '3609', '00,36,3609', '袁州区', '36', '江西省', '3609', '宜春市', '360902', '袁州区', '', '', '', '', 3, 1, ''), ('360921', '3609', '00,36,3609', '奉新县', '36', '江西省', '3609', '宜春市', '360921', '奉新县', '', '', '', '', 3, 1, ''), ('360922', '3609', '00,36,3609', '万载县', '36', '江西省', '3609', '宜春市', '360922', '万载县', '', '', '', '', 3, 1, ''), ('360923', '3609', '00,36,3609', '上高县', '36', '江西省', '3609', '宜春市', '360923', '上高县', '', '', '', '', 3, 1, ''), ('360924', '3609', '00,36,3609', '宜丰县', '36', '江西省', '3609', '宜春市', '360924', '宜丰县', '', '', '', '', 3, 1, ''), ('360925', '3609', '00,36,3609', '靖安县', '36', '江西省', '3609', '宜春市', '360925', '靖安县', '', '', '', '', 3, 1, ''), ('360926', '3609', '00,36,3609', '铜鼓县', '36', '江西省', '3609', '宜春市', '360926', '铜鼓县', '', '', '', '', 3, 1, ''), ('360981', '3609', '00,36,3609', '丰城市', '36', '江西省', '3609', '宜春市', '360981', '丰城市', '', '', '', '', 3, 1, ''), ('360982', '3609', '00,36,3609', '樟树市', '36', '江西省', '3609', '宜春市', '360982', '樟树市', '', '', '', '', 3, 1, ''), ('360983', '3609', '00,36,3609', '高安市', '36', '江西省', '3609', '宜春市', '360983', '高安市', '', '', '', '', 3, 1, ''), ('3610', '36', '00,36', '抚州市', '36', '江西省', '3610', '抚州市', '', '', '', '', '', '', 2, 1, ''), ('361002', '3610', '00,36,3610', '临川区', '36', '江西省', '3610', '抚州市', '361002', '临川区', '', '', '', '', 3, 1, ''), ('361003', '3610', '00,36,3610', '东乡区', '36', '江西省', '3610', '抚州市', '361003', '东乡区', '', '', '', '', 3, 1, ''), ('361021', '3610', '00,36,3610', '南城县', '36', '江西省', '3610', '抚州市', '361021', '南城县', '', '', '', '', 3, 1, ''), ('361022', '3610', '00,36,3610', '黎川县', '36', '江西省', '3610', '抚州市', '361022', '黎川县', '', '', '', '', 3, 1, ''), ('361023', '3610', '00,36,3610', '南丰县', '36', '江西省', '3610', '抚州市', '361023', '南丰县', '', '', '', '', 3, 1, ''), ('361024', '3610', '00,36,3610', '崇仁县', '36', '江西省', '3610', '抚州市', '361024', '崇仁县', '', '', '', '', 3, 1, ''), ('361025', '3610', '00,36,3610', '乐安县', '36', '江西省', '3610', '抚州市', '361025', '乐安县', '', '', '', '', 3, 1, ''), ('361026', '3610', '00,36,3610', '宜黄县', '36', '江西省', '3610', '抚州市', '361026', '宜黄县', '', '', '', '', 3, 1, ''), ('361027', '3610', '00,36,3610', '金溪县', '36', '江西省', '3610', '抚州市', '361027', '金溪县', '', '', '', '', 3, 1, ''), ('361028', '3610', '00,36,3610', '资溪县', '36', '江西省', '3610', '抚州市', '361028', '资溪县', '', '', '', '', 3, 1, ''), ('361030', '3610', '00,36,3610', '广昌县', '36', '江西省', '3610', '抚州市', '361030', '广昌县', '', '', '', '', 3, 1, ''), ('3611', '36', '00,36', '上饶市', '36', '江西省', '3611', '上饶市', '', '', '', '', '', '', 2, 1, ''), ('361102', '3611', '00,36,3611', '信州区', '36', '江西省', '3611', '上饶市', '361102', '信州区', '', '', '', '', 3, 1, ''), ('361103', '3611', '00,36,3611', '广丰区', '36', '江西省', '3611', '上饶市', '361103', '广丰区', '', '', '', '', 3, 1, ''), ('361104', '3611', '00,36,3611', '广信区', '36', '江西省', '3611', '上饶市', '361104', '广信区', '', '', '', '', 3, 1, ''), ('361123', '3611', '00,36,3611', '玉山县', '36', '江西省', '3611', '上饶市', '361123', '玉山县', '', '', '', '', 3, 1, ''), ('361124', '3611', '00,36,3611', '铅山县', '36', '江西省', '3611', '上饶市', '361124', '铅山县', '', '', '', '', 3, 1, ''), ('361125', '3611', '00,36,3611', '横峰县', '36', '江西省', '3611', '上饶市', '361125', '横峰县', '', '', '', '', 3, 1, ''), ('361126', '3611', '00,36,3611', '弋阳县', '36', '江西省', '3611', '上饶市', '361126', '弋阳县', '', '', '', '', 3, 1, ''), ('361127', '3611', '00,36,3611', '余干县', '36', '江西省', '3611', '上饶市', '361127', '余干县', '', '', '', '', 3, 1, ''), ('361128', '3611', '00,36,3611', '鄱阳县', '36', '江西省', '3611', '上饶市', '361128', '鄱阳县', '', '', '', '', 3, 1, ''), ('361129', '3611', '00,36,3611', '万年县', '36', '江西省', '3611', '上饶市', '361129', '万年县', '', '', '', '', 3, 1, ''), ('361130', '3611', '00,36,3611', '婺源县', '36', '江西省', '3611', '上饶市', '361130', '婺源县', '', '', '', '', 3, 1, ''), ('361181', '3611', '00,36,3611', '德兴市', '36', '江西省', '3611', '上饶市', '361181', '德兴市', '', '', '', '', 3, 1, ''), ('37', '00', '00', '山东省', '37', '山东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3701', '37', '00,37', '济南市', '37', '山东省', '3701', '济南市', '', '', '', '', '', '', 2, 1, ''), ('370102', '3701', '00,37,3701', '历下区', '37', '山东省', '3701', '济南市', '370102', '历下区', '', '', '', '', 3, 1, ''), ('370103', '3701', '00,37,3701', '市中区', '37', '山东省', '3701', '济南市', '370103', '市中区', '', '', '', '', 3, 1, ''), ('370104', '3701', '00,37,3701', '槐荫区', '37', '山东省', '3701', '济南市', '370104', '槐荫区', '', '', '', '', 3, 1, ''), ('370105', '3701', '00,37,3701', '天桥区', '37', '山东省', '3701', '济南市', '370105', '天桥区', '', '', '', '', 3, 1, ''), ('370112', '3701', '00,37,3701', '历城区', '37', '山东省', '3701', '济南市', '370112', '历城区', '', '', '', '', 3, 1, ''), ('370113', '3701', '00,37,3701', '长清区', '37', '山东省', '3701', '济南市', '370113', '长清区', '', '', '', '', 3, 1, ''), ('370114', '3701', '00,37,3701', '章丘区', '37', '山东省', '3701', '济南市', '370114', '章丘区', '', '', '', '', 3, 1, ''), ('370115', '3701', '00,37,3701', '济阳区', '37', '山东省', '3701', '济南市', '370115', '济阳区', '', '', '', '', 3, 1, ''), ('370116', '3701', '00,37,3701', '莱芜区', '37', '山东省', '3701', '济南市', '370116', '莱芜区', '', '', '', '', 3, 1, ''), ('370117', '3701', '00,37,3701', '钢城区', '37', '山东省', '3701', '济南市', '370117', '钢城区', '', '', '', '', 3, 1, ''), ('370124', '3701', '00,37,3701', '平阴县', '37', '山东省', '3701', '济南市', '370124', '平阴县', '', '', '', '', 3, 1, ''), ('370126', '3701', '00,37,3701', '商河县', '37', '山东省', '3701', '济南市', '370126', '商河县', '', '', '', '', 3, 1, ''), ('3702', '37', '00,37', '青岛市', '37', '山东省', '3702', '青岛市', '', '', '', '', '', '', 2, 1, ''), ('370202', '3702', '00,37,3702', '市南区', '37', '山东省', '3702', '青岛市', '370202', '市南区', '', '', '', '', 3, 1, ''), ('370203', '3702', '00,37,3702', '市北区', '37', '山东省', '3702', '青岛市', '370203', '市北区', '', '', '', '', 3, 1, ''), ('370211', '3702', '00,37,3702', '黄岛区', '37', '山东省', '3702', '青岛市', '370211', '黄岛区', '', '', '', '', 3, 1, ''), ('370212', '3702', '00,37,3702', '崂山区', '37', '山东省', '3702', '青岛市', '370212', '崂山区', '', '', '', '', 3, 1, ''), ('370213', '3702', '00,37,3702', '李沧区', '37', '山东省', '3702', '青岛市', '370213', '李沧区', '', '', '', '', 3, 1, ''), ('370214', '3702', '00,37,3702', '城阳区', '37', '山东省', '3702', '青岛市', '370214', '城阳区', '', '', '', '', 3, 1, ''), ('370215', '3702', '00,37,3702', '即墨区', '37', '山东省', '3702', '青岛市', '370215', '即墨区', '', '', '', '', 3, 1, ''), ('370281', '3702', '00,37,3702', '胶州市', '37', '山东省', '3702', '青岛市', '370281', '胶州市', '', '', '', '', 3, 1, ''), ('370283', '3702', '00,37,3702', '平度市', '37', '山东省', '3702', '青岛市', '370283', '平度市', '', '', '', '', 3, 1, ''), ('370285', '3702', '00,37,3702', '莱西市', '37', '山东省', '3702', '青岛市', '370285', '莱西市', '', '', '', '', 3, 1, ''), ('3703', '37', '00,37', '淄博市', '37', '山东省', '3703', '淄博市', '', '', '', '', '', '', 2, 1, ''), ('370302', '3703', '00,37,3703', '淄川区', '37', '山东省', '3703', '淄博市', '370302', '淄川区', '', '', '', '', 3, 1, ''), ('370303', '3703', '00,37,3703', '张店区', '37', '山东省', '3703', '淄博市', '370303', '张店区', '', '', '', '', 3, 1, ''), ('370304', '3703', '00,37,3703', '博山区', '37', '山东省', '3703', '淄博市', '370304', '博山区', '', '', '', '', 3, 1, ''), ('370305', '3703', '00,37,3703', '临淄区', '37', '山东省', '3703', '淄博市', '370305', '临淄区', '', '', '', '', 3, 1, ''), ('370306', '3703', '00,37,3703', '周村区', '37', '山东省', '3703', '淄博市', '370306', '周村区', '', '', '', '', 3, 1, ''), ('370321', '3703', '00,37,3703', '桓台县', '37', '山东省', '3703', '淄博市', '370321', '桓台县', '', '', '', '', 3, 1, ''), ('370322', '3703', '00,37,3703', '高青县', '37', '山东省', '3703', '淄博市', '370322', '高青县', '', '', '', '', 3, 1, ''), ('370323', '3703', '00,37,3703', '沂源县', '37', '山东省', '3703', '淄博市', '370323', '沂源县', '', '', '', '', 3, 1, ''), ('3704', '37', '00,37', '枣庄市', '37', '山东省', '3704', '枣庄市', '', '', '', '', '', '', 2, 1, ''), ('370402', '3704', '00,37,3704', '市中区', '37', '山东省', '3704', '枣庄市', '370402', '市中区', '', '', '', '', 3, 1, ''), ('370403', '3704', '00,37,3704', '薛城区', '37', '山东省', '3704', '枣庄市', '370403', '薛城区', '', '', '', '', 3, 1, ''), ('370404', '3704', '00,37,3704', '峄城区', '37', '山东省', '3704', '枣庄市', '370404', '峄城区', '', '', '', '', 3, 1, ''), ('370405', '3704', '00,37,3704', '台儿庄区', '37', '山东省', '3704', '枣庄市', '370405', '台儿庄区', '', '', '', '', 3, 1, ''), ('370406', '3704', '00,37,3704', '山亭区', '37', '山东省', '3704', '枣庄市', '370406', '山亭区', '', '', '', '', 3, 1, ''), ('370481', '3704', '00,37,3704', '滕州市', '37', '山东省', '3704', '枣庄市', '370481', '滕州市', '', '', '', '', 3, 1, ''), ('3705', '37', '00,37', '东营市', '37', '山东省', '3705', '东营市', '', '', '', '', '', '', 2, 1, ''), ('370502', '3705', '00,37,3705', '东营区', '37', '山东省', '3705', '东营市', '370502', '东营区', '', '', '', '', 3, 1, ''), ('370503', '3705', '00,37,3705', '河口区', '37', '山东省', '3705', '东营市', '370503', '河口区', '', '', '', '', 3, 1, ''), ('370505', '3705', '00,37,3705', '垦利区', '37', '山东省', '3705', '东营市', '370505', '垦利区', '', '', '', '', 3, 1, ''), ('370522', '3705', '00,37,3705', '利津县', '37', '山东省', '3705', '东营市', '370522', '利津县', '', '', '', '', 3, 1, ''), ('370523', '3705', '00,37,3705', '广饶县', '37', '山东省', '3705', '东营市', '370523', '广饶县', '', '', '', '', 3, 1, ''), ('3706', '37', '00,37', '烟台市', '37', '山东省', '3706', '烟台市', '', '', '', '', '', '', 2, 1, ''), ('370602', '3706', '00,37,3706', '芝罘区', '37', '山东省', '3706', '烟台市', '370602', '芝罘区', '', '', '', '', 3, 1, ''), ('370611', '3706', '00,37,3706', '福山区', '37', '山东省', '3706', '烟台市', '370611', '福山区', '', '', '', '', 3, 1, ''), ('370612', '3706', '00,37,3706', '牟平区', '37', '山东省', '3706', '烟台市', '370612', '牟平区', '', '', '', '', 3, 1, ''), ('370613', '3706', '00,37,3706', '莱山区', '37', '山东省', '3706', '烟台市', '370613', '莱山区', '', '', '', '', 3, 1, ''), ('370634', '3706', '00,37,3706', '长岛县', '37', '山东省', '3706', '烟台市', '370634', '长岛县', '', '', '', '', 3, 1, ''), ('370681', '3706', '00,37,3706', '龙口市', '37', '山东省', '3706', '烟台市', '370681', '龙口市', '', '', '', '', 3, 1, ''), ('370682', '3706', '00,37,3706', '莱阳市', '37', '山东省', '3706', '烟台市', '370682', '莱阳市', '', '', '', '', 3, 1, ''), ('370683', '3706', '00,37,3706', '莱州市', '37', '山东省', '3706', '烟台市', '370683', '莱州市', '', '', '', '', 3, 1, ''), ('370684', '3706', '00,37,3706', '蓬莱市', '37', '山东省', '3706', '烟台市', '370684', '蓬莱市', '', '', '', '', 3, 1, ''), ('370685', '3706', '00,37,3706', '招远市', '37', '山东省', '3706', '烟台市', '370685', '招远市', '', '', '', '', 3, 1, ''), ('370686', '3706', '00,37,3706', '栖霞市', '37', '山东省', '3706', '烟台市', '370686', '栖霞市', '', '', '', '', 3, 1, ''), ('370687', '3706', '00,37,3706', '海阳市', '37', '山东省', '3706', '烟台市', '370687', '海阳市', '', '', '', '', 3, 1, ''), ('3707', '37', '00,37', '潍坊市', '37', '山东省', '3707', '潍坊市', '', '', '', '', '', '', 2, 1, ''), ('370702', '3707', '00,37,3707', '潍城区', '37', '山东省', '3707', '潍坊市', '370702', '潍城区', '', '', '', '', 3, 1, ''), ('370703', '3707', '00,37,3707', '寒亭区', '37', '山东省', '3707', '潍坊市', '370703', '寒亭区', '', '', '', '', 3, 1, ''), ('370704', '3707', '00,37,3707', '坊子区', '37', '山东省', '3707', '潍坊市', '370704', '坊子区', '', '', '', '', 3, 1, ''), ('370705', '3707', '00,37,3707', '奎文区', '37', '山东省', '3707', '潍坊市', '370705', '奎文区', '', '', '', '', 3, 1, ''), ('370724', '3707', '00,37,3707', '临朐县', '37', '山东省', '3707', '潍坊市', '370724', '临朐县', '', '', '', '', 3, 1, ''), ('370725', '3707', '00,37,3707', '昌乐县', '37', '山东省', '3707', '潍坊市', '370725', '昌乐县', '', '', '', '', 3, 1, ''), ('370781', '3707', '00,37,3707', '青州市', '37', '山东省', '3707', '潍坊市', '370781', '青州市', '', '', '', '', 3, 1, ''), ('370782', '3707', '00,37,3707', '诸城市', '37', '山东省', '3707', '潍坊市', '370782', '诸城市', '', '', '', '', 3, 1, ''), ('370783', '3707', '00,37,3707', '寿光市', '37', '山东省', '3707', '潍坊市', '370783', '寿光市', '', '', '', '', 3, 1, ''), ('370784', '3707', '00,37,3707', '安丘市', '37', '山东省', '3707', '潍坊市', '370784', '安丘市', '', '', '', '', 3, 1, ''), ('370785', '3707', '00,37,3707', '高密市', '37', '山东省', '3707', '潍坊市', '370785', '高密市', '', '', '', '', 3, 1, ''), ('370786', '3707', '00,37,3707', '昌邑市', '37', '山东省', '3707', '潍坊市', '370786', '昌邑市', '', '', '', '', 3, 1, ''), ('3708', '37', '00,37', '济宁市', '37', '山东省', '3708', '济宁市', '', '', '', '', '', '', 2, 1, ''), ('370811', '3708', '00,37,3708', '任城区', '37', '山东省', '3708', '济宁市', '370811', '任城区', '', '', '', '', 3, 1, ''), ('370812', '3708', '00,37,3708', '兖州区', '37', '山东省', '3708', '济宁市', '370812', '兖州区', '', '', '', '', 3, 1, ''), ('370826', '3708', '00,37,3708', '微山县', '37', '山东省', '3708', '济宁市', '370826', '微山县', '', '', '', '', 3, 1, ''), ('370827', '3708', '00,37,3708', '鱼台县', '37', '山东省', '3708', '济宁市', '370827', '鱼台县', '', '', '', '', 3, 1, ''), ('370828', '3708', '00,37,3708', '金乡县', '37', '山东省', '3708', '济宁市', '370828', '金乡县', '', '', '', '', 3, 1, ''), ('370829', '3708', '00,37,3708', '嘉祥县', '37', '山东省', '3708', '济宁市', '370829', '嘉祥县', '', '', '', '', 3, 1, ''), ('370830', '3708', '00,37,3708', '汶上县', '37', '山东省', '3708', '济宁市', '370830', '汶上县', '', '', '', '', 3, 1, ''), ('370831', '3708', '00,37,3708', '泗水县', '37', '山东省', '3708', '济宁市', '370831', '泗水县', '', '', '', '', 3, 1, ''), ('370832', '3708', '00,37,3708', '梁山县', '37', '山东省', '3708', '济宁市', '370832', '梁山县', '', '', '', '', 3, 1, ''), ('370881', '3708', '00,37,3708', '曲阜市', '37', '山东省', '3708', '济宁市', '370881', '曲阜市', '', '', '', '', 3, 1, ''), ('370883', '3708', '00,37,3708', '邹城市', '37', '山东省', '3708', '济宁市', '370883', '邹城市', '', '', '', '', 3, 1, ''), ('3709', '37', '00,37', '泰安市', '37', '山东省', '3709', '泰安市', '', '', '', '', '', '', 2, 1, ''), ('370902', '3709', '00,37,3709', '泰山区', '37', '山东省', '3709', '泰安市', '370902', '泰山区', '', '', '', '', 3, 1, ''), ('370911', '3709', '00,37,3709', '岱岳区', '37', '山东省', '3709', '泰安市', '370911', '岱岳区', '', '', '', '', 3, 1, ''), ('370921', '3709', '00,37,3709', '宁阳县', '37', '山东省', '3709', '泰安市', '370921', '宁阳县', '', '', '', '', 3, 1, ''), ('370923', '3709', '00,37,3709', '东平县', '37', '山东省', '3709', '泰安市', '370923', '东平县', '', '', '', '', 3, 1, ''), ('370982', '3709', '00,37,3709', '新泰市', '37', '山东省', '3709', '泰安市', '370982', '新泰市', '', '', '', '', 3, 1, ''), ('370983', '3709', '00,37,3709', '肥城市', '37', '山东省', '3709', '泰安市', '370983', '肥城市', '', '', '', '', 3, 1, ''), ('3710', '37', '00,37', '威海市', '37', '山东省', '3710', '威海市', '', '', '', '', '', '', 2, 1, ''), ('371002', '3710', '00,37,3710', '环翠区', '37', '山东省', '3710', '威海市', '371002', '环翠区', '', '', '', '', 3, 1, ''), ('371003', '3710', '00,37,3710', '文登区', '37', '山东省', '3710', '威海市', '371003', '文登区', '', '', '', '', 3, 1, ''), ('371082', '3710', '00,37,3710', '荣成市', '37', '山东省', '3710', '威海市', '371082', '荣成市', '', '', '', '', 3, 1, ''), ('371083', '3710', '00,37,3710', '乳山市', '37', '山东省', '3710', '威海市', '371083', '乳山市', '', '', '', '', 3, 1, ''), ('3711', '37', '00,37', '日照市', '37', '山东省', '3711', '日照市', '', '', '', '', '', '', 2, 1, ''), ('371102', '3711', '00,37,3711', '东港区', '37', '山东省', '3711', '日照市', '371102', '东港区', '', '', '', '', 3, 1, ''), ('371103', '3711', '00,37,3711', '岚山区', '37', '山东省', '3711', '日照市', '371103', '岚山区', '', '', '', '', 3, 1, ''), ('371121', '3711', '00,37,3711', '五莲县', '37', '山东省', '3711', '日照市', '371121', '五莲县', '', '', '', '', 3, 1, ''), ('371122', '3711', '00,37,3711', '莒县', '37', '山东省', '3711', '日照市', '371122', '莒县', '', '', '', '', 3, 1, ''), ('3713', '37', '00,37', '临沂市', '37', '山东省', '3713', '临沂市', '', '', '', '', '', '', 2, 1, ''), ('371302', '3713', '00,37,3713', '兰山区', '37', '山东省', '3713', '临沂市', '371302', '兰山区', '', '', '', '', 3, 1, ''), ('371311', '3713', '00,37,3713', '罗庄区', '37', '山东省', '3713', '临沂市', '371311', '罗庄区', '', '', '', '', 3, 1, ''), ('371312', '3713', '00,37,3713', '河东区', '37', '山东省', '3713', '临沂市', '371312', '河东区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('371321', '3713', '00,37,3713', '沂南县', '37', '山东省', '3713', '临沂市', '371321', '沂南县', '', '', '', '', 3, 1, ''), ('371322', '3713', '00,37,3713', '郯城县', '37', '山东省', '3713', '临沂市', '371322', '郯城县', '', '', '', '', 3, 1, ''), ('371323', '3713', '00,37,3713', '沂水县', '37', '山东省', '3713', '临沂市', '371323', '沂水县', '', '', '', '', 3, 1, ''), ('371324', '3713', '00,37,3713', '兰陵县', '37', '山东省', '3713', '临沂市', '371324', '兰陵县', '', '', '', '', 3, 1, ''), ('371325', '3713', '00,37,3713', '费县', '37', '山东省', '3713', '临沂市', '371325', '费县', '', '', '', '', 3, 1, ''), ('371326', '3713', '00,37,3713', '平邑县', '37', '山东省', '3713', '临沂市', '371326', '平邑县', '', '', '', '', 3, 1, ''), ('371327', '3713', '00,37,3713', '莒南县', '37', '山东省', '3713', '临沂市', '371327', '莒南县', '', '', '', '', 3, 1, ''), ('371328', '3713', '00,37,3713', '蒙阴县', '37', '山东省', '3713', '临沂市', '371328', '蒙阴县', '', '', '', '', 3, 1, ''), ('371329', '3713', '00,37,3713', '临沭县', '37', '山东省', '3713', '临沂市', '371329', '临沭县', '', '', '', '', 3, 1, ''), ('3714', '37', '00,37', '德州市', '37', '山东省', '3714', '德州市', '', '', '', '', '', '', 2, 1, ''), ('371402', '3714', '00,37,3714', '德城区', '37', '山东省', '3714', '德州市', '371402', '德城区', '', '', '', '', 3, 1, ''), ('371403', '3714', '00,37,3714', '陵城区', '37', '山东省', '3714', '德州市', '371403', '陵城区', '', '', '', '', 3, 1, ''), ('371422', '3714', '00,37,3714', '宁津县', '37', '山东省', '3714', '德州市', '371422', '宁津县', '', '', '', '', 3, 1, ''), ('371423', '3714', '00,37,3714', '庆云县', '37', '山东省', '3714', '德州市', '371423', '庆云县', '', '', '', '', 3, 1, ''), ('371424', '3714', '00,37,3714', '临邑县', '37', '山东省', '3714', '德州市', '371424', '临邑县', '', '', '', '', 3, 1, ''), ('371425', '3714', '00,37,3714', '齐河县', '37', '山东省', '3714', '德州市', '371425', '齐河县', '', '', '', '', 3, 1, ''), ('371426', '3714', '00,37,3714', '平原县', '37', '山东省', '3714', '德州市', '371426', '平原县', '', '', '', '', 3, 1, ''), ('371427', '3714', '00,37,3714', '夏津县', '37', '山东省', '3714', '德州市', '371427', '夏津县', '', '', '', '', 3, 1, ''), ('371428', '3714', '00,37,3714', '武城县', '37', '山东省', '3714', '德州市', '371428', '武城县', '', '', '', '', 3, 1, ''), ('371481', '3714', '00,37,3714', '乐陵市', '37', '山东省', '3714', '德州市', '371481', '乐陵市', '', '', '', '', 3, 1, ''), ('371482', '3714', '00,37,3714', '禹城市', '37', '山东省', '3714', '德州市', '371482', '禹城市', '', '', '', '', 3, 1, ''), ('3715', '37', '00,37', '聊城市', '37', '山东省', '3715', '聊城市', '', '', '', '', '', '', 2, 1, ''), ('371502', '3715', '00,37,3715', '东昌府区', '37', '山东省', '3715', '聊城市', '371502', '东昌府区', '', '', '', '', 3, 1, ''), ('371503', '3715', '00,37,3715', '茌平区', '37', '山东省', '3715', '聊城市', '371503', '茌平区', '', '', '', '', 3, 1, ''), ('371521', '3715', '00,37,3715', '阳谷县', '37', '山东省', '3715', '聊城市', '371521', '阳谷县', '', '', '', '', 3, 1, ''), ('371522', '3715', '00,37,3715', '莘县', '37', '山东省', '3715', '聊城市', '371522', '莘县', '', '', '', '', 3, 1, ''), ('371524', '3715', '00,37,3715', '东阿县', '37', '山东省', '3715', '聊城市', '371524', '东阿县', '', '', '', '', 3, 1, ''), ('371525', '3715', '00,37,3715', '冠县', '37', '山东省', '3715', '聊城市', '371525', '冠县', '', '', '', '', 3, 1, ''), ('371526', '3715', '00,37,3715', '高唐县', '37', '山东省', '3715', '聊城市', '371526', '高唐县', '', '', '', '', 3, 1, ''), ('371581', '3715', '00,37,3715', '临清市', '37', '山东省', '3715', '聊城市', '371581', '临清市', '', '', '', '', 3, 1, ''), ('3716', '37', '00,37', '滨州市', '37', '山东省', '3716', '滨州市', '', '', '', '', '', '', 2, 1, ''), ('371602', '3716', '00,37,3716', '滨城区', '37', '山东省', '3716', '滨州市', '371602', '滨城区', '', '', '', '', 3, 1, ''), ('371603', '3716', '00,37,3716', '沾化区', '37', '山东省', '3716', '滨州市', '371603', '沾化区', '', '', '', '', 3, 1, ''), ('371621', '3716', '00,37,3716', '惠民县', '37', '山东省', '3716', '滨州市', '371621', '惠民县', '', '', '', '', 3, 1, ''), ('371622', '3716', '00,37,3716', '阳信县', '37', '山东省', '3716', '滨州市', '371622', '阳信县', '', '', '', '', 3, 1, ''), ('371623', '3716', '00,37,3716', '无棣县', '37', '山东省', '3716', '滨州市', '371623', '无棣县', '', '', '', '', 3, 1, ''), ('371625', '3716', '00,37,3716', '博兴县', '37', '山东省', '3716', '滨州市', '371625', '博兴县', '', '', '', '', 3, 1, ''), ('371681', '3716', '00,37,3716', '邹平市', '37', '山东省', '3716', '滨州市', '371681', '邹平市', '', '', '', '', 3, 1, ''), ('3717', '37', '00,37', '菏泽市', '37', '山东省', '3717', '菏泽市', '', '', '', '', '', '', 2, 1, ''), ('371702', '3717', '00,37,3717', '牡丹区', '37', '山东省', '3717', '菏泽市', '371702', '牡丹区', '', '', '', '', 3, 1, ''), ('371703', '3717', '00,37,3717', '定陶区', '37', '山东省', '3717', '菏泽市', '371703', '定陶区', '', '', '', '', 3, 1, ''), ('371721', '3717', '00,37,3717', '曹县', '37', '山东省', '3717', '菏泽市', '371721', '曹县', '', '', '', '', 3, 1, ''), ('371722', '3717', '00,37,3717', '单县', '37', '山东省', '3717', '菏泽市', '371722', '单县', '', '', '', '', 3, 1, ''), ('371723', '3717', '00,37,3717', '成武县', '37', '山东省', '3717', '菏泽市', '371723', '成武县', '', '', '', '', 3, 1, ''), ('371724', '3717', '00,37,3717', '巨野县', '37', '山东省', '3717', '菏泽市', '371724', '巨野县', '', '', '', '', 3, 1, ''), ('371725', '3717', '00,37,3717', '郓城县', '37', '山东省', '3717', '菏泽市', '371725', '郓城县', '', '', '', '', 3, 1, ''), ('371726', '3717', '00,37,3717', '鄄城县', '37', '山东省', '3717', '菏泽市', '371726', '鄄城县', '', '', '', '', 3, 1, ''), ('371728', '3717', '00,37,3717', '东明县', '37', '山东省', '3717', '菏泽市', '371728', '东明县', '', '', '', '', 3, 1, ''), ('41', '00', '00', '河南省', '41', '河南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4101', '41', '00,41', '郑州市', '41', '河南省', '4101', '郑州市', '', '', '', '', '', '', 2, 1, ''), ('410102', '4101', '00,41,4101', '中原区', '41', '河南省', '4101', '郑州市', '410102', '中原区', '', '', '', '', 3, 1, ''), ('410103', '4101', '00,41,4101', '二七区', '41', '河南省', '4101', '郑州市', '410103', '二七区', '', '', '', '', 3, 1, ''), ('410104', '4101', '00,41,4101', '管城回族区', '41', '河南省', '4101', '郑州市', '410104', '管城回族区', '', '', '', '', 3, 1, ''), ('410105', '4101', '00,41,4101', '金水区', '41', '河南省', '4101', '郑州市', '410105', '金水区', '', '', '', '', 3, 1, ''), ('410106', '4101', '00,41,4101', '上街区', '41', '河南省', '4101', '郑州市', '410106', '上街区', '', '', '', '', 3, 1, ''), ('410108', '4101', '00,41,4101', '惠济区', '41', '河南省', '4101', '郑州市', '410108', '惠济区', '', '', '', '', 3, 1, ''), ('410122', '4101', '00,41,4101', '中牟县', '41', '河南省', '4101', '郑州市', '410122', '中牟县', '', '', '', '', 3, 1, ''), ('410181', '4101', '00,41,4101', '巩义市', '41', '河南省', '4101', '郑州市', '410181', '巩义市', '', '', '', '', 3, 1, ''), ('410182', '4101', '00,41,4101', '荥阳市', '41', '河南省', '4101', '郑州市', '410182', '荥阳市', '', '', '', '', 3, 1, ''), ('410183', '4101', '00,41,4101', '新密市', '41', '河南省', '4101', '郑州市', '410183', '新密市', '', '', '', '', 3, 1, ''), ('410184', '4101', '00,41,4101', '新郑市', '41', '河南省', '4101', '郑州市', '410184', '新郑市', '', '', '', '', 3, 1, ''), ('410185', '4101', '00,41,4101', '登封市', '41', '河南省', '4101', '郑州市', '410185', '登封市', '', '', '', '', 3, 1, ''), ('4102', '41', '00,41', '开封市', '41', '河南省', '4102', '开封市', '', '', '', '', '', '', 2, 1, ''), ('410202', '4102', '00,41,4102', '龙亭区', '41', '河南省', '4102', '开封市', '410202', '龙亭区', '', '', '', '', 3, 1, ''), ('410203', '4102', '00,41,4102', '顺河回族区', '41', '河南省', '4102', '开封市', '410203', '顺河回族区', '', '', '', '', 3, 1, ''), ('410204', '4102', '00,41,4102', '鼓楼区', '41', '河南省', '4102', '开封市', '410204', '鼓楼区', '', '', '', '', 3, 1, ''), ('410205', '4102', '00,41,4102', '禹王台区', '41', '河南省', '4102', '开封市', '410205', '禹王台区', '', '', '', '', 3, 1, ''), ('410212', '4102', '00,41,4102', '祥符区', '41', '河南省', '4102', '开封市', '410212', '祥符区', '', '', '', '', 3, 1, ''), ('410221', '4102', '00,41,4102', '杞县', '41', '河南省', '4102', '开封市', '410221', '杞县', '', '', '', '', 3, 1, ''), ('410222', '4102', '00,41,4102', '通许县', '41', '河南省', '4102', '开封市', '410222', '通许县', '', '', '', '', 3, 1, ''), ('410223', '4102', '00,41,4102', '尉氏县', '41', '河南省', '4102', '开封市', '410223', '尉氏县', '', '', '', '', 3, 1, ''), ('410225', '4102', '00,41,4102', '兰考县', '41', '河南省', '4102', '开封市', '410225', '兰考县', '', '', '', '', 3, 1, ''), ('4103', '41', '00,41', '洛阳市', '41', '河南省', '4103', '洛阳市', '', '', '', '', '', '', 2, 1, ''), ('410302', '4103', '00,41,4103', '老城区', '41', '河南省', '4103', '洛阳市', '410302', '老城区', '', '', '', '', 3, 1, ''), ('410303', '4103', '00,41,4103', '西工区', '41', '河南省', '4103', '洛阳市', '410303', '西工区', '', '', '', '', 3, 1, ''), ('410304', '4103', '00,41,4103', '瀍河回族区', '41', '河南省', '4103', '洛阳市', '410304', '瀍河回族区', '', '', '', '', 3, 1, ''), ('410305', '4103', '00,41,4103', '涧西区', '41', '河南省', '4103', '洛阳市', '410305', '涧西区', '', '', '', '', 3, 1, ''), ('410306', '4103', '00,41,4103', '吉利区', '41', '河南省', '4103', '洛阳市', '410306', '吉利区', '', '', '', '', 3, 1, ''), ('410311', '4103', '00,41,4103', '洛龙区', '41', '河南省', '4103', '洛阳市', '410311', '洛龙区', '', '', '', '', 3, 1, ''), ('410322', '4103', '00,41,4103', '孟津县', '41', '河南省', '4103', '洛阳市', '410322', '孟津县', '', '', '', '', 3, 1, ''), ('410323', '4103', '00,41,4103', '新安县', '41', '河南省', '4103', '洛阳市', '410323', '新安县', '', '', '', '', 3, 1, ''), ('410324', '4103', '00,41,4103', '栾川县', '41', '河南省', '4103', '洛阳市', '410324', '栾川县', '', '', '', '', 3, 1, ''), ('410325', '4103', '00,41,4103', '嵩县', '41', '河南省', '4103', '洛阳市', '410325', '嵩县', '', '', '', '', 3, 1, ''), ('410326', '4103', '00,41,4103', '汝阳县', '41', '河南省', '4103', '洛阳市', '410326', '汝阳县', '', '', '', '', 3, 1, ''), ('410327', '4103', '00,41,4103', '宜阳县', '41', '河南省', '4103', '洛阳市', '410327', '宜阳县', '', '', '', '', 3, 1, ''), ('410328', '4103', '00,41,4103', '洛宁县', '41', '河南省', '4103', '洛阳市', '410328', '洛宁县', '', '', '', '', 3, 1, ''), ('410329', '4103', '00,41,4103', '伊川县', '41', '河南省', '4103', '洛阳市', '410329', '伊川县', '', '', '', '', 3, 1, ''), ('410381', '4103', '00,41,4103', '偃师市', '41', '河南省', '4103', '洛阳市', '410381', '偃师市', '', '', '', '', 3, 1, ''), ('4104', '41', '00,41', '平顶山市', '41', '河南省', '4104', '平顶山市', '', '', '', '', '', '', 2, 1, ''), ('410402', '4104', '00,41,4104', '新华区', '41', '河南省', '4104', '平顶山市', '410402', '新华区', '', '', '', '', 3, 1, ''), ('410403', '4104', '00,41,4104', '卫东区', '41', '河南省', '4104', '平顶山市', '410403', '卫东区', '', '', '', '', 3, 1, ''), ('410404', '4104', '00,41,4104', '石龙区', '41', '河南省', '4104', '平顶山市', '410404', '石龙区', '', '', '', '', 3, 1, ''), ('410411', '4104', '00,41,4104', '湛河区', '41', '河南省', '4104', '平顶山市', '410411', '湛河区', '', '', '', '', 3, 1, ''), ('410421', '4104', '00,41,4104', '宝丰县', '41', '河南省', '4104', '平顶山市', '410421', '宝丰县', '', '', '', '', 3, 1, ''), ('410422', '4104', '00,41,4104', '叶县', '41', '河南省', '4104', '平顶山市', '410422', '叶县', '', '', '', '', 3, 1, ''), ('410423', '4104', '00,41,4104', '鲁山县', '41', '河南省', '4104', '平顶山市', '410423', '鲁山县', '', '', '', '', 3, 1, ''), ('410425', '4104', '00,41,4104', '郏县', '41', '河南省', '4104', '平顶山市', '410425', '郏县', '', '', '', '', 3, 1, ''), ('410481', '4104', '00,41,4104', '舞钢市', '41', '河南省', '4104', '平顶山市', '410481', '舞钢市', '', '', '', '', 3, 1, ''), ('410482', '4104', '00,41,4104', '汝州市', '41', '河南省', '4104', '平顶山市', '410482', '汝州市', '', '', '', '', 3, 1, ''), ('4105', '41', '00,41', '安阳市', '41', '河南省', '4105', '安阳市', '', '', '', '', '', '', 2, 1, ''), ('410502', '4105', '00,41,4105', '文峰区', '41', '河南省', '4105', '安阳市', '410502', '文峰区', '', '', '', '', 3, 1, ''), ('410503', '4105', '00,41,4105', '北关区', '41', '河南省', '4105', '安阳市', '410503', '北关区', '', '', '', '', 3, 1, ''), ('410505', '4105', '00,41,4105', '殷都区', '41', '河南省', '4105', '安阳市', '410505', '殷都区', '', '', '', '', 3, 1, ''), ('410506', '4105', '00,41,4105', '龙安区', '41', '河南省', '4105', '安阳市', '410506', '龙安区', '', '', '', '', 3, 1, ''), ('410522', '4105', '00,41,4105', '安阳县', '41', '河南省', '4105', '安阳市', '410522', '安阳县', '', '', '', '', 3, 1, ''), ('410523', '4105', '00,41,4105', '汤阴县', '41', '河南省', '4105', '安阳市', '410523', '汤阴县', '', '', '', '', 3, 1, ''), ('410526', '4105', '00,41,4105', '滑县', '41', '河南省', '4105', '安阳市', '410526', '滑县', '', '', '', '', 3, 1, ''), ('410527', '4105', '00,41,4105', '内黄县', '41', '河南省', '4105', '安阳市', '410527', '内黄县', '', '', '', '', 3, 1, ''), ('410581', '4105', '00,41,4105', '林州市', '41', '河南省', '4105', '安阳市', '410581', '林州市', '', '', '', '', 3, 1, ''), ('4106', '41', '00,41', '鹤壁市', '41', '河南省', '4106', '鹤壁市', '', '', '', '', '', '', 2, 1, ''), ('410602', '4106', '00,41,4106', '鹤山区', '41', '河南省', '4106', '鹤壁市', '410602', '鹤山区', '', '', '', '', 3, 1, ''), ('410603', '4106', '00,41,4106', '山城区', '41', '河南省', '4106', '鹤壁市', '410603', '山城区', '', '', '', '', 3, 1, ''), ('410611', '4106', '00,41,4106', '淇滨区', '41', '河南省', '4106', '鹤壁市', '410611', '淇滨区', '', '', '', '', 3, 1, ''), ('410621', '4106', '00,41,4106', '浚县', '41', '河南省', '4106', '鹤壁市', '410621', '浚县', '', '', '', '', 3, 1, ''), ('410622', '4106', '00,41,4106', '淇县', '41', '河南省', '4106', '鹤壁市', '410622', '淇县', '', '', '', '', 3, 1, ''), ('4107', '41', '00,41', '新乡市', '41', '河南省', '4107', '新乡市', '', '', '', '', '', '', 2, 1, ''), ('410702', '4107', '00,41,4107', '红旗区', '41', '河南省', '4107', '新乡市', '410702', '红旗区', '', '', '', '', 3, 1, ''), ('410703', '4107', '00,41,4107', '卫滨区', '41', '河南省', '4107', '新乡市', '410703', '卫滨区', '', '', '', '', 3, 1, ''), ('410704', '4107', '00,41,4107', '凤泉区', '41', '河南省', '4107', '新乡市', '410704', '凤泉区', '', '', '', '', 3, 1, ''), ('410711', '4107', '00,41,4107', '牧野区', '41', '河南省', '4107', '新乡市', '410711', '牧野区', '', '', '', '', 3, 1, ''), ('410721', '4107', '00,41,4107', '新乡县', '41', '河南省', '4107', '新乡市', '410721', '新乡县', '', '', '', '', 3, 1, ''), ('410724', '4107', '00,41,4107', '获嘉县', '41', '河南省', '4107', '新乡市', '410724', '获嘉县', '', '', '', '', 3, 1, ''), ('410725', '4107', '00,41,4107', '原阳县', '41', '河南省', '4107', '新乡市', '410725', '原阳县', '', '', '', '', 3, 1, ''), ('410726', '4107', '00,41,4107', '延津县', '41', '河南省', '4107', '新乡市', '410726', '延津县', '', '', '', '', 3, 1, ''), ('410727', '4107', '00,41,4107', '封丘县', '41', '河南省', '4107', '新乡市', '410727', '封丘县', '', '', '', '', 3, 1, ''), ('410781', '4107', '00,41,4107', '卫辉市', '41', '河南省', '4107', '新乡市', '410781', '卫辉市', '', '', '', '', 3, 1, ''), ('410782', '4107', '00,41,4107', '辉县市', '41', '河南省', '4107', '新乡市', '410782', '辉县市', '', '', '', '', 3, 1, ''), ('410783', '4107', '00,41,4107', '长垣市', '41', '河南省', '4107', '新乡市', '410783', '长垣市', '', '', '', '', 3, 1, ''), ('4108', '41', '00,41', '焦作市', '41', '河南省', '4108', '焦作市', '', '', '', '', '', '', 2, 1, ''), ('410802', '4108', '00,41,4108', '解放区', '41', '河南省', '4108', '焦作市', '410802', '解放区', '', '', '', '', 3, 1, ''), ('410803', '4108', '00,41,4108', '中站区', '41', '河南省', '4108', '焦作市', '410803', '中站区', '', '', '', '', 3, 1, ''), ('410804', '4108', '00,41,4108', '马村区', '41', '河南省', '4108', '焦作市', '410804', '马村区', '', '', '', '', 3, 1, ''), ('410811', '4108', '00,41,4108', '山阳区', '41', '河南省', '4108', '焦作市', '410811', '山阳区', '', '', '', '', 3, 1, ''), ('410821', '4108', '00,41,4108', '修武县', '41', '河南省', '4108', '焦作市', '410821', '修武县', '', '', '', '', 3, 1, ''), ('410822', '4108', '00,41,4108', '博爱县', '41', '河南省', '4108', '焦作市', '410822', '博爱县', '', '', '', '', 3, 1, ''), ('410823', '4108', '00,41,4108', '武陟县', '41', '河南省', '4108', '焦作市', '410823', '武陟县', '', '', '', '', 3, 1, ''), ('410825', '4108', '00,41,4108', '温县', '41', '河南省', '4108', '焦作市', '410825', '温县', '', '', '', '', 3, 1, ''), ('410882', '4108', '00,41,4108', '沁阳市', '41', '河南省', '4108', '焦作市', '410882', '沁阳市', '', '', '', '', 3, 1, ''), ('410883', '4108', '00,41,4108', '孟州市', '41', '河南省', '4108', '焦作市', '410883', '孟州市', '', '', '', '', 3, 1, ''), ('4109', '41', '00,41', '濮阳市', '41', '河南省', '4109', '濮阳市', '', '', '', '', '', '', 2, 1, ''), ('410902', '4109', '00,41,4109', '华龙区', '41', '河南省', '4109', '濮阳市', '410902', '华龙区', '', '', '', '', 3, 1, ''), ('410922', '4109', '00,41,4109', '清丰县', '41', '河南省', '4109', '濮阳市', '410922', '清丰县', '', '', '', '', 3, 1, ''), ('410923', '4109', '00,41,4109', '南乐县', '41', '河南省', '4109', '濮阳市', '410923', '南乐县', '', '', '', '', 3, 1, ''), ('410926', '4109', '00,41,4109', '范县', '41', '河南省', '4109', '濮阳市', '410926', '范县', '', '', '', '', 3, 1, ''), ('410927', '4109', '00,41,4109', '台前县', '41', '河南省', '4109', '濮阳市', '410927', '台前县', '', '', '', '', 3, 1, ''), ('410928', '4109', '00,41,4109', '濮阳县', '41', '河南省', '4109', '濮阳市', '410928', '濮阳县', '', '', '', '', 3, 1, ''), ('4110', '41', '00,41', '许昌市', '41', '河南省', '4110', '许昌市', '', '', '', '', '', '', 2, 1, ''), ('411002', '4110', '00,41,4110', '魏都区', '41', '河南省', '4110', '许昌市', '411002', '魏都区', '', '', '', '', 3, 1, ''), ('411003', '4110', '00,41,4110', '建安区', '41', '河南省', '4110', '许昌市', '411003', '建安区', '', '', '', '', 3, 1, ''), ('411024', '4110', '00,41,4110', '鄢陵县', '41', '河南省', '4110', '许昌市', '411024', '鄢陵县', '', '', '', '', 3, 1, ''), ('411025', '4110', '00,41,4110', '襄城县', '41', '河南省', '4110', '许昌市', '411025', '襄城县', '', '', '', '', 3, 1, ''), ('411081', '4110', '00,41,4110', '禹州市', '41', '河南省', '4110', '许昌市', '411081', '禹州市', '', '', '', '', 3, 1, ''), ('411082', '4110', '00,41,4110', '长葛市', '41', '河南省', '4110', '许昌市', '411082', '长葛市', '', '', '', '', 3, 1, ''), ('4111', '41', '00,41', '漯河市', '41', '河南省', '4111', '漯河市', '', '', '', '', '', '', 2, 1, ''), ('411102', '4111', '00,41,4111', '源汇区', '41', '河南省', '4111', '漯河市', '411102', '源汇区', '', '', '', '', 3, 1, ''), ('411103', '4111', '00,41,4111', '郾城区', '41', '河南省', '4111', '漯河市', '411103', '郾城区', '', '', '', '', 3, 1, ''), ('411104', '4111', '00,41,4111', '召陵区', '41', '河南省', '4111', '漯河市', '411104', '召陵区', '', '', '', '', 3, 1, ''), ('411121', '4111', '00,41,4111', '舞阳县', '41', '河南省', '4111', '漯河市', '411121', '舞阳县', '', '', '', '', 3, 1, ''), ('411122', '4111', '00,41,4111', '临颍县', '41', '河南省', '4111', '漯河市', '411122', '临颍县', '', '', '', '', 3, 1, ''), ('4112', '41', '00,41', '三门峡市', '41', '河南省', '4112', '三门峡市', '', '', '', '', '', '', 2, 1, ''), ('411202', '4112', '00,41,4112', '湖滨区', '41', '河南省', '4112', '三门峡市', '411202', '湖滨区', '', '', '', '', 3, 1, ''), ('411203', '4112', '00,41,4112', '陕州区', '41', '河南省', '4112', '三门峡市', '411203', '陕州区', '', '', '', '', 3, 1, ''), ('411221', '4112', '00,41,4112', '渑池县', '41', '河南省', '4112', '三门峡市', '411221', '渑池县', '', '', '', '', 3, 1, ''), ('411224', '4112', '00,41,4112', '卢氏县', '41', '河南省', '4112', '三门峡市', '411224', '卢氏县', '', '', '', '', 3, 1, ''), ('411281', '4112', '00,41,4112', '义马市', '41', '河南省', '4112', '三门峡市', '411281', '义马市', '', '', '', '', 3, 1, ''), ('411282', '4112', '00,41,4112', '灵宝市', '41', '河南省', '4112', '三门峡市', '411282', '灵宝市', '', '', '', '', 3, 1, ''), ('4113', '41', '00,41', '南阳市', '41', '河南省', '4113', '南阳市', '', '', '', '', '', '', 2, 1, ''), ('411302', '4113', '00,41,4113', '宛城区', '41', '河南省', '4113', '南阳市', '411302', '宛城区', '', '', '', '', 3, 1, ''), ('411303', '4113', '00,41,4113', '卧龙区', '41', '河南省', '4113', '南阳市', '411303', '卧龙区', '', '', '', '', 3, 1, ''), ('411321', '4113', '00,41,4113', '南召县', '41', '河南省', '4113', '南阳市', '411321', '南召县', '', '', '', '', 3, 1, ''), ('411322', '4113', '00,41,4113', '方城县', '41', '河南省', '4113', '南阳市', '411322', '方城县', '', '', '', '', 3, 1, ''), ('411323', '4113', '00,41,4113', '西峡县', '41', '河南省', '4113', '南阳市', '411323', '西峡县', '', '', '', '', 3, 1, ''), ('411324', '4113', '00,41,4113', '镇平县', '41', '河南省', '4113', '南阳市', '411324', '镇平县', '', '', '', '', 3, 1, ''), ('411325', '4113', '00,41,4113', '内乡县', '41', '河南省', '4113', '南阳市', '411325', '内乡县', '', '', '', '', 3, 1, ''), ('411326', '4113', '00,41,4113', '淅川县', '41', '河南省', '4113', '南阳市', '411326', '淅川县', '', '', '', '', 3, 1, ''), ('411327', '4113', '00,41,4113', '社旗县', '41', '河南省', '4113', '南阳市', '411327', '社旗县', '', '', '', '', 3, 1, ''), ('411328', '4113', '00,41,4113', '唐河县', '41', '河南省', '4113', '南阳市', '411328', '唐河县', '', '', '', '', 3, 1, ''), ('411329', '4113', '00,41,4113', '新野县', '41', '河南省', '4113', '南阳市', '411329', '新野县', '', '', '', '', 3, 1, ''), ('411330', '4113', '00,41,4113', '桐柏县', '41', '河南省', '4113', '南阳市', '411330', '桐柏县', '', '', '', '', 3, 1, ''), ('411381', '4113', '00,41,4113', '邓州市', '41', '河南省', '4113', '南阳市', '411381', '邓州市', '', '', '', '', 3, 1, ''), ('4114', '41', '00,41', '商丘市', '41', '河南省', '4114', '商丘市', '', '', '', '', '', '', 2, 1, ''), ('411402', '4114', '00,41,4114', '梁园区', '41', '河南省', '4114', '商丘市', '411402', '梁园区', '', '', '', '', 3, 1, ''), ('411403', '4114', '00,41,4114', '睢阳区', '41', '河南省', '4114', '商丘市', '411403', '睢阳区', '', '', '', '', 3, 1, ''), ('411421', '4114', '00,41,4114', '民权县', '41', '河南省', '4114', '商丘市', '411421', '民权县', '', '', '', '', 3, 1, ''), ('411422', '4114', '00,41,4114', '睢县', '41', '河南省', '4114', '商丘市', '411422', '睢县', '', '', '', '', 3, 1, ''), ('411423', '4114', '00,41,4114', '宁陵县', '41', '河南省', '4114', '商丘市', '411423', '宁陵县', '', '', '', '', 3, 1, ''), ('411424', '4114', '00,41,4114', '柘城县', '41', '河南省', '4114', '商丘市', '411424', '柘城县', '', '', '', '', 3, 1, ''), ('411425', '4114', '00,41,4114', '虞城县', '41', '河南省', '4114', '商丘市', '411425', '虞城县', '', '', '', '', 3, 1, ''), ('411426', '4114', '00,41,4114', '夏邑县', '41', '河南省', '4114', '商丘市', '411426', '夏邑县', '', '', '', '', 3, 1, ''), ('411481', '4114', '00,41,4114', '永城市', '41', '河南省', '4114', '商丘市', '411481', '永城市', '', '', '', '', 3, 1, ''), ('4115', '41', '00,41', '信阳市', '41', '河南省', '4115', '信阳市', '', '', '', '', '', '', 2, 1, ''), ('411502', '4115', '00,41,4115', '浉河区', '41', '河南省', '4115', '信阳市', '411502', '浉河区', '', '', '', '', 3, 1, ''), ('411503', '4115', '00,41,4115', '平桥区', '41', '河南省', '4115', '信阳市', '411503', '平桥区', '', '', '', '', 3, 1, ''), ('411521', '4115', '00,41,4115', '罗山县', '41', '河南省', '4115', '信阳市', '411521', '罗山县', '', '', '', '', 3, 1, ''), ('411522', '4115', '00,41,4115', '光山县', '41', '河南省', '4115', '信阳市', '411522', '光山县', '', '', '', '', 3, 1, ''), ('411523', '4115', '00,41,4115', '新县', '41', '河南省', '4115', '信阳市', '411523', '新县', '', '', '', '', 3, 1, ''), ('411524', '4115', '00,41,4115', '商城县', '41', '河南省', '4115', '信阳市', '411524', '商城县', '', '', '', '', 3, 1, ''), ('411525', '4115', '00,41,4115', '固始县', '41', '河南省', '4115', '信阳市', '411525', '固始县', '', '', '', '', 3, 1, ''), ('411526', '4115', '00,41,4115', '潢川县', '41', '河南省', '4115', '信阳市', '411526', '潢川县', '', '', '', '', 3, 1, ''), ('411527', '4115', '00,41,4115', '淮滨县', '41', '河南省', '4115', '信阳市', '411527', '淮滨县', '', '', '', '', 3, 1, ''), ('411528', '4115', '00,41,4115', '息县', '41', '河南省', '4115', '信阳市', '411528', '息县', '', '', '', '', 3, 1, ''), ('4116', '41', '00,41', '周口市', '41', '河南省', '4116', '周口市', '', '', '', '', '', '', 2, 1, ''), ('411602', '4116', '00,41,4116', '川汇区', '41', '河南省', '4116', '周口市', '411602', '川汇区', '', '', '', '', 3, 1, ''), ('411603', '4116', '00,41,4116', '淮阳区', '41', '河南省', '4116', '周口市', '411603', '淮阳区', '', '', '', '', 3, 1, ''), ('411621', '4116', '00,41,4116', '扶沟县', '41', '河南省', '4116', '周口市', '411621', '扶沟县', '', '', '', '', 3, 1, ''), ('411622', '4116', '00,41,4116', '西华县', '41', '河南省', '4116', '周口市', '411622', '西华县', '', '', '', '', 3, 1, ''), ('411623', '4116', '00,41,4116', '商水县', '41', '河南省', '4116', '周口市', '411623', '商水县', '', '', '', '', 3, 1, ''), ('411624', '4116', '00,41,4116', '沈丘县', '41', '河南省', '4116', '周口市', '411624', '沈丘县', '', '', '', '', 3, 1, ''), ('411625', '4116', '00,41,4116', '郸城县', '41', '河南省', '4116', '周口市', '411625', '郸城县', '', '', '', '', 3, 1, ''), ('411627', '4116', '00,41,4116', '太康县', '41', '河南省', '4116', '周口市', '411627', '太康县', '', '', '', '', 3, 1, ''), ('411628', '4116', '00,41,4116', '鹿邑县', '41', '河南省', '4116', '周口市', '411628', '鹿邑县', '', '', '', '', 3, 1, ''), ('411681', '4116', '00,41,4116', '项城市', '41', '河南省', '4116', '周口市', '411681', '项城市', '', '', '', '', 3, 1, ''), ('4117', '41', '00,41', '驻马店市', '41', '河南省', '4117', '驻马店市', '', '', '', '', '', '', 2, 1, ''), ('411702', '4117', '00,41,4117', '驿城区', '41', '河南省', '4117', '驻马店市', '411702', '驿城区', '', '', '', '', 3, 1, ''), ('411721', '4117', '00,41,4117', '西平县', '41', '河南省', '4117', '驻马店市', '411721', '西平县', '', '', '', '', 3, 1, ''), ('411722', '4117', '00,41,4117', '上蔡县', '41', '河南省', '4117', '驻马店市', '411722', '上蔡县', '', '', '', '', 3, 1, ''), ('411723', '4117', '00,41,4117', '平舆县', '41', '河南省', '4117', '驻马店市', '411723', '平舆县', '', '', '', '', 3, 1, ''), ('411724', '4117', '00,41,4117', '正阳县', '41', '河南省', '4117', '驻马店市', '411724', '正阳县', '', '', '', '', 3, 1, ''), ('411725', '4117', '00,41,4117', '确山县', '41', '河南省', '4117', '驻马店市', '411725', '确山县', '', '', '', '', 3, 1, ''), ('411726', '4117', '00,41,4117', '泌阳县', '41', '河南省', '4117', '驻马店市', '411726', '泌阳县', '', '', '', '', 3, 1, ''), ('411727', '4117', '00,41,4117', '汝南县', '41', '河南省', '4117', '驻马店市', '411727', '汝南县', '', '', '', '', 3, 1, ''), ('411728', '4117', '00,41,4117', '遂平县', '41', '河南省', '4117', '驻马店市', '411728', '遂平县', '', '', '', '', 3, 1, ''), ('411729', '4117', '00,41,4117', '新蔡县', '41', '河南省', '4117', '驻马店市', '411729', '新蔡县', '', '', '', '', 3, 1, ''), ('4190', '41', '00,41', '省直辖县级行政区', '41', '河南省', '4190', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('419001', '4190', '00,41,4190', '济源市', '41', '河南省', '4190', '省直辖县级行政区', '419001', '济源市', '', '', '', '', 3, 1, ''), ('42', '00', '00', '湖北省', '42', '湖北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4201', '42', '00,42', '武汉市', '42', '湖北省', '4201', '武汉市', '', '', '', '', '', '', 2, 1, ''), ('420102', '4201', '00,42,4201', '江岸区', '42', '湖北省', '4201', '武汉市', '420102', '江岸区', '', '', '', '', 3, 1, ''), ('420103', '4201', '00,42,4201', '江汉区', '42', '湖北省', '4201', '武汉市', '420103', '江汉区', '', '', '', '', 3, 1, ''), ('420104', '4201', '00,42,4201', '硚口区', '42', '湖北省', '4201', '武汉市', '420104', '硚口区', '', '', '', '', 3, 1, ''), ('420105', '4201', '00,42,4201', '汉阳区', '42', '湖北省', '4201', '武汉市', '420105', '汉阳区', '', '', '', '', 3, 1, ''), ('420106', '4201', '00,42,4201', '武昌区', '42', '湖北省', '4201', '武汉市', '420106', '武昌区', '', '', '', '', 3, 1, ''), ('420107', '4201', '00,42,4201', '青山区', '42', '湖北省', '4201', '武汉市', '420107', '青山区', '', '', '', '', 3, 1, ''), ('420111', '4201', '00,42,4201', '洪山区', '42', '湖北省', '4201', '武汉市', '420111', '洪山区', '', '', '', '', 3, 1, ''), ('420112', '4201', '00,42,4201', '东西湖区', '42', '湖北省', '4201', '武汉市', '420112', '东西湖区', '', '', '', '', 3, 1, ''), ('420113', '4201', '00,42,4201', '汉南区', '42', '湖北省', '4201', '武汉市', '420113', '汉南区', '', '', '', '', 3, 1, ''), ('420114', '4201', '00,42,4201', '蔡甸区', '42', '湖北省', '4201', '武汉市', '420114', '蔡甸区', '', '', '', '', 3, 1, ''), ('420115', '4201', '00,42,4201', '江夏区', '42', '湖北省', '4201', '武汉市', '420115', '江夏区', '', '', '', '', 3, 1, ''), ('420116', '4201', '00,42,4201', '黄陂区', '42', '湖北省', '4201', '武汉市', '420116', '黄陂区', '', '', '', '', 3, 1, ''), ('420117', '4201', '00,42,4201', '新洲区', '42', '湖北省', '4201', '武汉市', '420117', '新洲区', '', '', '', '', 3, 1, ''), ('4202', '42', '00,42', '黄石市', '42', '湖北省', '4202', '黄石市', '', '', '', '', '', '', 2, 1, ''), ('420202', '4202', '00,42,4202', '黄石港区', '42', '湖北省', '4202', '黄石市', '420202', '黄石港区', '', '', '', '', 3, 1, ''), ('420203', '4202', '00,42,4202', '西塞山区', '42', '湖北省', '4202', '黄石市', '420203', '西塞山区', '', '', '', '', 3, 1, ''), ('420204', '4202', '00,42,4202', '下陆区', '42', '湖北省', '4202', '黄石市', '420204', '下陆区', '', '', '', '', 3, 1, ''), ('420205', '4202', '00,42,4202', '铁山区', '42', '湖北省', '4202', '黄石市', '420205', '铁山区', '', '', '', '', 3, 1, ''), ('420222', '4202', '00,42,4202', '阳新县', '42', '湖北省', '4202', '黄石市', '420222', '阳新县', '', '', '', '', 3, 1, ''), ('420281', '4202', '00,42,4202', '大冶市', '42', '湖北省', '4202', '黄石市', '420281', '大冶市', '', '', '', '', 3, 1, ''), ('4203', '42', '00,42', '十堰市', '42', '湖北省', '4203', '十堰市', '', '', '', '', '', '', 2, 1, ''), ('420302', '4203', '00,42,4203', '茅箭区', '42', '湖北省', '4203', '十堰市', '420302', '茅箭区', '', '', '', '', 3, 1, ''), ('420303', '4203', '00,42,4203', '张湾区', '42', '湖北省', '4203', '十堰市', '420303', '张湾区', '', '', '', '', 3, 1, ''), ('420304', '4203', '00,42,4203', '郧阳区', '42', '湖北省', '4203', '十堰市', '420304', '郧阳区', '', '', '', '', 3, 1, ''), ('420322', '4203', '00,42,4203', '郧西县', '42', '湖北省', '4203', '十堰市', '420322', '郧西县', '', '', '', '', 3, 1, ''), ('420323', '4203', '00,42,4203', '竹山县', '42', '湖北省', '4203', '十堰市', '420323', '竹山县', '', '', '', '', 3, 1, ''), ('420324', '4203', '00,42,4203', '竹溪县', '42', '湖北省', '4203', '十堰市', '420324', '竹溪县', '', '', '', '', 3, 1, ''), ('420325', '4203', '00,42,4203', '房县', '42', '湖北省', '4203', '十堰市', '420325', '房县', '', '', '', '', 3, 1, ''), ('420381', '4203', '00,42,4203', '丹江口市', '42', '湖北省', '4203', '十堰市', '420381', '丹江口市', '', '', '', '', 3, 1, ''), ('4205', '42', '00,42', '宜昌市', '42', '湖北省', '4205', '宜昌市', '', '', '', '', '', '', 2, 1, ''), ('420502', '4205', '00,42,4205', '西陵区', '42', '湖北省', '4205', '宜昌市', '420502', '西陵区', '', '', '', '', 3, 1, ''), ('420503', '4205', '00,42,4205', '伍家岗区', '42', '湖北省', '4205', '宜昌市', '420503', '伍家岗区', '', '', '', '', 3, 1, ''), ('420504', '4205', '00,42,4205', '点军区', '42', '湖北省', '4205', '宜昌市', '420504', '点军区', '', '', '', '', 3, 1, ''), ('420505', '4205', '00,42,4205', '猇亭区', '42', '湖北省', '4205', '宜昌市', '420505', '猇亭区', '', '', '', '', 3, 1, ''), ('420506', '4205', '00,42,4205', '夷陵区', '42', '湖北省', '4205', '宜昌市', '420506', '夷陵区', '', '', '', '', 3, 1, ''), ('420525', '4205', '00,42,4205', '远安县', '42', '湖北省', '4205', '宜昌市', '420525', '远安县', '', '', '', '', 3, 1, ''), ('420526', '4205', '00,42,4205', '兴山县', '42', '湖北省', '4205', '宜昌市', '420526', '兴山县', '', '', '', '', 3, 1, ''), ('420527', '4205', '00,42,4205', '秭归县', '42', '湖北省', '4205', '宜昌市', '420527', '秭归县', '', '', '', '', 3, 1, ''), ('420528', '4205', '00,42,4205', '长阳土家族自治县', '42', '湖北省', '4205', '宜昌市', '420528', '长阳土家族自治县', '', '', '', '', 3, 1, ''), ('420529', '4205', '00,42,4205', '五峰土家族自治县', '42', '湖北省', '4205', '宜昌市', '420529', '五峰土家族自治县', '', '', '', '', 3, 1, ''), ('420581', '4205', '00,42,4205', '宜都市', '42', '湖北省', '4205', '宜昌市', '420581', '宜都市', '', '', '', '', 3, 1, ''), ('420582', '4205', '00,42,4205', '当阳市', '42', '湖北省', '4205', '宜昌市', '420582', '当阳市', '', '', '', '', 3, 1, ''), ('420583', '4205', '00,42,4205', '枝江市', '42', '湖北省', '4205', '宜昌市', '420583', '枝江市', '', '', '', '', 3, 1, ''), ('4206', '42', '00,42', '襄阳市', '42', '湖北省', '4206', '襄阳市', '', '', '', '', '', '', 2, 1, ''), ('420602', '4206', '00,42,4206', '襄城区', '42', '湖北省', '4206', '襄阳市', '420602', '襄城区', '', '', '', '', 3, 1, ''), ('420606', '4206', '00,42,4206', '樊城区', '42', '湖北省', '4206', '襄阳市', '420606', '樊城区', '', '', '', '', 3, 1, ''), ('420607', '4206', '00,42,4206', '襄州区', '42', '湖北省', '4206', '襄阳市', '420607', '襄州区', '', '', '', '', 3, 1, ''), ('420624', '4206', '00,42,4206', '南漳县', '42', '湖北省', '4206', '襄阳市', '420624', '南漳县', '', '', '', '', 3, 1, ''), ('420625', '4206', '00,42,4206', '谷城县', '42', '湖北省', '4206', '襄阳市', '420625', '谷城县', '', '', '', '', 3, 1, ''), ('420626', '4206', '00,42,4206', '保康县', '42', '湖北省', '4206', '襄阳市', '420626', '保康县', '', '', '', '', 3, 1, ''), ('420682', '4206', '00,42,4206', '老河口市', '42', '湖北省', '4206', '襄阳市', '420682', '老河口市', '', '', '', '', 3, 1, ''), ('420683', '4206', '00,42,4206', '枣阳市', '42', '湖北省', '4206', '襄阳市', '420683', '枣阳市', '', '', '', '', 3, 1, ''), ('420684', '4206', '00,42,4206', '宜城市', '42', '湖北省', '4206', '襄阳市', '420684', '宜城市', '', '', '', '', 3, 1, ''), ('4207', '42', '00,42', '鄂州市', '42', '湖北省', '4207', '鄂州市', '', '', '', '', '', '', 2, 1, ''), ('420702', '4207', '00,42,4207', '梁子湖区', '42', '湖北省', '4207', '鄂州市', '420702', '梁子湖区', '', '', '', '', 3, 1, ''), ('420703', '4207', '00,42,4207', '华容区', '42', '湖北省', '4207', '鄂州市', '420703', '华容区', '', '', '', '', 3, 1, ''), ('420704', '4207', '00,42,4207', '鄂城区', '42', '湖北省', '4207', '鄂州市', '420704', '鄂城区', '', '', '', '', 3, 1, ''), ('4208', '42', '00,42', '荆门市', '42', '湖北省', '4208', '荆门市', '', '', '', '', '', '', 2, 1, ''), ('420802', '4208', '00,42,4208', '东宝区', '42', '湖北省', '4208', '荆门市', '420802', '东宝区', '', '', '', '', 3, 1, ''), ('420804', '4208', '00,42,4208', '掇刀区', '42', '湖北省', '4208', '荆门市', '420804', '掇刀区', '', '', '', '', 3, 1, ''), ('420822', '4208', '00,42,4208', '沙洋县', '42', '湖北省', '4208', '荆门市', '420822', '沙洋县', '', '', '', '', 3, 1, ''), ('420881', '4208', '00,42,4208', '钟祥市', '42', '湖北省', '4208', '荆门市', '420881', '钟祥市', '', '', '', '', 3, 1, ''), ('420882', '4208', '00,42,4208', '京山市', '42', '湖北省', '4208', '荆门市', '420882', '京山市', '', '', '', '', 3, 1, ''), ('4209', '42', '00,42', '孝感市', '42', '湖北省', '4209', '孝感市', '', '', '', '', '', '', 2, 1, ''), ('420902', '4209', '00,42,4209', '孝南区', '42', '湖北省', '4209', '孝感市', '420902', '孝南区', '', '', '', '', 3, 1, ''), ('420921', '4209', '00,42,4209', '孝昌县', '42', '湖北省', '4209', '孝感市', '420921', '孝昌县', '', '', '', '', 3, 1, ''), ('420922', '4209', '00,42,4209', '大悟县', '42', '湖北省', '4209', '孝感市', '420922', '大悟县', '', '', '', '', 3, 1, ''), ('420923', '4209', '00,42,4209', '云梦县', '42', '湖北省', '4209', '孝感市', '420923', '云梦县', '', '', '', '', 3, 1, ''), ('420981', '4209', '00,42,4209', '应城市', '42', '湖北省', '4209', '孝感市', '420981', '应城市', '', '', '', '', 3, 1, ''), ('420982', '4209', '00,42,4209', '安陆市', '42', '湖北省', '4209', '孝感市', '420982', '安陆市', '', '', '', '', 3, 1, ''), ('420984', '4209', '00,42,4209', '汉川市', '42', '湖北省', '4209', '孝感市', '420984', '汉川市', '', '', '', '', 3, 1, ''), ('4210', '42', '00,42', '荆州市', '42', '湖北省', '4210', '荆州市', '', '', '', '', '', '', 2, 1, ''), ('421002', '4210', '00,42,4210', '沙市区', '42', '湖北省', '4210', '荆州市', '421002', '沙市区', '', '', '', '', 3, 1, ''), ('421003', '4210', '00,42,4210', '荆州区', '42', '湖北省', '4210', '荆州市', '421003', '荆州区', '', '', '', '', 3, 1, ''), ('421022', '4210', '00,42,4210', '公安县', '42', '湖北省', '4210', '荆州市', '421022', '公安县', '', '', '', '', 3, 1, ''), ('421023', '4210', '00,42,4210', '监利县', '42', '湖北省', '4210', '荆州市', '421023', '监利县', '', '', '', '', 3, 1, ''), ('421024', '4210', '00,42,4210', '江陵县', '42', '湖北省', '4210', '荆州市', '421024', '江陵县', '', '', '', '', 3, 1, ''), ('421081', '4210', '00,42,4210', '石首市', '42', '湖北省', '4210', '荆州市', '421081', '石首市', '', '', '', '', 3, 1, ''), ('421083', '4210', '00,42,4210', '洪湖市', '42', '湖北省', '4210', '荆州市', '421083', '洪湖市', '', '', '', '', 3, 1, ''), ('421087', '4210', '00,42,4210', '松滋市', '42', '湖北省', '4210', '荆州市', '421087', '松滋市', '', '', '', '', 3, 1, ''), ('4211', '42', '00,42', '黄冈市', '42', '湖北省', '4211', '黄冈市', '', '', '', '', '', '', 2, 1, ''), ('421102', '4211', '00,42,4211', '黄州区', '42', '湖北省', '4211', '黄冈市', '421102', '黄州区', '', '', '', '', 3, 1, ''), ('421121', '4211', '00,42,4211', '团风县', '42', '湖北省', '4211', '黄冈市', '421121', '团风县', '', '', '', '', 3, 1, ''), ('421122', '4211', '00,42,4211', '红安县', '42', '湖北省', '4211', '黄冈市', '421122', '红安县', '', '', '', '', 3, 1, ''), ('421123', '4211', '00,42,4211', '罗田县', '42', '湖北省', '4211', '黄冈市', '421123', '罗田县', '', '', '', '', 3, 1, ''), ('421124', '4211', '00,42,4211', '英山县', '42', '湖北省', '4211', '黄冈市', '421124', '英山县', '', '', '', '', 3, 1, ''), ('421125', '4211', '00,42,4211', '浠水县', '42', '湖北省', '4211', '黄冈市', '421125', '浠水县', '', '', '', '', 3, 1, ''), ('421126', '4211', '00,42,4211', '蕲春县', '42', '湖北省', '4211', '黄冈市', '421126', '蕲春县', '', '', '', '', 3, 1, ''), ('421127', '4211', '00,42,4211', '黄梅县', '42', '湖北省', '4211', '黄冈市', '421127', '黄梅县', '', '', '', '', 3, 1, ''), ('421181', '4211', '00,42,4211', '麻城市', '42', '湖北省', '4211', '黄冈市', '421181', '麻城市', '', '', '', '', 3, 1, ''), ('421182', '4211', '00,42,4211', '武穴市', '42', '湖北省', '4211', '黄冈市', '421182', '武穴市', '', '', '', '', 3, 1, ''), ('4212', '42', '00,42', '咸宁市', '42', '湖北省', '4212', '咸宁市', '', '', '', '', '', '', 2, 1, ''), ('421202', '4212', '00,42,4212', '咸安区', '42', '湖北省', '4212', '咸宁市', '421202', '咸安区', '', '', '', '', 3, 1, ''), ('421221', '4212', '00,42,4212', '嘉鱼县', '42', '湖北省', '4212', '咸宁市', '421221', '嘉鱼县', '', '', '', '', 3, 1, ''), ('421222', '4212', '00,42,4212', '通城县', '42', '湖北省', '4212', '咸宁市', '421222', '通城县', '', '', '', '', 3, 1, ''), ('421223', '4212', '00,42,4212', '崇阳县', '42', '湖北省', '4212', '咸宁市', '421223', '崇阳县', '', '', '', '', 3, 1, ''), ('421224', '4212', '00,42,4212', '通山县', '42', '湖北省', '4212', '咸宁市', '421224', '通山县', '', '', '', '', 3, 1, ''), ('421281', '4212', '00,42,4212', '赤壁市', '42', '湖北省', '4212', '咸宁市', '421281', '赤壁市', '', '', '', '', 3, 1, ''), ('4213', '42', '00,42', '随州市', '42', '湖北省', '4213', '随州市', '', '', '', '', '', '', 2, 1, ''), ('421303', '4213', '00,42,4213', '曾都区', '42', '湖北省', '4213', '随州市', '421303', '曾都区', '', '', '', '', 3, 1, ''), ('421321', '4213', '00,42,4213', '随县', '42', '湖北省', '4213', '随州市', '421321', '随县', '', '', '', '', 3, 1, ''), ('421381', '4213', '00,42,4213', '广水市', '42', '湖北省', '4213', '随州市', '421381', '广水市', '', '', '', '', 3, 1, ''), ('4228', '42', '00,42', '恩施土家族苗族自治州', '42', '湖北省', '4228', '恩施土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('422801', '4228', '00,42,4228', '恩施市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422801', '恩施市', '', '', '', '', 3, 1, ''), ('422802', '4228', '00,42,4228', '利川市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422802', '利川市', '', '', '', '', 3, 1, ''), ('422822', '4228', '00,42,4228', '建始县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422822', '建始县', '', '', '', '', 3, 1, ''), ('422823', '4228', '00,42,4228', '巴东县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422823', '巴东县', '', '', '', '', 3, 1, ''), ('422825', '4228', '00,42,4228', '宣恩县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422825', '宣恩县', '', '', '', '', 3, 1, ''), ('422826', '4228', '00,42,4228', '咸丰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422826', '咸丰县', '', '', '', '', 3, 1, ''), ('422827', '4228', '00,42,4228', '来凤县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422827', '来凤县', '', '', '', '', 3, 1, ''), ('422828', '4228', '00,42,4228', '鹤峰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422828', '鹤峰县', '', '', '', '', 3, 1, ''), ('4290', '42', '00,42', '省直辖县级行政区', '42', '湖北省', '4290', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('429004', '4290', '00,42,4290', '仙桃市', '42', '湖北省', '4290', '省直辖县级行政区', '429004', '仙桃市', '', '', '', '', 3, 1, ''), ('429005', '4290', '00,42,4290', '潜江市', '42', '湖北省', '4290', '省直辖县级行政区', '429005', '潜江市', '', '', '', '', 3, 1, ''), ('429006', '4290', '00,42,4290', '天门市', '42', '湖北省', '4290', '省直辖县级行政区', '429006', '天门市', '', '', '', '', 3, 1, ''), ('429021', '4290', '00,42,4290', '神农架林区', '42', '湖北省', '4290', '省直辖县级行政区', '429021', '神农架林区', '', '', '', '', 3, 1, ''), ('43', '00', '00', '湖南省', '43', '湖南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4301', '43', '00,43', '长沙市', '43', '湖南省', '4301', '长沙市', '', '', '', '', '', '', 2, 1, ''), ('430102', '4301', '00,43,4301', '芙蓉区', '43', '湖南省', '4301', '长沙市', '430102', '芙蓉区', '', '', '', '', 3, 1, ''), ('430103', '4301', '00,43,4301', '天心区', '43', '湖南省', '4301', '长沙市', '430103', '天心区', '', '', '', '', 3, 1, ''), ('430104', '4301', '00,43,4301', '岳麓区', '43', '湖南省', '4301', '长沙市', '430104', '岳麓区', '', '', '', '', 3, 1, ''), ('430105', '4301', '00,43,4301', '开福区', '43', '湖南省', '4301', '长沙市', '430105', '开福区', '', '', '', '', 3, 1, ''), ('430111', '4301', '00,43,4301', '雨花区', '43', '湖南省', '4301', '长沙市', '430111', '雨花区', '', '', '', '', 3, 1, ''), ('430112', '4301', '00,43,4301', '望城区', '43', '湖南省', '4301', '长沙市', '430112', '望城区', '', '', '', '', 3, 1, ''), ('430121', '4301', '00,43,4301', '长沙县', '43', '湖南省', '4301', '长沙市', '430121', '长沙县', '', '', '', '', 3, 1, ''), ('430181', '4301', '00,43,4301', '浏阳市', '43', '湖南省', '4301', '长沙市', '430181', '浏阳市', '', '', '', '', 3, 1, ''), ('430182', '4301', '00,43,4301', '宁乡市', '43', '湖南省', '4301', '长沙市', '430182', '宁乡市', '', '', '', '', 3, 1, ''), ('4302', '43', '00,43', '株洲市', '43', '湖南省', '4302', '株洲市', '', '', '', '', '', '', 2, 1, ''), ('430202', '4302', '00,43,4302', '荷塘区', '43', '湖南省', '4302', '株洲市', '430202', '荷塘区', '', '', '', '', 3, 1, ''), ('430203', '4302', '00,43,4302', '芦淞区', '43', '湖南省', '4302', '株洲市', '430203', '芦淞区', '', '', '', '', 3, 1, ''), ('430204', '4302', '00,43,4302', '石峰区', '43', '湖南省', '4302', '株洲市', '430204', '石峰区', '', '', '', '', 3, 1, ''), ('430211', '4302', '00,43,4302', '天元区', '43', '湖南省', '4302', '株洲市', '430211', '天元区', '', '', '', '', 3, 1, ''), ('430212', '4302', '00,43,4302', '渌口区', '43', '湖南省', '4302', '株洲市', '430212', '渌口区', '', '', '', '', 3, 1, ''), ('430223', '4302', '00,43,4302', '攸县', '43', '湖南省', '4302', '株洲市', '430223', '攸县', '', '', '', '', 3, 1, ''), ('430224', '4302', '00,43,4302', '茶陵县', '43', '湖南省', '4302', '株洲市', '430224', '茶陵县', '', '', '', '', 3, 1, ''), ('430225', '4302', '00,43,4302', '炎陵县', '43', '湖南省', '4302', '株洲市', '430225', '炎陵县', '', '', '', '', 3, 1, ''), ('430281', '4302', '00,43,4302', '醴陵市', '43', '湖南省', '4302', '株洲市', '430281', '醴陵市', '', '', '', '', 3, 1, ''), ('4303', '43', '00,43', '湘潭市', '43', '湖南省', '4303', '湘潭市', '', '', '', '', '', '', 2, 1, ''), ('430302', '4303', '00,43,4303', '雨湖区', '43', '湖南省', '4303', '湘潭市', '430302', '雨湖区', '', '', '', '', 3, 1, ''), ('430304', '4303', '00,43,4303', '岳塘区', '43', '湖南省', '4303', '湘潭市', '430304', '岳塘区', '', '', '', '', 3, 1, ''), ('430321', '4303', '00,43,4303', '湘潭县', '43', '湖南省', '4303', '湘潭市', '430321', '湘潭县', '', '', '', '', 3, 1, ''), ('430381', '4303', '00,43,4303', '湘乡市', '43', '湖南省', '4303', '湘潭市', '430381', '湘乡市', '', '', '', '', 3, 1, ''), ('430382', '4303', '00,43,4303', '韶山市', '43', '湖南省', '4303', '湘潭市', '430382', '韶山市', '', '', '', '', 3, 1, ''), ('4304', '43', '00,43', '衡阳市', '43', '湖南省', '4304', '衡阳市', '', '', '', '', '', '', 2, 1, ''), ('430405', '4304', '00,43,4304', '珠晖区', '43', '湖南省', '4304', '衡阳市', '430405', '珠晖区', '', '', '', '', 3, 1, ''), ('430406', '4304', '00,43,4304', '雁峰区', '43', '湖南省', '4304', '衡阳市', '430406', '雁峰区', '', '', '', '', 3, 1, ''), ('430407', '4304', '00,43,4304', '石鼓区', '43', '湖南省', '4304', '衡阳市', '430407', '石鼓区', '', '', '', '', 3, 1, ''), ('430408', '4304', '00,43,4304', '蒸湘区', '43', '湖南省', '4304', '衡阳市', '430408', '蒸湘区', '', '', '', '', 3, 1, ''), ('430412', '4304', '00,43,4304', '南岳区', '43', '湖南省', '4304', '衡阳市', '430412', '南岳区', '', '', '', '', 3, 1, ''), ('430421', '4304', '00,43,4304', '衡阳县', '43', '湖南省', '4304', '衡阳市', '430421', '衡阳县', '', '', '', '', 3, 1, ''), ('430422', '4304', '00,43,4304', '衡南县', '43', '湖南省', '4304', '衡阳市', '430422', '衡南县', '', '', '', '', 3, 1, ''), ('430423', '4304', '00,43,4304', '衡山县', '43', '湖南省', '4304', '衡阳市', '430423', '衡山县', '', '', '', '', 3, 1, ''), ('430424', '4304', '00,43,4304', '衡东县', '43', '湖南省', '4304', '衡阳市', '430424', '衡东县', '', '', '', '', 3, 1, ''), ('430426', '4304', '00,43,4304', '祁东县', '43', '湖南省', '4304', '衡阳市', '430426', '祁东县', '', '', '', '', 3, 1, ''), ('430481', '4304', '00,43,4304', '耒阳市', '43', '湖南省', '4304', '衡阳市', '430481', '耒阳市', '', '', '', '', 3, 1, ''), ('430482', '4304', '00,43,4304', '常宁市', '43', '湖南省', '4304', '衡阳市', '430482', '常宁市', '', '', '', '', 3, 1, ''), ('4305', '43', '00,43', '邵阳市', '43', '湖南省', '4305', '邵阳市', '', '', '', '', '', '', 2, 1, ''), ('430502', '4305', '00,43,4305', '双清区', '43', '湖南省', '4305', '邵阳市', '430502', '双清区', '', '', '', '', 3, 1, ''), ('430503', '4305', '00,43,4305', '大祥区', '43', '湖南省', '4305', '邵阳市', '430503', '大祥区', '', '', '', '', 3, 1, ''), ('430511', '4305', '00,43,4305', '北塔区', '43', '湖南省', '4305', '邵阳市', '430511', '北塔区', '', '', '', '', 3, 1, ''), ('430522', '4305', '00,43,4305', '新邵县', '43', '湖南省', '4305', '邵阳市', '430522', '新邵县', '', '', '', '', 3, 1, ''), ('430523', '4305', '00,43,4305', '邵阳县', '43', '湖南省', '4305', '邵阳市', '430523', '邵阳县', '', '', '', '', 3, 1, ''), ('430524', '4305', '00,43,4305', '隆回县', '43', '湖南省', '4305', '邵阳市', '430524', '隆回县', '', '', '', '', 3, 1, ''), ('430525', '4305', '00,43,4305', '洞口县', '43', '湖南省', '4305', '邵阳市', '430525', '洞口县', '', '', '', '', 3, 1, ''), ('430527', '4305', '00,43,4305', '绥宁县', '43', '湖南省', '4305', '邵阳市', '430527', '绥宁县', '', '', '', '', 3, 1, ''), ('430528', '4305', '00,43,4305', '新宁县', '43', '湖南省', '4305', '邵阳市', '430528', '新宁县', '', '', '', '', 3, 1, ''), ('430529', '4305', '00,43,4305', '城步苗族自治县', '43', '湖南省', '4305', '邵阳市', '430529', '城步苗族自治县', '', '', '', '', 3, 1, ''), ('430581', '4305', '00,43,4305', '武冈市', '43', '湖南省', '4305', '邵阳市', '430581', '武冈市', '', '', '', '', 3, 1, ''), ('430582', '4305', '00,43,4305', '邵东市', '43', '湖南省', '4305', '邵阳市', '430582', '邵东市', '', '', '', '', 3, 1, ''), ('4306', '43', '00,43', '岳阳市', '43', '湖南省', '4306', '岳阳市', '', '', '', '', '', '', 2, 1, ''), ('430602', '4306', '00,43,4306', '岳阳楼区', '43', '湖南省', '4306', '岳阳市', '430602', '岳阳楼区', '', '', '', '', 3, 1, ''), ('430603', '4306', '00,43,4306', '云溪区', '43', '湖南省', '4306', '岳阳市', '430603', '云溪区', '', '', '', '', 3, 1, ''), ('430611', '4306', '00,43,4306', '君山区', '43', '湖南省', '4306', '岳阳市', '430611', '君山区', '', '', '', '', 3, 1, ''), ('430621', '4306', '00,43,4306', '岳阳县', '43', '湖南省', '4306', '岳阳市', '430621', '岳阳县', '', '', '', '', 3, 1, ''), ('430623', '4306', '00,43,4306', '华容县', '43', '湖南省', '4306', '岳阳市', '430623', '华容县', '', '', '', '', 3, 1, ''), ('430624', '4306', '00,43,4306', '湘阴县', '43', '湖南省', '4306', '岳阳市', '430624', '湘阴县', '', '', '', '', 3, 1, ''), ('430626', '4306', '00,43,4306', '平江县', '43', '湖南省', '4306', '岳阳市', '430626', '平江县', '', '', '', '', 3, 1, ''), ('430681', '4306', '00,43,4306', '汨罗市', '43', '湖南省', '4306', '岳阳市', '430681', '汨罗市', '', '', '', '', 3, 1, ''), ('430682', '4306', '00,43,4306', '临湘市', '43', '湖南省', '4306', '岳阳市', '430682', '临湘市', '', '', '', '', 3, 1, ''), ('4307', '43', '00,43', '常德市', '43', '湖南省', '4307', '常德市', '', '', '', '', '', '', 2, 1, ''), ('430702', '4307', '00,43,4307', '武陵区', '43', '湖南省', '4307', '常德市', '430702', '武陵区', '', '', '', '', 3, 1, ''), ('430703', '4307', '00,43,4307', '鼎城区', '43', '湖南省', '4307', '常德市', '430703', '鼎城区', '', '', '', '', 3, 1, ''), ('430721', '4307', '00,43,4307', '安乡县', '43', '湖南省', '4307', '常德市', '430721', '安乡县', '', '', '', '', 3, 1, ''), ('430722', '4307', '00,43,4307', '汉寿县', '43', '湖南省', '4307', '常德市', '430722', '汉寿县', '', '', '', '', 3, 1, ''), ('430723', '4307', '00,43,4307', '澧县', '43', '湖南省', '4307', '常德市', '430723', '澧县', '', '', '', '', 3, 1, ''), ('430724', '4307', '00,43,4307', '临澧县', '43', '湖南省', '4307', '常德市', '430724', '临澧县', '', '', '', '', 3, 1, ''), ('430725', '4307', '00,43,4307', '桃源县', '43', '湖南省', '4307', '常德市', '430725', '桃源县', '', '', '', '', 3, 1, ''), ('430726', '4307', '00,43,4307', '石门县', '43', '湖南省', '4307', '常德市', '430726', '石门县', '', '', '', '', 3, 1, ''), ('430781', '4307', '00,43,4307', '津市市', '43', '湖南省', '4307', '常德市', '430781', '津市市', '', '', '', '', 3, 1, ''), ('4308', '43', '00,43', '张家界市', '43', '湖南省', '4308', '张家界市', '', '', '', '', '', '', 2, 1, ''), ('430802', '4308', '00,43,4308', '永定区', '43', '湖南省', '4308', '张家界市', '430802', '永定区', '', '', '', '', 3, 1, ''), ('430811', '4308', '00,43,4308', '武陵源区', '43', '湖南省', '4308', '张家界市', '430811', '武陵源区', '', '', '', '', 3, 1, ''), ('430821', '4308', '00,43,4308', '慈利县', '43', '湖南省', '4308', '张家界市', '430821', '慈利县', '', '', '', '', 3, 1, ''), ('430822', '4308', '00,43,4308', '桑植县', '43', '湖南省', '4308', '张家界市', '430822', '桑植县', '', '', '', '', 3, 1, ''), ('4309', '43', '00,43', '益阳市', '43', '湖南省', '4309', '益阳市', '', '', '', '', '', '', 2, 1, ''), ('430902', '4309', '00,43,4309', '资阳区', '43', '湖南省', '4309', '益阳市', '430902', '资阳区', '', '', '', '', 3, 1, ''), ('430903', '4309', '00,43,4309', '赫山区', '43', '湖南省', '4309', '益阳市', '430903', '赫山区', '', '', '', '', 3, 1, ''), ('430921', '4309', '00,43,4309', '南县', '43', '湖南省', '4309', '益阳市', '430921', '南县', '', '', '', '', 3, 1, ''), ('430922', '4309', '00,43,4309', '桃江县', '43', '湖南省', '4309', '益阳市', '430922', '桃江县', '', '', '', '', 3, 1, ''), ('430923', '4309', '00,43,4309', '安化县', '43', '湖南省', '4309', '益阳市', '430923', '安化县', '', '', '', '', 3, 1, ''), ('430981', '4309', '00,43,4309', '沅江市', '43', '湖南省', '4309', '益阳市', '430981', '沅江市', '', '', '', '', 3, 1, ''), ('4310', '43', '00,43', '郴州市', '43', '湖南省', '4310', '郴州市', '', '', '', '', '', '', 2, 1, ''), ('431002', '4310', '00,43,4310', '北湖区', '43', '湖南省', '4310', '郴州市', '431002', '北湖区', '', '', '', '', 3, 1, ''), ('431003', '4310', '00,43,4310', '苏仙区', '43', '湖南省', '4310', '郴州市', '431003', '苏仙区', '', '', '', '', 3, 1, ''), ('431021', '4310', '00,43,4310', '桂阳县', '43', '湖南省', '4310', '郴州市', '431021', '桂阳县', '', '', '', '', 3, 1, ''), ('431022', '4310', '00,43,4310', '宜章县', '43', '湖南省', '4310', '郴州市', '431022', '宜章县', '', '', '', '', 3, 1, ''), ('431023', '4310', '00,43,4310', '永兴县', '43', '湖南省', '4310', '郴州市', '431023', '永兴县', '', '', '', '', 3, 1, ''), ('431024', '4310', '00,43,4310', '嘉禾县', '43', '湖南省', '4310', '郴州市', '431024', '嘉禾县', '', '', '', '', 3, 1, ''), ('431025', '4310', '00,43,4310', '临武县', '43', '湖南省', '4310', '郴州市', '431025', '临武县', '', '', '', '', 3, 1, ''), ('431026', '4310', '00,43,4310', '汝城县', '43', '湖南省', '4310', '郴州市', '431026', '汝城县', '', '', '', '', 3, 1, ''), ('431027', '4310', '00,43,4310', '桂东县', '43', '湖南省', '4310', '郴州市', '431027', '桂东县', '', '', '', '', 3, 1, ''), ('431028', '4310', '00,43,4310', '安仁县', '43', '湖南省', '4310', '郴州市', '431028', '安仁县', '', '', '', '', 3, 1, ''), ('431081', '4310', '00,43,4310', '资兴市', '43', '湖南省', '4310', '郴州市', '431081', '资兴市', '', '', '', '', 3, 1, ''), ('4311', '43', '00,43', '永州市', '43', '湖南省', '4311', '永州市', '', '', '', '', '', '', 2, 1, ''), ('431102', '4311', '00,43,4311', '零陵区', '43', '湖南省', '4311', '永州市', '431102', '零陵区', '', '', '', '', 3, 1, ''), ('431103', '4311', '00,43,4311', '冷水滩区', '43', '湖南省', '4311', '永州市', '431103', '冷水滩区', '', '', '', '', 3, 1, ''), ('431121', '4311', '00,43,4311', '祁阳县', '43', '湖南省', '4311', '永州市', '431121', '祁阳县', '', '', '', '', 3, 1, ''), ('431122', '4311', '00,43,4311', '东安县', '43', '湖南省', '4311', '永州市', '431122', '东安县', '', '', '', '', 3, 1, ''), ('431123', '4311', '00,43,4311', '双牌县', '43', '湖南省', '4311', '永州市', '431123', '双牌县', '', '', '', '', 3, 1, ''), ('431124', '4311', '00,43,4311', '道县', '43', '湖南省', '4311', '永州市', '431124', '道县', '', '', '', '', 3, 1, ''), ('431125', '4311', '00,43,4311', '江永县', '43', '湖南省', '4311', '永州市', '431125', '江永县', '', '', '', '', 3, 1, ''), ('431126', '4311', '00,43,4311', '宁远县', '43', '湖南省', '4311', '永州市', '431126', '宁远县', '', '', '', '', 3, 1, ''), ('431127', '4311', '00,43,4311', '蓝山县', '43', '湖南省', '4311', '永州市', '431127', '蓝山县', '', '', '', '', 3, 1, ''), ('431128', '4311', '00,43,4311', '新田县', '43', '湖南省', '4311', '永州市', '431128', '新田县', '', '', '', '', 3, 1, ''), ('431129', '4311', '00,43,4311', '江华瑶族自治县', '43', '湖南省', '4311', '永州市', '431129', '江华瑶族自治县', '', '', '', '', 3, 1, ''), ('4312', '43', '00,43', '怀化市', '43', '湖南省', '4312', '怀化市', '', '', '', '', '', '', 2, 1, ''), ('431202', '4312', '00,43,4312', '鹤城区', '43', '湖南省', '4312', '怀化市', '431202', '鹤城区', '', '', '', '', 3, 1, ''), ('431221', '4312', '00,43,4312', '中方县', '43', '湖南省', '4312', '怀化市', '431221', '中方县', '', '', '', '', 3, 1, ''), ('431222', '4312', '00,43,4312', '沅陵县', '43', '湖南省', '4312', '怀化市', '431222', '沅陵县', '', '', '', '', 3, 1, ''), ('431223', '4312', '00,43,4312', '辰溪县', '43', '湖南省', '4312', '怀化市', '431223', '辰溪县', '', '', '', '', 3, 1, ''), ('431224', '4312', '00,43,4312', '溆浦县', '43', '湖南省', '4312', '怀化市', '431224', '溆浦县', '', '', '', '', 3, 1, ''), ('431225', '4312', '00,43,4312', '会同县', '43', '湖南省', '4312', '怀化市', '431225', '会同县', '', '', '', '', 3, 1, ''), ('431226', '4312', '00,43,4312', '麻阳苗族自治县', '43', '湖南省', '4312', '怀化市', '431226', '麻阳苗族自治县', '', '', '', '', 3, 1, ''), ('431227', '4312', '00,43,4312', '新晃侗族自治县', '43', '湖南省', '4312', '怀化市', '431227', '新晃侗族自治县', '', '', '', '', 3, 1, ''), ('431228', '4312', '00,43,4312', '芷江侗族自治县', '43', '湖南省', '4312', '怀化市', '431228', '芷江侗族自治县', '', '', '', '', 3, 1, ''), ('431229', '4312', '00,43,4312', '靖州苗族侗族自治县', '43', '湖南省', '4312', '怀化市', '431229', '靖州苗族侗族自治县', '', '', '', '', 3, 1, ''), ('431230', '4312', '00,43,4312', '通道侗族自治县', '43', '湖南省', '4312', '怀化市', '431230', '通道侗族自治县', '', '', '', '', 3, 1, ''), ('431281', '4312', '00,43,4312', '洪江市', '43', '湖南省', '4312', '怀化市', '431281', '洪江市', '', '', '', '', 3, 1, ''), ('4313', '43', '00,43', '娄底市', '43', '湖南省', '4313', '娄底市', '', '', '', '', '', '', 2, 1, ''), ('431302', '4313', '00,43,4313', '娄星区', '43', '湖南省', '4313', '娄底市', '431302', '娄星区', '', '', '', '', 3, 1, ''), ('431321', '4313', '00,43,4313', '双峰县', '43', '湖南省', '4313', '娄底市', '431321', '双峰县', '', '', '', '', 3, 1, ''), ('431322', '4313', '00,43,4313', '新化县', '43', '湖南省', '4313', '娄底市', '431322', '新化县', '', '', '', '', 3, 1, ''), ('431381', '4313', '00,43,4313', '冷水江市', '43', '湖南省', '4313', '娄底市', '431381', '冷水江市', '', '', '', '', 3, 1, ''), ('431382', '4313', '00,43,4313', '涟源市', '43', '湖南省', '4313', '娄底市', '431382', '涟源市', '', '', '', '', 3, 1, ''), ('4331', '43', '00,43', '湘西土家族苗族自治州', '43', '湖南省', '4331', '湘西土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('433101', '4331', '00,43,4331', '吉首市', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433101', '吉首市', '', '', '', '', 3, 1, ''), ('433122', '4331', '00,43,4331', '泸溪县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433122', '泸溪县', '', '', '', '', 3, 1, ''), ('433123', '4331', '00,43,4331', '凤凰县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433123', '凤凰县', '', '', '', '', 3, 1, ''), ('433124', '4331', '00,43,4331', '花垣县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433124', '花垣县', '', '', '', '', 3, 1, ''), ('433125', '4331', '00,43,4331', '保靖县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433125', '保靖县', '', '', '', '', 3, 1, ''), ('433126', '4331', '00,43,4331', '古丈县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433126', '古丈县', '', '', '', '', 3, 1, ''), ('433127', '4331', '00,43,4331', '永顺县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433127', '永顺县', '', '', '', '', 3, 1, ''), ('433130', '4331', '00,43,4331', '龙山县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433130', '龙山县', '', '', '', '', 3, 1, ''), ('44', '00', '00', '广东省', '44', '广东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4401', '44', '00,44', '广州市', '44', '广东省', '4401', '广州市', '', '', '', '', '', '', 2, 1, ''), ('440103', '4401', '00,44,4401', '荔湾区', '44', '广东省', '4401', '广州市', '440103', '荔湾区', '', '', '', '', 3, 1, ''), ('440104', '4401', '00,44,4401', '越秀区', '44', '广东省', '4401', '广州市', '440104', '越秀区', '', '', '', '', 3, 1, ''), ('440105', '4401', '00,44,4401', '海珠区', '44', '广东省', '4401', '广州市', '440105', '海珠区', '', '', '', '', 3, 1, ''), ('440106', '4401', '00,44,4401', '天河区', '44', '广东省', '4401', '广州市', '440106', '天河区', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('440111', '4401', '00,44,4401', '白云区', '44', '广东省', '4401', '广州市', '440111', '白云区', '', '', '', '', 3, 1, ''), ('440112', '4401', '00,44,4401', '黄埔区', '44', '广东省', '4401', '广州市', '440112', '黄埔区', '', '', '', '', 3, 1, ''), ('440113', '4401', '00,44,4401', '番禺区', '44', '广东省', '4401', '广州市', '440113', '番禺区', '', '', '', '', 3, 1, ''), ('440114', '4401', '00,44,4401', '花都区', '44', '广东省', '4401', '广州市', '440114', '花都区', '', '', '', '', 3, 1, ''), ('440115', '4401', '00,44,4401', '南沙区', '44', '广东省', '4401', '广州市', '440115', '南沙区', '', '', '', '', 3, 1, ''), ('440117', '4401', '00,44,4401', '从化区', '44', '广东省', '4401', '广州市', '440117', '从化区', '', '', '', '', 3, 1, ''), ('440118', '4401', '00,44,4401', '增城区', '44', '广东省', '4401', '广州市', '440118', '增城区', '', '', '', '', 3, 1, ''), ('4402', '44', '00,44', '韶关市', '44', '广东省', '4402', '韶关市', '', '', '', '', '', '', 2, 1, ''), ('440203', '4402', '00,44,4402', '武江区', '44', '广东省', '4402', '韶关市', '440203', '武江区', '', '', '', '', 3, 1, ''), ('440204', '4402', '00,44,4402', '浈江区', '44', '广东省', '4402', '韶关市', '440204', '浈江区', '', '', '', '', 3, 1, ''), ('440205', '4402', '00,44,4402', '曲江区', '44', '广东省', '4402', '韶关市', '440205', '曲江区', '', '', '', '', 3, 1, ''), ('440222', '4402', '00,44,4402', '始兴县', '44', '广东省', '4402', '韶关市', '440222', '始兴县', '', '', '', '', 3, 1, ''), ('440224', '4402', '00,44,4402', '仁化县', '44', '广东省', '4402', '韶关市', '440224', '仁化县', '', '', '', '', 3, 1, ''), ('440229', '4402', '00,44,4402', '翁源县', '44', '广东省', '4402', '韶关市', '440229', '翁源县', '', '', '', '', 3, 1, ''), ('440232', '4402', '00,44,4402', '乳源瑶族自治县', '44', '广东省', '4402', '韶关市', '440232', '乳源瑶族自治县', '', '', '', '', 3, 1, ''), ('440233', '4402', '00,44,4402', '新丰县', '44', '广东省', '4402', '韶关市', '440233', '新丰县', '', '', '', '', 3, 1, ''), ('440281', '4402', '00,44,4402', '乐昌市', '44', '广东省', '4402', '韶关市', '440281', '乐昌市', '', '', '', '', 3, 1, ''), ('440282', '4402', '00,44,4402', '南雄市', '44', '广东省', '4402', '韶关市', '440282', '南雄市', '', '', '', '', 3, 1, ''), ('4403', '44', '00,44', '深圳市', '44', '广东省', '4403', '深圳市', '', '', '', '', '', '', 2, 1, ''), ('440303', '4403', '00,44,4403', '罗湖区', '44', '广东省', '4403', '深圳市', '440303', '罗湖区', '', '', '', '', 3, 1, ''), ('440304', '4403', '00,44,4403', '福田区', '44', '广东省', '4403', '深圳市', '440304', '福田区', '', '', '', '', 3, 1, ''), ('440305', '4403', '00,44,4403', '南山区', '44', '广东省', '4403', '深圳市', '440305', '南山区', '', '', '', '', 3, 1, ''), ('440306', '4403', '00,44,4403', '宝安区', '44', '广东省', '4403', '深圳市', '440306', '宝安区', '', '', '', '', 3, 1, ''), ('440307', '4403', '00,44,4403', '龙岗区', '44', '广东省', '4403', '深圳市', '440307', '龙岗区', '', '', '', '', 3, 1, ''), ('440308', '4403', '00,44,4403', '盐田区', '44', '广东省', '4403', '深圳市', '440308', '盐田区', '', '', '', '', 3, 1, ''), ('440309', '4403', '00,44,4403', '龙华区', '44', '广东省', '4403', '深圳市', '440309', '龙华区', '', '', '', '', 3, 1, ''), ('440310', '4403', '00,44,4403', '坪山区', '44', '广东省', '4403', '深圳市', '440310', '坪山区', '', '', '', '', 3, 1, ''), ('440311', '4403', '00,44,4403', '光明区', '44', '广东省', '4403', '深圳市', '440311', '光明区', '', '', '', '', 3, 1, ''), ('4404', '44', '00,44', '珠海市', '44', '广东省', '4404', '珠海市', '', '', '', '', '', '', 2, 1, ''), ('440402', '4404', '00,44,4404', '香洲区', '44', '广东省', '4404', '珠海市', '440402', '香洲区', '', '', '', '', 3, 1, ''), ('440403', '4404', '00,44,4404', '斗门区', '44', '广东省', '4404', '珠海市', '440403', '斗门区', '', '', '', '', 3, 1, ''), ('440404', '4404', '00,44,4404', '金湾区', '44', '广东省', '4404', '珠海市', '440404', '金湾区', '', '', '', '', 3, 1, ''), ('4405', '44', '00,44', '汕头市', '44', '广东省', '4405', '汕头市', '', '', '', '', '', '', 2, 1, ''), ('440507', '4405', '00,44,4405', '龙湖区', '44', '广东省', '4405', '汕头市', '440507', '龙湖区', '', '', '', '', 3, 1, ''), ('440511', '4405', '00,44,4405', '金平区', '44', '广东省', '4405', '汕头市', '440511', '金平区', '', '', '', '', 3, 1, ''), ('440512', '4405', '00,44,4405', '濠江区', '44', '广东省', '4405', '汕头市', '440512', '濠江区', '', '', '', '', 3, 1, ''), ('440513', '4405', '00,44,4405', '潮阳区', '44', '广东省', '4405', '汕头市', '440513', '潮阳区', '', '', '', '', 3, 1, ''), ('440514', '4405', '00,44,4405', '潮南区', '44', '广东省', '4405', '汕头市', '440514', '潮南区', '', '', '', '', 3, 1, ''), ('440515', '4405', '00,44,4405', '澄海区', '44', '广东省', '4405', '汕头市', '440515', '澄海区', '', '', '', '', 3, 1, ''), ('440523', '4405', '00,44,4405', '南澳县', '44', '广东省', '4405', '汕头市', '440523', '南澳县', '', '', '', '', 3, 1, ''), ('4406', '44', '00,44', '佛山市', '44', '广东省', '4406', '佛山市', '', '', '', '', '', '', 2, 1, ''), ('440604', '4406', '00,44,4406', '禅城区', '44', '广东省', '4406', '佛山市', '440604', '禅城区', '', '', '', '', 3, 1, ''), ('440605', '4406', '00,44,4406', '南海区', '44', '广东省', '4406', '佛山市', '440605', '南海区', '', '', '', '', 3, 1, ''), ('440606', '4406', '00,44,4406', '顺德区', '44', '广东省', '4406', '佛山市', '440606', '顺德区', '', '', '', '', 3, 1, ''), ('440607', '4406', '00,44,4406', '三水区', '44', '广东省', '4406', '佛山市', '440607', '三水区', '', '', '', '', 3, 1, ''), ('440608', '4406', '00,44,4406', '高明区', '44', '广东省', '4406', '佛山市', '440608', '高明区', '', '', '', '', 3, 1, ''), ('4407', '44', '00,44', '江门市', '44', '广东省', '4407', '江门市', '', '', '', '', '', '', 2, 1, ''), ('440703', '4407', '00,44,4407', '蓬江区', '44', '广东省', '4407', '江门市', '440703', '蓬江区', '', '', '', '', 3, 1, ''), ('440704', '4407', '00,44,4407', '江海区', '44', '广东省', '4407', '江门市', '440704', '江海区', '', '', '', '', 3, 1, ''), ('440705', '4407', '00,44,4407', '新会区', '44', '广东省', '4407', '江门市', '440705', '新会区', '', '', '', '', 3, 1, ''), ('440781', '4407', '00,44,4407', '台山市', '44', '广东省', '4407', '江门市', '440781', '台山市', '', '', '', '', 3, 1, ''), ('440783', '4407', '00,44,4407', '开平市', '44', '广东省', '4407', '江门市', '440783', '开平市', '', '', '', '', 3, 1, ''), ('440784', '4407', '00,44,4407', '鹤山市', '44', '广东省', '4407', '江门市', '440784', '鹤山市', '', '', '', '', 3, 1, ''), ('440785', '4407', '00,44,4407', '恩平市', '44', '广东省', '4407', '江门市', '440785', '恩平市', '', '', '', '', 3, 1, ''), ('4408', '44', '00,44', '湛江市', '44', '广东省', '4408', '湛江市', '', '', '', '', '', '', 2, 1, ''), ('440802', '4408', '00,44,4408', '赤坎区', '44', '广东省', '4408', '湛江市', '440802', '赤坎区', '', '', '', '', 3, 1, ''), ('440803', '4408', '00,44,4408', '霞山区', '44', '广东省', '4408', '湛江市', '440803', '霞山区', '', '', '', '', 3, 1, ''), ('440804', '4408', '00,44,4408', '坡头区', '44', '广东省', '4408', '湛江市', '440804', '坡头区', '', '', '', '', 3, 1, ''), ('440811', '4408', '00,44,4408', '麻章区', '44', '广东省', '4408', '湛江市', '440811', '麻章区', '', '', '', '', 3, 1, ''), ('440823', '4408', '00,44,4408', '遂溪县', '44', '广东省', '4408', '湛江市', '440823', '遂溪县', '', '', '', '', 3, 1, ''), ('440825', '4408', '00,44,4408', '徐闻县', '44', '广东省', '4408', '湛江市', '440825', '徐闻县', '', '', '', '', 3, 1, ''), ('440881', '4408', '00,44,4408', '廉江市', '44', '广东省', '4408', '湛江市', '440881', '廉江市', '', '', '', '', 3, 1, ''), ('440882', '4408', '00,44,4408', '雷州市', '44', '广东省', '4408', '湛江市', '440882', '雷州市', '', '', '', '', 3, 1, ''), ('440883', '4408', '00,44,4408', '吴川市', '44', '广东省', '4408', '湛江市', '440883', '吴川市', '', '', '', '', 3, 1, ''), ('4409', '44', '00,44', '茂名市', '44', '广东省', '4409', '茂名市', '', '', '', '', '', '', 2, 1, ''), ('440902', '4409', '00,44,4409', '茂南区', '44', '广东省', '4409', '茂名市', '440902', '茂南区', '', '', '', '', 3, 1, ''), ('440904', '4409', '00,44,4409', '电白区', '44', '广东省', '4409', '茂名市', '440904', '电白区', '', '', '', '', 3, 1, ''), ('440981', '4409', '00,44,4409', '高州市', '44', '广东省', '4409', '茂名市', '440981', '高州市', '', '', '', '', 3, 1, ''), ('440982', '4409', '00,44,4409', '化州市', '44', '广东省', '4409', '茂名市', '440982', '化州市', '', '', '', '', 3, 1, ''), ('440983', '4409', '00,44,4409', '信宜市', '44', '广东省', '4409', '茂名市', '440983', '信宜市', '', '', '', '', 3, 1, ''), ('4412', '44', '00,44', '肇庆市', '44', '广东省', '4412', '肇庆市', '', '', '', '', '', '', 2, 1, ''), ('441202', '4412', '00,44,4412', '端州区', '44', '广东省', '4412', '肇庆市', '441202', '端州区', '', '', '', '', 3, 1, ''), ('441203', '4412', '00,44,4412', '鼎湖区', '44', '广东省', '4412', '肇庆市', '441203', '鼎湖区', '', '', '', '', 3, 1, ''), ('441204', '4412', '00,44,4412', '高要区', '44', '广东省', '4412', '肇庆市', '441204', '高要区', '', '', '', '', 3, 1, ''), ('441223', '4412', '00,44,4412', '广宁县', '44', '广东省', '4412', '肇庆市', '441223', '广宁县', '', '', '', '', 3, 1, ''), ('441224', '4412', '00,44,4412', '怀集县', '44', '广东省', '4412', '肇庆市', '441224', '怀集县', '', '', '', '', 3, 1, ''), ('441225', '4412', '00,44,4412', '封开县', '44', '广东省', '4412', '肇庆市', '441225', '封开县', '', '', '', '', 3, 1, ''), ('441226', '4412', '00,44,4412', '德庆县', '44', '广东省', '4412', '肇庆市', '441226', '德庆县', '', '', '', '', 3, 1, ''), ('441284', '4412', '00,44,4412', '四会市', '44', '广东省', '4412', '肇庆市', '441284', '四会市', '', '', '', '', 3, 1, ''), ('4413', '44', '00,44', '惠州市', '44', '广东省', '4413', '惠州市', '', '', '', '', '', '', 2, 1, ''), ('441302', '4413', '00,44,4413', '惠城区', '44', '广东省', '4413', '惠州市', '441302', '惠城区', '', '', '', '', 3, 1, ''), ('441303', '4413', '00,44,4413', '惠阳区', '44', '广东省', '4413', '惠州市', '441303', '惠阳区', '', '', '', '', 3, 1, ''), ('441322', '4413', '00,44,4413', '博罗县', '44', '广东省', '4413', '惠州市', '441322', '博罗县', '', '', '', '', 3, 1, ''), ('441323', '4413', '00,44,4413', '惠东县', '44', '广东省', '4413', '惠州市', '441323', '惠东县', '', '', '', '', 3, 1, ''), ('441324', '4413', '00,44,4413', '龙门县', '44', '广东省', '4413', '惠州市', '441324', '龙门县', '', '', '', '', 3, 1, ''), ('4414', '44', '00,44', '梅州市', '44', '广东省', '4414', '梅州市', '', '', '', '', '', '', 2, 1, ''), ('441402', '4414', '00,44,4414', '梅江区', '44', '广东省', '4414', '梅州市', '441402', '梅江区', '', '', '', '', 3, 1, ''), ('441403', '4414', '00,44,4414', '梅县区', '44', '广东省', '4414', '梅州市', '441403', '梅县区', '', '', '', '', 3, 1, ''), ('441422', '4414', '00,44,4414', '大埔县', '44', '广东省', '4414', '梅州市', '441422', '大埔县', '', '', '', '', 3, 1, ''), ('441423', '4414', '00,44,4414', '丰顺县', '44', '广东省', '4414', '梅州市', '441423', '丰顺县', '', '', '', '', 3, 1, ''), ('441424', '4414', '00,44,4414', '五华县', '44', '广东省', '4414', '梅州市', '441424', '五华县', '', '', '', '', 3, 1, ''), ('441426', '4414', '00,44,4414', '平远县', '44', '广东省', '4414', '梅州市', '441426', '平远县', '', '', '', '', 3, 1, ''), ('441427', '4414', '00,44,4414', '蕉岭县', '44', '广东省', '4414', '梅州市', '441427', '蕉岭县', '', '', '', '', 3, 1, ''), ('441481', '4414', '00,44,4414', '兴宁市', '44', '广东省', '4414', '梅州市', '441481', '兴宁市', '', '', '', '', 3, 1, ''), ('4415', '44', '00,44', '汕尾市', '44', '广东省', '4415', '汕尾市', '', '', '', '', '', '', 2, 1, ''), ('441502', '4415', '00,44,4415', '城区', '44', '广东省', '4415', '汕尾市', '441502', '城区', '', '', '', '', 3, 1, ''), ('441521', '4415', '00,44,4415', '海丰县', '44', '广东省', '4415', '汕尾市', '441521', '海丰县', '', '', '', '', 3, 1, ''), ('441523', '4415', '00,44,4415', '陆河县', '44', '广东省', '4415', '汕尾市', '441523', '陆河县', '', '', '', '', 3, 1, ''), ('441581', '4415', '00,44,4415', '陆丰市', '44', '广东省', '4415', '汕尾市', '441581', '陆丰市', '', '', '', '', 3, 1, ''), ('4416', '44', '00,44', '河源市', '44', '广东省', '4416', '河源市', '', '', '', '', '', '', 2, 1, ''), ('441602', '4416', '00,44,4416', '源城区', '44', '广东省', '4416', '河源市', '441602', '源城区', '', '', '', '', 3, 1, ''), ('441621', '4416', '00,44,4416', '紫金县', '44', '广东省', '4416', '河源市', '441621', '紫金县', '', '', '', '', 3, 1, ''), ('441622', '4416', '00,44,4416', '龙川县', '44', '广东省', '4416', '河源市', '441622', '龙川县', '', '', '', '', 3, 1, ''), ('441623', '4416', '00,44,4416', '连平县', '44', '广东省', '4416', '河源市', '441623', '连平县', '', '', '', '', 3, 1, ''), ('441624', '4416', '00,44,4416', '和平县', '44', '广东省', '4416', '河源市', '441624', '和平县', '', '', '', '', 3, 1, ''), ('441625', '4416', '00,44,4416', '东源县', '44', '广东省', '4416', '河源市', '441625', '东源县', '', '', '', '', 3, 1, ''), ('4417', '44', '00,44', '阳江市', '44', '广东省', '4417', '阳江市', '', '', '', '', '', '', 2, 1, ''), ('441702', '4417', '00,44,4417', '江城区', '44', '广东省', '4417', '阳江市', '441702', '江城区', '', '', '', '', 3, 1, ''), ('441704', '4417', '00,44,4417', '阳东区', '44', '广东省', '4417', '阳江市', '441704', '阳东区', '', '', '', '', 3, 1, ''), ('441721', '4417', '00,44,4417', '阳西县', '44', '广东省', '4417', '阳江市', '441721', '阳西县', '', '', '', '', 3, 1, ''), ('441781', '4417', '00,44,4417', '阳春市', '44', '广东省', '4417', '阳江市', '441781', '阳春市', '', '', '', '', 3, 1, ''), ('4418', '44', '00,44', '清远市', '44', '广东省', '4418', '清远市', '', '', '', '', '', '', 2, 1, ''), ('441802', '4418', '00,44,4418', '清城区', '44', '广东省', '4418', '清远市', '441802', '清城区', '', '', '', '', 3, 1, ''), ('441803', '4418', '00,44,4418', '清新区', '44', '广东省', '4418', '清远市', '441803', '清新区', '', '', '', '', 3, 1, ''), ('441821', '4418', '00,44,4418', '佛冈县', '44', '广东省', '4418', '清远市', '441821', '佛冈县', '', '', '', '', 3, 1, ''), ('441823', '4418', '00,44,4418', '阳山县', '44', '广东省', '4418', '清远市', '441823', '阳山县', '', '', '', '', 3, 1, ''), ('441825', '4418', '00,44,4418', '连山壮族瑶族自治县', '44', '广东省', '4418', '清远市', '441825', '连山壮族瑶族自治县', '', '', '', '', 3, 1, ''), ('441826', '4418', '00,44,4418', '连南瑶族自治县', '44', '广东省', '4418', '清远市', '441826', '连南瑶族自治县', '', '', '', '', 3, 1, ''), ('441881', '4418', '00,44,4418', '英德市', '44', '广东省', '4418', '清远市', '441881', '英德市', '', '', '', '', 3, 1, ''), ('441882', '4418', '00,44,4418', '连州市', '44', '广东省', '4418', '清远市', '441882', '连州市', '', '', '', '', 3, 1, ''), ('4419', '44', '00,44', '东莞市', '44', '广东省', '4419', '东莞市', '', '', '', '', '', '', 2, 1, ''), ('441900', '4419', '00,44,4419', '东莞市', '44', '广东省', '4419', '东莞市', '441900', '东莞市', '', '', '', '', 3, 1, ''), ('4420', '44', '00,44', '中山市', '44', '广东省', '4420', '中山市', '', '', '', '', '', '', 2, 1, ''), ('442000', '4420', '00,44,4420', '中山市', '44', '广东省', '4420', '中山市', '442000', '中山市', '', '', '', '', 3, 1, ''), ('4451', '44', '00,44', '潮州市', '44', '广东省', '4451', '潮州市', '', '', '', '', '', '', 2, 1, ''), ('445102', '4451', '00,44,4451', '湘桥区', '44', '广东省', '4451', '潮州市', '445102', '湘桥区', '', '', '', '', 3, 1, ''), ('445103', '4451', '00,44,4451', '潮安区', '44', '广东省', '4451', '潮州市', '445103', '潮安区', '', '', '', '', 3, 1, ''), ('445122', '4451', '00,44,4451', '饶平县', '44', '广东省', '4451', '潮州市', '445122', '饶平县', '', '', '', '', 3, 1, ''), ('4452', '44', '00,44', '揭阳市', '44', '广东省', '4452', '揭阳市', '', '', '', '', '', '', 2, 1, ''), ('445202', '4452', '00,44,4452', '榕城区', '44', '广东省', '4452', '揭阳市', '445202', '榕城区', '', '', '', '', 3, 1, ''), ('445203', '4452', '00,44,4452', '揭东区', '44', '广东省', '4452', '揭阳市', '445203', '揭东区', '', '', '', '', 3, 1, ''), ('445222', '4452', '00,44,4452', '揭西县', '44', '广东省', '4452', '揭阳市', '445222', '揭西县', '', '', '', '', 3, 1, ''), ('445224', '4452', '00,44,4452', '惠来县', '44', '广东省', '4452', '揭阳市', '445224', '惠来县', '', '', '', '', 3, 1, ''), ('445281', '4452', '00,44,4452', '普宁市', '44', '广东省', '4452', '揭阳市', '445281', '普宁市', '', '', '', '', 3, 1, ''), ('4453', '44', '00,44', '云浮市', '44', '广东省', '4453', '云浮市', '', '', '', '', '', '', 2, 1, ''), ('445302', '4453', '00,44,4453', '云城区', '44', '广东省', '4453', '云浮市', '445302', '云城区', '', '', '', '', 3, 1, ''), ('445303', '4453', '00,44,4453', '云安区', '44', '广东省', '4453', '云浮市', '445303', '云安区', '', '', '', '', 3, 1, ''), ('445321', '4453', '00,44,4453', '新兴县', '44', '广东省', '4453', '云浮市', '445321', '新兴县', '', '', '', '', 3, 1, ''), ('445322', '4453', '00,44,4453', '郁南县', '44', '广东省', '4453', '云浮市', '445322', '郁南县', '', '', '', '', 3, 1, ''), ('445381', '4453', '00,44,4453', '罗定市', '44', '广东省', '4453', '云浮市', '445381', '罗定市', '', '', '', '', 3, 1, ''), ('45', '00', '00', '广西壮族自治区', '45', '广西壮族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('4501', '45', '00,45', '南宁市', '45', '广西壮族自治区', '4501', '南宁市', '', '', '', '', '', '', 2, 1, ''), ('450102', '4501', '00,45,4501', '兴宁区', '45', '广西壮族自治区', '4501', '南宁市', '450102', '兴宁区', '', '', '', '', 3, 1, ''), ('450103', '4501', '00,45,4501', '青秀区', '45', '广西壮族自治区', '4501', '南宁市', '450103', '青秀区', '', '', '', '', 3, 1, ''), ('450105', '4501', '00,45,4501', '江南区', '45', '广西壮族自治区', '4501', '南宁市', '450105', '江南区', '', '', '', '', 3, 1, ''), ('450107', '4501', '00,45,4501', '西乡塘区', '45', '广西壮族自治区', '4501', '南宁市', '450107', '西乡塘区', '', '', '', '', 3, 1, ''), ('450108', '4501', '00,45,4501', '良庆区', '45', '广西壮族自治区', '4501', '南宁市', '450108', '良庆区', '', '', '', '', 3, 1, ''), ('450109', '4501', '00,45,4501', '邕宁区', '45', '广西壮族自治区', '4501', '南宁市', '450109', '邕宁区', '', '', '', '', 3, 1, ''), ('450110', '4501', '00,45,4501', '武鸣区', '45', '广西壮族自治区', '4501', '南宁市', '450110', '武鸣区', '', '', '', '', 3, 1, ''), ('450123', '4501', '00,45,4501', '隆安县', '45', '广西壮族自治区', '4501', '南宁市', '450123', '隆安县', '', '', '', '', 3, 1, ''), ('450124', '4501', '00,45,4501', '马山县', '45', '广西壮族自治区', '4501', '南宁市', '450124', '马山县', '', '', '', '', 3, 1, ''), ('450125', '4501', '00,45,4501', '上林县', '45', '广西壮族自治区', '4501', '南宁市', '450125', '上林县', '', '', '', '', 3, 1, ''), ('450126', '4501', '00,45,4501', '宾阳县', '45', '广西壮族自治区', '4501', '南宁市', '450126', '宾阳县', '', '', '', '', 3, 1, ''), ('450127', '4501', '00,45,4501', '横县', '45', '广西壮族自治区', '4501', '南宁市', '450127', '横县', '', '', '', '', 3, 1, ''), ('4502', '45', '00,45', '柳州市', '45', '广西壮族自治区', '4502', '柳州市', '', '', '', '', '', '', 2, 1, ''), ('450202', '4502', '00,45,4502', '城中区', '45', '广西壮族自治区', '4502', '柳州市', '450202', '城中区', '', '', '', '', 3, 1, ''), ('450203', '4502', '00,45,4502', '鱼峰区', '45', '广西壮族自治区', '4502', '柳州市', '450203', '鱼峰区', '', '', '', '', 3, 1, ''), ('450204', '4502', '00,45,4502', '柳南区', '45', '广西壮族自治区', '4502', '柳州市', '450204', '柳南区', '', '', '', '', 3, 1, ''), ('450205', '4502', '00,45,4502', '柳北区', '45', '广西壮族自治区', '4502', '柳州市', '450205', '柳北区', '', '', '', '', 3, 1, ''), ('450206', '4502', '00,45,4502', '柳江区', '45', '广西壮族自治区', '4502', '柳州市', '450206', '柳江区', '', '', '', '', 3, 1, ''), ('450222', '4502', '00,45,4502', '柳城县', '45', '广西壮族自治区', '4502', '柳州市', '450222', '柳城县', '', '', '', '', 3, 1, ''), ('450223', '4502', '00,45,4502', '鹿寨县', '45', '广西壮族自治区', '4502', '柳州市', '450223', '鹿寨县', '', '', '', '', 3, 1, ''), ('450224', '4502', '00,45,4502', '融安县', '45', '广西壮族自治区', '4502', '柳州市', '450224', '融安县', '', '', '', '', 3, 1, ''), ('450225', '4502', '00,45,4502', '融水苗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450225', '融水苗族自治县', '', '', '', '', 3, 1, ''), ('450226', '4502', '00,45,4502', '三江侗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450226', '三江侗族自治县', '', '', '', '', 3, 1, ''), ('4503', '45', '00,45', '桂林市', '45', '广西壮族自治区', '4503', '桂林市', '', '', '', '', '', '', 2, 1, ''), ('450302', '4503', '00,45,4503', '秀峰区', '45', '广西壮族自治区', '4503', '桂林市', '450302', '秀峰区', '', '', '', '', 3, 1, ''), ('450303', '4503', '00,45,4503', '叠彩区', '45', '广西壮族自治区', '4503', '桂林市', '450303', '叠彩区', '', '', '', '', 3, 1, ''), ('450304', '4503', '00,45,4503', '象山区', '45', '广西壮族自治区', '4503', '桂林市', '450304', '象山区', '', '', '', '', 3, 1, ''), ('450305', '4503', '00,45,4503', '七星区', '45', '广西壮族自治区', '4503', '桂林市', '450305', '七星区', '', '', '', '', 3, 1, ''), ('450311', '4503', '00,45,4503', '雁山区', '45', '广西壮族自治区', '4503', '桂林市', '450311', '雁山区', '', '', '', '', 3, 1, ''), ('450312', '4503', '00,45,4503', '临桂区', '45', '广西壮族自治区', '4503', '桂林市', '450312', '临桂区', '', '', '', '', 3, 1, ''), ('450321', '4503', '00,45,4503', '阳朔县', '45', '广西壮族自治区', '4503', '桂林市', '450321', '阳朔县', '', '', '', '', 3, 1, ''), ('450323', '4503', '00,45,4503', '灵川县', '45', '广西壮族自治区', '4503', '桂林市', '450323', '灵川县', '', '', '', '', 3, 1, ''), ('450324', '4503', '00,45,4503', '全州县', '45', '广西壮族自治区', '4503', '桂林市', '450324', '全州县', '', '', '', '', 3, 1, ''), ('450325', '4503', '00,45,4503', '兴安县', '45', '广西壮族自治区', '4503', '桂林市', '450325', '兴安县', '', '', '', '', 3, 1, ''), ('450326', '4503', '00,45,4503', '永福县', '45', '广西壮族自治区', '4503', '桂林市', '450326', '永福县', '', '', '', '', 3, 1, ''), ('450327', '4503', '00,45,4503', '灌阳县', '45', '广西壮族自治区', '4503', '桂林市', '450327', '灌阳县', '', '', '', '', 3, 1, ''), ('450328', '4503', '00,45,4503', '龙胜各族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450328', '龙胜各族自治县', '', '', '', '', 3, 1, ''), ('450329', '4503', '00,45,4503', '资源县', '45', '广西壮族自治区', '4503', '桂林市', '450329', '资源县', '', '', '', '', 3, 1, ''), ('450330', '4503', '00,45,4503', '平乐县', '45', '广西壮族自治区', '4503', '桂林市', '450330', '平乐县', '', '', '', '', 3, 1, ''), ('450332', '4503', '00,45,4503', '恭城瑶族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450332', '恭城瑶族自治县', '', '', '', '', 3, 1, ''), ('450381', '4503', '00,45,4503', '荔浦市', '45', '广西壮族自治区', '4503', '桂林市', '450381', '荔浦市', '', '', '', '', 3, 1, ''), ('4504', '45', '00,45', '梧州市', '45', '广西壮族自治区', '4504', '梧州市', '', '', '', '', '', '', 2, 1, ''), ('450403', '4504', '00,45,4504', '万秀区', '45', '广西壮族自治区', '4504', '梧州市', '450403', '万秀区', '', '', '', '', 3, 1, ''), ('450405', '4504', '00,45,4504', '长洲区', '45', '广西壮族自治区', '4504', '梧州市', '450405', '长洲区', '', '', '', '', 3, 1, ''), ('450406', '4504', '00,45,4504', '龙圩区', '45', '广西壮族自治区', '4504', '梧州市', '450406', '龙圩区', '', '', '', '', 3, 1, ''), ('450421', '4504', '00,45,4504', '苍梧县', '45', '广西壮族自治区', '4504', '梧州市', '450421', '苍梧县', '', '', '', '', 3, 1, ''), ('450422', '4504', '00,45,4504', '藤县', '45', '广西壮族自治区', '4504', '梧州市', '450422', '藤县', '', '', '', '', 3, 1, ''), ('450423', '4504', '00,45,4504', '蒙山县', '45', '广西壮族自治区', '4504', '梧州市', '450423', '蒙山县', '', '', '', '', 3, 1, ''), ('450481', '4504', '00,45,4504', '岑溪市', '45', '广西壮族自治区', '4504', '梧州市', '450481', '岑溪市', '', '', '', '', 3, 1, ''), ('4505', '45', '00,45', '北海市', '45', '广西壮族自治区', '4505', '北海市', '', '', '', '', '', '', 2, 1, ''), ('450502', '4505', '00,45,4505', '海城区', '45', '广西壮族自治区', '4505', '北海市', '450502', '海城区', '', '', '', '', 3, 1, ''), ('450503', '4505', '00,45,4505', '银海区', '45', '广西壮族自治区', '4505', '北海市', '450503', '银海区', '', '', '', '', 3, 1, ''), ('450512', '4505', '00,45,4505', '铁山港区', '45', '广西壮族自治区', '4505', '北海市', '450512', '铁山港区', '', '', '', '', 3, 1, ''), ('450521', '4505', '00,45,4505', '合浦县', '45', '广西壮族自治区', '4505', '北海市', '450521', '合浦县', '', '', '', '', 3, 1, ''), ('4506', '45', '00,45', '防城港市', '45', '广西壮族自治区', '4506', '防城港市', '', '', '', '', '', '', 2, 1, ''), ('450602', '4506', '00,45,4506', '港口区', '45', '广西壮族自治区', '4506', '防城港市', '450602', '港口区', '', '', '', '', 3, 1, ''), ('450603', '4506', '00,45,4506', '防城区', '45', '广西壮族自治区', '4506', '防城港市', '450603', '防城区', '', '', '', '', 3, 1, ''), ('450621', '4506', '00,45,4506', '上思县', '45', '广西壮族自治区', '4506', '防城港市', '450621', '上思县', '', '', '', '', 3, 1, ''), ('450681', '4506', '00,45,4506', '东兴市', '45', '广西壮族自治区', '4506', '防城港市', '450681', '东兴市', '', '', '', '', 3, 1, ''), ('4507', '45', '00,45', '钦州市', '45', '广西壮族自治区', '4507', '钦州市', '', '', '', '', '', '', 2, 1, ''), ('450702', '4507', '00,45,4507', '钦南区', '45', '广西壮族自治区', '4507', '钦州市', '450702', '钦南区', '', '', '', '', 3, 1, ''), ('450703', '4507', '00,45,4507', '钦北区', '45', '广西壮族自治区', '4507', '钦州市', '450703', '钦北区', '', '', '', '', 3, 1, ''), ('450721', '4507', '00,45,4507', '灵山县', '45', '广西壮族自治区', '4507', '钦州市', '450721', '灵山县', '', '', '', '', 3, 1, ''), ('450722', '4507', '00,45,4507', '浦北县', '45', '广西壮族自治区', '4507', '钦州市', '450722', '浦北县', '', '', '', '', 3, 1, ''), ('4508', '45', '00,45', '贵港市', '45', '广西壮族自治区', '4508', '贵港市', '', '', '', '', '', '', 2, 1, ''), ('450802', '4508', '00,45,4508', '港北区', '45', '广西壮族自治区', '4508', '贵港市', '450802', '港北区', '', '', '', '', 3, 1, ''), ('450803', '4508', '00,45,4508', '港南区', '45', '广西壮族自治区', '4508', '贵港市', '450803', '港南区', '', '', '', '', 3, 1, ''), ('450804', '4508', '00,45,4508', '覃塘区', '45', '广西壮族自治区', '4508', '贵港市', '450804', '覃塘区', '', '', '', '', 3, 1, ''), ('450821', '4508', '00,45,4508', '平南县', '45', '广西壮族自治区', '4508', '贵港市', '450821', '平南县', '', '', '', '', 3, 1, ''), ('450881', '4508', '00,45,4508', '桂平市', '45', '广西壮族自治区', '4508', '贵港市', '450881', '桂平市', '', '', '', '', 3, 1, ''), ('4509', '45', '00,45', '玉林市', '45', '广西壮族自治区', '4509', '玉林市', '', '', '', '', '', '', 2, 1, ''), ('450902', '4509', '00,45,4509', '玉州区', '45', '广西壮族自治区', '4509', '玉林市', '450902', '玉州区', '', '', '', '', 3, 1, ''), ('450903', '4509', '00,45,4509', '福绵区', '45', '广西壮族自治区', '4509', '玉林市', '450903', '福绵区', '', '', '', '', 3, 1, ''), ('450921', '4509', '00,45,4509', '容县', '45', '广西壮族自治区', '4509', '玉林市', '450921', '容县', '', '', '', '', 3, 1, ''), ('450922', '4509', '00,45,4509', '陆川县', '45', '广西壮族自治区', '4509', '玉林市', '450922', '陆川县', '', '', '', '', 3, 1, ''), ('450923', '4509', '00,45,4509', '博白县', '45', '广西壮族自治区', '4509', '玉林市', '450923', '博白县', '', '', '', '', 3, 1, ''), ('450924', '4509', '00,45,4509', '兴业县', '45', '广西壮族自治区', '4509', '玉林市', '450924', '兴业县', '', '', '', '', 3, 1, ''), ('450981', '4509', '00,45,4509', '北流市', '45', '广西壮族自治区', '4509', '玉林市', '450981', '北流市', '', '', '', '', 3, 1, ''), ('4510', '45', '00,45', '百色市', '45', '广西壮族自治区', '4510', '百色市', '', '', '', '', '', '', 2, 1, ''), ('451002', '4510', '00,45,4510', '右江区', '45', '广西壮族自治区', '4510', '百色市', '451002', '右江区', '', '', '', '', 3, 1, ''), ('451003', '4510', '00,45,4510', '田阳区', '45', '广西壮族自治区', '4510', '百色市', '451003', '田阳区', '', '', '', '', 3, 1, ''), ('451022', '4510', '00,45,4510', '田东县', '45', '广西壮族自治区', '4510', '百色市', '451022', '田东县', '', '', '', '', 3, 1, ''), ('451024', '4510', '00,45,4510', '德保县', '45', '广西壮族自治区', '4510', '百色市', '451024', '德保县', '', '', '', '', 3, 1, ''), ('451026', '4510', '00,45,4510', '那坡县', '45', '广西壮族自治区', '4510', '百色市', '451026', '那坡县', '', '', '', '', 3, 1, ''), ('451027', '4510', '00,45,4510', '凌云县', '45', '广西壮族自治区', '4510', '百色市', '451027', '凌云县', '', '', '', '', 3, 1, ''), ('451028', '4510', '00,45,4510', '乐业县', '45', '广西壮族自治区', '4510', '百色市', '451028', '乐业县', '', '', '', '', 3, 1, ''), ('451029', '4510', '00,45,4510', '田林县', '45', '广西壮族自治区', '4510', '百色市', '451029', '田林县', '', '', '', '', 3, 1, ''), ('451030', '4510', '00,45,4510', '西林县', '45', '广西壮族自治区', '4510', '百色市', '451030', '西林县', '', '', '', '', 3, 1, ''), ('451031', '4510', '00,45,4510', '隆林各族自治县', '45', '广西壮族自治区', '4510', '百色市', '451031', '隆林各族自治县', '', '', '', '', 3, 1, ''), ('451081', '4510', '00,45,4510', '靖西市', '45', '广西壮族自治区', '4510', '百色市', '451081', '靖西市', '', '', '', '', 3, 1, ''), ('451082', '4510', '00,45,4510', '平果市', '45', '广西壮族自治区', '4510', '百色市', '451082', '平果市', '', '', '', '', 3, 1, ''), ('4511', '45', '00,45', '贺州市', '45', '广西壮族自治区', '4511', '贺州市', '', '', '', '', '', '', 2, 1, ''), ('451102', '4511', '00,45,4511', '八步区', '45', '广西壮族自治区', '4511', '贺州市', '451102', '八步区', '', '', '', '', 3, 1, ''), ('451103', '4511', '00,45,4511', '平桂区', '45', '广西壮族自治区', '4511', '贺州市', '451103', '平桂区', '', '', '', '', 3, 1, ''), ('451121', '4511', '00,45,4511', '昭平县', '45', '广西壮族自治区', '4511', '贺州市', '451121', '昭平县', '', '', '', '', 3, 1, ''), ('451122', '4511', '00,45,4511', '钟山县', '45', '广西壮族自治区', '4511', '贺州市', '451122', '钟山县', '', '', '', '', 3, 1, ''), ('451123', '4511', '00,45,4511', '富川瑶族自治县', '45', '广西壮族自治区', '4511', '贺州市', '451123', '富川瑶族自治县', '', '', '', '', 3, 1, ''), ('4512', '45', '00,45', '河池市', '45', '广西壮族自治区', '4512', '河池市', '', '', '', '', '', '', 2, 1, ''), ('451202', '4512', '00,45,4512', '金城江区', '45', '广西壮族自治区', '4512', '河池市', '451202', '金城江区', '', '', '', '', 3, 1, ''), ('451203', '4512', '00,45,4512', '宜州区', '45', '广西壮族自治区', '4512', '河池市', '451203', '宜州区', '', '', '', '', 3, 1, ''), ('451221', '4512', '00,45,4512', '南丹县', '45', '广西壮族自治区', '4512', '河池市', '451221', '南丹县', '', '', '', '', 3, 1, ''), ('451222', '4512', '00,45,4512', '天峨县', '45', '广西壮族自治区', '4512', '河池市', '451222', '天峨县', '', '', '', '', 3, 1, ''), ('451223', '4512', '00,45,4512', '凤山县', '45', '广西壮族自治区', '4512', '河池市', '451223', '凤山县', '', '', '', '', 3, 1, ''), ('451224', '4512', '00,45,4512', '东兰县', '45', '广西壮族自治区', '4512', '河池市', '451224', '东兰县', '', '', '', '', 3, 1, ''), ('451225', '4512', '00,45,4512', '罗城仫佬族自治县', '45', '广西壮族自治区', '4512', '河池市', '451225', '罗城仫佬族自治县', '', '', '', '', 3, 1, ''), ('451226', '4512', '00,45,4512', '环江毛南族自治县', '45', '广西壮族自治区', '4512', '河池市', '451226', '环江毛南族自治县', '', '', '', '', 3, 1, ''), ('451227', '4512', '00,45,4512', '巴马瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451227', '巴马瑶族自治县', '', '', '', '', 3, 1, ''), ('451228', '4512', '00,45,4512', '都安瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451228', '都安瑶族自治县', '', '', '', '', 3, 1, ''), ('451229', '4512', '00,45,4512', '大化瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451229', '大化瑶族自治县', '', '', '', '', 3, 1, ''), ('4513', '45', '00,45', '来宾市', '45', '广西壮族自治区', '4513', '来宾市', '', '', '', '', '', '', 2, 1, ''), ('451302', '4513', '00,45,4513', '兴宾区', '45', '广西壮族自治区', '4513', '来宾市', '451302', '兴宾区', '', '', '', '', 3, 1, ''), ('451321', '4513', '00,45,4513', '忻城县', '45', '广西壮族自治区', '4513', '来宾市', '451321', '忻城县', '', '', '', '', 3, 1, ''), ('451322', '4513', '00,45,4513', '象州县', '45', '广西壮族自治区', '4513', '来宾市', '451322', '象州县', '', '', '', '', 3, 1, ''), ('451323', '4513', '00,45,4513', '武宣县', '45', '广西壮族自治区', '4513', '来宾市', '451323', '武宣县', '', '', '', '', 3, 1, ''), ('451324', '4513', '00,45,4513', '金秀瑶族自治县', '45', '广西壮族自治区', '4513', '来宾市', '451324', '金秀瑶族自治县', '', '', '', '', 3, 1, ''), ('451381', '4513', '00,45,4513', '合山市', '45', '广西壮族自治区', '4513', '来宾市', '451381', '合山市', '', '', '', '', 3, 1, ''), ('4514', '45', '00,45', '崇左市', '45', '广西壮族自治区', '4514', '崇左市', '', '', '', '', '', '', 2, 1, ''), ('451402', '4514', '00,45,4514', '江州区', '45', '广西壮族自治区', '4514', '崇左市', '451402', '江州区', '', '', '', '', 3, 1, ''), ('451421', '4514', '00,45,4514', '扶绥县', '45', '广西壮族自治区', '4514', '崇左市', '451421', '扶绥县', '', '', '', '', 3, 1, ''), ('451422', '4514', '00,45,4514', '宁明县', '45', '广西壮族自治区', '4514', '崇左市', '451422', '宁明县', '', '', '', '', 3, 1, ''), ('451423', '4514', '00,45,4514', '龙州县', '45', '广西壮族自治区', '4514', '崇左市', '451423', '龙州县', '', '', '', '', 3, 1, ''), ('451424', '4514', '00,45,4514', '大新县', '45', '广西壮族自治区', '4514', '崇左市', '451424', '大新县', '', '', '', '', 3, 1, ''), ('451425', '4514', '00,45,4514', '天等县', '45', '广西壮族自治区', '4514', '崇左市', '451425', '天等县', '', '', '', '', 3, 1, ''), ('451481', '4514', '00,45,4514', '凭祥市', '45', '广西壮族自治区', '4514', '崇左市', '451481', '凭祥市', '', '', '', '', 3, 1, ''), ('46', '00', '00', '海南省', '46', '海南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4601', '46', '00,46', '海口市', '46', '海南省', '4601', '海口市', '', '', '', '', '', '', 2, 1, ''), ('460105', '4601', '00,46,4601', '秀英区', '46', '海南省', '4601', '海口市', '460105', '秀英区', '', '', '', '', 3, 1, ''), ('460106', '4601', '00,46,4601', '龙华区', '46', '海南省', '4601', '海口市', '460106', '龙华区', '', '', '', '', 3, 1, ''), ('460107', '4601', '00,46,4601', '琼山区', '46', '海南省', '4601', '海口市', '460107', '琼山区', '', '', '', '', 3, 1, ''), ('460108', '4601', '00,46,4601', '美兰区', '46', '海南省', '4601', '海口市', '460108', '美兰区', '', '', '', '', 3, 1, ''), ('4602', '46', '00,46', '三亚市', '46', '海南省', '4602', '三亚市', '', '', '', '', '', '', 2, 1, ''), ('460202', '4602', '00,46,4602', '海棠区', '46', '海南省', '4602', '三亚市', '460202', '海棠区', '', '', '', '', 3, 1, ''), ('460203', '4602', '00,46,4602', '吉阳区', '46', '海南省', '4602', '三亚市', '460203', '吉阳区', '', '', '', '', 3, 1, ''), ('460204', '4602', '00,46,4602', '天涯区', '46', '海南省', '4602', '三亚市', '460204', '天涯区', '', '', '', '', 3, 1, ''), ('460205', '4602', '00,46,4602', '崖州区', '46', '海南省', '4602', '三亚市', '460205', '崖州区', '', '', '', '', 3, 1, ''), ('4603', '46', '00,46', '三沙市', '46', '海南省', '4603', '三沙市', '', '', '', '', '', '', 2, 1, ''), ('460300', '4603', '00,46,4603', '三沙市', '46', '海南省', '4603', '三沙市', '460300', '三沙市', '', '', '', '', 3, 1, ''), ('4604', '46', '00,46', '儋州市', '46', '海南省', '4604', '儋州市', '', '', '', '', '', '', 2, 1, ''), ('460400', '4604', '00,46,4604', '儋州市', '46', '海南省', '4604', '儋州市', '460400', '儋州市', '', '', '', '', 3, 1, ''), ('4690', '46', '00,46', '省直辖县级行政区', '46', '海南省', '4690', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('469001', '4690', '00,46,4690', '五指山市', '46', '海南省', '4690', '省直辖县级行政区', '469001', '五指山市', '', '', '', '', 3, 1, ''), ('469002', '4690', '00,46,4690', '琼海市', '46', '海南省', '4690', '省直辖县级行政区', '469002', '琼海市', '', '', '', '', 3, 1, ''), ('469005', '4690', '00,46,4690', '文昌市', '46', '海南省', '4690', '省直辖县级行政区', '469005', '文昌市', '', '', '', '', 3, 1, ''), ('469006', '4690', '00,46,4690', '万宁市', '46', '海南省', '4690', '省直辖县级行政区', '469006', '万宁市', '', '', '', '', 3, 1, ''), ('469007', '4690', '00,46,4690', '东方市', '46', '海南省', '4690', '省直辖县级行政区', '469007', '东方市', '', '', '', '', 3, 1, ''), ('469021', '4690', '00,46,4690', '定安县', '46', '海南省', '4690', '省直辖县级行政区', '469021', '定安县', '', '', '', '', 3, 1, ''), ('469022', '4690', '00,46,4690', '屯昌县', '46', '海南省', '4690', '省直辖县级行政区', '469022', '屯昌县', '', '', '', '', 3, 1, ''), ('469023', '4690', '00,46,4690', '澄迈县', '46', '海南省', '4690', '省直辖县级行政区', '469023', '澄迈县', '', '', '', '', 3, 1, ''), ('469024', '4690', '00,46,4690', '临高县', '46', '海南省', '4690', '省直辖县级行政区', '469024', '临高县', '', '', '', '', 3, 1, ''), ('469025', '4690', '00,46,4690', '白沙黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469025', '白沙黎族自治县', '', '', '', '', 3, 1, ''), ('469026', '4690', '00,46,4690', '昌江黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469026', '昌江黎族自治县', '', '', '', '', 3, 1, ''), ('469027', '4690', '00,46,4690', '乐东黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469027', '乐东黎族自治县', '', '', '', '', 3, 1, ''), ('469028', '4690', '00,46,4690', '陵水黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469028', '陵水黎族自治县', '', '', '', '', 3, 1, ''), ('469029', '4690', '00,46,4690', '保亭黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469029', '保亭黎族苗族自治县', '', '', '', '', 3, 1, ''), ('469030', '4690', '00,46,4690', '琼中黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469030', '琼中黎族苗族自治县', '', '', '', '', 3, 1, ''), ('50', '00', '00', '重庆市', '50', '重庆市', '', '', '', '', '', '', '', '', 1, 1, ''), ('5001', '50', '00,50', '重庆市', '50', '重庆市', '5001', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500101', '5001', '00,50,5001', '万州区', '50', '重庆市', '5001', '重庆市', '500101', '万州区', '', '', '', '', 3, 1, ''), ('500102', '5001', '00,50,5001', '涪陵区', '50', '重庆市', '5001', '重庆市', '500102', '涪陵区', '', '', '', '', 3, 1, ''), ('500103', '5001', '00,50,5001', '渝中区', '50', '重庆市', '5001', '重庆市', '500103', '渝中区', '', '', '', '', 3, 1, ''), ('500104', '5001', '00,50,5001', '大渡口区', '50', '重庆市', '5001', '重庆市', '500104', '大渡口区', '', '', '', '', 3, 1, ''), ('500105', '5001', '00,50,5001', '江北区', '50', '重庆市', '5001', '重庆市', '500105', '江北区', '', '', '', '', 3, 1, ''), ('500106', '5001', '00,50,5001', '沙坪坝区', '50', '重庆市', '5001', '重庆市', '500106', '沙坪坝区', '', '', '', '', 3, 1, ''), ('500107', '5001', '00,50,5001', '九龙坡区', '50', '重庆市', '5001', '重庆市', '500107', '九龙坡区', '', '', '', '', 3, 1, ''), ('500108', '5001', '00,50,5001', '南岸区', '50', '重庆市', '5001', '重庆市', '500108', '南岸区', '', '', '', '', 3, 1, ''), ('500109', '5001', '00,50,5001', '北碚区', '50', '重庆市', '5001', '重庆市', '500109', '北碚区', '', '', '', '', 3, 1, ''), ('500110', '5001', '00,50,5001', '綦江区', '50', '重庆市', '5001', '重庆市', '500110', '綦江区', '', '', '', '', 3, 1, ''), ('500111', '5001', '00,50,5001', '大足区', '50', '重庆市', '5001', '重庆市', '500111', '大足区', '', '', '', '', 3, 1, ''), ('500112', '5001', '00,50,5001', '渝北区', '50', '重庆市', '5001', '重庆市', '500112', '渝北区', '', '', '', '', 3, 1, ''), ('500113', '5001', '00,50,5001', '巴南区', '50', '重庆市', '5001', '重庆市', '500113', '巴南区', '', '', '', '', 3, 1, ''), ('500114', '5001', '00,50,5001', '黔江区', '50', '重庆市', '5001', '重庆市', '500114', '黔江区', '', '', '', '', 3, 1, ''), ('500115', '5001', '00,50,5001', '长寿区', '50', '重庆市', '5001', '重庆市', '500115', '长寿区', '', '', '', '', 3, 1, ''), ('500116', '5001', '00,50,5001', '江津区', '50', '重庆市', '5001', '重庆市', '500116', '江津区', '', '', '', '', 3, 1, ''), ('500117', '5001', '00,50,5001', '合川区', '50', '重庆市', '5001', '重庆市', '500117', '合川区', '', '', '', '', 3, 1, ''), ('500118', '5001', '00,50,5001', '永川区', '50', '重庆市', '5001', '重庆市', '500118', '永川区', '', '', '', '', 3, 1, ''), ('500119', '5001', '00,50,5001', '南川区', '50', '重庆市', '5001', '重庆市', '500119', '南川区', '', '', '', '', 3, 1, ''), ('500120', '5001', '00,50,5001', '璧山区', '50', '重庆市', '5001', '重庆市', '500120', '璧山区', '', '', '', '', 3, 1, ''), ('500151', '5001', '00,50,5001', '铜梁区', '50', '重庆市', '5001', '重庆市', '500151', '铜梁区', '', '', '', '', 3, 1, ''), ('500152', '5001', '00,50,5001', '潼南区', '50', '重庆市', '5001', '重庆市', '500152', '潼南区', '', '', '', '', 3, 1, ''), ('500153', '5001', '00,50,5001', '荣昌区', '50', '重庆市', '5001', '重庆市', '500153', '荣昌区', '', '', '', '', 3, 1, ''), ('500154', '5001', '00,50,5001', '开州区', '50', '重庆市', '5001', '重庆市', '500154', '开州区', '', '', '', '', 3, 1, ''), ('500155', '5001', '00,50,5001', '梁平区', '50', '重庆市', '5001', '重庆市', '500155', '梁平区', '', '', '', '', 3, 1, ''), ('500156', '5001', '00,50,5001', '武隆区', '50', '重庆市', '5001', '重庆市', '500156', '武隆区', '', '', '', '', 3, 1, ''), ('5002', '50', '00,50', '重庆市', '50', '重庆市', '5002', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500229', '5002', '00,50,5002', '城口县', '50', '重庆市', '5002', '重庆市', '500229', '城口县', '', '', '', '', 3, 1, ''), ('500230', '5002', '00,50,5002', '丰都县', '50', '重庆市', '5002', '重庆市', '500230', '丰都县', '', '', '', '', 3, 1, ''), ('500231', '5002', '00,50,5002', '垫江县', '50', '重庆市', '5002', '重庆市', '500231', '垫江县', '', '', '', '', 3, 1, ''), ('500233', '5002', '00,50,5002', '忠县', '50', '重庆市', '5002', '重庆市', '500233', '忠县', '', '', '', '', 3, 1, ''), ('500235', '5002', '00,50,5002', '云阳县', '50', '重庆市', '5002', '重庆市', '500235', '云阳县', '', '', '', '', 3, 1, ''), ('500236', '5002', '00,50,5002', '奉节县', '50', '重庆市', '5002', '重庆市', '500236', '奉节县', '', '', '', '', 3, 1, ''), ('500237', '5002', '00,50,5002', '巫山县', '50', '重庆市', '5002', '重庆市', '500237', '巫山县', '', '', '', '', 3, 1, ''), ('500238', '5002', '00,50,5002', '巫溪县', '50', '重庆市', '5002', '重庆市', '500238', '巫溪县', '', '', '', '', 3, 1, ''), ('500240', '5002', '00,50,5002', '石柱土家族自治县', '50', '重庆市', '5002', '重庆市', '500240', '石柱土家族自治县', '', '', '', '', 3, 1, ''), ('500241', '5002', '00,50,5002', '秀山土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500241', '秀山土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500242', '5002', '00,50,5002', '酉阳土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500242', '酉阳土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500243', '5002', '00,50,5002', '彭水苗族土家族自治县', '50', '重庆市', '5002', '重庆市', '500243', '彭水苗族土家族自治县', '', '', '', '', 3, 1, ''), ('51', '00', '00', '四川省', '51', '四川省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5101', '51', '00,51', '成都市', '51', '四川省', '5101', '成都市', '', '', '', '', '', '', 2, 1, ''), ('510104', '5101', '00,51,5101', '锦江区', '51', '四川省', '5101', '成都市', '510104', '锦江区', '', '', '', '', 3, 1, ''), ('510105', '5101', '00,51,5101', '青羊区', '51', '四川省', '5101', '成都市', '510105', '青羊区', '', '', '', '', 3, 1, ''), ('510106', '5101', '00,51,5101', '金牛区', '51', '四川省', '5101', '成都市', '510106', '金牛区', '', '', '', '', 3, 1, ''), ('510107', '5101', '00,51,5101', '武侯区', '51', '四川省', '5101', '成都市', '510107', '武侯区', '', '', '', '', 3, 1, ''), ('510108', '5101', '00,51,5101', '成华区', '51', '四川省', '5101', '成都市', '510108', '成华区', '', '', '', '', 3, 1, ''), ('510112', '5101', '00,51,5101', '龙泉驿区', '51', '四川省', '5101', '成都市', '510112', '龙泉驿区', '', '', '', '', 3, 1, ''), ('510113', '5101', '00,51,5101', '青白江区', '51', '四川省', '5101', '成都市', '510113', '青白江区', '', '', '', '', 3, 1, ''), ('510114', '5101', '00,51,5101', '新都区', '51', '四川省', '5101', '成都市', '510114', '新都区', '', '', '', '', 3, 1, ''), ('510115', '5101', '00,51,5101', '温江区', '51', '四川省', '5101', '成都市', '510115', '温江区', '', '', '', '', 3, 1, ''), ('510116', '5101', '00,51,5101', '双流区', '51', '四川省', '5101', '成都市', '510116', '双流区', '', '', '', '', 3, 1, ''), ('510117', '5101', '00,51,5101', '郫都区', '51', '四川省', '5101', '成都市', '510117', '郫都区', '', '', '', '', 3, 1, ''), ('510121', '5101', '00,51,5101', '金堂县', '51', '四川省', '5101', '成都市', '510121', '金堂县', '', '', '', '', 3, 1, ''), ('510129', '5101', '00,51,5101', '大邑县', '51', '四川省', '5101', '成都市', '510129', '大邑县', '', '', '', '', 3, 1, ''), ('510131', '5101', '00,51,5101', '蒲江县', '51', '四川省', '5101', '成都市', '510131', '蒲江县', '', '', '', '', 3, 1, ''), ('510132', '5101', '00,51,5101', '新津县', '51', '四川省', '5101', '成都市', '510132', '新津县', '', '', '', '', 3, 1, ''), ('510181', '5101', '00,51,5101', '都江堰市', '51', '四川省', '5101', '成都市', '510181', '都江堰市', '', '', '', '', 3, 1, ''), ('510182', '5101', '00,51,5101', '彭州市', '51', '四川省', '5101', '成都市', '510182', '彭州市', '', '', '', '', 3, 1, ''), ('510183', '5101', '00,51,5101', '邛崃市', '51', '四川省', '5101', '成都市', '510183', '邛崃市', '', '', '', '', 3, 1, ''), ('510184', '5101', '00,51,5101', '崇州市', '51', '四川省', '5101', '成都市', '510184', '崇州市', '', '', '', '', 3, 1, ''), ('510185', '5101', '00,51,5101', '简阳市', '51', '四川省', '5101', '成都市', '510185', '简阳市', '', '', '', '', 3, 1, ''), ('5103', '51', '00,51', '自贡市', '51', '四川省', '5103', '自贡市', '', '', '', '', '', '', 2, 1, ''), ('510302', '5103', '00,51,5103', '自流井区', '51', '四川省', '5103', '自贡市', '510302', '自流井区', '', '', '', '', 3, 1, ''), ('510303', '5103', '00,51,5103', '贡井区', '51', '四川省', '5103', '自贡市', '510303', '贡井区', '', '', '', '', 3, 1, ''), ('510304', '5103', '00,51,5103', '大安区', '51', '四川省', '5103', '自贡市', '510304', '大安区', '', '', '', '', 3, 1, ''), ('510311', '5103', '00,51,5103', '沿滩区', '51', '四川省', '5103', '自贡市', '510311', '沿滩区', '', '', '', '', 3, 1, ''), ('510321', '5103', '00,51,5103', '荣县', '51', '四川省', '5103', '自贡市', '510321', '荣县', '', '', '', '', 3, 1, ''), ('510322', '5103', '00,51,5103', '富顺县', '51', '四川省', '5103', '自贡市', '510322', '富顺县', '', '', '', '', 3, 1, ''), ('5104', '51', '00,51', '攀枝花市', '51', '四川省', '5104', '攀枝花市', '', '', '', '', '', '', 2, 1, ''), ('510402', '5104', '00,51,5104', '东区', '51', '四川省', '5104', '攀枝花市', '510402', '东区', '', '', '', '', 3, 1, ''), ('510403', '5104', '00,51,5104', '西区', '51', '四川省', '5104', '攀枝花市', '510403', '西区', '', '', '', '', 3, 1, ''), ('510411', '5104', '00,51,5104', '仁和区', '51', '四川省', '5104', '攀枝花市', '510411', '仁和区', '', '', '', '', 3, 1, ''), ('510421', '5104', '00,51,5104', '米易县', '51', '四川省', '5104', '攀枝花市', '510421', '米易县', '', '', '', '', 3, 1, ''), ('510422', '5104', '00,51,5104', '盐边县', '51', '四川省', '5104', '攀枝花市', '510422', '盐边县', '', '', '', '', 3, 1, ''), ('5105', '51', '00,51', '泸州市', '51', '四川省', '5105', '泸州市', '', '', '', '', '', '', 2, 1, ''), ('510502', '5105', '00,51,5105', '江阳区', '51', '四川省', '5105', '泸州市', '510502', '江阳区', '', '', '', '', 3, 1, ''), ('510503', '5105', '00,51,5105', '纳溪区', '51', '四川省', '5105', '泸州市', '510503', '纳溪区', '', '', '', '', 3, 1, ''), ('510504', '5105', '00,51,5105', '龙马潭区', '51', '四川省', '5105', '泸州市', '510504', '龙马潭区', '', '', '', '', 3, 1, ''), ('510521', '5105', '00,51,5105', '泸县', '51', '四川省', '5105', '泸州市', '510521', '泸县', '', '', '', '', 3, 1, ''), ('510522', '5105', '00,51,5105', '合江县', '51', '四川省', '5105', '泸州市', '510522', '合江县', '', '', '', '', 3, 1, ''), ('510524', '5105', '00,51,5105', '叙永县', '51', '四川省', '5105', '泸州市', '510524', '叙永县', '', '', '', '', 3, 1, ''), ('510525', '5105', '00,51,5105', '古蔺县', '51', '四川省', '5105', '泸州市', '510525', '古蔺县', '', '', '', '', 3, 1, ''), ('5106', '51', '00,51', '德阳市', '51', '四川省', '5106', '德阳市', '', '', '', '', '', '', 2, 1, ''), ('510603', '5106', '00,51,5106', '旌阳区', '51', '四川省', '5106', '德阳市', '510603', '旌阳区', '', '', '', '', 3, 1, ''), ('510604', '5106', '00,51,5106', '罗江区', '51', '四川省', '5106', '德阳市', '510604', '罗江区', '', '', '', '', 3, 1, ''), ('510623', '5106', '00,51,5106', '中江县', '51', '四川省', '5106', '德阳市', '510623', '中江县', '', '', '', '', 3, 1, ''), ('510681', '5106', '00,51,5106', '广汉市', '51', '四川省', '5106', '德阳市', '510681', '广汉市', '', '', '', '', 3, 1, ''), ('510682', '5106', '00,51,5106', '什邡市', '51', '四川省', '5106', '德阳市', '510682', '什邡市', '', '', '', '', 3, 1, ''), ('510683', '5106', '00,51,5106', '绵竹市', '51', '四川省', '5106', '德阳市', '510683', '绵竹市', '', '', '', '', 3, 1, ''), ('5107', '51', '00,51', '绵阳市', '51', '四川省', '5107', '绵阳市', '', '', '', '', '', '', 2, 1, ''), ('510703', '5107', '00,51,5107', '涪城区', '51', '四川省', '5107', '绵阳市', '510703', '涪城区', '', '', '', '', 3, 1, ''), ('510704', '5107', '00,51,5107', '游仙区', '51', '四川省', '5107', '绵阳市', '510704', '游仙区', '', '', '', '', 3, 1, ''), ('510705', '5107', '00,51,5107', '安州区', '51', '四川省', '5107', '绵阳市', '510705', '安州区', '', '', '', '', 3, 1, ''), ('510722', '5107', '00,51,5107', '三台县', '51', '四川省', '5107', '绵阳市', '510722', '三台县', '', '', '', '', 3, 1, ''), ('510723', '5107', '00,51,5107', '盐亭县', '51', '四川省', '5107', '绵阳市', '510723', '盐亭县', '', '', '', '', 3, 1, ''), ('510725', '5107', '00,51,5107', '梓潼县', '51', '四川省', '5107', '绵阳市', '510725', '梓潼县', '', '', '', '', 3, 1, ''), ('510726', '5107', '00,51,5107', '北川羌族自治县', '51', '四川省', '5107', '绵阳市', '510726', '北川羌族自治县', '', '', '', '', 3, 1, ''), ('510727', '5107', '00,51,5107', '平武县', '51', '四川省', '5107', '绵阳市', '510727', '平武县', '', '', '', '', 3, 1, ''), ('510781', '5107', '00,51,5107', '江油市', '51', '四川省', '5107', '绵阳市', '510781', '江油市', '', '', '', '', 3, 1, ''), ('5108', '51', '00,51', '广元市', '51', '四川省', '5108', '广元市', '', '', '', '', '', '', 2, 1, ''), ('510802', '5108', '00,51,5108', '利州区', '51', '四川省', '5108', '广元市', '510802', '利州区', '', '', '', '', 3, 1, ''), ('510811', '5108', '00,51,5108', '昭化区', '51', '四川省', '5108', '广元市', '510811', '昭化区', '', '', '', '', 3, 1, ''), ('510812', '5108', '00,51,5108', '朝天区', '51', '四川省', '5108', '广元市', '510812', '朝天区', '', '', '', '', 3, 1, ''), ('510821', '5108', '00,51,5108', '旺苍县', '51', '四川省', '5108', '广元市', '510821', '旺苍县', '', '', '', '', 3, 1, ''), ('510822', '5108', '00,51,5108', '青川县', '51', '四川省', '5108', '广元市', '510822', '青川县', '', '', '', '', 3, 1, ''), ('510823', '5108', '00,51,5108', '剑阁县', '51', '四川省', '5108', '广元市', '510823', '剑阁县', '', '', '', '', 3, 1, ''), ('510824', '5108', '00,51,5108', '苍溪县', '51', '四川省', '5108', '广元市', '510824', '苍溪县', '', '', '', '', 3, 1, ''), ('5109', '51', '00,51', '遂宁市', '51', '四川省', '5109', '遂宁市', '', '', '', '', '', '', 2, 1, ''), ('510903', '5109', '00,51,5109', '船山区', '51', '四川省', '5109', '遂宁市', '510903', '船山区', '', '', '', '', 3, 1, ''), ('510904', '5109', '00,51,5109', '安居区', '51', '四川省', '5109', '遂宁市', '510904', '安居区', '', '', '', '', 3, 1, ''), ('510921', '5109', '00,51,5109', '蓬溪县', '51', '四川省', '5109', '遂宁市', '510921', '蓬溪县', '', '', '', '', 3, 1, ''), ('510923', '5109', '00,51,5109', '大英县', '51', '四川省', '5109', '遂宁市', '510923', '大英县', '', '', '', '', 3, 1, ''), ('510981', '5109', '00,51,5109', '射洪市', '51', '四川省', '5109', '遂宁市', '510981', '射洪市', '', '', '', '', 3, 1, ''), ('5110', '51', '00,51', '内江市', '51', '四川省', '5110', '内江市', '', '', '', '', '', '', 2, 1, ''), ('511002', '5110', '00,51,5110', '市中区', '51', '四川省', '5110', '内江市', '511002', '市中区', '', '', '', '', 3, 1, ''), ('511011', '5110', '00,51,5110', '东兴区', '51', '四川省', '5110', '内江市', '511011', '东兴区', '', '', '', '', 3, 1, ''), ('511024', '5110', '00,51,5110', '威远县', '51', '四川省', '5110', '内江市', '511024', '威远县', '', '', '', '', 3, 1, ''), ('511025', '5110', '00,51,5110', '资中县', '51', '四川省', '5110', '内江市', '511025', '资中县', '', '', '', '', 3, 1, ''), ('511083', '5110', '00,51,5110', '隆昌市', '51', '四川省', '5110', '内江市', '511083', '隆昌市', '', '', '', '', 3, 1, ''), ('5111', '51', '00,51', '乐山市', '51', '四川省', '5111', '乐山市', '', '', '', '', '', '', 2, 1, ''), ('511102', '5111', '00,51,5111', '市中区', '51', '四川省', '5111', '乐山市', '511102', '市中区', '', '', '', '', 3, 1, ''), ('511111', '5111', '00,51,5111', '沙湾区', '51', '四川省', '5111', '乐山市', '511111', '沙湾区', '', '', '', '', 3, 1, ''), ('511112', '5111', '00,51,5111', '五通桥区', '51', '四川省', '5111', '乐山市', '511112', '五通桥区', '', '', '', '', 3, 1, ''), ('511113', '5111', '00,51,5111', '金口河区', '51', '四川省', '5111', '乐山市', '511113', '金口河区', '', '', '', '', 3, 1, ''), ('511123', '5111', '00,51,5111', '犍为县', '51', '四川省', '5111', '乐山市', '511123', '犍为县', '', '', '', '', 3, 1, ''), ('511124', '5111', '00,51,5111', '井研县', '51', '四川省', '5111', '乐山市', '511124', '井研县', '', '', '', '', 3, 1, ''), ('511126', '5111', '00,51,5111', '夹江县', '51', '四川省', '5111', '乐山市', '511126', '夹江县', '', '', '', '', 3, 1, ''), ('511129', '5111', '00,51,5111', '沐川县', '51', '四川省', '5111', '乐山市', '511129', '沐川县', '', '', '', '', 3, 1, ''), ('511132', '5111', '00,51,5111', '峨边彝族自治县', '51', '四川省', '5111', '乐山市', '511132', '峨边彝族自治县', '', '', '', '', 3, 1, ''), ('511133', '5111', '00,51,5111', '马边彝族自治县', '51', '四川省', '5111', '乐山市', '511133', '马边彝族自治县', '', '', '', '', 3, 1, ''), ('511181', '5111', '00,51,5111', '峨眉山市', '51', '四川省', '5111', '乐山市', '511181', '峨眉山市', '', '', '', '', 3, 1, ''), ('5113', '51', '00,51', '南充市', '51', '四川省', '5113', '南充市', '', '', '', '', '', '', 2, 1, ''), ('511302', '5113', '00,51,5113', '顺庆区', '51', '四川省', '5113', '南充市', '511302', '顺庆区', '', '', '', '', 3, 1, ''), ('511303', '5113', '00,51,5113', '高坪区', '51', '四川省', '5113', '南充市', '511303', '高坪区', '', '', '', '', 3, 1, ''), ('511304', '5113', '00,51,5113', '嘉陵区', '51', '四川省', '5113', '南充市', '511304', '嘉陵区', '', '', '', '', 3, 1, ''), ('511321', '5113', '00,51,5113', '南部县', '51', '四川省', '5113', '南充市', '511321', '南部县', '', '', '', '', 3, 1, ''), ('511322', '5113', '00,51,5113', '营山县', '51', '四川省', '5113', '南充市', '511322', '营山县', '', '', '', '', 3, 1, ''), ('511323', '5113', '00,51,5113', '蓬安县', '51', '四川省', '5113', '南充市', '511323', '蓬安县', '', '', '', '', 3, 1, ''), ('511324', '5113', '00,51,5113', '仪陇县', '51', '四川省', '5113', '南充市', '511324', '仪陇县', '', '', '', '', 3, 1, ''), ('511325', '5113', '00,51,5113', '西充县', '51', '四川省', '5113', '南充市', '511325', '西充县', '', '', '', '', 3, 1, ''), ('511381', '5113', '00,51,5113', '阆中市', '51', '四川省', '5113', '南充市', '511381', '阆中市', '', '', '', '', 3, 1, ''), ('5114', '51', '00,51', '眉山市', '51', '四川省', '5114', '眉山市', '', '', '', '', '', '', 2, 1, ''), ('511402', '5114', '00,51,5114', '东坡区', '51', '四川省', '5114', '眉山市', '511402', '东坡区', '', '', '', '', 3, 1, ''), ('511403', '5114', '00,51,5114', '彭山区', '51', '四川省', '5114', '眉山市', '511403', '彭山区', '', '', '', '', 3, 1, ''), ('511421', '5114', '00,51,5114', '仁寿县', '51', '四川省', '5114', '眉山市', '511421', '仁寿县', '', '', '', '', 3, 1, ''), ('511423', '5114', '00,51,5114', '洪雅县', '51', '四川省', '5114', '眉山市', '511423', '洪雅县', '', '', '', '', 3, 1, ''), ('511424', '5114', '00,51,5114', '丹棱县', '51', '四川省', '5114', '眉山市', '511424', '丹棱县', '', '', '', '', 3, 1, ''), ('511425', '5114', '00,51,5114', '青神县', '51', '四川省', '5114', '眉山市', '511425', '青神县', '', '', '', '', 3, 1, ''), ('5115', '51', '00,51', '宜宾市', '51', '四川省', '5115', '宜宾市', '', '', '', '', '', '', 2, 1, ''), ('511502', '5115', '00,51,5115', '翠屏区', '51', '四川省', '5115', '宜宾市', '511502', '翠屏区', '', '', '', '', 3, 1, ''), ('511503', '5115', '00,51,5115', '南溪区', '51', '四川省', '5115', '宜宾市', '511503', '南溪区', '', '', '', '', 3, 1, ''), ('511504', '5115', '00,51,5115', '叙州区', '51', '四川省', '5115', '宜宾市', '511504', '叙州区', '', '', '', '', 3, 1, ''), ('511523', '5115', '00,51,5115', '江安县', '51', '四川省', '5115', '宜宾市', '511523', '江安县', '', '', '', '', 3, 1, ''), ('511524', '5115', '00,51,5115', '长宁县', '51', '四川省', '5115', '宜宾市', '511524', '长宁县', '', '', '', '', 3, 1, ''), ('511525', '5115', '00,51,5115', '高县', '51', '四川省', '5115', '宜宾市', '511525', '高县', '', '', '', '', 3, 1, ''), ('511526', '5115', '00,51,5115', '珙县', '51', '四川省', '5115', '宜宾市', '511526', '珙县', '', '', '', '', 3, 1, ''), ('511527', '5115', '00,51,5115', '筠连县', '51', '四川省', '5115', '宜宾市', '511527', '筠连县', '', '', '', '', 3, 1, ''), ('511528', '5115', '00,51,5115', '兴文县', '51', '四川省', '5115', '宜宾市', '511528', '兴文县', '', '', '', '', 3, 1, ''), ('511529', '5115', '00,51,5115', '屏山县', '51', '四川省', '5115', '宜宾市', '511529', '屏山县', '', '', '', '', 3, 1, ''), ('5116', '51', '00,51', '广安市', '51', '四川省', '5116', '广安市', '', '', '', '', '', '', 2, 1, ''), ('511602', '5116', '00,51,5116', '广安区', '51', '四川省', '5116', '广安市', '511602', '广安区', '', '', '', '', 3, 1, ''), ('511603', '5116', '00,51,5116', '前锋区', '51', '四川省', '5116', '广安市', '511603', '前锋区', '', '', '', '', 3, 1, ''), ('511621', '5116', '00,51,5116', '岳池县', '51', '四川省', '5116', '广安市', '511621', '岳池县', '', '', '', '', 3, 1, ''), ('511622', '5116', '00,51,5116', '武胜县', '51', '四川省', '5116', '广安市', '511622', '武胜县', '', '', '', '', 3, 1, ''), ('511623', '5116', '00,51,5116', '邻水县', '51', '四川省', '5116', '广安市', '511623', '邻水县', '', '', '', '', 3, 1, ''), ('511681', '5116', '00,51,5116', '华蓥市', '51', '四川省', '5116', '广安市', '511681', '华蓥市', '', '', '', '', 3, 1, ''), ('5117', '51', '00,51', '达州市', '51', '四川省', '5117', '达州市', '', '', '', '', '', '', 2, 1, ''), ('511702', '5117', '00,51,5117', '通川区', '51', '四川省', '5117', '达州市', '511702', '通川区', '', '', '', '', 3, 1, ''), ('511703', '5117', '00,51,5117', '达川区', '51', '四川省', '5117', '达州市', '511703', '达川区', '', '', '', '', 3, 1, ''), ('511722', '5117', '00,51,5117', '宣汉县', '51', '四川省', '5117', '达州市', '511722', '宣汉县', '', '', '', '', 3, 1, ''), ('511723', '5117', '00,51,5117', '开江县', '51', '四川省', '5117', '达州市', '511723', '开江县', '', '', '', '', 3, 1, ''), ('511724', '5117', '00,51,5117', '大竹县', '51', '四川省', '5117', '达州市', '511724', '大竹县', '', '', '', '', 3, 1, ''), ('511725', '5117', '00,51,5117', '渠县', '51', '四川省', '5117', '达州市', '511725', '渠县', '', '', '', '', 3, 1, ''), ('511781', '5117', '00,51,5117', '万源市', '51', '四川省', '5117', '达州市', '511781', '万源市', '', '', '', '', 3, 1, ''), ('5118', '51', '00,51', '雅安市', '51', '四川省', '5118', '雅安市', '', '', '', '', '', '', 2, 1, ''); +INSERT INTO `sys_region` VALUES ('511802', '5118', '00,51,5118', '雨城区', '51', '四川省', '5118', '雅安市', '511802', '雨城区', '', '', '', '', 3, 1, ''), ('511803', '5118', '00,51,5118', '名山区', '51', '四川省', '5118', '雅安市', '511803', '名山区', '', '', '', '', 3, 1, ''), ('511822', '5118', '00,51,5118', '荥经县', '51', '四川省', '5118', '雅安市', '511822', '荥经县', '', '', '', '', 3, 1, ''), ('511823', '5118', '00,51,5118', '汉源县', '51', '四川省', '5118', '雅安市', '511823', '汉源县', '', '', '', '', 3, 1, ''), ('511824', '5118', '00,51,5118', '石棉县', '51', '四川省', '5118', '雅安市', '511824', '石棉县', '', '', '', '', 3, 1, ''), ('511825', '5118', '00,51,5118', '天全县', '51', '四川省', '5118', '雅安市', '511825', '天全县', '', '', '', '', 3, 1, ''), ('511826', '5118', '00,51,5118', '芦山县', '51', '四川省', '5118', '雅安市', '511826', '芦山县', '', '', '', '', 3, 1, ''), ('511827', '5118', '00,51,5118', '宝兴县', '51', '四川省', '5118', '雅安市', '511827', '宝兴县', '', '', '', '', 3, 1, ''), ('5119', '51', '00,51', '巴中市', '51', '四川省', '5119', '巴中市', '', '', '', '', '', '', 2, 1, ''), ('511902', '5119', '00,51,5119', '巴州区', '51', '四川省', '5119', '巴中市', '511902', '巴州区', '', '', '', '', 3, 1, ''), ('511903', '5119', '00,51,5119', '恩阳区', '51', '四川省', '5119', '巴中市', '511903', '恩阳区', '', '', '', '', 3, 1, ''), ('511921', '5119', '00,51,5119', '通江县', '51', '四川省', '5119', '巴中市', '511921', '通江县', '', '', '', '', 3, 1, ''), ('511922', '5119', '00,51,5119', '南江县', '51', '四川省', '5119', '巴中市', '511922', '南江县', '', '', '', '', 3, 1, ''), ('511923', '5119', '00,51,5119', '平昌县', '51', '四川省', '5119', '巴中市', '511923', '平昌县', '', '', '', '', 3, 1, ''), ('5120', '51', '00,51', '资阳市', '51', '四川省', '5120', '资阳市', '', '', '', '', '', '', 2, 1, ''), ('512002', '5120', '00,51,5120', '雁江区', '51', '四川省', '5120', '资阳市', '512002', '雁江区', '', '', '', '', 3, 1, ''), ('512021', '5120', '00,51,5120', '安岳县', '51', '四川省', '5120', '资阳市', '512021', '安岳县', '', '', '', '', 3, 1, ''), ('512022', '5120', '00,51,5120', '乐至县', '51', '四川省', '5120', '资阳市', '512022', '乐至县', '', '', '', '', 3, 1, ''), ('5132', '51', '00,51', '阿坝藏族羌族自治州', '51', '四川省', '5132', '阿坝藏族羌族自治州', '', '', '', '', '', '', 2, 1, ''), ('513201', '5132', '00,51,5132', '马尔康市', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513201', '马尔康市', '', '', '', '', 3, 1, ''), ('513221', '5132', '00,51,5132', '汶川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513221', '汶川县', '', '', '', '', 3, 1, ''), ('513222', '5132', '00,51,5132', '理县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513222', '理县', '', '', '', '', 3, 1, ''), ('513223', '5132', '00,51,5132', '茂县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513223', '茂县', '', '', '', '', 3, 1, ''), ('513224', '5132', '00,51,5132', '松潘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513224', '松潘县', '', '', '', '', 3, 1, ''), ('513225', '5132', '00,51,5132', '九寨沟县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513225', '九寨沟县', '', '', '', '', 3, 1, ''), ('513226', '5132', '00,51,5132', '金川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513226', '金川县', '', '', '', '', 3, 1, ''), ('513227', '5132', '00,51,5132', '小金县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513227', '小金县', '', '', '', '', 3, 1, ''), ('513228', '5132', '00,51,5132', '黑水县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513228', '黑水县', '', '', '', '', 3, 1, ''), ('513230', '5132', '00,51,5132', '壤塘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513230', '壤塘县', '', '', '', '', 3, 1, ''), ('513231', '5132', '00,51,5132', '阿坝县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513231', '阿坝县', '', '', '', '', 3, 1, ''), ('513232', '5132', '00,51,5132', '若尔盖县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513232', '若尔盖县', '', '', '', '', 3, 1, ''), ('513233', '5132', '00,51,5132', '红原县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513233', '红原县', '', '', '', '', 3, 1, ''), ('5133', '51', '00,51', '甘孜藏族自治州', '51', '四川省', '5133', '甘孜藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('513301', '5133', '00,51,5133', '康定市', '51', '四川省', '5133', '甘孜藏族自治州', '513301', '康定市', '', '', '', '', 3, 1, ''), ('513322', '5133', '00,51,5133', '泸定县', '51', '四川省', '5133', '甘孜藏族自治州', '513322', '泸定县', '', '', '', '', 3, 1, ''), ('513323', '5133', '00,51,5133', '丹巴县', '51', '四川省', '5133', '甘孜藏族自治州', '513323', '丹巴县', '', '', '', '', 3, 1, ''), ('513324', '5133', '00,51,5133', '九龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513324', '九龙县', '', '', '', '', 3, 1, ''), ('513325', '5133', '00,51,5133', '雅江县', '51', '四川省', '5133', '甘孜藏族自治州', '513325', '雅江县', '', '', '', '', 3, 1, ''), ('513326', '5133', '00,51,5133', '道孚县', '51', '四川省', '5133', '甘孜藏族自治州', '513326', '道孚县', '', '', '', '', 3, 1, ''), ('513327', '5133', '00,51,5133', '炉霍县', '51', '四川省', '5133', '甘孜藏族自治州', '513327', '炉霍县', '', '', '', '', 3, 1, ''), ('513328', '5133', '00,51,5133', '甘孜县', '51', '四川省', '5133', '甘孜藏族自治州', '513328', '甘孜县', '', '', '', '', 3, 1, ''), ('513329', '5133', '00,51,5133', '新龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513329', '新龙县', '', '', '', '', 3, 1, ''), ('513330', '5133', '00,51,5133', '德格县', '51', '四川省', '5133', '甘孜藏族自治州', '513330', '德格县', '', '', '', '', 3, 1, ''), ('513331', '5133', '00,51,5133', '白玉县', '51', '四川省', '5133', '甘孜藏族自治州', '513331', '白玉县', '', '', '', '', 3, 1, ''), ('513332', '5133', '00,51,5133', '石渠县', '51', '四川省', '5133', '甘孜藏族自治州', '513332', '石渠县', '', '', '', '', 3, 1, ''), ('513333', '5133', '00,51,5133', '色达县', '51', '四川省', '5133', '甘孜藏族自治州', '513333', '色达县', '', '', '', '', 3, 1, ''), ('513334', '5133', '00,51,5133', '理塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513334', '理塘县', '', '', '', '', 3, 1, ''), ('513335', '5133', '00,51,5133', '巴塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513335', '巴塘县', '', '', '', '', 3, 1, ''), ('513336', '5133', '00,51,5133', '乡城县', '51', '四川省', '5133', '甘孜藏族自治州', '513336', '乡城县', '', '', '', '', 3, 1, ''), ('513337', '5133', '00,51,5133', '稻城县', '51', '四川省', '5133', '甘孜藏族自治州', '513337', '稻城县', '', '', '', '', 3, 1, ''), ('513338', '5133', '00,51,5133', '得荣县', '51', '四川省', '5133', '甘孜藏族自治州', '513338', '得荣县', '', '', '', '', 3, 1, ''), ('5134', '51', '00,51', '凉山彝族自治州', '51', '四川省', '5134', '凉山彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('513401', '5134', '00,51,5134', '西昌市', '51', '四川省', '5134', '凉山彝族自治州', '513401', '西昌市', '', '', '', '', 3, 1, ''), ('513422', '5134', '00,51,5134', '木里藏族自治县', '51', '四川省', '5134', '凉山彝族自治州', '513422', '木里藏族自治县', '', '', '', '', 3, 1, ''), ('513423', '5134', '00,51,5134', '盐源县', '51', '四川省', '5134', '凉山彝族自治州', '513423', '盐源县', '', '', '', '', 3, 1, ''), ('513424', '5134', '00,51,5134', '德昌县', '51', '四川省', '5134', '凉山彝族自治州', '513424', '德昌县', '', '', '', '', 3, 1, ''), ('513425', '5134', '00,51,5134', '会理县', '51', '四川省', '5134', '凉山彝族自治州', '513425', '会理县', '', '', '', '', 3, 1, ''), ('513426', '5134', '00,51,5134', '会东县', '51', '四川省', '5134', '凉山彝族自治州', '513426', '会东县', '', '', '', '', 3, 1, ''), ('513427', '5134', '00,51,5134', '宁南县', '51', '四川省', '5134', '凉山彝族自治州', '513427', '宁南县', '', '', '', '', 3, 1, ''), ('513428', '5134', '00,51,5134', '普格县', '51', '四川省', '5134', '凉山彝族自治州', '513428', '普格县', '', '', '', '', 3, 1, ''), ('513429', '5134', '00,51,5134', '布拖县', '51', '四川省', '5134', '凉山彝族自治州', '513429', '布拖县', '', '', '', '', 3, 1, ''), ('513430', '5134', '00,51,5134', '金阳县', '51', '四川省', '5134', '凉山彝族自治州', '513430', '金阳县', '', '', '', '', 3, 1, ''), ('513431', '5134', '00,51,5134', '昭觉县', '51', '四川省', '5134', '凉山彝族自治州', '513431', '昭觉县', '', '', '', '', 3, 1, ''), ('513432', '5134', '00,51,5134', '喜德县', '51', '四川省', '5134', '凉山彝族自治州', '513432', '喜德县', '', '', '', '', 3, 1, ''), ('513433', '5134', '00,51,5134', '冕宁县', '51', '四川省', '5134', '凉山彝族自治州', '513433', '冕宁县', '', '', '', '', 3, 1, ''), ('513434', '5134', '00,51,5134', '越西县', '51', '四川省', '5134', '凉山彝族自治州', '513434', '越西县', '', '', '', '', 3, 1, ''), ('513435', '5134', '00,51,5134', '甘洛县', '51', '四川省', '5134', '凉山彝族自治州', '513435', '甘洛县', '', '', '', '', 3, 1, ''), ('513436', '5134', '00,51,5134', '美姑县', '51', '四川省', '5134', '凉山彝族自治州', '513436', '美姑县', '', '', '', '', 3, 1, ''), ('513437', '5134', '00,51,5134', '雷波县', '51', '四川省', '5134', '凉山彝族自治州', '513437', '雷波县', '', '', '', '', 3, 1, ''), ('52', '00', '00', '贵州省', '52', '贵州省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5201', '52', '00,52', '贵阳市', '52', '贵州省', '5201', '贵阳市', '', '', '', '', '', '', 2, 1, ''), ('520102', '5201', '00,52,5201', '南明区', '52', '贵州省', '5201', '贵阳市', '520102', '南明区', '', '', '', '', 3, 1, ''), ('520103', '5201', '00,52,5201', '云岩区', '52', '贵州省', '5201', '贵阳市', '520103', '云岩区', '', '', '', '', 3, 1, ''), ('520111', '5201', '00,52,5201', '花溪区', '52', '贵州省', '5201', '贵阳市', '520111', '花溪区', '', '', '', '', 3, 1, ''), ('520112', '5201', '00,52,5201', '乌当区', '52', '贵州省', '5201', '贵阳市', '520112', '乌当区', '', '', '', '', 3, 1, ''), ('520113', '5201', '00,52,5201', '白云区', '52', '贵州省', '5201', '贵阳市', '520113', '白云区', '', '', '', '', 3, 1, ''), ('520115', '5201', '00,52,5201', '观山湖区', '52', '贵州省', '5201', '贵阳市', '520115', '观山湖区', '', '', '', '', 3, 1, ''), ('520121', '5201', '00,52,5201', '开阳县', '52', '贵州省', '5201', '贵阳市', '520121', '开阳县', '', '', '', '', 3, 1, ''), ('520122', '5201', '00,52,5201', '息烽县', '52', '贵州省', '5201', '贵阳市', '520122', '息烽县', '', '', '', '', 3, 1, ''), ('520123', '5201', '00,52,5201', '修文县', '52', '贵州省', '5201', '贵阳市', '520123', '修文县', '', '', '', '', 3, 1, ''), ('520181', '5201', '00,52,5201', '清镇市', '52', '贵州省', '5201', '贵阳市', '520181', '清镇市', '', '', '', '', 3, 1, ''), ('5202', '52', '00,52', '六盘水市', '52', '贵州省', '5202', '六盘水市', '', '', '', '', '', '', 2, 1, ''), ('520201', '5202', '00,52,5202', '钟山区', '52', '贵州省', '5202', '六盘水市', '520201', '钟山区', '', '', '', '', 3, 1, ''), ('520203', '5202', '00,52,5202', '六枝特区', '52', '贵州省', '5202', '六盘水市', '520203', '六枝特区', '', '', '', '', 3, 1, ''), ('520221', '5202', '00,52,5202', '水城县', '52', '贵州省', '5202', '六盘水市', '520221', '水城县', '', '', '', '', 3, 1, ''), ('520281', '5202', '00,52,5202', '盘州市', '52', '贵州省', '5202', '六盘水市', '520281', '盘州市', '', '', '', '', 3, 1, ''), ('5203', '52', '00,52', '遵义市', '52', '贵州省', '5203', '遵义市', '', '', '', '', '', '', 2, 1, ''), ('520302', '5203', '00,52,5203', '红花岗区', '52', '贵州省', '5203', '遵义市', '520302', '红花岗区', '', '', '', '', 3, 1, ''), ('520303', '5203', '00,52,5203', '汇川区', '52', '贵州省', '5203', '遵义市', '520303', '汇川区', '', '', '', '', 3, 1, ''), ('520304', '5203', '00,52,5203', '播州区', '52', '贵州省', '5203', '遵义市', '520304', '播州区', '', '', '', '', 3, 1, ''), ('520322', '5203', '00,52,5203', '桐梓县', '52', '贵州省', '5203', '遵义市', '520322', '桐梓县', '', '', '', '', 3, 1, ''), ('520323', '5203', '00,52,5203', '绥阳县', '52', '贵州省', '5203', '遵义市', '520323', '绥阳县', '', '', '', '', 3, 1, ''), ('520324', '5203', '00,52,5203', '正安县', '52', '贵州省', '5203', '遵义市', '520324', '正安县', '', '', '', '', 3, 1, ''), ('520325', '5203', '00,52,5203', '道真仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520325', '道真仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520326', '5203', '00,52,5203', '务川仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520326', '务川仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520327', '5203', '00,52,5203', '凤冈县', '52', '贵州省', '5203', '遵义市', '520327', '凤冈县', '', '', '', '', 3, 1, ''), ('520328', '5203', '00,52,5203', '湄潭县', '52', '贵州省', '5203', '遵义市', '520328', '湄潭县', '', '', '', '', 3, 1, ''), ('520329', '5203', '00,52,5203', '余庆县', '52', '贵州省', '5203', '遵义市', '520329', '余庆县', '', '', '', '', 3, 1, ''), ('520330', '5203', '00,52,5203', '习水县', '52', '贵州省', '5203', '遵义市', '520330', '习水县', '', '', '', '', 3, 1, ''), ('520381', '5203', '00,52,5203', '赤水市', '52', '贵州省', '5203', '遵义市', '520381', '赤水市', '', '', '', '', 3, 1, ''), ('520382', '5203', '00,52,5203', '仁怀市', '52', '贵州省', '5203', '遵义市', '520382', '仁怀市', '', '', '', '', 3, 1, ''), ('5204', '52', '00,52', '安顺市', '52', '贵州省', '5204', '安顺市', '', '', '', '', '', '', 2, 1, ''), ('520402', '5204', '00,52,5204', '西秀区', '52', '贵州省', '5204', '安顺市', '520402', '西秀区', '', '', '', '', 3, 1, ''), ('520403', '5204', '00,52,5204', '平坝区', '52', '贵州省', '5204', '安顺市', '520403', '平坝区', '', '', '', '', 3, 1, ''), ('520422', '5204', '00,52,5204', '普定县', '52', '贵州省', '5204', '安顺市', '520422', '普定县', '', '', '', '', 3, 1, ''), ('520423', '5204', '00,52,5204', '镇宁布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520423', '镇宁布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520424', '5204', '00,52,5204', '关岭布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520424', '关岭布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520425', '5204', '00,52,5204', '紫云苗族布依族自治县', '52', '贵州省', '5204', '安顺市', '520425', '紫云苗族布依族自治县', '', '', '', '', 3, 1, ''), ('5205', '52', '00,52', '毕节市', '52', '贵州省', '5205', '毕节市', '', '', '', '', '', '', 2, 1, ''), ('520502', '5205', '00,52,5205', '七星关区', '52', '贵州省', '5205', '毕节市', '520502', '七星关区', '', '', '', '', 3, 1, ''), ('520521', '5205', '00,52,5205', '大方县', '52', '贵州省', '5205', '毕节市', '520521', '大方县', '', '', '', '', 3, 1, ''), ('520522', '5205', '00,52,5205', '黔西县', '52', '贵州省', '5205', '毕节市', '520522', '黔西县', '', '', '', '', 3, 1, ''), ('520523', '5205', '00,52,5205', '金沙县', '52', '贵州省', '5205', '毕节市', '520523', '金沙县', '', '', '', '', 3, 1, ''), ('520524', '5205', '00,52,5205', '织金县', '52', '贵州省', '5205', '毕节市', '520524', '织金县', '', '', '', '', 3, 1, ''), ('520525', '5205', '00,52,5205', '纳雍县', '52', '贵州省', '5205', '毕节市', '520525', '纳雍县', '', '', '', '', 3, 1, ''), ('520526', '5205', '00,52,5205', '威宁彝族回族苗族自治县', '52', '贵州省', '5205', '毕节市', '520526', '威宁彝族回族苗族自治县', '', '', '', '', 3, 1, ''), ('520527', '5205', '00,52,5205', '赫章县', '52', '贵州省', '5205', '毕节市', '520527', '赫章县', '', '', '', '', 3, 1, ''), ('5206', '52', '00,52', '铜仁市', '52', '贵州省', '5206', '铜仁市', '', '', '', '', '', '', 2, 1, ''), ('520602', '5206', '00,52,5206', '碧江区', '52', '贵州省', '5206', '铜仁市', '520602', '碧江区', '', '', '', '', 3, 1, ''), ('520603', '5206', '00,52,5206', '万山区', '52', '贵州省', '5206', '铜仁市', '520603', '万山区', '', '', '', '', 3, 1, ''), ('520621', '5206', '00,52,5206', '江口县', '52', '贵州省', '5206', '铜仁市', '520621', '江口县', '', '', '', '', 3, 1, ''), ('520622', '5206', '00,52,5206', '玉屏侗族自治县', '52', '贵州省', '5206', '铜仁市', '520622', '玉屏侗族自治县', '', '', '', '', 3, 1, ''), ('520623', '5206', '00,52,5206', '石阡县', '52', '贵州省', '5206', '铜仁市', '520623', '石阡县', '', '', '', '', 3, 1, ''), ('520624', '5206', '00,52,5206', '思南县', '52', '贵州省', '5206', '铜仁市', '520624', '思南县', '', '', '', '', 3, 1, ''), ('520625', '5206', '00,52,5206', '印江土家族苗族自治县', '52', '贵州省', '5206', '铜仁市', '520625', '印江土家族苗族自治县', '', '', '', '', 3, 1, ''), ('520626', '5206', '00,52,5206', '德江县', '52', '贵州省', '5206', '铜仁市', '520626', '德江县', '', '', '', '', 3, 1, ''), ('520627', '5206', '00,52,5206', '沿河土家族自治县', '52', '贵州省', '5206', '铜仁市', '520627', '沿河土家族自治县', '', '', '', '', 3, 1, ''), ('520628', '5206', '00,52,5206', '松桃苗族自治县', '52', '贵州省', '5206', '铜仁市', '520628', '松桃苗族自治县', '', '', '', '', 3, 1, ''), ('5223', '52', '00,52', '黔西南布依族苗族自治州', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522301', '5223', '00,52,5223', '兴义市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522301', '兴义市', '', '', '', '', 3, 1, ''), ('522302', '5223', '00,52,5223', '兴仁市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522302', '兴仁市', '', '', '', '', 3, 1, ''), ('522323', '5223', '00,52,5223', '普安县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522323', '普安县', '', '', '', '', 3, 1, ''), ('522324', '5223', '00,52,5223', '晴隆县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522324', '晴隆县', '', '', '', '', 3, 1, ''), ('522325', '5223', '00,52,5223', '贞丰县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522325', '贞丰县', '', '', '', '', 3, 1, ''), ('522326', '5223', '00,52,5223', '望谟县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522326', '望谟县', '', '', '', '', 3, 1, ''), ('522327', '5223', '00,52,5223', '册亨县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522327', '册亨县', '', '', '', '', 3, 1, ''), ('522328', '5223', '00,52,5223', '安龙县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522328', '安龙县', '', '', '', '', 3, 1, ''), ('5226', '52', '00,52', '黔东南苗族侗族自治州', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522601', '5226', '00,52,5226', '凯里市', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522601', '凯里市', '', '', '', '', 3, 1, ''), ('522622', '5226', '00,52,5226', '黄平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522622', '黄平县', '', '', '', '', 3, 1, ''), ('522623', '5226', '00,52,5226', '施秉县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522623', '施秉县', '', '', '', '', 3, 1, ''), ('522624', '5226', '00,52,5226', '三穗县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522624', '三穗县', '', '', '', '', 3, 1, ''), ('522625', '5226', '00,52,5226', '镇远县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522625', '镇远县', '', '', '', '', 3, 1, ''), ('522626', '5226', '00,52,5226', '岑巩县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522626', '岑巩县', '', '', '', '', 3, 1, ''), ('522627', '5226', '00,52,5226', '天柱县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522627', '天柱县', '', '', '', '', 3, 1, ''), ('522628', '5226', '00,52,5226', '锦屏县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522628', '锦屏县', '', '', '', '', 3, 1, ''), ('522629', '5226', '00,52,5226', '剑河县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522629', '剑河县', '', '', '', '', 3, 1, ''), ('522630', '5226', '00,52,5226', '台江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522630', '台江县', '', '', '', '', 3, 1, ''), ('522631', '5226', '00,52,5226', '黎平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522631', '黎平县', '', '', '', '', 3, 1, ''), ('522632', '5226', '00,52,5226', '榕江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522632', '榕江县', '', '', '', '', 3, 1, ''), ('522633', '5226', '00,52,5226', '从江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522633', '从江县', '', '', '', '', 3, 1, ''), ('522634', '5226', '00,52,5226', '雷山县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522634', '雷山县', '', '', '', '', 3, 1, ''), ('522635', '5226', '00,52,5226', '麻江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522635', '麻江县', '', '', '', '', 3, 1, ''), ('522636', '5226', '00,52,5226', '丹寨县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522636', '丹寨县', '', '', '', '', 3, 1, ''), ('5227', '52', '00,52', '黔南布依族苗族自治州', '52', '贵州省', '5227', '黔南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522701', '5227', '00,52,5227', '都匀市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522701', '都匀市', '', '', '', '', 3, 1, ''), ('522702', '5227', '00,52,5227', '福泉市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522702', '福泉市', '', '', '', '', 3, 1, ''), ('522722', '5227', '00,52,5227', '荔波县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522722', '荔波县', '', '', '', '', 3, 1, ''), ('522723', '5227', '00,52,5227', '贵定县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522723', '贵定县', '', '', '', '', 3, 1, ''), ('522725', '5227', '00,52,5227', '瓮安县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522725', '瓮安县', '', '', '', '', 3, 1, ''), ('522726', '5227', '00,52,5227', '独山县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522726', '独山县', '', '', '', '', 3, 1, ''), ('522727', '5227', '00,52,5227', '平塘县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522727', '平塘县', '', '', '', '', 3, 1, ''), ('522728', '5227', '00,52,5227', '罗甸县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522728', '罗甸县', '', '', '', '', 3, 1, ''), ('522729', '5227', '00,52,5227', '长顺县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522729', '长顺县', '', '', '', '', 3, 1, ''), ('522730', '5227', '00,52,5227', '龙里县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522730', '龙里县', '', '', '', '', 3, 1, ''), ('522731', '5227', '00,52,5227', '惠水县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522731', '惠水县', '', '', '', '', 3, 1, ''), ('522732', '5227', '00,52,5227', '三都水族自治县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522732', '三都水族自治县', '', '', '', '', 3, 1, ''), ('53', '00', '00', '云南省', '53', '云南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5301', '53', '00,53', '昆明市', '53', '云南省', '5301', '昆明市', '', '', '', '', '', '', 2, 1, ''), ('530102', '5301', '00,53,5301', '五华区', '53', '云南省', '5301', '昆明市', '530102', '五华区', '', '', '', '', 3, 1, ''), ('530103', '5301', '00,53,5301', '盘龙区', '53', '云南省', '5301', '昆明市', '530103', '盘龙区', '', '', '', '', 3, 1, ''), ('530111', '5301', '00,53,5301', '官渡区', '53', '云南省', '5301', '昆明市', '530111', '官渡区', '', '', '', '', 3, 1, ''), ('530112', '5301', '00,53,5301', '西山区', '53', '云南省', '5301', '昆明市', '530112', '西山区', '', '', '', '', 3, 1, ''), ('530113', '5301', '00,53,5301', '东川区', '53', '云南省', '5301', '昆明市', '530113', '东川区', '', '', '', '', 3, 1, ''), ('530114', '5301', '00,53,5301', '呈贡区', '53', '云南省', '5301', '昆明市', '530114', '呈贡区', '', '', '', '', 3, 1, ''), ('530115', '5301', '00,53,5301', '晋宁区', '53', '云南省', '5301', '昆明市', '530115', '晋宁区', '', '', '', '', 3, 1, ''), ('530124', '5301', '00,53,5301', '富民县', '53', '云南省', '5301', '昆明市', '530124', '富民县', '', '', '', '', 3, 1, ''), ('530125', '5301', '00,53,5301', '宜良县', '53', '云南省', '5301', '昆明市', '530125', '宜良县', '', '', '', '', 3, 1, ''), ('530126', '5301', '00,53,5301', '石林彝族自治县', '53', '云南省', '5301', '昆明市', '530126', '石林彝族自治县', '', '', '', '', 3, 1, ''), ('530127', '5301', '00,53,5301', '嵩明县', '53', '云南省', '5301', '昆明市', '530127', '嵩明县', '', '', '', '', 3, 1, ''), ('530128', '5301', '00,53,5301', '禄劝彝族苗族自治县', '53', '云南省', '5301', '昆明市', '530128', '禄劝彝族苗族自治县', '', '', '', '', 3, 1, ''), ('530129', '5301', '00,53,5301', '寻甸回族彝族自治县', '53', '云南省', '5301', '昆明市', '530129', '寻甸回族彝族自治县', '', '', '', '', 3, 1, ''), ('530181', '5301', '00,53,5301', '安宁市', '53', '云南省', '5301', '昆明市', '530181', '安宁市', '', '', '', '', 3, 1, ''), ('5303', '53', '00,53', '曲靖市', '53', '云南省', '5303', '曲靖市', '', '', '', '', '', '', 2, 1, ''), ('530302', '5303', '00,53,5303', '麒麟区', '53', '云南省', '5303', '曲靖市', '530302', '麒麟区', '', '', '', '', 3, 1, ''), ('530303', '5303', '00,53,5303', '沾益区', '53', '云南省', '5303', '曲靖市', '530303', '沾益区', '', '', '', '', 3, 1, ''), ('530304', '5303', '00,53,5303', '马龙区', '53', '云南省', '5303', '曲靖市', '530304', '马龙区', '', '', '', '', 3, 1, ''), ('530322', '5303', '00,53,5303', '陆良县', '53', '云南省', '5303', '曲靖市', '530322', '陆良县', '', '', '', '', 3, 1, ''), ('530323', '5303', '00,53,5303', '师宗县', '53', '云南省', '5303', '曲靖市', '530323', '师宗县', '', '', '', '', 3, 1, ''), ('530324', '5303', '00,53,5303', '罗平县', '53', '云南省', '5303', '曲靖市', '530324', '罗平县', '', '', '', '', 3, 1, ''), ('530325', '5303', '00,53,5303', '富源县', '53', '云南省', '5303', '曲靖市', '530325', '富源县', '', '', '', '', 3, 1, ''), ('530326', '5303', '00,53,5303', '会泽县', '53', '云南省', '5303', '曲靖市', '530326', '会泽县', '', '', '', '', 3, 1, ''), ('530381', '5303', '00,53,5303', '宣威市', '53', '云南省', '5303', '曲靖市', '530381', '宣威市', '', '', '', '', 3, 1, ''), ('5304', '53', '00,53', '玉溪市', '53', '云南省', '5304', '玉溪市', '', '', '', '', '', '', 2, 1, ''), ('530402', '5304', '00,53,5304', '红塔区', '53', '云南省', '5304', '玉溪市', '530402', '红塔区', '', '', '', '', 3, 1, ''), ('530403', '5304', '00,53,5304', '江川区', '53', '云南省', '5304', '玉溪市', '530403', '江川区', '', '', '', '', 3, 1, ''), ('530423', '5304', '00,53,5304', '通海县', '53', '云南省', '5304', '玉溪市', '530423', '通海县', '', '', '', '', 3, 1, ''), ('530424', '5304', '00,53,5304', '华宁县', '53', '云南省', '5304', '玉溪市', '530424', '华宁县', '', '', '', '', 3, 1, ''), ('530425', '5304', '00,53,5304', '易门县', '53', '云南省', '5304', '玉溪市', '530425', '易门县', '', '', '', '', 3, 1, ''), ('530426', '5304', '00,53,5304', '峨山彝族自治县', '53', '云南省', '5304', '玉溪市', '530426', '峨山彝族自治县', '', '', '', '', 3, 1, ''), ('530427', '5304', '00,53,5304', '新平彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530427', '新平彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530428', '5304', '00,53,5304', '元江哈尼族彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530428', '元江哈尼族彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530481', '5304', '00,53,5304', '澄江市', '53', '云南省', '5304', '玉溪市', '530481', '澄江市', '', '', '', '', 3, 1, ''), ('5305', '53', '00,53', '保山市', '53', '云南省', '5305', '保山市', '', '', '', '', '', '', 2, 1, ''), ('530502', '5305', '00,53,5305', '隆阳区', '53', '云南省', '5305', '保山市', '530502', '隆阳区', '', '', '', '', 3, 1, ''), ('530521', '5305', '00,53,5305', '施甸县', '53', '云南省', '5305', '保山市', '530521', '施甸县', '', '', '', '', 3, 1, ''), ('530523', '5305', '00,53,5305', '龙陵县', '53', '云南省', '5305', '保山市', '530523', '龙陵县', '', '', '', '', 3, 1, ''), ('530524', '5305', '00,53,5305', '昌宁县', '53', '云南省', '5305', '保山市', '530524', '昌宁县', '', '', '', '', 3, 1, ''), ('530581', '5305', '00,53,5305', '腾冲市', '53', '云南省', '5305', '保山市', '530581', '腾冲市', '', '', '', '', 3, 1, ''), ('5306', '53', '00,53', '昭通市', '53', '云南省', '5306', '昭通市', '', '', '', '', '', '', 2, 1, ''), ('530602', '5306', '00,53,5306', '昭阳区', '53', '云南省', '5306', '昭通市', '530602', '昭阳区', '', '', '', '', 3, 1, ''), ('530621', '5306', '00,53,5306', '鲁甸县', '53', '云南省', '5306', '昭通市', '530621', '鲁甸县', '', '', '', '', 3, 1, ''), ('530622', '5306', '00,53,5306', '巧家县', '53', '云南省', '5306', '昭通市', '530622', '巧家县', '', '', '', '', 3, 1, ''), ('530623', '5306', '00,53,5306', '盐津县', '53', '云南省', '5306', '昭通市', '530623', '盐津县', '', '', '', '', 3, 1, ''), ('530624', '5306', '00,53,5306', '大关县', '53', '云南省', '5306', '昭通市', '530624', '大关县', '', '', '', '', 3, 1, ''), ('530625', '5306', '00,53,5306', '永善县', '53', '云南省', '5306', '昭通市', '530625', '永善县', '', '', '', '', 3, 1, ''), ('530626', '5306', '00,53,5306', '绥江县', '53', '云南省', '5306', '昭通市', '530626', '绥江县', '', '', '', '', 3, 1, ''), ('530627', '5306', '00,53,5306', '镇雄县', '53', '云南省', '5306', '昭通市', '530627', '镇雄县', '', '', '', '', 3, 1, ''), ('530628', '5306', '00,53,5306', '彝良县', '53', '云南省', '5306', '昭通市', '530628', '彝良县', '', '', '', '', 3, 1, ''), ('530629', '5306', '00,53,5306', '威信县', '53', '云南省', '5306', '昭通市', '530629', '威信县', '', '', '', '', 3, 1, ''), ('530681', '5306', '00,53,5306', '水富市', '53', '云南省', '5306', '昭通市', '530681', '水富市', '', '', '', '', 3, 1, ''), ('5307', '53', '00,53', '丽江市', '53', '云南省', '5307', '丽江市', '', '', '', '', '', '', 2, 1, ''), ('530702', '5307', '00,53,5307', '古城区', '53', '云南省', '5307', '丽江市', '530702', '古城区', '', '', '', '', 3, 1, ''), ('530721', '5307', '00,53,5307', '玉龙纳西族自治县', '53', '云南省', '5307', '丽江市', '530721', '玉龙纳西族自治县', '', '', '', '', 3, 1, ''), ('530722', '5307', '00,53,5307', '永胜县', '53', '云南省', '5307', '丽江市', '530722', '永胜县', '', '', '', '', 3, 1, ''), ('530723', '5307', '00,53,5307', '华坪县', '53', '云南省', '5307', '丽江市', '530723', '华坪县', '', '', '', '', 3, 1, ''), ('530724', '5307', '00,53,5307', '宁蒗彝族自治县', '53', '云南省', '5307', '丽江市', '530724', '宁蒗彝族自治县', '', '', '', '', 3, 1, ''), ('5308', '53', '00,53', '普洱市', '53', '云南省', '5308', '普洱市', '', '', '', '', '', '', 2, 1, ''), ('530802', '5308', '00,53,5308', '思茅区', '53', '云南省', '5308', '普洱市', '530802', '思茅区', '', '', '', '', 3, 1, ''), ('530821', '5308', '00,53,5308', '宁洱哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530821', '宁洱哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530822', '5308', '00,53,5308', '墨江哈尼族自治县', '53', '云南省', '5308', '普洱市', '530822', '墨江哈尼族自治县', '', '', '', '', 3, 1, ''), ('530823', '5308', '00,53,5308', '景东彝族自治县', '53', '云南省', '5308', '普洱市', '530823', '景东彝族自治县', '', '', '', '', 3, 1, ''), ('530824', '5308', '00,53,5308', '景谷傣族彝族自治县', '53', '云南省', '5308', '普洱市', '530824', '景谷傣族彝族自治县', '', '', '', '', 3, 1, ''), ('530825', '5308', '00,53,5308', '镇沅彝族哈尼族拉祜族自治县', '53', '云南省', '5308', '普洱市', '530825', '镇沅彝族哈尼族拉祜族自治县', '', '', '', '', 3, 1, ''), ('530826', '5308', '00,53,5308', '江城哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530826', '江城哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530827', '5308', '00,53,5308', '孟连傣族拉祜族佤族自治县', '53', '云南省', '5308', '普洱市', '530827', '孟连傣族拉祜族佤族自治县', '', '', '', '', 3, 1, ''), ('530828', '5308', '00,53,5308', '澜沧拉祜族自治县', '53', '云南省', '5308', '普洱市', '530828', '澜沧拉祜族自治县', '', '', '', '', 3, 1, ''), ('530829', '5308', '00,53,5308', '西盟佤族自治县', '53', '云南省', '5308', '普洱市', '530829', '西盟佤族自治县', '', '', '', '', 3, 1, ''), ('5309', '53', '00,53', '临沧市', '53', '云南省', '5309', '临沧市', '', '', '', '', '', '', 2, 1, ''), ('530902', '5309', '00,53,5309', '临翔区', '53', '云南省', '5309', '临沧市', '530902', '临翔区', '', '', '', '', 3, 1, ''), ('530921', '5309', '00,53,5309', '凤庆县', '53', '云南省', '5309', '临沧市', '530921', '凤庆县', '', '', '', '', 3, 1, ''), ('530922', '5309', '00,53,5309', '云县', '53', '云南省', '5309', '临沧市', '530922', '云县', '', '', '', '', 3, 1, ''), ('530923', '5309', '00,53,5309', '永德县', '53', '云南省', '5309', '临沧市', '530923', '永德县', '', '', '', '', 3, 1, ''), ('530924', '5309', '00,53,5309', '镇康县', '53', '云南省', '5309', '临沧市', '530924', '镇康县', '', '', '', '', 3, 1, ''), ('530925', '5309', '00,53,5309', '双江拉祜族佤族布朗族傣族自治县', '53', '云南省', '5309', '临沧市', '530925', '双江拉祜族佤族布朗族傣族自治县', '', '', '', '', 3, 1, ''), ('530926', '5309', '00,53,5309', '耿马傣族佤族自治县', '53', '云南省', '5309', '临沧市', '530926', '耿马傣族佤族自治县', '', '', '', '', 3, 1, ''), ('530927', '5309', '00,53,5309', '沧源佤族自治县', '53', '云南省', '5309', '临沧市', '530927', '沧源佤族自治县', '', '', '', '', 3, 1, ''), ('5323', '53', '00,53', '楚雄彝族自治州', '53', '云南省', '5323', '楚雄彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532301', '5323', '00,53,5323', '楚雄市', '53', '云南省', '5323', '楚雄彝族自治州', '532301', '楚雄市', '', '', '', '', 3, 1, ''), ('532322', '5323', '00,53,5323', '双柏县', '53', '云南省', '5323', '楚雄彝族自治州', '532322', '双柏县', '', '', '', '', 3, 1, ''), ('532323', '5323', '00,53,5323', '牟定县', '53', '云南省', '5323', '楚雄彝族自治州', '532323', '牟定县', '', '', '', '', 3, 1, ''), ('532324', '5323', '00,53,5323', '南华县', '53', '云南省', '5323', '楚雄彝族自治州', '532324', '南华县', '', '', '', '', 3, 1, ''), ('532325', '5323', '00,53,5323', '姚安县', '53', '云南省', '5323', '楚雄彝族自治州', '532325', '姚安县', '', '', '', '', 3, 1, ''), ('532326', '5323', '00,53,5323', '大姚县', '53', '云南省', '5323', '楚雄彝族自治州', '532326', '大姚县', '', '', '', '', 3, 1, ''), ('532327', '5323', '00,53,5323', '永仁县', '53', '云南省', '5323', '楚雄彝族自治州', '532327', '永仁县', '', '', '', '', 3, 1, ''), ('532328', '5323', '00,53,5323', '元谋县', '53', '云南省', '5323', '楚雄彝族自治州', '532328', '元谋县', '', '', '', '', 3, 1, ''), ('532329', '5323', '00,53,5323', '武定县', '53', '云南省', '5323', '楚雄彝族自治州', '532329', '武定县', '', '', '', '', 3, 1, ''), ('532331', '5323', '00,53,5323', '禄丰县', '53', '云南省', '5323', '楚雄彝族自治州', '532331', '禄丰县', '', '', '', '', 3, 1, ''), ('5325', '53', '00,53', '红河哈尼族彝族自治州', '53', '云南省', '5325', '红河哈尼族彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532501', '5325', '00,53,5325', '个旧市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532501', '个旧市', '', '', '', '', 3, 1, ''), ('532502', '5325', '00,53,5325', '开远市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532502', '开远市', '', '', '', '', 3, 1, ''), ('532503', '5325', '00,53,5325', '蒙自市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532503', '蒙自市', '', '', '', '', 3, 1, ''), ('532504', '5325', '00,53,5325', '弥勒市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532504', '弥勒市', '', '', '', '', 3, 1, ''), ('532523', '5325', '00,53,5325', '屏边苗族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532523', '屏边苗族自治县', '', '', '', '', 3, 1, ''), ('532524', '5325', '00,53,5325', '建水县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532524', '建水县', '', '', '', '', 3, 1, ''), ('532525', '5325', '00,53,5325', '石屏县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532525', '石屏县', '', '', '', '', 3, 1, ''), ('532527', '5325', '00,53,5325', '泸西县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532527', '泸西县', '', '', '', '', 3, 1, ''), ('532528', '5325', '00,53,5325', '元阳县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532528', '元阳县', '', '', '', '', 3, 1, ''), ('532529', '5325', '00,53,5325', '红河县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532529', '红河县', '', '', '', '', 3, 1, ''), ('532530', '5325', '00,53,5325', '金平苗族瑶族傣族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532530', '金平苗族瑶族傣族自治县', '', '', '', '', 3, 1, ''), ('532531', '5325', '00,53,5325', '绿春县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532531', '绿春县', '', '', '', '', 3, 1, ''), ('532532', '5325', '00,53,5325', '河口瑶族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532532', '河口瑶族自治县', '', '', '', '', 3, 1, ''), ('5326', '53', '00,53', '文山壮族苗族自治州', '53', '云南省', '5326', '文山壮族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('532601', '5326', '00,53,5326', '文山市', '53', '云南省', '5326', '文山壮族苗族自治州', '532601', '文山市', '', '', '', '', 3, 1, ''), ('532622', '5326', '00,53,5326', '砚山县', '53', '云南省', '5326', '文山壮族苗族自治州', '532622', '砚山县', '', '', '', '', 3, 1, ''), ('532623', '5326', '00,53,5326', '西畴县', '53', '云南省', '5326', '文山壮族苗族自治州', '532623', '西畴县', '', '', '', '', 3, 1, ''), ('532624', '5326', '00,53,5326', '麻栗坡县', '53', '云南省', '5326', '文山壮族苗族自治州', '532624', '麻栗坡县', '', '', '', '', 3, 1, ''), ('532625', '5326', '00,53,5326', '马关县', '53', '云南省', '5326', '文山壮族苗族自治州', '532625', '马关县', '', '', '', '', 3, 1, ''), ('532626', '5326', '00,53,5326', '丘北县', '53', '云南省', '5326', '文山壮族苗族自治州', '532626', '丘北县', '', '', '', '', 3, 1, ''), ('532627', '5326', '00,53,5326', '广南县', '53', '云南省', '5326', '文山壮族苗族自治州', '532627', '广南县', '', '', '', '', 3, 1, ''), ('532628', '5326', '00,53,5326', '富宁县', '53', '云南省', '5326', '文山壮族苗族自治州', '532628', '富宁县', '', '', '', '', 3, 1, ''), ('5328', '53', '00,53', '西双版纳傣族自治州', '53', '云南省', '5328', '西双版纳傣族自治州', '', '', '', '', '', '', 2, 1, ''), ('532801', '5328', '00,53,5328', '景洪市', '53', '云南省', '5328', '西双版纳傣族自治州', '532801', '景洪市', '', '', '', '', 3, 1, ''), ('532822', '5328', '00,53,5328', '勐海县', '53', '云南省', '5328', '西双版纳傣族自治州', '532822', '勐海县', '', '', '', '', 3, 1, ''), ('532823', '5328', '00,53,5328', '勐腊县', '53', '云南省', '5328', '西双版纳傣族自治州', '532823', '勐腊县', '', '', '', '', 3, 1, ''), ('5329', '53', '00,53', '大理白族自治州', '53', '云南省', '5329', '大理白族自治州', '', '', '', '', '', '', 2, 1, ''), ('532901', '5329', '00,53,5329', '大理市', '53', '云南省', '5329', '大理白族自治州', '532901', '大理市', '', '', '', '', 3, 1, ''), ('532922', '5329', '00,53,5329', '漾濞彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532922', '漾濞彝族自治县', '', '', '', '', 3, 1, ''), ('532923', '5329', '00,53,5329', '祥云县', '53', '云南省', '5329', '大理白族自治州', '532923', '祥云县', '', '', '', '', 3, 1, ''), ('532924', '5329', '00,53,5329', '宾川县', '53', '云南省', '5329', '大理白族自治州', '532924', '宾川县', '', '', '', '', 3, 1, ''), ('532925', '5329', '00,53,5329', '弥渡县', '53', '云南省', '5329', '大理白族自治州', '532925', '弥渡县', '', '', '', '', 3, 1, ''), ('532926', '5329', '00,53,5329', '南涧彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532926', '南涧彝族自治县', '', '', '', '', 3, 1, ''), ('532927', '5329', '00,53,5329', '巍山彝族回族自治县', '53', '云南省', '5329', '大理白族自治州', '532927', '巍山彝族回族自治县', '', '', '', '', 3, 1, ''), ('532928', '5329', '00,53,5329', '永平县', '53', '云南省', '5329', '大理白族自治州', '532928', '永平县', '', '', '', '', 3, 1, ''), ('532929', '5329', '00,53,5329', '云龙县', '53', '云南省', '5329', '大理白族自治州', '532929', '云龙县', '', '', '', '', 3, 1, ''), ('532930', '5329', '00,53,5329', '洱源县', '53', '云南省', '5329', '大理白族自治州', '532930', '洱源县', '', '', '', '', 3, 1, ''), ('532931', '5329', '00,53,5329', '剑川县', '53', '云南省', '5329', '大理白族自治州', '532931', '剑川县', '', '', '', '', 3, 1, ''), ('532932', '5329', '00,53,5329', '鹤庆县', '53', '云南省', '5329', '大理白族自治州', '532932', '鹤庆县', '', '', '', '', 3, 1, ''), ('5331', '53', '00,53', '德宏傣族景颇族自治州', '53', '云南省', '5331', '德宏傣族景颇族自治州', '', '', '', '', '', '', 2, 1, ''), ('533102', '5331', '00,53,5331', '瑞丽市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533102', '瑞丽市', '', '', '', '', 3, 1, ''), ('533103', '5331', '00,53,5331', '芒市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533103', '芒市', '', '', '', '', 3, 1, ''), ('533122', '5331', '00,53,5331', '梁河县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533122', '梁河县', '', '', '', '', 3, 1, ''), ('533123', '5331', '00,53,5331', '盈江县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533123', '盈江县', '', '', '', '', 3, 1, ''), ('533124', '5331', '00,53,5331', '陇川县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533124', '陇川县', '', '', '', '', 3, 1, ''), ('5333', '53', '00,53', '怒江傈僳族自治州', '53', '云南省', '5333', '怒江傈僳族自治州', '', '', '', '', '', '', 2, 1, ''), ('533301', '5333', '00,53,5333', '泸水市', '53', '云南省', '5333', '怒江傈僳族自治州', '533301', '泸水市', '', '', '', '', 3, 1, ''), ('533323', '5333', '00,53,5333', '福贡县', '53', '云南省', '5333', '怒江傈僳族自治州', '533323', '福贡县', '', '', '', '', 3, 1, ''), ('533324', '5333', '00,53,5333', '贡山独龙族怒族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533324', '贡山独龙族怒族自治县', '', '', '', '', 3, 1, ''), ('533325', '5333', '00,53,5333', '兰坪白族普米族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533325', '兰坪白族普米族自治县', '', '', '', '', 3, 1, ''), ('5334', '53', '00,53', '迪庆藏族自治州', '53', '云南省', '5334', '迪庆藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('533401', '5334', '00,53,5334', '香格里拉市', '53', '云南省', '5334', '迪庆藏族自治州', '533401', '香格里拉市', '', '', '', '', 3, 1, ''), ('533422', '5334', '00,53,5334', '德钦县', '53', '云南省', '5334', '迪庆藏族自治州', '533422', '德钦县', '', '', '', '', 3, 1, ''), ('533423', '5334', '00,53,5334', '维西傈僳族自治县', '53', '云南省', '5334', '迪庆藏族自治州', '533423', '维西傈僳族自治县', '', '', '', '', 3, 1, ''), ('54', '00', '00', '西藏自治区', '54', '西藏自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('5401', '54', '00,54', '拉萨市', '54', '西藏自治区', '5401', '拉萨市', '', '', '', '', '', '', 2, 1, ''), ('540102', '5401', '00,54,5401', '城关区', '54', '西藏自治区', '5401', '拉萨市', '540102', '城关区', '', '', '', '', 3, 1, ''), ('540103', '5401', '00,54,5401', '堆龙德庆区', '54', '西藏自治区', '5401', '拉萨市', '540103', '堆龙德庆区', '', '', '', '', 3, 1, ''), ('540104', '5401', '00,54,5401', '达孜区', '54', '西藏自治区', '5401', '拉萨市', '540104', '达孜区', '', '', '', '', 3, 1, ''), ('540121', '5401', '00,54,5401', '林周县', '54', '西藏自治区', '5401', '拉萨市', '540121', '林周县', '', '', '', '', 3, 1, ''), ('540122', '5401', '00,54,5401', '当雄县', '54', '西藏自治区', '5401', '拉萨市', '540122', '当雄县', '', '', '', '', 3, 1, ''), ('540123', '5401', '00,54,5401', '尼木县', '54', '西藏自治区', '5401', '拉萨市', '540123', '尼木县', '', '', '', '', 3, 1, ''), ('540124', '5401', '00,54,5401', '曲水县', '54', '西藏自治区', '5401', '拉萨市', '540124', '曲水县', '', '', '', '', 3, 1, ''), ('540127', '5401', '00,54,5401', '墨竹工卡县', '54', '西藏自治区', '5401', '拉萨市', '540127', '墨竹工卡县', '', '', '', '', 3, 1, ''), ('5402', '54', '00,54', '日喀则市', '54', '西藏自治区', '5402', '日喀则市', '', '', '', '', '', '', 2, 1, ''), ('540202', '5402', '00,54,5402', '桑珠孜区', '54', '西藏自治区', '5402', '日喀则市', '540202', '桑珠孜区', '', '', '', '', 3, 1, ''), ('540221', '5402', '00,54,5402', '南木林县', '54', '西藏自治区', '5402', '日喀则市', '540221', '南木林县', '', '', '', '', 3, 1, ''), ('540222', '5402', '00,54,5402', '江孜县', '54', '西藏自治区', '5402', '日喀则市', '540222', '江孜县', '', '', '', '', 3, 1, ''), ('540223', '5402', '00,54,5402', '定日县', '54', '西藏自治区', '5402', '日喀则市', '540223', '定日县', '', '', '', '', 3, 1, ''), ('540224', '5402', '00,54,5402', '萨迦县', '54', '西藏自治区', '5402', '日喀则市', '540224', '萨迦县', '', '', '', '', 3, 1, ''), ('540225', '5402', '00,54,5402', '拉孜县', '54', '西藏自治区', '5402', '日喀则市', '540225', '拉孜县', '', '', '', '', 3, 1, ''), ('540226', '5402', '00,54,5402', '昂仁县', '54', '西藏自治区', '5402', '日喀则市', '540226', '昂仁县', '', '', '', '', 3, 1, ''), ('540227', '5402', '00,54,5402', '谢通门县', '54', '西藏自治区', '5402', '日喀则市', '540227', '谢通门县', '', '', '', '', 3, 1, ''), ('540228', '5402', '00,54,5402', '白朗县', '54', '西藏自治区', '5402', '日喀则市', '540228', '白朗县', '', '', '', '', 3, 1, ''), ('540229', '5402', '00,54,5402', '仁布县', '54', '西藏自治区', '5402', '日喀则市', '540229', '仁布县', '', '', '', '', 3, 1, ''), ('540230', '5402', '00,54,5402', '康马县', '54', '西藏自治区', '5402', '日喀则市', '540230', '康马县', '', '', '', '', 3, 1, ''), ('540231', '5402', '00,54,5402', '定结县', '54', '西藏自治区', '5402', '日喀则市', '540231', '定结县', '', '', '', '', 3, 1, ''), ('540232', '5402', '00,54,5402', '仲巴县', '54', '西藏自治区', '5402', '日喀则市', '540232', '仲巴县', '', '', '', '', 3, 1, ''), ('540233', '5402', '00,54,5402', '亚东县', '54', '西藏自治区', '5402', '日喀则市', '540233', '亚东县', '', '', '', '', 3, 1, ''), ('540234', '5402', '00,54,5402', '吉隆县', '54', '西藏自治区', '5402', '日喀则市', '540234', '吉隆县', '', '', '', '', 3, 1, ''), ('540235', '5402', '00,54,5402', '聂拉木县', '54', '西藏自治区', '5402', '日喀则市', '540235', '聂拉木县', '', '', '', '', 3, 1, ''), ('540236', '5402', '00,54,5402', '萨嘎县', '54', '西藏自治区', '5402', '日喀则市', '540236', '萨嘎县', '', '', '', '', 3, 1, ''), ('540237', '5402', '00,54,5402', '岗巴县', '54', '西藏自治区', '5402', '日喀则市', '540237', '岗巴县', '', '', '', '', 3, 1, ''), ('5403', '54', '00,54', '昌都市', '54', '西藏自治区', '5403', '昌都市', '', '', '', '', '', '', 2, 1, ''), ('540302', '5403', '00,54,5403', '卡若区', '54', '西藏自治区', '5403', '昌都市', '540302', '卡若区', '', '', '', '', 3, 1, ''), ('540321', '5403', '00,54,5403', '江达县', '54', '西藏自治区', '5403', '昌都市', '540321', '江达县', '', '', '', '', 3, 1, ''), ('540322', '5403', '00,54,5403', '贡觉县', '54', '西藏自治区', '5403', '昌都市', '540322', '贡觉县', '', '', '', '', 3, 1, ''), ('540323', '5403', '00,54,5403', '类乌齐县', '54', '西藏自治区', '5403', '昌都市', '540323', '类乌齐县', '', '', '', '', 3, 1, ''), ('540324', '5403', '00,54,5403', '丁青县', '54', '西藏自治区', '5403', '昌都市', '540324', '丁青县', '', '', '', '', 3, 1, ''), ('540325', '5403', '00,54,5403', '察雅县', '54', '西藏自治区', '5403', '昌都市', '540325', '察雅县', '', '', '', '', 3, 1, ''), ('540326', '5403', '00,54,5403', '八宿县', '54', '西藏自治区', '5403', '昌都市', '540326', '八宿县', '', '', '', '', 3, 1, ''), ('540327', '5403', '00,54,5403', '左贡县', '54', '西藏自治区', '5403', '昌都市', '540327', '左贡县', '', '', '', '', 3, 1, ''), ('540328', '5403', '00,54,5403', '芒康县', '54', '西藏自治区', '5403', '昌都市', '540328', '芒康县', '', '', '', '', 3, 1, ''), ('540329', '5403', '00,54,5403', '洛隆县', '54', '西藏自治区', '5403', '昌都市', '540329', '洛隆县', '', '', '', '', 3, 1, ''), ('540330', '5403', '00,54,5403', '边坝县', '54', '西藏自治区', '5403', '昌都市', '540330', '边坝县', '', '', '', '', 3, 1, ''), ('5404', '54', '00,54', '林芝市', '54', '西藏自治区', '5404', '林芝市', '', '', '', '', '', '', 2, 1, ''), ('540402', '5404', '00,54,5404', '巴宜区', '54', '西藏自治区', '5404', '林芝市', '540402', '巴宜区', '', '', '', '', 3, 1, ''), ('540421', '5404', '00,54,5404', '工布江达县', '54', '西藏自治区', '5404', '林芝市', '540421', '工布江达县', '', '', '', '', 3, 1, ''), ('540422', '5404', '00,54,5404', '米林县', '54', '西藏自治区', '5404', '林芝市', '540422', '米林县', '', '', '', '', 3, 1, ''), ('540423', '5404', '00,54,5404', '墨脱县', '54', '西藏自治区', '5404', '林芝市', '540423', '墨脱县', '', '', '', '', 3, 1, ''), ('540424', '5404', '00,54,5404', '波密县', '54', '西藏自治区', '5404', '林芝市', '540424', '波密县', '', '', '', '', 3, 1, ''), ('540425', '5404', '00,54,5404', '察隅县', '54', '西藏自治区', '5404', '林芝市', '540425', '察隅县', '', '', '', '', 3, 1, ''), ('540426', '5404', '00,54,5404', '朗县', '54', '西藏自治区', '5404', '林芝市', '540426', '朗县', '', '', '', '', 3, 1, ''), ('5405', '54', '00,54', '山南市', '54', '西藏自治区', '5405', '山南市', '', '', '', '', '', '', 2, 1, ''), ('540502', '5405', '00,54,5405', '乃东区', '54', '西藏自治区', '5405', '山南市', '540502', '乃东区', '', '', '', '', 3, 1, ''), ('540521', '5405', '00,54,5405', '扎囊县', '54', '西藏自治区', '5405', '山南市', '540521', '扎囊县', '', '', '', '', 3, 1, ''), ('540522', '5405', '00,54,5405', '贡嘎县', '54', '西藏自治区', '5405', '山南市', '540522', '贡嘎县', '', '', '', '', 3, 1, ''), ('540523', '5405', '00,54,5405', '桑日县', '54', '西藏自治区', '5405', '山南市', '540523', '桑日县', '', '', '', '', 3, 1, ''), ('540524', '5405', '00,54,5405', '琼结县', '54', '西藏自治区', '5405', '山南市', '540524', '琼结县', '', '', '', '', 3, 1, ''), ('540525', '5405', '00,54,5405', '曲松县', '54', '西藏自治区', '5405', '山南市', '540525', '曲松县', '', '', '', '', 3, 1, ''), ('540526', '5405', '00,54,5405', '措美县', '54', '西藏自治区', '5405', '山南市', '540526', '措美县', '', '', '', '', 3, 1, ''), ('540527', '5405', '00,54,5405', '洛扎县', '54', '西藏自治区', '5405', '山南市', '540527', '洛扎县', '', '', '', '', 3, 1, ''), ('540528', '5405', '00,54,5405', '加查县', '54', '西藏自治区', '5405', '山南市', '540528', '加查县', '', '', '', '', 3, 1, ''), ('540529', '5405', '00,54,5405', '隆子县', '54', '西藏自治区', '5405', '山南市', '540529', '隆子县', '', '', '', '', 3, 1, ''), ('540530', '5405', '00,54,5405', '错那县', '54', '西藏自治区', '5405', '山南市', '540530', '错那县', '', '', '', '', 3, 1, ''), ('540531', '5405', '00,54,5405', '浪卡子县', '54', '西藏自治区', '5405', '山南市', '540531', '浪卡子县', '', '', '', '', 3, 1, ''), ('5406', '54', '00,54', '那曲市', '54', '西藏自治区', '5406', '那曲市', '', '', '', '', '', '', 2, 1, ''), ('540602', '5406', '00,54,5406', '色尼区', '54', '西藏自治区', '5406', '那曲市', '540602', '色尼区', '', '', '', '', 3, 1, ''), ('540621', '5406', '00,54,5406', '嘉黎县', '54', '西藏自治区', '5406', '那曲市', '540621', '嘉黎县', '', '', '', '', 3, 1, ''), ('540622', '5406', '00,54,5406', '比如县', '54', '西藏自治区', '5406', '那曲市', '540622', '比如县', '', '', '', '', 3, 1, ''), ('540623', '5406', '00,54,5406', '聂荣县', '54', '西藏自治区', '5406', '那曲市', '540623', '聂荣县', '', '', '', '', 3, 1, ''), ('540624', '5406', '00,54,5406', '安多县', '54', '西藏自治区', '5406', '那曲市', '540624', '安多县', '', '', '', '', 3, 1, ''), ('540625', '5406', '00,54,5406', '申扎县', '54', '西藏自治区', '5406', '那曲市', '540625', '申扎县', '', '', '', '', 3, 1, ''), ('540626', '5406', '00,54,5406', '索县', '54', '西藏自治区', '5406', '那曲市', '540626', '索县', '', '', '', '', 3, 1, ''), ('540627', '5406', '00,54,5406', '班戈县', '54', '西藏自治区', '5406', '那曲市', '540627', '班戈县', '', '', '', '', 3, 1, ''), ('540628', '5406', '00,54,5406', '巴青县', '54', '西藏自治区', '5406', '那曲市', '540628', '巴青县', '', '', '', '', 3, 1, ''), ('540629', '5406', '00,54,5406', '尼玛县', '54', '西藏自治区', '5406', '那曲市', '540629', '尼玛县', '', '', '', '', 3, 1, ''), ('540630', '5406', '00,54,5406', '双湖县', '54', '西藏自治区', '5406', '那曲市', '540630', '双湖县', '', '', '', '', 3, 1, ''), ('5425', '54', '00,54', '阿里地区', '54', '西藏自治区', '5425', '阿里地区', '', '', '', '', '', '', 2, 1, ''), ('542521', '5425', '00,54,5425', '普兰县', '54', '西藏自治区', '5425', '阿里地区', '542521', '普兰县', '', '', '', '', 3, 1, ''), ('542522', '5425', '00,54,5425', '札达县', '54', '西藏自治区', '5425', '阿里地区', '542522', '札达县', '', '', '', '', 3, 1, ''), ('542523', '5425', '00,54,5425', '噶尔县', '54', '西藏自治区', '5425', '阿里地区', '542523', '噶尔县', '', '', '', '', 3, 1, ''), ('542524', '5425', '00,54,5425', '日土县', '54', '西藏自治区', '5425', '阿里地区', '542524', '日土县', '', '', '', '', 3, 1, ''), ('542525', '5425', '00,54,5425', '革吉县', '54', '西藏自治区', '5425', '阿里地区', '542525', '革吉县', '', '', '', '', 3, 1, ''), ('542526', '5425', '00,54,5425', '改则县', '54', '西藏自治区', '5425', '阿里地区', '542526', '改则县', '', '', '', '', 3, 1, ''), ('542527', '5425', '00,54,5425', '措勤县', '54', '西藏自治区', '5425', '阿里地区', '542527', '措勤县', '', '', '', '', 3, 1, ''), ('61', '00', '00', '陕西省', '61', '陕西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6101', '61', '00,61', '西安市', '61', '陕西省', '6101', '西安市', '', '', '', '', '', '', 2, 1, ''), ('610102', '6101', '00,61,6101', '新城区', '61', '陕西省', '6101', '西安市', '610102', '新城区', '', '', '', '', 3, 1, ''), ('610103', '6101', '00,61,6101', '碑林区', '61', '陕西省', '6101', '西安市', '610103', '碑林区', '', '', '', '', 3, 1, ''), ('610104', '6101', '00,61,6101', '莲湖区', '61', '陕西省', '6101', '西安市', '610104', '莲湖区', '', '', '', '', 3, 1, ''), ('610111', '6101', '00,61,6101', '灞桥区', '61', '陕西省', '6101', '西安市', '610111', '灞桥区', '', '', '', '', 3, 1, ''), ('610112', '6101', '00,61,6101', '未央区', '61', '陕西省', '6101', '西安市', '610112', '未央区', '', '', '', '', 3, 1, ''), ('610113', '6101', '00,61,6101', '雁塔区', '61', '陕西省', '6101', '西安市', '610113', '雁塔区', '', '', '', '', 3, 1, ''), ('610114', '6101', '00,61,6101', '阎良区', '61', '陕西省', '6101', '西安市', '610114', '阎良区', '', '', '', '', 3, 1, ''), ('610115', '6101', '00,61,6101', '临潼区', '61', '陕西省', '6101', '西安市', '610115', '临潼区', '', '', '', '', 3, 1, ''), ('610116', '6101', '00,61,6101', '长安区', '61', '陕西省', '6101', '西安市', '610116', '长安区', '', '', '', '', 3, 1, ''), ('610117', '6101', '00,61,6101', '高陵区', '61', '陕西省', '6101', '西安市', '610117', '高陵区', '', '', '', '', 3, 1, ''), ('610118', '6101', '00,61,6101', '鄠邑区', '61', '陕西省', '6101', '西安市', '610118', '鄠邑区', '', '', '', '', 3, 1, ''), ('610122', '6101', '00,61,6101', '蓝田县', '61', '陕西省', '6101', '西安市', '610122', '蓝田县', '', '', '', '', 3, 1, ''), ('610124', '6101', '00,61,6101', '周至县', '61', '陕西省', '6101', '西安市', '610124', '周至县', '', '', '', '', 3, 1, ''), ('6102', '61', '00,61', '铜川市', '61', '陕西省', '6102', '铜川市', '', '', '', '', '', '', 2, 1, ''), ('610202', '6102', '00,61,6102', '王益区', '61', '陕西省', '6102', '铜川市', '610202', '王益区', '', '', '', '', 3, 1, ''), ('610203', '6102', '00,61,6102', '印台区', '61', '陕西省', '6102', '铜川市', '610203', '印台区', '', '', '', '', 3, 1, ''), ('610204', '6102', '00,61,6102', '耀州区', '61', '陕西省', '6102', '铜川市', '610204', '耀州区', '', '', '', '', 3, 1, ''), ('610222', '6102', '00,61,6102', '宜君县', '61', '陕西省', '6102', '铜川市', '610222', '宜君县', '', '', '', '', 3, 1, ''), ('6103', '61', '00,61', '宝鸡市', '61', '陕西省', '6103', '宝鸡市', '', '', '', '', '', '', 2, 1, ''), ('610302', '6103', '00,61,6103', '渭滨区', '61', '陕西省', '6103', '宝鸡市', '610302', '渭滨区', '', '', '', '', 3, 1, ''), ('610303', '6103', '00,61,6103', '金台区', '61', '陕西省', '6103', '宝鸡市', '610303', '金台区', '', '', '', '', 3, 1, ''), ('610304', '6103', '00,61,6103', '陈仓区', '61', '陕西省', '6103', '宝鸡市', '610304', '陈仓区', '', '', '', '', 3, 1, ''), ('610322', '6103', '00,61,6103', '凤翔县', '61', '陕西省', '6103', '宝鸡市', '610322', '凤翔县', '', '', '', '', 3, 1, ''), ('610323', '6103', '00,61,6103', '岐山县', '61', '陕西省', '6103', '宝鸡市', '610323', '岐山县', '', '', '', '', 3, 1, ''), ('610324', '6103', '00,61,6103', '扶风县', '61', '陕西省', '6103', '宝鸡市', '610324', '扶风县', '', '', '', '', 3, 1, ''), ('610326', '6103', '00,61,6103', '眉县', '61', '陕西省', '6103', '宝鸡市', '610326', '眉县', '', '', '', '', 3, 1, ''), ('610327', '6103', '00,61,6103', '陇县', '61', '陕西省', '6103', '宝鸡市', '610327', '陇县', '', '', '', '', 3, 1, ''), ('610328', '6103', '00,61,6103', '千阳县', '61', '陕西省', '6103', '宝鸡市', '610328', '千阳县', '', '', '', '', 3, 1, ''), ('610329', '6103', '00,61,6103', '麟游县', '61', '陕西省', '6103', '宝鸡市', '610329', '麟游县', '', '', '', '', 3, 1, ''), ('610330', '6103', '00,61,6103', '凤县', '61', '陕西省', '6103', '宝鸡市', '610330', '凤县', '', '', '', '', 3, 1, ''), ('610331', '6103', '00,61,6103', '太白县', '61', '陕西省', '6103', '宝鸡市', '610331', '太白县', '', '', '', '', 3, 1, ''), ('6104', '61', '00,61', '咸阳市', '61', '陕西省', '6104', '咸阳市', '', '', '', '', '', '', 2, 1, ''), ('610402', '6104', '00,61,6104', '秦都区', '61', '陕西省', '6104', '咸阳市', '610402', '秦都区', '', '', '', '', 3, 1, ''), ('610403', '6104', '00,61,6104', '杨陵区', '61', '陕西省', '6104', '咸阳市', '610403', '杨陵区', '', '', '', '', 3, 1, ''), ('610404', '6104', '00,61,6104', '渭城区', '61', '陕西省', '6104', '咸阳市', '610404', '渭城区', '', '', '', '', 3, 1, ''), ('610422', '6104', '00,61,6104', '三原县', '61', '陕西省', '6104', '咸阳市', '610422', '三原县', '', '', '', '', 3, 1, ''), ('610423', '6104', '00,61,6104', '泾阳县', '61', '陕西省', '6104', '咸阳市', '610423', '泾阳县', '', '', '', '', 3, 1, ''), ('610424', '6104', '00,61,6104', '乾县', '61', '陕西省', '6104', '咸阳市', '610424', '乾县', '', '', '', '', 3, 1, ''), ('610425', '6104', '00,61,6104', '礼泉县', '61', '陕西省', '6104', '咸阳市', '610425', '礼泉县', '', '', '', '', 3, 1, ''), ('610426', '6104', '00,61,6104', '永寿县', '61', '陕西省', '6104', '咸阳市', '610426', '永寿县', '', '', '', '', 3, 1, ''), ('610428', '6104', '00,61,6104', '长武县', '61', '陕西省', '6104', '咸阳市', '610428', '长武县', '', '', '', '', 3, 1, ''), ('610429', '6104', '00,61,6104', '旬邑县', '61', '陕西省', '6104', '咸阳市', '610429', '旬邑县', '', '', '', '', 3, 1, ''), ('610430', '6104', '00,61,6104', '淳化县', '61', '陕西省', '6104', '咸阳市', '610430', '淳化县', '', '', '', '', 3, 1, ''), ('610431', '6104', '00,61,6104', '武功县', '61', '陕西省', '6104', '咸阳市', '610431', '武功县', '', '', '', '', 3, 1, ''), ('610481', '6104', '00,61,6104', '兴平市', '61', '陕西省', '6104', '咸阳市', '610481', '兴平市', '', '', '', '', 3, 1, ''), ('610482', '6104', '00,61,6104', '彬州市', '61', '陕西省', '6104', '咸阳市', '610482', '彬州市', '', '', '', '', 3, 1, ''), ('6105', '61', '00,61', '渭南市', '61', '陕西省', '6105', '渭南市', '', '', '', '', '', '', 2, 1, ''), ('610502', '6105', '00,61,6105', '临渭区', '61', '陕西省', '6105', '渭南市', '610502', '临渭区', '', '', '', '', 3, 1, ''), ('610503', '6105', '00,61,6105', '华州区', '61', '陕西省', '6105', '渭南市', '610503', '华州区', '', '', '', '', 3, 1, ''), ('610522', '6105', '00,61,6105', '潼关县', '61', '陕西省', '6105', '渭南市', '610522', '潼关县', '', '', '', '', 3, 1, ''), ('610523', '6105', '00,61,6105', '大荔县', '61', '陕西省', '6105', '渭南市', '610523', '大荔县', '', '', '', '', 3, 1, ''), ('610524', '6105', '00,61,6105', '合阳县', '61', '陕西省', '6105', '渭南市', '610524', '合阳县', '', '', '', '', 3, 1, ''), ('610525', '6105', '00,61,6105', '澄城县', '61', '陕西省', '6105', '渭南市', '610525', '澄城县', '', '', '', '', 3, 1, ''), ('610526', '6105', '00,61,6105', '蒲城县', '61', '陕西省', '6105', '渭南市', '610526', '蒲城县', '', '', '', '', 3, 1, ''), ('610527', '6105', '00,61,6105', '白水县', '61', '陕西省', '6105', '渭南市', '610527', '白水县', '', '', '', '', 3, 1, ''), ('610528', '6105', '00,61,6105', '富平县', '61', '陕西省', '6105', '渭南市', '610528', '富平县', '', '', '', '', 3, 1, ''), ('610581', '6105', '00,61,6105', '韩城市', '61', '陕西省', '6105', '渭南市', '610581', '韩城市', '', '', '', '', 3, 1, ''); +INSERT INTO `sys_region` VALUES ('610582', '6105', '00,61,6105', '华阴市', '61', '陕西省', '6105', '渭南市', '610582', '华阴市', '', '', '', '', 3, 1, ''), ('6106', '61', '00,61', '延安市', '61', '陕西省', '6106', '延安市', '', '', '', '', '', '', 2, 1, ''), ('610602', '6106', '00,61,6106', '宝塔区', '61', '陕西省', '6106', '延安市', '610602', '宝塔区', '', '', '', '', 3, 1, ''), ('610603', '6106', '00,61,6106', '安塞区', '61', '陕西省', '6106', '延安市', '610603', '安塞区', '', '', '', '', 3, 1, ''), ('610621', '6106', '00,61,6106', '延长县', '61', '陕西省', '6106', '延安市', '610621', '延长县', '', '', '', '', 3, 1, ''), ('610622', '6106', '00,61,6106', '延川县', '61', '陕西省', '6106', '延安市', '610622', '延川县', '', '', '', '', 3, 1, ''), ('610625', '6106', '00,61,6106', '志丹县', '61', '陕西省', '6106', '延安市', '610625', '志丹县', '', '', '', '', 3, 1, ''), ('610626', '6106', '00,61,6106', '吴起县', '61', '陕西省', '6106', '延安市', '610626', '吴起县', '', '', '', '', 3, 1, ''), ('610627', '6106', '00,61,6106', '甘泉县', '61', '陕西省', '6106', '延安市', '610627', '甘泉县', '', '', '', '', 3, 1, ''), ('610628', '6106', '00,61,6106', '富县', '61', '陕西省', '6106', '延安市', '610628', '富县', '', '', '', '', 3, 1, ''), ('610629', '6106', '00,61,6106', '洛川县', '61', '陕西省', '6106', '延安市', '610629', '洛川县', '', '', '', '', 3, 1, ''), ('610630', '6106', '00,61,6106', '宜川县', '61', '陕西省', '6106', '延安市', '610630', '宜川县', '', '', '', '', 3, 1, ''), ('610631', '6106', '00,61,6106', '黄龙县', '61', '陕西省', '6106', '延安市', '610631', '黄龙县', '', '', '', '', 3, 1, ''), ('610632', '6106', '00,61,6106', '黄陵县', '61', '陕西省', '6106', '延安市', '610632', '黄陵县', '', '', '', '', 3, 1, ''), ('610681', '6106', '00,61,6106', '子长市', '61', '陕西省', '6106', '延安市', '610681', '子长市', '', '', '', '', 3, 1, ''), ('6107', '61', '00,61', '汉中市', '61', '陕西省', '6107', '汉中市', '', '', '', '', '', '', 2, 1, ''), ('610702', '6107', '00,61,6107', '汉台区', '61', '陕西省', '6107', '汉中市', '610702', '汉台区', '', '', '', '', 3, 1, ''), ('610703', '6107', '00,61,6107', '南郑区', '61', '陕西省', '6107', '汉中市', '610703', '南郑区', '', '', '', '', 3, 1, ''), ('610722', '6107', '00,61,6107', '城固县', '61', '陕西省', '6107', '汉中市', '610722', '城固县', '', '', '', '', 3, 1, ''), ('610723', '6107', '00,61,6107', '洋县', '61', '陕西省', '6107', '汉中市', '610723', '洋县', '', '', '', '', 3, 1, ''), ('610724', '6107', '00,61,6107', '西乡县', '61', '陕西省', '6107', '汉中市', '610724', '西乡县', '', '', '', '', 3, 1, ''), ('610725', '6107', '00,61,6107', '勉县', '61', '陕西省', '6107', '汉中市', '610725', '勉县', '', '', '', '', 3, 1, ''), ('610726', '6107', '00,61,6107', '宁强县', '61', '陕西省', '6107', '汉中市', '610726', '宁强县', '', '', '', '', 3, 1, ''), ('610727', '6107', '00,61,6107', '略阳县', '61', '陕西省', '6107', '汉中市', '610727', '略阳县', '', '', '', '', 3, 1, ''), ('610728', '6107', '00,61,6107', '镇巴县', '61', '陕西省', '6107', '汉中市', '610728', '镇巴县', '', '', '', '', 3, 1, ''), ('610729', '6107', '00,61,6107', '留坝县', '61', '陕西省', '6107', '汉中市', '610729', '留坝县', '', '', '', '', 3, 1, ''), ('610730', '6107', '00,61,6107', '佛坪县', '61', '陕西省', '6107', '汉中市', '610730', '佛坪县', '', '', '', '', 3, 1, ''), ('6108', '61', '00,61', '榆林市', '61', '陕西省', '6108', '榆林市', '', '', '', '', '', '', 2, 1, ''), ('610802', '6108', '00,61,6108', '榆阳区', '61', '陕西省', '6108', '榆林市', '610802', '榆阳区', '', '', '', '', 3, 1, ''), ('610803', '6108', '00,61,6108', '横山区', '61', '陕西省', '6108', '榆林市', '610803', '横山区', '', '', '', '', 3, 1, ''), ('610822', '6108', '00,61,6108', '府谷县', '61', '陕西省', '6108', '榆林市', '610822', '府谷县', '', '', '', '', 3, 1, ''), ('610824', '6108', '00,61,6108', '靖边县', '61', '陕西省', '6108', '榆林市', '610824', '靖边县', '', '', '', '', 3, 1, ''), ('610825', '6108', '00,61,6108', '定边县', '61', '陕西省', '6108', '榆林市', '610825', '定边县', '', '', '', '', 3, 1, ''), ('610826', '6108', '00,61,6108', '绥德县', '61', '陕西省', '6108', '榆林市', '610826', '绥德县', '', '', '', '', 3, 1, ''), ('610827', '6108', '00,61,6108', '米脂县', '61', '陕西省', '6108', '榆林市', '610827', '米脂县', '', '', '', '', 3, 1, ''), ('610828', '6108', '00,61,6108', '佳县', '61', '陕西省', '6108', '榆林市', '610828', '佳县', '', '', '', '', 3, 1, ''), ('610829', '6108', '00,61,6108', '吴堡县', '61', '陕西省', '6108', '榆林市', '610829', '吴堡县', '', '', '', '', 3, 1, ''), ('610830', '6108', '00,61,6108', '清涧县', '61', '陕西省', '6108', '榆林市', '610830', '清涧县', '', '', '', '', 3, 1, ''), ('610831', '6108', '00,61,6108', '子洲县', '61', '陕西省', '6108', '榆林市', '610831', '子洲县', '', '', '', '', 3, 1, ''), ('610881', '6108', '00,61,6108', '神木市', '61', '陕西省', '6108', '榆林市', '610881', '神木市', '', '', '', '', 3, 1, ''), ('6109', '61', '00,61', '安康市', '61', '陕西省', '6109', '安康市', '', '', '', '', '', '', 2, 1, ''), ('610902', '6109', '00,61,6109', '汉滨区', '61', '陕西省', '6109', '安康市', '610902', '汉滨区', '', '', '', '', 3, 1, ''), ('610921', '6109', '00,61,6109', '汉阴县', '61', '陕西省', '6109', '安康市', '610921', '汉阴县', '', '', '', '', 3, 1, ''), ('610922', '6109', '00,61,6109', '石泉县', '61', '陕西省', '6109', '安康市', '610922', '石泉县', '', '', '', '', 3, 1, ''), ('610923', '6109', '00,61,6109', '宁陕县', '61', '陕西省', '6109', '安康市', '610923', '宁陕县', '', '', '', '', 3, 1, ''), ('610924', '6109', '00,61,6109', '紫阳县', '61', '陕西省', '6109', '安康市', '610924', '紫阳县', '', '', '', '', 3, 1, ''), ('610925', '6109', '00,61,6109', '岚皋县', '61', '陕西省', '6109', '安康市', '610925', '岚皋县', '', '', '', '', 3, 1, ''), ('610926', '6109', '00,61,6109', '平利县', '61', '陕西省', '6109', '安康市', '610926', '平利县', '', '', '', '', 3, 1, ''), ('610927', '6109', '00,61,6109', '镇坪县', '61', '陕西省', '6109', '安康市', '610927', '镇坪县', '', '', '', '', 3, 1, ''), ('610928', '6109', '00,61,6109', '旬阳县', '61', '陕西省', '6109', '安康市', '610928', '旬阳县', '', '', '', '', 3, 1, ''), ('610929', '6109', '00,61,6109', '白河县', '61', '陕西省', '6109', '安康市', '610929', '白河县', '', '', '', '', 3, 1, ''), ('6110', '61', '00,61', '商洛市', '61', '陕西省', '6110', '商洛市', '', '', '', '', '', '', 2, 1, ''), ('611002', '6110', '00,61,6110', '商州区', '61', '陕西省', '6110', '商洛市', '611002', '商州区', '', '', '', '', 3, 1, ''), ('611021', '6110', '00,61,6110', '洛南县', '61', '陕西省', '6110', '商洛市', '611021', '洛南县', '', '', '', '', 3, 1, ''), ('611022', '6110', '00,61,6110', '丹凤县', '61', '陕西省', '6110', '商洛市', '611022', '丹凤县', '', '', '', '', 3, 1, ''), ('611023', '6110', '00,61,6110', '商南县', '61', '陕西省', '6110', '商洛市', '611023', '商南县', '', '', '', '', 3, 1, ''), ('611024', '6110', '00,61,6110', '山阳县', '61', '陕西省', '6110', '商洛市', '611024', '山阳县', '', '', '', '', 3, 1, ''), ('611025', '6110', '00,61,6110', '镇安县', '61', '陕西省', '6110', '商洛市', '611025', '镇安县', '', '', '', '', 3, 1, ''), ('611026', '6110', '00,61,6110', '柞水县', '61', '陕西省', '6110', '商洛市', '611026', '柞水县', '', '', '', '', 3, 1, ''), ('62', '00', '00', '甘肃省', '62', '甘肃省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6201', '62', '00,62', '兰州市', '62', '甘肃省', '6201', '兰州市', '', '', '', '', '', '', 2, 1, ''), ('620102', '6201', '00,62,6201', '城关区', '62', '甘肃省', '6201', '兰州市', '620102', '城关区', '', '', '', '', 3, 1, ''), ('620103', '6201', '00,62,6201', '七里河区', '62', '甘肃省', '6201', '兰州市', '620103', '七里河区', '', '', '', '', 3, 1, ''), ('620104', '6201', '00,62,6201', '西固区', '62', '甘肃省', '6201', '兰州市', '620104', '西固区', '', '', '', '', 3, 1, ''), ('620105', '6201', '00,62,6201', '安宁区', '62', '甘肃省', '6201', '兰州市', '620105', '安宁区', '', '', '', '', 3, 1, ''), ('620111', '6201', '00,62,6201', '红古区', '62', '甘肃省', '6201', '兰州市', '620111', '红古区', '', '', '', '', 3, 1, ''), ('620121', '6201', '00,62,6201', '永登县', '62', '甘肃省', '6201', '兰州市', '620121', '永登县', '', '', '', '', 3, 1, ''), ('620122', '6201', '00,62,6201', '皋兰县', '62', '甘肃省', '6201', '兰州市', '620122', '皋兰县', '', '', '', '', 3, 1, ''), ('620123', '6201', '00,62,6201', '榆中县', '62', '甘肃省', '6201', '兰州市', '620123', '榆中县', '', '', '', '', 3, 1, ''), ('6202', '62', '00,62', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '', '', '', '', '', '', 2, 1, ''), ('620200', '6202', '00,62,6202', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '620200', '嘉峪关市', '', '', '', '', 3, 1, ''), ('6203', '62', '00,62', '金昌市', '62', '甘肃省', '6203', '金昌市', '', '', '', '', '', '', 2, 1, ''), ('620302', '6203', '00,62,6203', '金川区', '62', '甘肃省', '6203', '金昌市', '620302', '金川区', '', '', '', '', 3, 1, ''), ('620321', '6203', '00,62,6203', '永昌县', '62', '甘肃省', '6203', '金昌市', '620321', '永昌县', '', '', '', '', 3, 1, ''), ('6204', '62', '00,62', '白银市', '62', '甘肃省', '6204', '白银市', '', '', '', '', '', '', 2, 1, ''), ('620402', '6204', '00,62,6204', '白银区', '62', '甘肃省', '6204', '白银市', '620402', '白银区', '', '', '', '', 3, 1, ''), ('620403', '6204', '00,62,6204', '平川区', '62', '甘肃省', '6204', '白银市', '620403', '平川区', '', '', '', '', 3, 1, ''), ('620421', '6204', '00,62,6204', '靖远县', '62', '甘肃省', '6204', '白银市', '620421', '靖远县', '', '', '', '', 3, 1, ''), ('620422', '6204', '00,62,6204', '会宁县', '62', '甘肃省', '6204', '白银市', '620422', '会宁县', '', '', '', '', 3, 1, ''), ('620423', '6204', '00,62,6204', '景泰县', '62', '甘肃省', '6204', '白银市', '620423', '景泰县', '', '', '', '', 3, 1, ''), ('6205', '62', '00,62', '天水市', '62', '甘肃省', '6205', '天水市', '', '', '', '', '', '', 2, 1, ''), ('620502', '6205', '00,62,6205', '秦州区', '62', '甘肃省', '6205', '天水市', '620502', '秦州区', '', '', '', '', 3, 1, ''), ('620503', '6205', '00,62,6205', '麦积区', '62', '甘肃省', '6205', '天水市', '620503', '麦积区', '', '', '', '', 3, 1, ''), ('620521', '6205', '00,62,6205', '清水县', '62', '甘肃省', '6205', '天水市', '620521', '清水县', '', '', '', '', 3, 1, ''), ('620522', '6205', '00,62,6205', '秦安县', '62', '甘肃省', '6205', '天水市', '620522', '秦安县', '', '', '', '', 3, 1, ''), ('620523', '6205', '00,62,6205', '甘谷县', '62', '甘肃省', '6205', '天水市', '620523', '甘谷县', '', '', '', '', 3, 1, ''), ('620524', '6205', '00,62,6205', '武山县', '62', '甘肃省', '6205', '天水市', '620524', '武山县', '', '', '', '', 3, 1, ''), ('620525', '6205', '00,62,6205', '张家川回族自治县', '62', '甘肃省', '6205', '天水市', '620525', '张家川回族自治县', '', '', '', '', 3, 1, ''), ('6206', '62', '00,62', '武威市', '62', '甘肃省', '6206', '武威市', '', '', '', '', '', '', 2, 1, ''), ('620602', '6206', '00,62,6206', '凉州区', '62', '甘肃省', '6206', '武威市', '620602', '凉州区', '', '', '', '', 3, 1, ''), ('620621', '6206', '00,62,6206', '民勤县', '62', '甘肃省', '6206', '武威市', '620621', '民勤县', '', '', '', '', 3, 1, ''), ('620622', '6206', '00,62,6206', '古浪县', '62', '甘肃省', '6206', '武威市', '620622', '古浪县', '', '', '', '', 3, 1, ''), ('620623', '6206', '00,62,6206', '天祝藏族自治县', '62', '甘肃省', '6206', '武威市', '620623', '天祝藏族自治县', '', '', '', '', 3, 1, ''), ('6207', '62', '00,62', '张掖市', '62', '甘肃省', '6207', '张掖市', '', '', '', '', '', '', 2, 1, ''), ('620702', '6207', '00,62,6207', '甘州区', '62', '甘肃省', '6207', '张掖市', '620702', '甘州区', '', '', '', '', 3, 1, ''), ('620721', '6207', '00,62,6207', '肃南裕固族自治县', '62', '甘肃省', '6207', '张掖市', '620721', '肃南裕固族自治县', '', '', '', '', 3, 1, ''), ('620722', '6207', '00,62,6207', '民乐县', '62', '甘肃省', '6207', '张掖市', '620722', '民乐县', '', '', '', '', 3, 1, ''), ('620723', '6207', '00,62,6207', '临泽县', '62', '甘肃省', '6207', '张掖市', '620723', '临泽县', '', '', '', '', 3, 1, ''), ('620724', '6207', '00,62,6207', '高台县', '62', '甘肃省', '6207', '张掖市', '620724', '高台县', '', '', '', '', 3, 1, ''), ('620725', '6207', '00,62,6207', '山丹县', '62', '甘肃省', '6207', '张掖市', '620725', '山丹县', '', '', '', '', 3, 1, ''), ('6208', '62', '00,62', '平凉市', '62', '甘肃省', '6208', '平凉市', '', '', '', '', '', '', 2, 1, ''), ('620802', '6208', '00,62,6208', '崆峒区', '62', '甘肃省', '6208', '平凉市', '620802', '崆峒区', '', '', '', '', 3, 1, ''), ('620821', '6208', '00,62,6208', '泾川县', '62', '甘肃省', '6208', '平凉市', '620821', '泾川县', '', '', '', '', 3, 1, ''), ('620822', '6208', '00,62,6208', '灵台县', '62', '甘肃省', '6208', '平凉市', '620822', '灵台县', '', '', '', '', 3, 1, ''), ('620823', '6208', '00,62,6208', '崇信县', '62', '甘肃省', '6208', '平凉市', '620823', '崇信县', '', '', '', '', 3, 1, ''), ('620825', '6208', '00,62,6208', '庄浪县', '62', '甘肃省', '6208', '平凉市', '620825', '庄浪县', '', '', '', '', 3, 1, ''), ('620826', '6208', '00,62,6208', '静宁县', '62', '甘肃省', '6208', '平凉市', '620826', '静宁县', '', '', '', '', 3, 1, ''), ('620881', '6208', '00,62,6208', '华亭市', '62', '甘肃省', '6208', '平凉市', '620881', '华亭市', '', '', '', '', 3, 1, ''), ('6209', '62', '00,62', '酒泉市', '62', '甘肃省', '6209', '酒泉市', '', '', '', '', '', '', 2, 1, ''), ('620902', '6209', '00,62,6209', '肃州区', '62', '甘肃省', '6209', '酒泉市', '620902', '肃州区', '', '', '', '', 3, 1, ''), ('620921', '6209', '00,62,6209', '金塔县', '62', '甘肃省', '6209', '酒泉市', '620921', '金塔县', '', '', '', '', 3, 1, ''), ('620922', '6209', '00,62,6209', '瓜州县', '62', '甘肃省', '6209', '酒泉市', '620922', '瓜州县', '', '', '', '', 3, 1, ''), ('620923', '6209', '00,62,6209', '肃北蒙古族自治县', '62', '甘肃省', '6209', '酒泉市', '620923', '肃北蒙古族自治县', '', '', '', '', 3, 1, ''), ('620924', '6209', '00,62,6209', '阿克塞哈萨克族自治县', '62', '甘肃省', '6209', '酒泉市', '620924', '阿克塞哈萨克族自治县', '', '', '', '', 3, 1, ''), ('620981', '6209', '00,62,6209', '玉门市', '62', '甘肃省', '6209', '酒泉市', '620981', '玉门市', '', '', '', '', 3, 1, ''), ('620982', '6209', '00,62,6209', '敦煌市', '62', '甘肃省', '6209', '酒泉市', '620982', '敦煌市', '', '', '', '', 3, 1, ''), ('6210', '62', '00,62', '庆阳市', '62', '甘肃省', '6210', '庆阳市', '', '', '', '', '', '', 2, 1, ''), ('621002', '6210', '00,62,6210', '西峰区', '62', '甘肃省', '6210', '庆阳市', '621002', '西峰区', '', '', '', '', 3, 1, ''), ('621021', '6210', '00,62,6210', '庆城县', '62', '甘肃省', '6210', '庆阳市', '621021', '庆城县', '', '', '', '', 3, 1, ''), ('621022', '6210', '00,62,6210', '环县', '62', '甘肃省', '6210', '庆阳市', '621022', '环县', '', '', '', '', 3, 1, ''), ('621023', '6210', '00,62,6210', '华池县', '62', '甘肃省', '6210', '庆阳市', '621023', '华池县', '', '', '', '', 3, 1, ''), ('621024', '6210', '00,62,6210', '合水县', '62', '甘肃省', '6210', '庆阳市', '621024', '合水县', '', '', '', '', 3, 1, ''), ('621025', '6210', '00,62,6210', '正宁县', '62', '甘肃省', '6210', '庆阳市', '621025', '正宁县', '', '', '', '', 3, 1, ''), ('621026', '6210', '00,62,6210', '宁县', '62', '甘肃省', '6210', '庆阳市', '621026', '宁县', '', '', '', '', 3, 1, ''), ('621027', '6210', '00,62,6210', '镇原县', '62', '甘肃省', '6210', '庆阳市', '621027', '镇原县', '', '', '', '', 3, 1, ''), ('6211', '62', '00,62', '定西市', '62', '甘肃省', '6211', '定西市', '', '', '', '', '', '', 2, 1, ''), ('621102', '6211', '00,62,6211', '安定区', '62', '甘肃省', '6211', '定西市', '621102', '安定区', '', '', '', '', 3, 1, ''), ('621121', '6211', '00,62,6211', '通渭县', '62', '甘肃省', '6211', '定西市', '621121', '通渭县', '', '', '', '', 3, 1, ''), ('621122', '6211', '00,62,6211', '陇西县', '62', '甘肃省', '6211', '定西市', '621122', '陇西县', '', '', '', '', 3, 1, ''), ('621123', '6211', '00,62,6211', '渭源县', '62', '甘肃省', '6211', '定西市', '621123', '渭源县', '', '', '', '', 3, 1, ''), ('621124', '6211', '00,62,6211', '临洮县', '62', '甘肃省', '6211', '定西市', '621124', '临洮县', '', '', '', '', 3, 1, ''), ('621125', '6211', '00,62,6211', '漳县', '62', '甘肃省', '6211', '定西市', '621125', '漳县', '', '', '', '', 3, 1, ''), ('621126', '6211', '00,62,6211', '岷县', '62', '甘肃省', '6211', '定西市', '621126', '岷县', '', '', '', '', 3, 1, ''), ('6212', '62', '00,62', '陇南市', '62', '甘肃省', '6212', '陇南市', '', '', '', '', '', '', 2, 1, ''), ('621202', '6212', '00,62,6212', '武都区', '62', '甘肃省', '6212', '陇南市', '621202', '武都区', '', '', '', '', 3, 1, ''), ('621221', '6212', '00,62,6212', '成县', '62', '甘肃省', '6212', '陇南市', '621221', '成县', '', '', '', '', 3, 1, ''), ('621222', '6212', '00,62,6212', '文县', '62', '甘肃省', '6212', '陇南市', '621222', '文县', '', '', '', '', 3, 1, ''), ('621223', '6212', '00,62,6212', '宕昌县', '62', '甘肃省', '6212', '陇南市', '621223', '宕昌县', '', '', '', '', 3, 1, ''), ('621224', '6212', '00,62,6212', '康县', '62', '甘肃省', '6212', '陇南市', '621224', '康县', '', '', '', '', 3, 1, ''), ('621225', '6212', '00,62,6212', '西和县', '62', '甘肃省', '6212', '陇南市', '621225', '西和县', '', '', '', '', 3, 1, ''), ('621226', '6212', '00,62,6212', '礼县', '62', '甘肃省', '6212', '陇南市', '621226', '礼县', '', '', '', '', 3, 1, ''), ('621227', '6212', '00,62,6212', '徽县', '62', '甘肃省', '6212', '陇南市', '621227', '徽县', '', '', '', '', 3, 1, ''), ('621228', '6212', '00,62,6212', '两当县', '62', '甘肃省', '6212', '陇南市', '621228', '两当县', '', '', '', '', 3, 1, ''), ('6229', '62', '00,62', '临夏回族自治州', '62', '甘肃省', '6229', '临夏回族自治州', '', '', '', '', '', '', 2, 1, ''), ('622901', '6229', '00,62,6229', '临夏市', '62', '甘肃省', '6229', '临夏回族自治州', '622901', '临夏市', '', '', '', '', 3, 1, ''), ('622921', '6229', '00,62,6229', '临夏县', '62', '甘肃省', '6229', '临夏回族自治州', '622921', '临夏县', '', '', '', '', 3, 1, ''), ('622922', '6229', '00,62,6229', '康乐县', '62', '甘肃省', '6229', '临夏回族自治州', '622922', '康乐县', '', '', '', '', 3, 1, ''), ('622923', '6229', '00,62,6229', '永靖县', '62', '甘肃省', '6229', '临夏回族自治州', '622923', '永靖县', '', '', '', '', 3, 1, ''), ('622924', '6229', '00,62,6229', '广河县', '62', '甘肃省', '6229', '临夏回族自治州', '622924', '广河县', '', '', '', '', 3, 1, ''), ('622925', '6229', '00,62,6229', '和政县', '62', '甘肃省', '6229', '临夏回族自治州', '622925', '和政县', '', '', '', '', 3, 1, ''), ('622926', '6229', '00,62,6229', '东乡族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622926', '东乡族自治县', '', '', '', '', 3, 1, ''), ('622927', '6229', '00,62,6229', '积石山保安族东乡族撒拉族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622927', '积石山保安族东乡族撒拉族自治县', '', '', '', '', 3, 1, ''), ('6230', '62', '00,62', '甘南藏族自治州', '62', '甘肃省', '6230', '甘南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('623001', '6230', '00,62,6230', '合作市', '62', '甘肃省', '6230', '甘南藏族自治州', '623001', '合作市', '', '', '', '', 3, 1, ''), ('623021', '6230', '00,62,6230', '临潭县', '62', '甘肃省', '6230', '甘南藏族自治州', '623021', '临潭县', '', '', '', '', 3, 1, ''), ('623022', '6230', '00,62,6230', '卓尼县', '62', '甘肃省', '6230', '甘南藏族自治州', '623022', '卓尼县', '', '', '', '', 3, 1, ''), ('623023', '6230', '00,62,6230', '舟曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623023', '舟曲县', '', '', '', '', 3, 1, ''), ('623024', '6230', '00,62,6230', '迭部县', '62', '甘肃省', '6230', '甘南藏族自治州', '623024', '迭部县', '', '', '', '', 3, 1, ''), ('623025', '6230', '00,62,6230', '玛曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623025', '玛曲县', '', '', '', '', 3, 1, ''), ('623026', '6230', '00,62,6230', '碌曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623026', '碌曲县', '', '', '', '', 3, 1, ''), ('623027', '6230', '00,62,6230', '夏河县', '62', '甘肃省', '6230', '甘南藏族自治州', '623027', '夏河县', '', '', '', '', 3, 1, ''), ('63', '00', '00', '青海省', '63', '青海省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6301', '63', '00,63', '西宁市', '63', '青海省', '6301', '西宁市', '', '', '', '', '', '', 2, 1, ''), ('630102', '6301', '00,63,6301', '城东区', '63', '青海省', '6301', '西宁市', '630102', '城东区', '', '', '', '', 3, 1, ''), ('630103', '6301', '00,63,6301', '城中区', '63', '青海省', '6301', '西宁市', '630103', '城中区', '', '', '', '', 3, 1, ''), ('630104', '6301', '00,63,6301', '城西区', '63', '青海省', '6301', '西宁市', '630104', '城西区', '', '', '', '', 3, 1, ''), ('630105', '6301', '00,63,6301', '城北区', '63', '青海省', '6301', '西宁市', '630105', '城北区', '', '', '', '', 3, 1, ''), ('630106', '6301', '00,63,6301', '湟中区', '63', '青海省', '6301', '西宁市', '630106', '湟中区', '', '', '', '', 3, 1, ''), ('630121', '6301', '00,63,6301', '大通回族土族自治县', '63', '青海省', '6301', '西宁市', '630121', '大通回族土族自治县', '', '', '', '', 3, 1, ''), ('630123', '6301', '00,63,6301', '湟源县', '63', '青海省', '6301', '西宁市', '630123', '湟源县', '', '', '', '', 3, 1, ''), ('6302', '63', '00,63', '海东市', '63', '青海省', '6302', '海东市', '', '', '', '', '', '', 2, 1, ''), ('630202', '6302', '00,63,6302', '乐都区', '63', '青海省', '6302', '海东市', '630202', '乐都区', '', '', '', '', 3, 1, ''), ('630203', '6302', '00,63,6302', '平安区', '63', '青海省', '6302', '海东市', '630203', '平安区', '', '', '', '', 3, 1, ''), ('630222', '6302', '00,63,6302', '民和回族土族自治县', '63', '青海省', '6302', '海东市', '630222', '民和回族土族自治县', '', '', '', '', 3, 1, ''), ('630223', '6302', '00,63,6302', '互助土族自治县', '63', '青海省', '6302', '海东市', '630223', '互助土族自治县', '', '', '', '', 3, 1, ''), ('630224', '6302', '00,63,6302', '化隆回族自治县', '63', '青海省', '6302', '海东市', '630224', '化隆回族自治县', '', '', '', '', 3, 1, ''), ('630225', '6302', '00,63,6302', '循化撒拉族自治县', '63', '青海省', '6302', '海东市', '630225', '循化撒拉族自治县', '', '', '', '', 3, 1, ''), ('6322', '63', '00,63', '海北藏族自治州', '63', '青海省', '6322', '海北藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632221', '6322', '00,63,6322', '门源回族自治县', '63', '青海省', '6322', '海北藏族自治州', '632221', '门源回族自治县', '', '', '', '', 3, 1, ''), ('632222', '6322', '00,63,6322', '祁连县', '63', '青海省', '6322', '海北藏族自治州', '632222', '祁连县', '', '', '', '', 3, 1, ''), ('632223', '6322', '00,63,6322', '海晏县', '63', '青海省', '6322', '海北藏族自治州', '632223', '海晏县', '', '', '', '', 3, 1, ''), ('632224', '6322', '00,63,6322', '刚察县', '63', '青海省', '6322', '海北藏族自治州', '632224', '刚察县', '', '', '', '', 3, 1, ''), ('6323', '63', '00,63', '黄南藏族自治州', '63', '青海省', '6323', '黄南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632321', '6323', '00,63,6323', '同仁县', '63', '青海省', '6323', '黄南藏族自治州', '632321', '同仁县', '', '', '', '', 3, 1, ''), ('632322', '6323', '00,63,6323', '尖扎县', '63', '青海省', '6323', '黄南藏族自治州', '632322', '尖扎县', '', '', '', '', 3, 1, ''), ('632323', '6323', '00,63,6323', '泽库县', '63', '青海省', '6323', '黄南藏族自治州', '632323', '泽库县', '', '', '', '', 3, 1, ''), ('632324', '6323', '00,63,6323', '河南蒙古族自治县', '63', '青海省', '6323', '黄南藏族自治州', '632324', '河南蒙古族自治县', '', '', '', '', 3, 1, ''), ('6325', '63', '00,63', '海南藏族自治州', '63', '青海省', '6325', '海南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632521', '6325', '00,63,6325', '共和县', '63', '青海省', '6325', '海南藏族自治州', '632521', '共和县', '', '', '', '', 3, 1, ''), ('632522', '6325', '00,63,6325', '同德县', '63', '青海省', '6325', '海南藏族自治州', '632522', '同德县', '', '', '', '', 3, 1, ''), ('632523', '6325', '00,63,6325', '贵德县', '63', '青海省', '6325', '海南藏族自治州', '632523', '贵德县', '', '', '', '', 3, 1, ''), ('632524', '6325', '00,63,6325', '兴海县', '63', '青海省', '6325', '海南藏族自治州', '632524', '兴海县', '', '', '', '', 3, 1, ''), ('632525', '6325', '00,63,6325', '贵南县', '63', '青海省', '6325', '海南藏族自治州', '632525', '贵南县', '', '', '', '', 3, 1, ''), ('6326', '63', '00,63', '果洛藏族自治州', '63', '青海省', '6326', '果洛藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632621', '6326', '00,63,6326', '玛沁县', '63', '青海省', '6326', '果洛藏族自治州', '632621', '玛沁县', '', '', '', '', 3, 1, ''), ('632622', '6326', '00,63,6326', '班玛县', '63', '青海省', '6326', '果洛藏族自治州', '632622', '班玛县', '', '', '', '', 3, 1, ''), ('632623', '6326', '00,63,6326', '甘德县', '63', '青海省', '6326', '果洛藏族自治州', '632623', '甘德县', '', '', '', '', 3, 1, ''), ('632624', '6326', '00,63,6326', '达日县', '63', '青海省', '6326', '果洛藏族自治州', '632624', '达日县', '', '', '', '', 3, 1, ''), ('632625', '6326', '00,63,6326', '久治县', '63', '青海省', '6326', '果洛藏族自治州', '632625', '久治县', '', '', '', '', 3, 1, ''), ('632626', '6326', '00,63,6326', '玛多县', '63', '青海省', '6326', '果洛藏族自治州', '632626', '玛多县', '', '', '', '', 3, 1, ''), ('6327', '63', '00,63', '玉树藏族自治州', '63', '青海省', '6327', '玉树藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632701', '6327', '00,63,6327', '玉树市', '63', '青海省', '6327', '玉树藏族自治州', '632701', '玉树市', '', '', '', '', 3, 1, ''), ('632722', '6327', '00,63,6327', '杂多县', '63', '青海省', '6327', '玉树藏族自治州', '632722', '杂多县', '', '', '', '', 3, 1, ''), ('632723', '6327', '00,63,6327', '称多县', '63', '青海省', '6327', '玉树藏族自治州', '632723', '称多县', '', '', '', '', 3, 1, ''), ('632724', '6327', '00,63,6327', '治多县', '63', '青海省', '6327', '玉树藏族自治州', '632724', '治多县', '', '', '', '', 3, 1, ''), ('632725', '6327', '00,63,6327', '囊谦县', '63', '青海省', '6327', '玉树藏族自治州', '632725', '囊谦县', '', '', '', '', 3, 1, ''), ('632726', '6327', '00,63,6327', '曲麻莱县', '63', '青海省', '6327', '玉树藏族自治州', '632726', '曲麻莱县', '', '', '', '', 3, 1, ''), ('6328', '63', '00,63', '海西蒙古族藏族自治州', '63', '青海省', '6328', '海西蒙古族藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632801', '6328', '00,63,6328', '格尔木市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632801', '格尔木市', '', '', '', '', 3, 1, ''), ('632802', '6328', '00,63,6328', '德令哈市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632802', '德令哈市', '', '', '', '', 3, 1, ''), ('632803', '6328', '00,63,6328', '茫崖市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632803', '茫崖市', '', '', '', '', 3, 1, ''), ('632821', '6328', '00,63,6328', '乌兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632821', '乌兰县', '', '', '', '', 3, 1, ''), ('632822', '6328', '00,63,6328', '都兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632822', '都兰县', '', '', '', '', 3, 1, ''), ('632823', '6328', '00,63,6328', '天峻县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632823', '天峻县', '', '', '', '', 3, 1, ''), ('64', '00', '00', '宁夏回族自治区', '64', '宁夏回族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6401', '64', '00,64', '银川市', '64', '宁夏回族自治区', '6401', '银川市', '', '', '', '', '', '', 2, 1, ''), ('640104', '6401', '00,64,6401', '兴庆区', '64', '宁夏回族自治区', '6401', '银川市', '640104', '兴庆区', '', '', '', '', 3, 1, ''), ('640105', '6401', '00,64,6401', '西夏区', '64', '宁夏回族自治区', '6401', '银川市', '640105', '西夏区', '', '', '', '', 3, 1, ''), ('640106', '6401', '00,64,6401', '金凤区', '64', '宁夏回族自治区', '6401', '银川市', '640106', '金凤区', '', '', '', '', 3, 1, ''), ('640121', '6401', '00,64,6401', '永宁县', '64', '宁夏回族自治区', '6401', '银川市', '640121', '永宁县', '', '', '', '', 3, 1, ''), ('640122', '6401', '00,64,6401', '贺兰县', '64', '宁夏回族自治区', '6401', '银川市', '640122', '贺兰县', '', '', '', '', 3, 1, ''), ('640181', '6401', '00,64,6401', '灵武市', '64', '宁夏回族自治区', '6401', '银川市', '640181', '灵武市', '', '', '', '', 3, 1, ''), ('6402', '64', '00,64', '石嘴山市', '64', '宁夏回族自治区', '6402', '石嘴山市', '', '', '', '', '', '', 2, 1, ''), ('640202', '6402', '00,64,6402', '大武口区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640202', '大武口区', '', '', '', '', 3, 1, ''), ('640205', '6402', '00,64,6402', '惠农区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640205', '惠农区', '', '', '', '', 3, 1, ''), ('640221', '6402', '00,64,6402', '平罗县', '64', '宁夏回族自治区', '6402', '石嘴山市', '640221', '平罗县', '', '', '', '', 3, 1, ''), ('6403', '64', '00,64', '吴忠市', '64', '宁夏回族自治区', '6403', '吴忠市', '', '', '', '', '', '', 2, 1, ''), ('640302', '6403', '00,64,6403', '利通区', '64', '宁夏回族自治区', '6403', '吴忠市', '640302', '利通区', '', '', '', '', 3, 1, ''), ('640303', '6403', '00,64,6403', '红寺堡区', '64', '宁夏回族自治区', '6403', '吴忠市', '640303', '红寺堡区', '', '', '', '', 3, 1, ''), ('640323', '6403', '00,64,6403', '盐池县', '64', '宁夏回族自治区', '6403', '吴忠市', '640323', '盐池县', '', '', '', '', 3, 1, ''), ('640324', '6403', '00,64,6403', '同心县', '64', '宁夏回族自治区', '6403', '吴忠市', '640324', '同心县', '', '', '', '', 3, 1, ''), ('640381', '6403', '00,64,6403', '青铜峡市', '64', '宁夏回族自治区', '6403', '吴忠市', '640381', '青铜峡市', '', '', '', '', 3, 1, ''), ('6404', '64', '00,64', '固原市', '64', '宁夏回族自治区', '6404', '固原市', '', '', '', '', '', '', 2, 1, ''), ('640402', '6404', '00,64,6404', '原州区', '64', '宁夏回族自治区', '6404', '固原市', '640402', '原州区', '', '', '', '', 3, 1, ''), ('640422', '6404', '00,64,6404', '西吉县', '64', '宁夏回族自治区', '6404', '固原市', '640422', '西吉县', '', '', '', '', 3, 1, ''), ('640423', '6404', '00,64,6404', '隆德县', '64', '宁夏回族自治区', '6404', '固原市', '640423', '隆德县', '', '', '', '', 3, 1, ''), ('640424', '6404', '00,64,6404', '泾源县', '64', '宁夏回族自治区', '6404', '固原市', '640424', '泾源县', '', '', '', '', 3, 1, ''), ('640425', '6404', '00,64,6404', '彭阳县', '64', '宁夏回族自治区', '6404', '固原市', '640425', '彭阳县', '', '', '', '', 3, 1, ''), ('6405', '64', '00,64', '中卫市', '64', '宁夏回族自治区', '6405', '中卫市', '', '', '', '', '', '', 2, 1, ''), ('640502', '6405', '00,64,6405', '沙坡头区', '64', '宁夏回族自治区', '6405', '中卫市', '640502', '沙坡头区', '', '', '', '', 3, 1, ''), ('640521', '6405', '00,64,6405', '中宁县', '64', '宁夏回族自治区', '6405', '中卫市', '640521', '中宁县', '', '', '', '', 3, 1, ''), ('640522', '6405', '00,64,6405', '海原县', '64', '宁夏回族自治区', '6405', '中卫市', '640522', '海原县', '', '', '', '', 3, 1, ''), ('65', '00', '00', '新疆维吾尔自治区', '65', '新疆维吾尔自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6501', '65', '00,65', '乌鲁木齐市', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '', '', '', '', '', '', 2, 1, ''), ('650102', '6501', '00,65,6501', '天山区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650102', '天山区', '', '', '', '', 3, 1, ''), ('650103', '6501', '00,65,6501', '沙依巴克区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650103', '沙依巴克区', '', '', '', '', 3, 1, ''), ('650104', '6501', '00,65,6501', '新市区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650104', '新市区', '', '', '', '', 3, 1, ''), ('650105', '6501', '00,65,6501', '水磨沟区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650105', '水磨沟区', '', '', '', '', 3, 1, ''), ('650106', '6501', '00,65,6501', '头屯河区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650106', '头屯河区', '', '', '', '', 3, 1, ''), ('650107', '6501', '00,65,6501', '达坂城区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650107', '达坂城区', '', '', '', '', 3, 1, ''), ('650109', '6501', '00,65,6501', '米东区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650109', '米东区', '', '', '', '', 3, 1, ''), ('650121', '6501', '00,65,6501', '乌鲁木齐县', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650121', '乌鲁木齐县', '', '', '', '', 3, 1, ''), ('6502', '65', '00,65', '克拉玛依市', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '', '', '', '', '', '', 2, 1, ''), ('650202', '6502', '00,65,6502', '独山子区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650202', '独山子区', '', '', '', '', 3, 1, ''), ('650203', '6502', '00,65,6502', '克拉玛依区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650203', '克拉玛依区', '', '', '', '', 3, 1, ''), ('650204', '6502', '00,65,6502', '白碱滩区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650204', '白碱滩区', '', '', '', '', 3, 1, ''), ('650205', '6502', '00,65,6502', '乌尔禾区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650205', '乌尔禾区', '', '', '', '', 3, 1, ''), ('6504', '65', '00,65', '吐鲁番市', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '', '', '', '', '', '', 2, 1, ''), ('650402', '6504', '00,65,6504', '高昌区', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650402', '高昌区', '', '', '', '', 3, 1, ''), ('650421', '6504', '00,65,6504', '鄯善县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650421', '鄯善县', '', '', '', '', 3, 1, ''), ('650422', '6504', '00,65,6504', '托克逊县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650422', '托克逊县', '', '', '', '', 3, 1, ''), ('6505', '65', '00,65', '哈密市', '65', '新疆维吾尔自治区', '6505', '哈密市', '', '', '', '', '', '', 2, 1, ''), ('650502', '6505', '00,65,6505', '伊州区', '65', '新疆维吾尔自治区', '6505', '哈密市', '650502', '伊州区', '', '', '', '', 3, 1, ''), ('650521', '6505', '00,65,6505', '巴里坤哈萨克自治县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650521', '巴里坤哈萨克自治县', '', '', '', '', 3, 1, ''), ('650522', '6505', '00,65,6505', '伊吾县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650522', '伊吾县', '', '', '', '', 3, 1, ''), ('6523', '65', '00,65', '昌吉回族自治州', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '', '', '', '', '', '', 2, 1, ''), ('652301', '6523', '00,65,6523', '昌吉市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652301', '昌吉市', '', '', '', '', 3, 1, ''), ('652302', '6523', '00,65,6523', '阜康市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652302', '阜康市', '', '', '', '', 3, 1, ''), ('652323', '6523', '00,65,6523', '呼图壁县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652323', '呼图壁县', '', '', '', '', 3, 1, ''), ('652324', '6523', '00,65,6523', '玛纳斯县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652324', '玛纳斯县', '', '', '', '', 3, 1, ''), ('652325', '6523', '00,65,6523', '奇台县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652325', '奇台县', '', '', '', '', 3, 1, ''), ('652327', '6523', '00,65,6523', '吉木萨尔县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652327', '吉木萨尔县', '', '', '', '', 3, 1, ''), ('652328', '6523', '00,65,6523', '木垒哈萨克自治县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652328', '木垒哈萨克自治县', '', '', '', '', 3, 1, ''), ('6527', '65', '00,65', '博尔塔拉蒙古自治州', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652701', '6527', '00,65,6527', '博乐市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652701', '博乐市', '', '', '', '', 3, 1, ''), ('652702', '6527', '00,65,6527', '阿拉山口市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652702', '阿拉山口市', '', '', '', '', 3, 1, ''), ('652722', '6527', '00,65,6527', '精河县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652722', '精河县', '', '', '', '', 3, 1, ''), ('652723', '6527', '00,65,6527', '温泉县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652723', '温泉县', '', '', '', '', 3, 1, ''), ('6528', '65', '00,65', '巴音郭楞蒙古自治州', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652801', '6528', '00,65,6528', '库尔勒市', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652801', '库尔勒市', '', '', '', '', 3, 1, ''), ('652822', '6528', '00,65,6528', '轮台县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652822', '轮台县', '', '', '', '', 3, 1, ''), ('652823', '6528', '00,65,6528', '尉犁县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652823', '尉犁县', '', '', '', '', 3, 1, ''), ('652824', '6528', '00,65,6528', '若羌县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652824', '若羌县', '', '', '', '', 3, 1, ''), ('652825', '6528', '00,65,6528', '且末县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652825', '且末县', '', '', '', '', 3, 1, ''), ('652826', '6528', '00,65,6528', '焉耆回族自治县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652826', '焉耆回族自治县', '', '', '', '', 3, 1, ''), ('652827', '6528', '00,65,6528', '和静县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652827', '和静县', '', '', '', '', 3, 1, ''), ('652828', '6528', '00,65,6528', '和硕县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652828', '和硕县', '', '', '', '', 3, 1, ''), ('652829', '6528', '00,65,6528', '博湖县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652829', '博湖县', '', '', '', '', 3, 1, ''), ('6529', '65', '00,65', '阿克苏地区', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '', '', '', '', '', '', 2, 1, ''), ('652901', '6529', '00,65,6529', '阿克苏市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652901', '阿克苏市', '', '', '', '', 3, 1, ''), ('652902', '6529', '00,65,6529', '库车市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652902', '库车市', '', '', '', '', 3, 1, ''), ('652922', '6529', '00,65,6529', '温宿县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652922', '温宿县', '', '', '', '', 3, 1, ''), ('652924', '6529', '00,65,6529', '沙雅县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652924', '沙雅县', '', '', '', '', 3, 1, ''), ('652925', '6529', '00,65,6529', '新和县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652925', '新和县', '', '', '', '', 3, 1, ''), ('652926', '6529', '00,65,6529', '拜城县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652926', '拜城县', '', '', '', '', 3, 1, ''), ('652927', '6529', '00,65,6529', '乌什县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652927', '乌什县', '', '', '', '', 3, 1, ''), ('652928', '6529', '00,65,6529', '阿瓦提县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652928', '阿瓦提县', '', '', '', '', 3, 1, ''), ('652929', '6529', '00,65,6529', '柯坪县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652929', '柯坪县', '', '', '', '', 3, 1, ''), ('6530', '65', '00,65', '克孜勒苏柯尔克孜自治州', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '', '', '', '', '', '', 2, 1, ''), ('653001', '6530', '00,65,6530', '阿图什市', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653001', '阿图什市', '', '', '', '', 3, 1, ''), ('653022', '6530', '00,65,6530', '阿克陶县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653022', '阿克陶县', '', '', '', '', 3, 1, ''), ('653023', '6530', '00,65,6530', '阿合奇县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653023', '阿合奇县', '', '', '', '', 3, 1, ''), ('653024', '6530', '00,65,6530', '乌恰县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653024', '乌恰县', '', '', '', '', 3, 1, ''), ('6531', '65', '00,65', '喀什地区', '65', '新疆维吾尔自治区', '6531', '喀什地区', '', '', '', '', '', '', 2, 1, ''), ('653101', '6531', '00,65,6531', '喀什市', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653101', '喀什市', '', '', '', '', 3, 1, ''), ('653121', '6531', '00,65,6531', '疏附县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653121', '疏附县', '', '', '', '', 3, 1, ''), ('653122', '6531', '00,65,6531', '疏勒县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653122', '疏勒县', '', '', '', '', 3, 1, ''), ('653123', '6531', '00,65,6531', '英吉沙县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653123', '英吉沙县', '', '', '', '', 3, 1, ''), ('653124', '6531', '00,65,6531', '泽普县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653124', '泽普县', '', '', '', '', 3, 1, ''), ('653125', '6531', '00,65,6531', '莎车县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653125', '莎车县', '', '', '', '', 3, 1, ''), ('653126', '6531', '00,65,6531', '叶城县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653126', '叶城县', '', '', '', '', 3, 1, ''), ('653127', '6531', '00,65,6531', '麦盖提县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653127', '麦盖提县', '', '', '', '', 3, 1, ''), ('653128', '6531', '00,65,6531', '岳普湖县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653128', '岳普湖县', '', '', '', '', 3, 1, ''), ('653129', '6531', '00,65,6531', '伽师县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653129', '伽师县', '', '', '', '', 3, 1, ''), ('653130', '6531', '00,65,6531', '巴楚县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653130', '巴楚县', '', '', '', '', 3, 1, ''), ('653131', '6531', '00,65,6531', '塔什库尔干塔吉克自治县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653131', '塔什库尔干塔吉克自治县', '', '', '', '', 3, 1, ''), ('6532', '65', '00,65', '和田地区', '65', '新疆维吾尔自治区', '6532', '和田地区', '', '', '', '', '', '', 2, 1, ''), ('653201', '6532', '00,65,6532', '和田市', '65', '新疆维吾尔自治区', '6532', '和田地区', '653201', '和田市', '', '', '', '', 3, 1, ''), ('653221', '6532', '00,65,6532', '和田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653221', '和田县', '', '', '', '', 3, 1, ''), ('653222', '6532', '00,65,6532', '墨玉县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653222', '墨玉县', '', '', '', '', 3, 1, ''), ('653223', '6532', '00,65,6532', '皮山县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653223', '皮山县', '', '', '', '', 3, 1, ''), ('653224', '6532', '00,65,6532', '洛浦县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653224', '洛浦县', '', '', '', '', 3, 1, ''), ('653225', '6532', '00,65,6532', '策勒县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653225', '策勒县', '', '', '', '', 3, 1, ''), ('653226', '6532', '00,65,6532', '于田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653226', '于田县', '', '', '', '', 3, 1, ''), ('653227', '6532', '00,65,6532', '民丰县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653227', '民丰县', '', '', '', '', 3, 1, ''), ('6540', '65', '00,65', '伊犁哈萨克自治州', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '', '', '', '', '', '', 2, 1, ''), ('654002', '6540', '00,65,6540', '伊宁市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654002', '伊宁市', '', '', '', '', 3, 1, ''), ('654003', '6540', '00,65,6540', '奎屯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654003', '奎屯市', '', '', '', '', 3, 1, ''), ('654004', '6540', '00,65,6540', '霍尔果斯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654004', '霍尔果斯市', '', '', '', '', 3, 1, ''), ('654021', '6540', '00,65,6540', '伊宁县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654021', '伊宁县', '', '', '', '', 3, 1, ''), ('654022', '6540', '00,65,6540', '察布查尔锡伯自治县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654022', '察布查尔锡伯自治县', '', '', '', '', 3, 1, ''), ('654023', '6540', '00,65,6540', '霍城县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654023', '霍城县', '', '', '', '', 3, 1, ''), ('654024', '6540', '00,65,6540', '巩留县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654024', '巩留县', '', '', '', '', 3, 1, ''), ('654025', '6540', '00,65,6540', '新源县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654025', '新源县', '', '', '', '', 3, 1, ''), ('654026', '6540', '00,65,6540', '昭苏县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654026', '昭苏县', '', '', '', '', 3, 1, ''), ('654027', '6540', '00,65,6540', '特克斯县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654027', '特克斯县', '', '', '', '', 3, 1, ''), ('654028', '6540', '00,65,6540', '尼勒克县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654028', '尼勒克县', '', '', '', '', 3, 1, ''), ('6542', '65', '00,65', '塔城地区', '65', '新疆维吾尔自治区', '6542', '塔城地区', '', '', '', '', '', '', 2, 1, ''), ('654201', '6542', '00,65,6542', '塔城市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654201', '塔城市', '', '', '', '', 3, 1, ''), ('654202', '6542', '00,65,6542', '乌苏市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654202', '乌苏市', '', '', '', '', 3, 1, ''), ('654221', '6542', '00,65,6542', '额敏县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654221', '额敏县', '', '', '', '', 3, 1, ''), ('654223', '6542', '00,65,6542', '沙湾县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654223', '沙湾县', '', '', '', '', 3, 1, ''), ('654224', '6542', '00,65,6542', '托里县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654224', '托里县', '', '', '', '', 3, 1, ''), ('654225', '6542', '00,65,6542', '裕民县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654225', '裕民县', '', '', '', '', 3, 1, ''), ('654226', '6542', '00,65,6542', '和布克赛尔蒙古自治县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654226', '和布克赛尔蒙古自治县', '', '', '', '', 3, 1, ''), ('6543', '65', '00,65', '阿勒泰地区', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '', '', '', '', '', '', 2, 1, ''), ('654301', '6543', '00,65,6543', '阿勒泰市', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654301', '阿勒泰市', '', '', '', '', 3, 1, ''), ('654321', '6543', '00,65,6543', '布尔津县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654321', '布尔津县', '', '', '', '', 3, 1, ''), ('654322', '6543', '00,65,6543', '富蕴县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654322', '富蕴县', '', '', '', '', 3, 1, ''), ('654323', '6543', '00,65,6543', '福海县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654323', '福海县', '', '', '', '', 3, 1, ''), ('654324', '6543', '00,65,6543', '哈巴河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654324', '哈巴河县', '', '', '', '', 3, 1, ''), ('654325', '6543', '00,65,6543', '青河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654325', '青河县', '', '', '', '', 3, 1, ''), ('654326', '6543', '00,65,6543', '吉木乃县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654326', '吉木乃县', '', '', '', '', 3, 1, ''), ('6590', '65', '00,65', '自治区直辖县级行政区', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('659001', '6590', '00,65,6590', '石河子市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659001', '石河子市', '', '', '', '', 3, 1, ''), ('659002', '6590', '00,65,6590', '阿拉尔市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659002', '阿拉尔市', '', '', '', '', 3, 1, ''), ('659003', '6590', '00,65,6590', '图木舒克市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659003', '图木舒克市', '', '', '', '', 3, 1, ''), ('659004', '6590', '00,65,6590', '五家渠市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659004', '五家渠市', '', '', '', '', 3, 1, ''), ('659005', '6590', '00,65,6590', '北屯市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659005', '北屯市', '', '', '', '', 3, 1, ''), ('659006', '6590', '00,65,6590', '铁门关市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659006', '铁门关市', '', '', '', '', 3, 1, ''), ('659007', '6590', '00,65,6590', '双河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659007', '双河市', '', '', '', '', 3, 1, ''), ('659008', '6590', '00,65,6590', '可克达拉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659008', '可克达拉市', '', '', '', '', 3, 1, ''), ('659009', '6590', '00,65,6590', '昆玉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659009', '昆玉市', '', '', '', '', 3, 1, ''), ('659010', '6590', '00,65,6590', '胡杨河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659010', '胡杨河市', '', '', '', '', 3, 1, ''), ('71', '00', '00', '台湾省', '71', '台湾省', '', '', '', '', '', '', '', '', 1, 1, ''), ('81', '00', '00', '香港特别行政区', '81', '香港特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''), ('82', '00', '00', '澳门特别行政区', '82', '澳门特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_report_file +-- ---------------------------- +DROP TABLE IF EXISTS `sys_report_file`; +CREATE TABLE `sys_report_file` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名', + `content` mediumblob NULL COMMENT '文件内容', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '报表文件表'; + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键', + `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `role_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色别名', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表'; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +BEGIN; +INSERT INTO `sys_role` VALUES (1123598816738675201, '000000', 0, '超级管理员', 1, 'administrator', 0), (1123598816738675202, '000000', 0, '用户', 2, 'user', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_menu`; +CREATE TABLE `sys_role_menu` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单id', + `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表'; + +-- ---------------------------- +-- Records of sys_role_menu +-- ---------------------------- +BEGIN; +INSERT INTO `sys_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030666634301441, 1123598815738675201, 1123598816738675202), (1296030666659467266, 1123598815738675202, 1123598816738675202), (1296030666680438785, 1123598815738675219, 1123598816738675202), (1296030666697216001, 1123598815738675220, 1123598816738675202), (1296030666713993218, 1123598815738675221, 1123598816738675202), (1296030666726576129, 1123598815738675222, 1123598816738675202), (1455363615489028098, 1123598815738675307, 1123598816738675201), (1455363615505805313, 1123598815738675309, 1123598816738675201), (1455363615518388225, 1123598815738675310, 1123598816738675201); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_role_scope +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_scope`; +CREATE TABLE `sys_role_scope` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id', + `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; + +-- ---------------------------- +-- Table structure for sys_scope_data +-- ---------------------------- +DROP TABLE IF EXISTS `sys_scope_data`; +CREATE TABLE `sys_scope_data` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键', + `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号', + `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称', + `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名', + `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型', + `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表'; + +-- ---------------------------- +-- Table structure for sys_tenant +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant`; +CREATE TABLE `sys_tenant` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID', + `tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称', + `domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '域名地址', + `linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人', + `contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户表'; + +-- ---------------------------- +-- Records of sys_tenant +-- ---------------------------- +BEGIN; +INSERT INTO `sys_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID', + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户编号', + `account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号', + `password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称', + `real_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真名', + `avatar` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `email` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机', + `birthday` datetime(0) NULL DEFAULT NULL COMMENT '生日', + `sex` smallint(6) NULL DEFAULT NULL COMMENT '性别', + `role_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id', + `dept_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id', + `post_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位id', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表'; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +BEGIN; +INSERT INTO `sys_user` +VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', + 'admin@dafx.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', + '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, + '2018-08-08 00:00:00', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for sys_user_oauth +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_oauth`; +CREATE TABLE `sys_user_oauth` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', + `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方系统用户ID', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID', + `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号', + `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名', + `avatar` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `blog` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用主页', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司名', + `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `gender` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别', + `source` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户第三方认证表'; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/doc/sql/blade-update-3.1.0~3.2.0.sql b/doc/sql/blade-update-3.1.0~3.2.0.sql new file mode 100644 index 0000000..74e77af --- /dev/null +++ b/doc/sql/blade-update-3.1.0~3.2.0.sql @@ -0,0 +1,115 @@ + +-- ---------------------------- +-- 创建数据权限表 +-- ---------------------------- +CREATE TABLE `sys_scope_data` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键', + `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号', + `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称', + `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名', + `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段', + `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型', + `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `status` int(2) NULL DEFAULT NULL COMMENT '状态', + `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表'; + + +-- ---------------------------- +-- 创建数据权限角色表 +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_scope`; +CREATE TABLE `sys_role_scope` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id', + `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; + +SET FOREIGN_KEY_CHECKS = 1; + +-- ---------------------------- +-- 部门表增加字段 +-- ---------------------------- +ALTER TABLE `sys_dept` + ADD COLUMN `ancestors` varchar(2000) NULL COMMENT '祖级列表' AFTER `parent_id`; + +UPDATE `sys_dept` SET `tenant_id` = '000000', `parent_id` = 0, `ancestors` = '0', `dept_name` = '刀锋科技', `full_name` = '江苏刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675201; +UPDATE `sys_dept` SET `tenant_id` = '000000', `parent_id` = 1123598813738675201, `ancestors` = '0,1123598813738675201', `dept_name` = '常州刀锋', `full_name` = '常州刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675202; +UPDATE `sys_dept` SET `tenant_id` = '000000', `parent_id` = 1123598813738675201, `ancestors` = '0,1123598813738675201', `dept_name` = '苏州刀锋', `full_name` = '苏州刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675203; + +-- ---------------------------- +-- 增加字典项 +-- ---------------------------- +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0); +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0); +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0); +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0); +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0); +INSERT INTO `sys_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0); + + +-- ---------------------------- +-- 增加权限管理模块 +-- ---------------------------- +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 98, 1, 0, 1, '', 0); + +-- ---------------------------- +-- 角色管理迁移至权限管理 +-- ---------------------------- +DELETE FROM `sys_menu` WHERE ID = 1123598815738675208; +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', 1, 1, 0, 1, NULL, 0); +UPDATE `sys_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_add', `name` = '新增', `alias` = 'add', `path` = '/authority/role/add', `source` = 'plus', `sort` = 1, `category` = 2, `action` = 1, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675241; +UPDATE `sys_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_edit', `name` = '修改', `alias` = 'edit', `path` = '/authority/role/edit', `source` = 'form', `sort` = 2, `category` = 2, `action` = 2, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675242; +UPDATE `sys_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_delete', `name` = '删除', `alias` = 'delete', `path` = '/api/daf-system/role/remove', `source` = 'delete', `sort` = 3, `category` = 2, `action` = 3, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675243; +UPDATE `sys_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_view', `name` = '查看', `alias` = 'view', `path` = '/authority/role/view', `source` = 'file-text', `sort` = 4, `category` = 2, `action` = 2, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675244; + + +-- ---------------------------- +-- 增加数据权限及接口权限独立菜单 +-- ---------------------------- +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', 'iconfont icon-shujuzhanshi2', 2, 1, 0, 1, '', 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, NULL, 0); + + +-- ---------------------------- +-- 增加数据权限及菜单权限 +-- ---------------------------- +INSERT INTO `sys_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615489028098, 1123598815738675307, 1123598816738675201); +INSERT INTO `sys_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615505805313, 1123598815738675309, 1123598816738675201); +INSERT INTO `sys_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615518388225, 1123598815738675310, 1123598816738675201); + + +-- ---------------------------- +-- 增加create_dept字段并赋默认值 +-- ---------------------------- +ALTER TABLE `sys_client` + ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`; +ALTER TABLE `sys_notice` + ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`; +ALTER TABLE `sys_param` + ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`; +ALTER TABLE `sys_tenant` + ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`; +ALTER TABLE `sys_user` + ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`; + +UPDATE `sys_client` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL; +UPDATE `sys_notice` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL; +UPDATE `sys_param` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL; +UPDATE `sys_tenant` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL; +UPDATE `sys_user` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL; + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1b50e45 --- /dev/null +++ b/pom.xml @@ -0,0 +1,238 @@ + + + 4.0.0 + + com.energy.control + smart-om-system + jar + 3.5.0 + + + 0.3.2-SNAPSHOT + + 1.8 + + 2.0.9 + 3.5.2 + 1.6.0 + 1.6.2 + 2.2.6 + + 2.7.1 + 2.0.0.RELEASE + Cairo-SR8 + 1.4.1.Final + + + + + + org.springframework.plugin + spring-plugin-core + ${spring.plugin.version} + + + org.springframework.plugin + spring-plugin-metadata + ${spring.plugin.version} + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + io.spring.platform + platform-bom + ${spring.platform.version} + pom + import + + + + + + + com.dayu.daf + dayu-core-boot + ${daf.tool.version} + + + com.dayu.daf + dayu-core-cloud + + + + + org.postgresql + postgresql + + + org.apache.commons + commons-csv + 1.9.0 + + + com.opencsv + opencsv + 5.6 + + + com.dayu.daf + dayu-core-trace-starter + ${daf.tool.version} + + + com.dayu.daf + dayu-core-develop + ${daf.tool.version} + + + com.dayu.daf + dayu-core-oss + ${daf.tool.version} + + + com.dayu.daf + dayu-core-report + ${daf.tool.version} + + + com.dayu.daf + dayu-core-social + ${daf.tool.version} + + + com.dayu.daf + dayu-core-datascope + ${daf.tool.version} + + + com.github.xiaoymin + knife4j-spring-ui + ${knife4j.version} + + + com.github.whvcse + easy-captcha + ${captcha.version} + + + com.alibaba + easyexcel + 3.1.1 + + + org.projectlombok + lombok + provided + + + com.dayu.daf + dayu-core-test + ${daf.tool.version} + test + + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + + + smart-om-system + + + src/main/resources + + + src/main/java + + **/*.xml + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + ${project.build.finalName} + + + + + repackage + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + UTF-8 + + -parameters + + + + org.projectlombok + lombok + 1.18.24 + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.projectlombok + lombok-mapstruct-binding + 0.2.0 + + + + + + + + + + aliyun-repos + https://maven.aliyun.com/nexus/content/groups/public/ + + false + + + + + + + aliyun-plugin + https://maven.aliyun.com/nexus/content/groups/public/ + + false + + + + + diff --git a/src/main/java/org/energy/Application.java b/src/main/java/org/energy/Application.java new file mode 100644 index 0000000..40ea9ff --- /dev/null +++ b/src/main/java/org/energy/Application.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy; + +import com.dayu.daf.core.launch.DafApplication; +import com.dayu.daf.core.secure.config.SecureConfiguration; +import org.energy.common.constant.LauncherConstant; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * 启动器 + * + * @author Chill + */ +@EnableScheduling +@SpringBootApplication(exclude = SecureConfiguration.class) +@MapperScan("org/energy/**/mapper") +public class Application { + + public static void main(String[] args) { + DafApplication.run(LauncherConstant.APPLICATION_NAME, Application.class, args); + } + +} + diff --git a/src/main/java/org/energy/common/cache/CacheNames.java b/src/main/java/org/energy/common/cache/CacheNames.java new file mode 100644 index 0000000..f5b7749 --- /dev/null +++ b/src/main/java/org/energy/common/cache/CacheNames.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.cache; + +/** + * 缓存名 + * + * @author Chill + */ +public interface CacheNames { + + String NOTICE_ONE = "notice:one"; + + String DICT_VALUE = "dict:value"; + String DICT_LIST = "dict:list"; + + String CAPTCHA_KEY = "daf:auth::captcha:"; + + String DEL_USER_ID = "user:del:"; + +} diff --git a/src/main/java/org/energy/common/config/DafConfiguration.java b/src/main/java/org/energy/common/config/DafConfiguration.java new file mode 100644 index 0000000..1ad4a97 --- /dev/null +++ b/src/main/java/org/energy/common/config/DafConfiguration.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.config; + + +import com.dayu.daf.core.secure.registry.SecureRegistry; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * Daf配置 + * + * @author Chill + */ +@Configuration(proxyBeanMethods = false) +public class DafConfiguration implements WebMvcConfigurer { + + @Bean + public SecureRegistry secureRegistry() { + SecureRegistry secureRegistry = new SecureRegistry(); + secureRegistry.setEnabled(true); + secureRegistry.excludePathPatterns("/daf-auth/**"); + secureRegistry.excludePathPatterns("/daf-system/menu/auth-routes"); + secureRegistry.excludePathPatterns("/daf-system/tenant/info"); + secureRegistry.excludePathPatterns("/doc.html"); + secureRegistry.excludePathPatterns("/js/**"); + secureRegistry.excludePathPatterns("/webjars/**"); + secureRegistry.excludePathPatterns("/swagger-resources/**"); + return secureRegistry; + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/js/**").addResourceLocations("classpath:/js/"); + } + +} diff --git a/src/main/java/org/energy/common/config/DafReportConfiguration.java b/src/main/java/org/energy/common/config/DafReportConfiguration.java new file mode 100644 index 0000000..eea32a1 --- /dev/null +++ b/src/main/java/org/energy/common/config/DafReportConfiguration.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.config; + +import com.dayu.daf.core.report.datasource.ReportDataSource; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.sql.DataSource; + +/** + * 报表配置类 + * + * @author Chill + */ +@Configuration(proxyBeanMethods = false) +@ConditionalOnProperty(value = "report.enabled", havingValue = "true", matchIfMissing = true) +public class DafReportConfiguration { + + /** + * 自定义报表可选数据源 + */ + @Bean + public ReportDataSource reportDataSource(DataSource dataSource) { + return new ReportDataSource(dataSource); + } + +} diff --git a/src/main/java/org/energy/common/config/SwaggerConfiguration.java b/src/main/java/org/energy/common/config/SwaggerConfiguration.java new file mode 100644 index 0000000..a4dbb12 --- /dev/null +++ b/src/main/java/org/energy/common/config/SwaggerConfiguration.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.config; + +import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver; +import com.google.common.collect.Lists; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.swagger.EnableSwagger; +import com.dayu.daf.core.swagger.SwaggerProperties; +import com.dayu.daf.core.swagger.SwaggerUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.service.*; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * Swagger配置类 + * + * @author Chill + */ +@Configuration(proxyBeanMethods = false) +@EnableSwagger +@AllArgsConstructor +public class SwaggerConfiguration { + + /** + * 引入swagger配置类 + */ + private final SwaggerProperties swaggerProperties; + + /** + * 引入Knife4j扩展类 + */ + private final OpenApiExtensionResolver openApiExtensionResolver; + + @Bean + public Docket deskDocket() { + return docket("工作台模块", Collections.singletonList(AppConstant.BASE_PACKAGES + ".modules.desk")); + } + + @Bean + public Docket authDocket() { + return docket("授权模块", Collections.singletonList(AppConstant.BASE_PACKAGES + ".modules.auth")); + } + + @Bean + public Docket sysDocket() { + return docket("系统模块", + Arrays.asList(AppConstant.BASE_PACKAGES + ".modules.system", AppConstant.BASE_PACKAGES + ".modules.resource")); + } + + private Docket docket(String groupName, List basePackages) { + return new Docket(DocumentationType.SWAGGER_2) + .groupName(groupName) + .apiInfo(apiInfo()) + .ignoredParameterTypes(DafUser.class) + .select() + .apis(SwaggerUtil.basePackages(basePackages)) + .paths(PathSelectors.any()) + .build().securityContexts(securityContexts()).securitySchemes(securitySchemas()) + .extensions(openApiExtensionResolver.buildExtensions(groupName)); + } + + private List securityContexts() { + return Collections.singletonList(SecurityContext.builder() + .securityReferences(defaultAuth()) + .forPaths(PathSelectors.regex("^.*$")) + .build()); + } + + List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverywhere"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + return Lists.newArrayList(new SecurityReference(SwaggerUtil.clientInfo().getName(), authorizationScopes), + new SecurityReference(SwaggerUtil.dafAuth().getName(), authorizationScopes), + new SecurityReference(SwaggerUtil.dafTenant().getName(), authorizationScopes)); + } + + private List securitySchemas() { + return Lists.newArrayList(SwaggerUtil.clientInfo(), SwaggerUtil.dafAuth(), SwaggerUtil.dafTenant()); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title(swaggerProperties.getTitle()) + .description(swaggerProperties.getDescription()) + .license(swaggerProperties.getLicense()) + .licenseUrl(swaggerProperties.getLicenseUrl()) + .termsOfServiceUrl(swaggerProperties.getTermsOfServiceUrl()) + .contact(new Contact(swaggerProperties.getContact().getName(), swaggerProperties.getContact().getUrl(), swaggerProperties.getContact().getEmail())) + .version(swaggerProperties.getVersion()) + .build(); + } + +} diff --git a/src/main/java/org/energy/common/constant/CommonConstant.java b/src/main/java/org/energy/common/constant/CommonConstant.java new file mode 100644 index 0000000..9881b24 --- /dev/null +++ b/src/main/java/org/energy/common/constant/CommonConstant.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.constant; + +/** + * 通用常量 + * + * @author Chill + */ +public interface CommonConstant { + + /** + * sword 系统名 + */ + String SWORD_NAME = "sword"; + + /** + * saber 系统名 + */ + String SABER_NAME = "saber"; + + /** + * 顶级父节点id + */ + Long TOP_PARENT_ID = 0L; + + /** + * 顶级父节点名称 + */ + String TOP_PARENT_NAME = "顶级"; + + /** + * 默认密码 + */ + String DEFAULT_PASSWORD = "123456"; + +} diff --git a/src/main/java/org/energy/common/constant/LauncherConstant.java b/src/main/java/org/energy/common/constant/LauncherConstant.java new file mode 100644 index 0000000..d23ec20 --- /dev/null +++ b/src/main/java/org/energy/common/constant/LauncherConstant.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.constant; + +import com.dayu.daf.core.launch.constant.AppConstant; + +/** + * 通用常量 + * + * @author Chill + */ +public interface LauncherConstant { + + /** + * app name + */ + String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api"; + + /** + * sentinel dev 地址 + */ + String SENTINEL_DEV_ADDR = "127.0.0.1:8858"; + + /** + * sentinel prod 地址 + */ + String SENTINEL_PROD_ADDR = "192.168.186.129:8858"; + + /** + * sentinel test 地址 + */ + String SENTINEL_TEST_ADDR = "192.168.186.129:8858"; + + /** + * 动态获取sentinel地址 + * + * @param profile 环境变量 + * @return addr + */ + static String sentinelAddr(String profile) { + switch (profile) { + case (AppConstant.PROD_CODE): + return SENTINEL_PROD_ADDR; + case (AppConstant.TEST_CODE): + return SENTINEL_TEST_ADDR; + default: + return SENTINEL_DEV_ADDR; + } + } +} diff --git a/src/main/java/org/energy/common/launch/LauncherServiceImpl.java b/src/main/java/org/energy/common/launch/LauncherServiceImpl.java new file mode 100644 index 0000000..9b6c1bb --- /dev/null +++ b/src/main/java/org/energy/common/launch/LauncherServiceImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.launch; + +import org.energy.common.constant.LauncherConstant; +import com.dayu.daf.core.launch.service.LauncherService; +import org.springframework.boot.builder.SpringApplicationBuilder; + +import java.util.Properties; + +/** + * 启动参数拓展 + * + * @author smallchil + */ +public class LauncherServiceImpl implements LauncherService { + + @Override + public void launcher(SpringApplicationBuilder builder, String appName, String profile) { + Properties props = System.getProperties(); + props.setProperty("spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); + } + +} diff --git a/src/main/java/org/energy/common/tool/CommonUtil.java b/src/main/java/org/energy/common/tool/CommonUtil.java new file mode 100644 index 0000000..efd7be1 --- /dev/null +++ b/src/main/java/org/energy/common/tool/CommonUtil.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.common.tool; + +/** + * 通用工具类 + * + * @author Chill + */ +public class CommonUtil { + +} diff --git a/src/main/java/org/energy/core/config/EnergySecureConfiguration.java b/src/main/java/org/energy/core/config/EnergySecureConfiguration.java new file mode 100644 index 0000000..0bf99b4 --- /dev/null +++ b/src/main/java/org/energy/core/config/EnergySecureConfiguration.java @@ -0,0 +1,66 @@ +package org.energy.core.config; + + +import com.dayu.daf.core.secure.aspect.AuthAspect; +import com.dayu.daf.core.secure.interceptor.ClientInterceptor; +import com.dayu.daf.core.secure.props.DafSecureProperties; +import com.dayu.daf.core.secure.props.DafTokenProperties; +import com.dayu.daf.core.secure.provider.ClientDetailsServiceImpl; +import com.dayu.daf.core.secure.provider.IClientDetailsService; +import com.dayu.daf.core.secure.registry.SecureRegistry; +import lombok.AllArgsConstructor; +import org.energy.core.interceptor.EnergySecureInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.annotation.Order; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 安全配置类 + * + * @author Dayu + */ +@Order +@Configuration +@AllArgsConstructor +@EnableConfigurationProperties({DafSecureProperties.class, DafTokenProperties.class}) +public class EnergySecureConfiguration implements WebMvcConfigurer { + + private final SecureRegistry secureRegistry; + + private final DafSecureProperties secureProperties; + + private final JdbcTemplate jdbcTemplate; + + @Autowired + private EnergySecureInterceptor energySecureInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + secureProperties.getClient().forEach(cs -> registry.addInterceptor(new ClientInterceptor(cs.getClientId())).addPathPatterns(cs.getPathPatterns())); + + if (secureRegistry.isEnabled()) { + registry.addInterceptor(energySecureInterceptor) + .excludePathPatterns(secureRegistry.getExcludePatterns()) + .excludePathPatterns(secureRegistry.getDefaultExcludePatterns()) + .excludePathPatterns(secureProperties.getSkipUrl()); + } + } + + @Bean + public AuthAspect authAspect() { + return new AuthAspect(); + } + + @Bean + @ConditionalOnMissingBean(IClientDetailsService.class) + public IClientDetailsService clientDetailsService() { + return new ClientDetailsServiceImpl(jdbcTemplate); + } + +} diff --git a/src/main/java/org/energy/core/interceptor/EnergySecureInterceptor.java b/src/main/java/org/energy/core/interceptor/EnergySecureInterceptor.java new file mode 100644 index 0000000..65be067 --- /dev/null +++ b/src/main/java/org/energy/core/interceptor/EnergySecureInterceptor.java @@ -0,0 +1,53 @@ +package org.energy.core.interceptor; + +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.api.ResultCode; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.jackson.JsonUtil; +import com.dayu.daf.core.tool.utils.RedisUtil; +import com.dayu.daf.core.tool.utils.WebUtil; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.energy.common.cache.CacheNames; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.AsyncHandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Objects; + +@Slf4j +@AllArgsConstructor +@Component +public class EnergySecureInterceptor implements AsyncHandlerInterceptor { + + private RedisUtil redisUtil; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + DafUser dafUser = SecureUtil.getUser(); + Object userId = null; + if (dafUser != null) { + userId = redisUtil.get(CacheNames.DEL_USER_ID + dafUser.getUserId()); + } + if (null != dafUser && userId == null) { + return true; + } else { + log.warn("签名认证失败,请求接口:{},请求IP:{},请求参数:{}", request.getRequestURI(), WebUtil.getIP(request), JsonUtil.toJson(request.getParameterMap())); + R result = R.fail(ResultCode.UN_AUTHORIZED); + response.setCharacterEncoding(DafConstant.UTF_8); + response.setHeader(DafConstant.CONTENT_TYPE_NAME, MediaType.APPLICATION_JSON_VALUE); + response.setStatus(HttpServletResponse.SC_OK); + try { + response.getWriter().write(Objects.requireNonNull(JsonUtil.toJson(result))); + } catch (IOException ex) { + log.error(ex.getMessage()); + } + return false; + } + } +} diff --git a/src/main/java/org/energy/core/log/config/DafLogToolAutoConfiguration.java b/src/main/java/org/energy/core/log/config/DafLogToolAutoConfiguration.java new file mode 100644 index 0000000..7a6735c --- /dev/null +++ b/src/main/java/org/energy/core/log/config/DafLogToolAutoConfiguration.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.energy.core.log.config; + +import com.dayu.daf.core.launch.props.DafProperties; +import com.dayu.daf.core.launch.server.ServerInfo; +import com.dayu.daf.core.log.aspect.ApiLogAspect; +import com.dayu.daf.core.log.logger.DafLogger; +import lombok.AllArgsConstructor; +import org.energy.core.log.event.ApiLogListener; +import org.energy.core.log.event.ErrorLogListener; +import org.energy.core.log.event.UsualLogListener; +import org.energy.modules.system.service.ILogService; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * 日志工具自动配置 + * + * @author Chill + */ +@Configuration(proxyBeanMethods = false) +@AllArgsConstructor +@ConditionalOnWebApplication +//@AutoConfigureBefore(LogUsualMapper.class) +public class DafLogToolAutoConfiguration { + + private final ILogService logService; + private final ServerInfo serverInfo; + private final DafProperties dafProperties; + + @Bean(value = "energyApiLogAspect") + public ApiLogAspect apiLogAspect() { + return new ApiLogAspect(); + } + + @Bean(value = "energyDafLogger") + public DafLogger dafLogger() { + return new DafLogger(); + } + + @Bean(value = "energyApiLogListener") + public ApiLogListener apiLogListener() { + return new ApiLogListener(logService, serverInfo, dafProperties); + } + + @Bean(value = "energyErrorEventListener") + public ErrorLogListener errorEventListener() { + return new ErrorLogListener(logService, serverInfo, dafProperties); + } + + @Bean(value = "energyDafEventListener") + public UsualLogListener dafEventListener() { + return new UsualLogListener(logService, serverInfo, dafProperties); + } + +} diff --git a/src/main/java/org/energy/core/log/event/ApiLogListener.java b/src/main/java/org/energy/core/log/event/ApiLogListener.java new file mode 100644 index 0000000..8021e89 --- /dev/null +++ b/src/main/java/org/energy/core/log/event/ApiLogListener.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.energy.core.log.event; + +import com.dayu.daf.core.launch.props.DafProperties; +import com.dayu.daf.core.launch.server.ServerInfo; +import com.dayu.daf.core.log.constant.EventConstant; +import com.dayu.daf.core.log.event.ApiLogEvent; +import com.dayu.daf.core.log.model.LogApi; +import com.dayu.daf.core.log.utils.LogAbstractUtil; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.energy.modules.system.service.ILogService; +import org.springframework.context.event.EventListener; +import org.springframework.core.annotation.Order; +import org.springframework.scheduling.annotation.Async; + +import java.util.Map; + + +/** + * 异步监听日志事件 + * + * @author Chill + */ +@Slf4j +@AllArgsConstructor +public class ApiLogListener { + + private final ILogService logService; + private final ServerInfo serverInfo; + private final DafProperties dafProperties; + + + @Async + @Order + @EventListener(ApiLogEvent.class) + public void saveApiLog(ApiLogEvent event) { + Map source = (Map) event.getSource(); + LogApi logApi = (LogApi) source.get(EventConstant.EVENT_LOG); + LogAbstractUtil.addOtherInfoToLog(logApi, dafProperties, serverInfo); + logService.saveApiLog(logApi); + } + +} diff --git a/src/main/java/org/energy/core/log/event/ErrorLogListener.java b/src/main/java/org/energy/core/log/event/ErrorLogListener.java new file mode 100644 index 0000000..895d045 --- /dev/null +++ b/src/main/java/org/energy/core/log/event/ErrorLogListener.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.core.log.event; + + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.energy.modules.system.service.ILogService; +import com.dayu.daf.core.launch.props.DafProperties; +import com.dayu.daf.core.launch.server.ServerInfo; +import com.dayu.daf.core.log.constant.EventConstant; +import com.dayu.daf.core.log.event.ErrorLogEvent; +import com.dayu.daf.core.log.model.LogError; +import com.dayu.daf.core.log.utils.LogAbstractUtil; +import org.springframework.context.event.EventListener; +import org.springframework.core.annotation.Order; +import org.springframework.scheduling.annotation.Async; + +import java.util.Map; + +/** + * 异步监听错误日志事件 + * + * @author Chill + */ +@Slf4j +@AllArgsConstructor +public class ErrorLogListener { + + private final ILogService logService; + private final ServerInfo serverInfo; + private final DafProperties dafProperties; + + @Async + @Order + @EventListener(ErrorLogEvent.class) + public void saveErrorLog(ErrorLogEvent event) { + Map source = (Map) event.getSource(); + LogError logError = (LogError) source.get(EventConstant.EVENT_LOG); + LogAbstractUtil.addOtherInfoToLog(logError, dafProperties, serverInfo); + logService.saveErrorLog(logError); + } +} diff --git a/src/main/java/org/energy/core/log/event/UsualLogListener.java b/src/main/java/org/energy/core/log/event/UsualLogListener.java new file mode 100644 index 0000000..bbe459b --- /dev/null +++ b/src/main/java/org/energy/core/log/event/UsualLogListener.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.core.log.event; + + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.energy.modules.system.service.ILogService; +import com.dayu.daf.core.launch.props.DafProperties; +import com.dayu.daf.core.launch.server.ServerInfo; +import com.dayu.daf.core.log.constant.EventConstant; +import com.dayu.daf.core.log.event.UsualLogEvent; +import com.dayu.daf.core.log.model.LogUsual; +import com.dayu.daf.core.log.utils.LogAbstractUtil; +import org.springframework.context.event.EventListener; +import org.springframework.core.annotation.Order; +import org.springframework.scheduling.annotation.Async; + +import java.util.Map; + +/** + * 异步监听日志事件 + * + * @author Chill + */ +@Slf4j +@AllArgsConstructor +public class UsualLogListener { + + private final ILogService logService; + private final ServerInfo serverInfo; + private final DafProperties dafProperties; + + @Async + @Order + @EventListener(UsualLogEvent.class) + public void saveUsualLog(UsualLogEvent event) { + Map source = (Map) event.getSource(); + LogUsual logUsual = (LogUsual) source.get(EventConstant.EVENT_LOG); + LogAbstractUtil.addOtherInfoToLog(logUsual, dafProperties, serverInfo); + logService.saveUsualLog(logUsual); + } + +} diff --git a/src/main/java/org/energy/core/secure/AuthInfo.java b/src/main/java/org/energy/core/secure/AuthInfo.java new file mode 100644 index 0000000..102d624 --- /dev/null +++ b/src/main/java/org/energy/core/secure/AuthInfo.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.core.secure; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.energy.modules.system.vo.MenuVO; + +import java.util.List; + +/** + * AuthInfo + * + * @author Chill + */ +@Data +@ApiModel(description = "认证信息") +public class AuthInfo { + @ApiModelProperty(value = "令牌") + private String accessToken; + @ApiModelProperty(value = "令牌类型") + private String tokenType; + @ApiModelProperty(value = "刷新令牌") + private String refreshToken; + @ApiModelProperty(value = "用户ID") + @JsonSerialize(using = ToStringSerializer.class) + private Long userId; + @ApiModelProperty(value = "租户ID") + private String tenantId; + @ApiModelProperty(value = "第三方系统ID") + private String oauthId; + @ApiModelProperty(value = "头像") + private String avatar = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"; + @ApiModelProperty(value = "角色名") + private String authority; + @ApiModelProperty(value = "用户名") + private String userName; + @ApiModelProperty(value = "账号名") + private String account; + @ApiModelProperty(value = "过期时间") + private long expiresIn; + @ApiModelProperty(value = "许可证") + private String license = "powered by daf"; + private List roleMenus; +} diff --git a/src/main/java/org/energy/core/secure/utils/SecureUtil.java b/src/main/java/org/energy/core/secure/utils/SecureUtil.java new file mode 100644 index 0000000..7f43652 --- /dev/null +++ b/src/main/java/org/energy/core/secure/utils/SecureUtil.java @@ -0,0 +1,488 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.core.secure.utils; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.JwtBuilder; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import lombok.SneakyThrows; +import com.dayu.daf.core.launch.constant.TokenConstant; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.secure.TokenInfo; +import com.dayu.daf.core.secure.constant.SecureConstant; +import com.dayu.daf.core.secure.exception.SecureException; +import com.dayu.daf.core.secure.props.DafTokenProperties; +import com.dayu.daf.core.secure.provider.IClientDetails; +import com.dayu.daf.core.secure.provider.IClientDetailsService; +import com.dayu.daf.core.tool.constant.RoleConstant; +import com.dayu.daf.core.tool.utils.*; + +import javax.crypto.spec.SecretKeySpec; +import javax.servlet.http.HttpServletRequest; +import java.security.Key; +import java.util.*; + +/** + * Secure工具类 + * + * @author Chill + */ +public class SecureUtil { + private static final String sys_USER_REQUEST_ATTR = "_sys_USER_REQUEST_ATTR_"; + + private final static String HEADER = TokenConstant.HEADER; + private final static String BEARER = TokenConstant.BEARER; + private final static String ACCOUNT = TokenConstant.ACCOUNT; + private final static String USER_ID = TokenConstant.USER_ID; + private final static String ROLE_ID = TokenConstant.ROLE_ID; + private final static String DEPT_ID = TokenConstant.DEPT_ID; + private final static String USER_NAME = TokenConstant.USER_NAME; + private final static String ROLE_NAME = TokenConstant.ROLE_NAME; + private final static String TENANT_ID = TokenConstant.TENANT_ID; + private final static String CLIENT_ID = TokenConstant.CLIENT_ID; + private final static Integer AUTH_LENGTH = TokenConstant.AUTH_LENGTH; + private static IClientDetailsService CLIENT_DETAILS_SERVICE; + private static DafTokenProperties TOKEN_PROPERTIES; + private static String BASE64_SECURITY; + + + /** + * 获取客户端服务类 + * + * @return clientDetailsService + */ + private static IClientDetailsService getClientDetailsService() { + if (CLIENT_DETAILS_SERVICE == null) { + CLIENT_DETAILS_SERVICE = SpringUtil.getBean(IClientDetailsService.class); + } + return CLIENT_DETAILS_SERVICE; + } + + /** + * 获取配置类 + * + * @return jwtProperties + */ + private static DafTokenProperties getTokenProperties() { + if (TOKEN_PROPERTIES == null) { + TOKEN_PROPERTIES = SpringUtil.getBean(DafTokenProperties.class); + } + return TOKEN_PROPERTIES; + } + + /** + * 获取Token签名 + * + * @return String + */ + private static String getBase64Security() { + if (BASE64_SECURITY == null) { + BASE64_SECURITY = Base64.getEncoder().encodeToString(getTokenProperties().getSignKey().getBytes(Charsets.UTF_8)); + } + return BASE64_SECURITY; + } + + /** + * 获取用户信息 + * + * @return DafUser + */ + public static DafUser getUser() { + HttpServletRequest request = WebUtil.getRequest(); + if (request == null) { + return null; + } + // 优先从 request 中获取 + Object DafUser = request.getAttribute(sys_USER_REQUEST_ATTR); + if (DafUser == null) { + DafUser = getUser(request); + if (DafUser != null) { + // 设置到 request 中 + request.setAttribute(sys_USER_REQUEST_ATTR, DafUser); + } + } + return (DafUser) DafUser; + } + + /** + * 获取用户信息 + * + * @param request request + * @return DafUser + */ + public static DafUser getUser(HttpServletRequest request) { + Claims claims = getClaims(request); + if (claims == null) { + return null; + } + String clientId = Func.toStr(claims.get(SecureUtil.CLIENT_ID)); + Long userId = Func.toLong(claims.get(SecureUtil.USER_ID)); + String tenantId = Func.toStr(claims.get(SecureUtil.TENANT_ID)); + String roleId = Func.toStr(claims.get(SecureUtil.ROLE_ID)); + String deptId = Func.toStr(claims.get(SecureUtil.DEPT_ID)); + String account = Func.toStr(claims.get(SecureUtil.ACCOUNT)); + String roleName = Func.toStr(claims.get(SecureUtil.ROLE_NAME)); + String userName = Func.toStr(claims.get(SecureUtil.USER_NAME)); + DafUser DafUser = new DafUser(); + DafUser.setClientId(clientId); + DafUser.setUserId(userId); + DafUser.setTenantId(tenantId); + DafUser.setAccount(account); + DafUser.setRoleId(roleId); + DafUser.setDeptId(deptId); + DafUser.setRoleName(roleName); + DafUser.setUserName(userName); + return DafUser; + } + + /** + * 是否为超管 + * + * @return boolean + */ + public static boolean isAdministrator() { + return StringUtil.containsAny(getUserRole(), RoleConstant.ADMIN); + } + + /** + * 获取用户id + * + * @return userId + */ + public static Long getUserId() { + DafUser user = getUser(); + return (null == user) ? -1 : user.getUserId(); + } + + /** + * 获取用户id + * + * @param request request + * @return userId + */ + public static Long getUserId(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? -1 : user.getUserId(); + } + + /** + * 获取用户账号 + * + * @return userAccount + */ + public static String getUserAccount() { + DafUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getAccount(); + } + + /** + * 获取用户账号 + * + * @param request request + * @return userAccount + */ + public static String getUserAccount(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getAccount(); + } + + /** + * 获取用户名 + * + * @return userName + */ + public static String getUserName() { + DafUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getUserName(); + } + + /** + * 获取用户名 + * + * @param request request + * @return userName + */ + public static String getUserName(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getUserName(); + } + + /** + * 获取用户角色 + * + * @return userName + */ + public static String getUserRole() { + DafUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getRoleName(); + } + + /** + * 获取用角色 + * + * @param request request + * @return userName + */ + public static String getUserRole(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getRoleName(); + } + + /** + * 获取租户ID + * + * @return tenantId + */ + public static String getTenantId() { + DafUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getTenantId(); + } + + /** + * 获取租户ID + * + * @param request request + * @return tenantId + */ + public static String getTenantId(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getTenantId(); + } + + /** + * 获取客户端id + * + * @return tenantId + */ + public static String getClientId() { + DafUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getClientId(); + } + + /** + * 获取客户端id + * + * @param request request + * @return tenantId + */ + public static String getClientId(HttpServletRequest request) { + DafUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getClientId(); + } + + /** + * 获取Claims + * + * @param request request + * @return Claims + */ + public static Claims getClaims(HttpServletRequest request) { + String auth = request.getHeader(SecureUtil.HEADER); + if (StringUtil.isNotBlank(auth) && auth.length() > AUTH_LENGTH) { + String headStr = auth.substring(0, 6).toLowerCase(); + if (headStr.compareTo(SecureUtil.BEARER) == 0) { + auth = auth.substring(7); + return SecureUtil.parseJWT(auth); + } + } else { + String parameter = request.getParameter(SecureUtil.HEADER); + if (StringUtil.isNotBlank(parameter)) { + return SecureUtil.parseJWT(parameter); + } + } + return null; + } + + /** + * 获取请求头 + * + * @return header + */ + public static String getHeader() { + return getHeader(Objects.requireNonNull(WebUtil.getRequest())); + } + + /** + * 获取请求头 + * + * @param request request + * @return header + */ + public static String getHeader(HttpServletRequest request) { + return request.getHeader(HEADER); + } + + /** + * 解析jsonWebToken + * + * @param jsonWebToken jsonWebToken + * @return Claims + */ + public static Claims parseJWT(String jsonWebToken) { + try { + return Jwts.parserBuilder() + .setSigningKey(Base64.getDecoder().decode(getBase64Security())).build() + .parseClaimsJws(jsonWebToken).getBody(); + } catch (Exception ex) { + return null; + } + } + + /** + * 创建令牌 + * + * @param user user + * @param audience audience + * @param issuer issuer + * @param tokenType tokenType + * @return jwt + */ + public static TokenInfo createJWT(Map user, String audience, String issuer, String tokenType) { + + String[] tokens = extractAndDecodeHeader(); + assert tokens.length == 2; + String clientId = tokens[0]; + String clientSecret = tokens[1]; + + // 获取客户端信息 + IClientDetails clientDetails = clientDetails(clientId); + + // 校验客户端信息 + if (!validateClient(clientDetails, clientId, clientSecret)) { + throw new SecureException("客户端认证失败!"); + } + + SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; + + long nowMillis = System.currentTimeMillis(); + Date now = new Date(nowMillis); + + //生成签名密钥 + byte[] apiKeySecretBytes = Base64.getDecoder().decode(getBase64Security()); + Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName()); + + //添加构成JWT的类 + JwtBuilder builder = Jwts.builder().setHeaderParam("typ", "JWT") + .setIssuer(issuer) + .setAudience(audience) + .signWith(signingKey); + + //设置JWT参数 + user.forEach(builder::claim); + + //设置应用id + builder.claim(CLIENT_ID, clientId); + + //添加Token过期时间 + long expireMillis; + if (tokenType.equals(TokenConstant.ACCESS_TOKEN)) { + expireMillis = clientDetails.getAccessTokenValidity() * 1000; + } else if (tokenType.equals(TokenConstant.REFRESH_TOKEN)) { + expireMillis = clientDetails.getRefreshTokenValidity() * 1000; + } else { + expireMillis = getExpire(); + } + long expMillis = nowMillis + expireMillis; + Date exp = new Date(expMillis); + builder.setExpiration(exp).setNotBefore(now); + + // 组装Token信息 + TokenInfo tokenInfo = new TokenInfo(); + tokenInfo.setToken(builder.compact()); + tokenInfo.setExpire((int) expireMillis / 1000); + + return tokenInfo; + } + + /** + * 获取过期时间(次日凌晨3点) + * + * @return expire + */ + public static long getExpire() { + Calendar cal = Calendar.getInstance(); + cal.add(Calendar.DAY_OF_YEAR, 1); + cal.set(Calendar.HOUR_OF_DAY, 3); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MINUTE, 0); + cal.set(Calendar.MILLISECOND, 0); + return cal.getTimeInMillis() - System.currentTimeMillis(); + } + + /** + * 客户端信息解码 + */ + @SneakyThrows + public static String[] extractAndDecodeHeader() { + // 获取请求头客户端信息 + String header = Objects.requireNonNull(WebUtil.getRequest()).getHeader(SecureConstant.BASIC_HEADER_KEY); + header = Func.toStr(header).replace(SecureConstant.BASIC_HEADER_PREFIX_EXT, SecureConstant.BASIC_HEADER_PREFIX); + if (!header.startsWith(SecureConstant.BASIC_HEADER_PREFIX)) { + throw new SecureException("No client information in request header"); + } + byte[] base64Token = header.substring(6).getBytes(Charsets.UTF_8_NAME); + + byte[] decoded; + try { + decoded = Base64.getDecoder().decode(base64Token); + } catch (IllegalArgumentException var7) { + throw new RuntimeException("Failed to decode basic authentication token"); + } + + String token = new String(decoded, Charsets.UTF_8_NAME); + int index = token.indexOf(StringPool.COLON); + if (index == -1) { + throw new RuntimeException("Invalid basic authentication token"); + } else { + return new String[]{token.substring(0, index), token.substring(index + 1)}; + } + } + + /** + * 获取请求头中的客户端id + */ + public static String getClientIdFromHeader() { + String[] tokens = extractAndDecodeHeader(); + assert tokens.length == 2; + return tokens[0]; + } + + /** + * 获取客户端信息 + * + * @param clientId 客户端id + * @return clientDetails + */ + private static IClientDetails clientDetails(String clientId) { + return getClientDetailsService().loadClientByClientId(clientId); + } + + /** + * 校验Client + * + * @param clientId 客户端id + * @param clientSecret 客户端密钥 + * @return boolean + */ + private static boolean validateClient(IClientDetails clientDetails, String clientId, String clientSecret) { + if (clientDetails != null) { + return StringUtil.equals(clientId, clientDetails.getClientId()) && StringUtil.equals(clientSecret, clientDetails.getClientSecret()); + } + return false; + } + +} diff --git a/src/main/java/org/energy/modules/auth/controller/AuthController.java b/src/main/java/org/energy/modules/auth/controller/AuthController.java new file mode 100644 index 0000000..48bfb11 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/controller/AuthController.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.controller; + +import com.wf.captcha.SpecCaptcha; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.UserInfo; +import org.energy.common.cache.CacheNames; +import org.energy.core.secure.AuthInfo; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.support.Kv; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.RedisUtil; +import com.dayu.daf.core.tool.utils.WebUtil; +import org.energy.modules.auth.granter.ITokenGranter; +import org.energy.modules.auth.granter.TokenGranterBuilder; +import org.energy.modules.auth.granter.TokenParameter; +import org.energy.modules.auth.utils.TokenUtil; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +/** + * 认证模块 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("daf-auth") +@Api(value = "用户授权认证", tags = "授权接口") +public class AuthController { + + private RedisUtil redisUtil; + + + @PostMapping("token") + @ApiOperation(value = "获取认证token", notes = "传入租户ID:tenantId,账号:account,密码:password") + public R token(@ApiParam(value = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType, + @ApiParam(value = "刷新令牌") @RequestParam(required = false) String refreshToken, + @ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId, + @ApiParam(value = "账号") @RequestParam(required = false) String account, + @ApiParam(value = "密码") @RequestParam(required = false) String password) { + + String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE); + + TokenParameter tokenParameter = new TokenParameter(); + tokenParameter.getArgs().set("tenantId", tenantId) + .set("account", account) + .set("password", password) + .set("grantType", grantType) + .set("refreshToken", refreshToken) + .set("userType", userType); + + ITokenGranter granter = TokenGranterBuilder.getGranter(grantType); + UserInfo userInfo = granter.grant(tokenParameter); + + if (userInfo == null || userInfo.getUser() == null) { + return R.fail(TokenUtil.USER_NOT_FOUND); + } + + return R.data(TokenUtil.createAuthInfo(userInfo)); + } + + @GetMapping("/captcha") + @ApiOperation(value = "获取验证码") + public R captcha() { + SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5); + String verCode = specCaptcha.text().toLowerCase(); + String key = UUID.randomUUID().toString(); + // 存入redis并设置过期时间为30分钟 + redisUtil.set(CacheNames.CAPTCHA_KEY + key, verCode, 30L, TimeUnit.MINUTES); + // 将key和base64返回给前端 + return R.data(Kv.init().set("key", key).set("image", specCaptcha.toBase64())); + } + + @PostMapping("scada-token") + @ApiOperation(value = "获取认证scada-token", notes = "传入") + public R token2(@ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId, + @ApiParam(value = "token") @RequestParam(required = false) String token) { + String grantType = "scada"; + TokenParameter tokenParameter = new TokenParameter(); + tokenParameter.getArgs().set("tenantId", tenantId).set("grantType", grantType).set("token", token); + ITokenGranter granter = TokenGranterBuilder.getGranter(grantType); + UserInfo userInfo = granter.grant(tokenParameter); + + if (userInfo == null || userInfo.getUser() == null) { + return R.fail(TokenUtil.USER_NOT_FOUND); + } + // success + return R.data(TokenUtil.createAuthInfo(userInfo)); + } + +} diff --git a/src/main/java/org/energy/modules/auth/controller/SocialController.java b/src/main/java/org/energy/modules/auth/controller/SocialController.java new file mode 100644 index 0000000..15f9c31 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/controller/SocialController.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhyd.oauth.model.AuthCallback; +import me.zhyd.oauth.model.AuthToken; +import me.zhyd.oauth.request.AuthRequest; +import me.zhyd.oauth.utils.AuthStateUtils; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.social.props.SocialProperties; +import com.dayu.daf.core.social.utils.SocialUtil; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 第三方登陆端点 + * + * @author Chill + */ +@Slf4j +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_AUTH_NAME) +@ConditionalOnProperty(value = "social.enabled", havingValue = "true") +@Api(value = "第三方登陆", tags = "第三方登陆端点") +public class SocialController { + + private final SocialProperties socialProperties; + + /** + * 授权完毕跳转 + */ + @ApiOperation(value = "授权完毕跳转") + @RequestMapping("/oauth/render/{source}") + public void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException { + AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); + String authorizeUrl = authRequest.authorize(AuthStateUtils.createState()); + response.sendRedirect(authorizeUrl); + } + + /** + * 获取认证信息 + */ + @ApiOperation(value = "获取认证信息") + @RequestMapping("/oauth/callback/{source}") + public Object login(@PathVariable("source") String source, AuthCallback callback) { + AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); + return authRequest.login(callback); + } + + /** + * 撤销授权 + */ + @ApiOperation(value = "撤销授权") + @RequestMapping("/oauth/revoke/{source}/{token}") + public Object revokeAuth(@PathVariable("source") String source, @PathVariable("token") String token) { + AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); + return authRequest.revoke(AuthToken.builder().accessToken(token).build()); + } + + /** + * 续期accessToken + */ + @ApiOperation(value = "续期令牌") + @RequestMapping("/oauth/refresh/{source}") + public Object refreshAuth(@PathVariable("source") String source, String token) { + AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); + return authRequest.refresh(AuthToken.builder().refreshToken(token).build()); + } + + +} diff --git a/src/main/java/org/energy/modules/auth/enums/DafUserEnum.java b/src/main/java/org/energy/modules/auth/enums/DafUserEnum.java new file mode 100644 index 0000000..e88355f --- /dev/null +++ b/src/main/java/org/energy/modules/auth/enums/DafUserEnum.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 用户类型枚举 + * + * @author Chill + */ +@Getter +@AllArgsConstructor +public enum DafUserEnum { + + /** + * web + */ + WEB("web", 1), + + /** + * app + */ + APP("app", 2), + ; + + final String name; + final int category; + +} diff --git a/src/main/java/org/energy/modules/auth/granter/CaptchaTokenGranter.java b/src/main/java/org/energy/modules/auth/granter/CaptchaTokenGranter.java new file mode 100644 index 0000000..408afde --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/CaptchaTokenGranter.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.tool.utils.*; +import lombok.AllArgsConstructor; +import org.energy.common.cache.CacheNames; +import org.energy.modules.auth.enums.DafUserEnum; +import org.energy.modules.auth.utils.TokenUtil; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.service.IUserService; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; + +/** + * 验证码TokenGranter + * + * @author Chill + */ +@Component +@AllArgsConstructor +public class CaptchaTokenGranter implements ITokenGranter { + + public static final String GRANT_TYPE = "captcha"; + + private IUserService userService; + private RedisUtil redisUtil; + + @Override + public UserInfo grant(TokenParameter tokenParameter) { + HttpServletRequest request = WebUtil.getRequest(); + + String key = request.getHeader(TokenUtil.CAPTCHA_HEADER_KEY); + String code = request.getHeader(TokenUtil.CAPTCHA_HEADER_CODE); + // 获取验证码 + String redisCode = String.valueOf(redisUtil.get(CacheNames.CAPTCHA_KEY + key)); + // 判断验证码 + if (code == null || !StringUtil.equalsIgnoreCase(redisCode, code)) { + throw new ServiceException(TokenUtil.CAPTCHA_NOT_CORRECT); + } + + String tenantId = tokenParameter.getArgs().getStr("tenantId"); + String account = tokenParameter.getArgs().getStr("account"); + String password = tokenParameter.getArgs().getStr("password"); + UserInfo userInfo = null; + if (Func.isNoneBlank(account, password)) { + // 获取用户类型 + String userType = tokenParameter.getArgs().getStr("userType"); + // 根据不同用户类型调用对应的接口返回数据,用户可自行拓展 + if (userType.equals(DafUserEnum.WEB.getName())) { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } else if (userType.equals(DafUserEnum.APP.getName())) { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } else { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } + } + return userInfo; + } + +} diff --git a/src/main/java/org/energy/modules/auth/granter/ITokenGranter.java b/src/main/java/org/energy/modules/auth/granter/ITokenGranter.java new file mode 100644 index 0000000..9b88c89 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/ITokenGranter.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + + +import org.energy.modules.system.entity.UserInfo; + +/** + * 授权认证统一接口. + * + * @author Chill + */ +public interface ITokenGranter { + + /** + * 获取用户信息 + * + * @param tokenParameter 授权参数 + * @return UserInfo + */ + UserInfo grant(TokenParameter tokenParameter); + +} diff --git a/src/main/java/org/energy/modules/auth/granter/PasswordTokenGranter.java b/src/main/java/org/energy/modules/auth/granter/PasswordTokenGranter.java new file mode 100644 index 0000000..5fa03d0 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/PasswordTokenGranter.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import com.dayu.daf.core.tool.utils.DigestUtil; +import com.dayu.daf.core.tool.utils.Func; +import lombok.AllArgsConstructor; +import org.energy.modules.auth.enums.DafUserEnum; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.service.IUserService; +import org.springframework.stereotype.Component; + +/** + * PasswordTokenGranter + * + * @author Chill + */ +@Component +@AllArgsConstructor +public class PasswordTokenGranter implements ITokenGranter { + + public static final String GRANT_TYPE = "password"; + + private IUserService userService; + + @Override + public UserInfo grant(TokenParameter tokenParameter) { + String tenantId = tokenParameter.getArgs().getStr("tenantId"); + String account = tokenParameter.getArgs().getStr("account"); + String password = tokenParameter.getArgs().getStr("password"); + UserInfo userInfo = null; + if (Func.isNoneBlank(account, password)) { + // 获取用户类型 + String userType = tokenParameter.getArgs().getStr("userType"); + // 根据不同用户类型调用对应的接口返回数据,用户可自行拓展 + if (userType.equals(DafUserEnum.WEB.getName())) { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } else if (userType.equals(DafUserEnum.APP.getName())) { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } else { + userInfo = userService.userInfo(tenantId, account, DigestUtil.encrypt(password)); + } + } + return userInfo; + } + +} diff --git a/src/main/java/org/energy/modules/auth/granter/RefreshTokenGranter.java b/src/main/java/org/energy/modules/auth/granter/RefreshTokenGranter.java new file mode 100644 index 0000000..a8002f5 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/RefreshTokenGranter.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import io.jsonwebtoken.Claims; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.service.IUserService; +import com.dayu.daf.core.launch.constant.TokenConstant; +import org.energy.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.stereotype.Component; + +import java.util.Objects; + +/** + * RefreshTokenGranter + * + * @author Chill + */ +@Component +@AllArgsConstructor +public class RefreshTokenGranter implements ITokenGranter { + + public static final String GRANT_TYPE = "refresh_token"; + + private IUserService userService; + + @Override + public UserInfo grant(TokenParameter tokenParameter) { + String grantType = tokenParameter.getArgs().getStr("grantType"); + String refreshToken = tokenParameter.getArgs().getStr("refreshToken"); + UserInfo userInfo = null; + if (Func.isNoneBlank(grantType, refreshToken) && grantType.equals(TokenConstant.REFRESH_TOKEN)) { + Claims claims = SecureUtil.parseJWT(refreshToken); + String tokenType = Func.toStr(Objects.requireNonNull(claims).get(TokenConstant.TOKEN_TYPE)); + if (tokenType.equals(TokenConstant.REFRESH_TOKEN)) { + userInfo= userService.userInfo(Func.toLong(claims.get(TokenConstant.USER_ID))); + } + } + return userInfo; + } +} diff --git a/src/main/java/org/energy/modules/auth/granter/ScadaTokenGranter.java b/src/main/java/org/energy/modules/auth/granter/ScadaTokenGranter.java new file mode 100644 index 0000000..1abfe0a --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/ScadaTokenGranter.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.codec.Base64; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.json.JSONUtil; +import com.dayu.daf.core.launch.constant.TokenConstant; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.tool.utils.Func; +import lombok.AllArgsConstructor; +import org.energy.modules.auth.properties.ScadaAuthProperties; +import org.energy.modules.auth.response.ShareAuthResponse; +import org.energy.modules.auth.utils.AesUtil; +import org.energy.modules.auth.utils.TokenUtil; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.service.IUserService; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Date; + +/** + * ScadaTokenGranter + * + * @author Chill + */ +@Component +@AllArgsConstructor +public class ScadaTokenGranter implements ITokenGranter { + + public static final String GRANT_TYPE = "scada"; + + private IUserService userService; + + @Resource + private ScadaAuthProperties properties; + + @Override + public UserInfo grant(TokenParameter tokenParameter) { + String token = tokenParameter.getArgs().getStr("token"); + String tenantId = tokenParameter.getArgs().getStr("tenantId"); + UserInfo userInfo = null; + if (Func.isNoneBlank(token)) { + byte[] tokenByte = Base64.decode(token); + String decrypt = AesUtil.decrypt(tokenByte, properties.getScadaKey(), properties.getScadaIv()); + if (StrUtil.isBlank(decrypt)) { + throw new ServiceException("授权错误"); + } + ShareAuthResponse response = BeanUtil.toBean(JSONUtil.parse(decrypt), ShareAuthResponse.class); + if (DateUtil.compare(new Date(), DateUtil.parseDate(response.getExpires())) > 0) { + throw new ServiceException("token过期,请重新登录。"); + } + String account = response.getUserName(); + userInfo = userService.userInfo(tenantId, account); + } else { + throw new ServiceException("token错误"); + } + return userInfo; + } + +} diff --git a/src/main/java/org/energy/modules/auth/granter/SocialTokenGranter.java b/src/main/java/org/energy/modules/auth/granter/SocialTokenGranter.java new file mode 100644 index 0000000..436dd87 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/SocialTokenGranter.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import lombok.AllArgsConstructor; +import me.zhyd.oauth.model.AuthCallback; +import me.zhyd.oauth.model.AuthResponse; +import me.zhyd.oauth.model.AuthUser; +import me.zhyd.oauth.request.AuthRequest; +import org.energy.modules.auth.utils.TokenUtil; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.entity.UserOauth; +import org.energy.modules.system.service.IUserService; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.social.props.SocialProperties; +import com.dayu.daf.core.social.utils.SocialUtil; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.WebUtil; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import java.util.Objects; + +/** + * SocialTokenGranter + * + * @author Chill + */ +@Component +@AllArgsConstructor +public class SocialTokenGranter implements ITokenGranter { + + public static final String GRANT_TYPE = "social"; + + private static final Integer AUTH_SUCCESS_CODE = 2000; + + private final IUserService userService; + private final SocialProperties socialProperties; + + @Override + public UserInfo grant(TokenParameter tokenParameter) { + HttpServletRequest request = WebUtil.getRequest(); + String tenantId = Func.toStr(request.getHeader(TokenUtil.TENANT_HEADER_KEY), TokenUtil.DEFAULT_TENANT_ID); + // 开放平台来源 + String sourceParameter = request.getParameter("source"); + // 匹配是否有别名定义 + String source = socialProperties.getAlias().getOrDefault(sourceParameter, sourceParameter); + // 开放平台授权码 + String code = request.getParameter("code"); + // 开放平台状态吗 + String state = request.getParameter("state"); + + // 获取开放平台授权数据 + AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); + AuthCallback authCallback = new AuthCallback(); + authCallback.setCode(code); + authCallback.setState(state); + AuthResponse authResponse = authRequest.login(authCallback); + AuthUser authUser; + if (authResponse.getCode() == AUTH_SUCCESS_CODE) { + authUser = (AuthUser) authResponse.getData(); + } else { + throw new ServiceException("social grant failure, auth response is not success"); + } + + // 组装数据 + UserOauth userOauth = Objects.requireNonNull(BeanUtil.copy(authUser, UserOauth.class)); + userOauth.setSource(authUser.getSource()); + userOauth.setTenantId(tenantId); + userOauth.setUuid(authUser.getUuid()); + // 返回UserInfo + return userService.userInfo(userOauth); + } + +} diff --git a/src/main/java/org/energy/modules/auth/granter/TokenGranterBuilder.java b/src/main/java/org/energy/modules/auth/granter/TokenGranterBuilder.java new file mode 100644 index 0000000..c99f1ed --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/TokenGranterBuilder.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import lombok.AllArgsConstructor; +import com.dayu.daf.core.secure.exception.SecureException; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * TokenGranterBuilder + * + * @author Chill + */ +@AllArgsConstructor +public class TokenGranterBuilder { + + /** + * TokenGranter缓存池 + */ + private static final Map GRANTER_POOL = new ConcurrentHashMap<>(); + + static { + GRANTER_POOL.put(PasswordTokenGranter.GRANT_TYPE, SpringUtil.getBean(PasswordTokenGranter.class)); + GRANTER_POOL.put(CaptchaTokenGranter.GRANT_TYPE, SpringUtil.getBean(CaptchaTokenGranter.class)); + GRANTER_POOL.put(RefreshTokenGranter.GRANT_TYPE, SpringUtil.getBean(RefreshTokenGranter.class)); + GRANTER_POOL.put(SocialTokenGranter.GRANT_TYPE, SpringUtil.getBean(SocialTokenGranter.class)); + GRANTER_POOL.put(ScadaTokenGranter.GRANT_TYPE, SpringUtil.getBean(ScadaTokenGranter.class)); + } + + /** + * 获取TokenGranter + * + * @param grantType 授权类型 + * @return ITokenGranter + */ + public static ITokenGranter getGranter(String grantType) { + ITokenGranter tokenGranter = GRANTER_POOL.get(Func.toStr(grantType, PasswordTokenGranter.GRANT_TYPE)); + if (tokenGranter == null) { + throw new SecureException("no grantType was found"); + } else { + return tokenGranter; + } + } + +} diff --git a/src/main/java/org/energy/modules/auth/granter/TokenParameter.java b/src/main/java/org/energy/modules/auth/granter/TokenParameter.java new file mode 100644 index 0000000..7d0aaba --- /dev/null +++ b/src/main/java/org/energy/modules/auth/granter/TokenParameter.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.granter; + +import lombok.Data; +import com.dayu.daf.core.tool.support.Kv; + +/** + * TokenParameter + * + * @author Chill + */ +@Data +public class TokenParameter { + + private Kv args = Kv.init(); + +} diff --git a/src/main/java/org/energy/modules/auth/properties/ScadaAuthProperties.java b/src/main/java/org/energy/modules/auth/properties/ScadaAuthProperties.java new file mode 100644 index 0000000..21f66ba --- /dev/null +++ b/src/main/java/org/energy/modules/auth/properties/ScadaAuthProperties.java @@ -0,0 +1,25 @@ +package org.energy.modules.auth.properties; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +/** + * 配置类 + * + * @author dayu + */ +@Component +@Data +public class ScadaAuthProperties { + @Value("${sso.scada.key}") + private String scadaKey; + + @Value("${sso.scada.iv}") + private String scadaIv; + +} diff --git a/src/main/java/org/energy/modules/auth/response/ShareAuthResponse.java b/src/main/java/org/energy/modules/auth/response/ShareAuthResponse.java new file mode 100644 index 0000000..202a86c --- /dev/null +++ b/src/main/java/org/energy/modules/auth/response/ShareAuthResponse.java @@ -0,0 +1,38 @@ +package org.energy.modules.auth.response; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +/** + * 分享链接鉴权返回值 + * + * @author dayu + * @since 2024/7/2 16:54 + */ +@Getter +@Setter +@ToString +public class ShareAuthResponse { + + /** + * 用户唯一凭证 + */ + private String uid; + + /** + * 用户名称 + */ + private String userName; + + /** + * 角色名称 + */ + private String roleName; + + /** + * 有效期 + */ + private String expires; + +} diff --git a/src/main/java/org/energy/modules/auth/utils/AesUtil.java b/src/main/java/org/energy/modules/auth/utils/AesUtil.java new file mode 100644 index 0000000..a6454f9 --- /dev/null +++ b/src/main/java/org/energy/modules/auth/utils/AesUtil.java @@ -0,0 +1,31 @@ +package org.energy.modules.auth.utils; + +import cn.hutool.crypto.Mode; +import cn.hutool.crypto.Padding; +import cn.hutool.crypto.symmetric.AES; +import lombok.extern.slf4j.Slf4j; + +/** + * Aes 加解密工具类 + * + * @author dayu + **/ +@Slf4j +public class AesUtil { + + /** + * 解密 + */ + public static String decrypt(byte[] content, String key, String iv) { + AES aes = new AES(Mode.CBC, Padding.PKCS5Padding, key.getBytes()); + aes.setIv(iv.getBytes()); + try { + byte[] decryptedBytes = aes.decrypt(content); + return new String(decryptedBytes); + } catch (Exception e) { + log.warn("解密失败", e); + return null; + } + } + +} diff --git a/src/main/java/org/energy/modules/auth/utils/TokenUtil.java b/src/main/java/org/energy/modules/auth/utils/TokenUtil.java new file mode 100644 index 0000000..589bebb --- /dev/null +++ b/src/main/java/org/energy/modules/auth/utils/TokenUtil.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.auth.utils; + +import org.energy.modules.system.entity.User; +import org.energy.modules.system.entity.UserInfo; +import com.dayu.daf.core.launch.constant.TokenConstant; +import org.energy.core.secure.AuthInfo; +import com.dayu.daf.core.secure.TokenInfo; +import org.energy.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.utils.Func; + +import java.util.HashMap; +import java.util.Map; + +/** + * 认证工具类 + * + * @author Chill + */ +public class TokenUtil { + + public final static String CAPTCHA_HEADER_KEY = "Captcha-Key"; + public final static String CAPTCHA_HEADER_CODE = "Captcha-Code"; + public final static String CAPTCHA_NOT_CORRECT = "验证码不正确"; + public final static String TENANT_HEADER_KEY = "Tenant-Id"; + public final static String DEFAULT_TENANT_ID = "000000"; + public final static String USER_TYPE_HEADER_KEY = "User-Type"; + public final static String DEFAULT_USER_TYPE = "web"; + public final static String USER_NOT_FOUND = "用户名或密码错误"; + public final static String HEADER_KEY = "Authorization"; + public final static String HEADER_PREFIX = "Basic "; + public final static String DEFAULT_AVATAR = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"; + public final static String SYSTEM_NOT_DATA = "未找到数据"; + + /** + * 创建认证token + * + * @param userInfo 用户信息 + * @return token + */ + public static AuthInfo createAuthInfo(UserInfo userInfo) { + User user = userInfo.getUser(); + + //设置jwt参数 + Map param = new HashMap<>(16); + param.put(TokenConstant.TOKEN_TYPE, TokenConstant.ACCESS_TOKEN); + param.put(TokenConstant.TENANT_ID, user.getTenantId()); + param.put(TokenConstant.OAUTH_ID, userInfo.getOauthId()); + param.put(TokenConstant.USER_ID, Func.toStr(user.getId())); + param.put(TokenConstant.ROLE_ID, user.getRoleId()); + param.put(TokenConstant.DEPT_ID, user.getDeptId()); + param.put(TokenConstant.ACCOUNT, user.getAccount()); + param.put(TokenConstant.USER_NAME, user.getAccount()); + param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles())); + + TokenInfo accessToken = SecureUtil.createJWT(param, "audience", "issuser", TokenConstant.ACCESS_TOKEN); + AuthInfo authInfo = new AuthInfo(); + authInfo.setUserId(user.getId()); + authInfo.setTenantId(user.getTenantId()); + authInfo.setOauthId(userInfo.getOauthId()); + authInfo.setAccount(user.getAccount()); + authInfo.setUserName(user.getRealName()); + authInfo.setAuthority(Func.join(userInfo.getRoles())); + authInfo.setAccessToken(accessToken.getToken()); + authInfo.setExpiresIn(accessToken.getExpire()); + authInfo.setRefreshToken(createRefreshToken(userInfo).getToken()); + authInfo.setTokenType(TokenConstant.BEARER); + authInfo.setLicense(TokenConstant.LICENSE_NAME); + authInfo.setRoleMenus(userInfo.getRoleMenus()); + + return authInfo; + } + + /** + * 创建refreshToken + * + * @param userInfo 用户信息 + * @return refreshToken + */ + private static TokenInfo createRefreshToken(UserInfo userInfo) { + User user = userInfo.getUser(); + Map param = new HashMap<>(16); + param.put(TokenConstant.TOKEN_TYPE, TokenConstant.REFRESH_TOKEN); + param.put(TokenConstant.USER_ID, Func.toStr(user.getId())); + return SecureUtil.createJWT(param, "audience", "issuser", TokenConstant.REFRESH_TOKEN); + } + +} diff --git a/src/main/java/org/energy/modules/desk/controller/DashBoardController.java b/src/main/java/org/energy/modules/desk/controller/DashBoardController.java new file mode 100644 index 0000000..03062a6 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/controller/DashBoardController.java @@ -0,0 +1,60 @@ +package org.energy.modules.desk.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.support.Kv; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 首页 + * + * @author zhuangqian + */ +@ApiIgnore +@RestController +@RequestMapping("/daf-desk/dashboard") +@AllArgsConstructor +@Api(value = "首页", tags = "首页") +public class DashBoardController { + + /** + * 活跃用户 + * + * @return + */ + @GetMapping("/activities") + @ApiOperation(value = "活跃用户", notes = "活跃用户") + public R activities() { + + List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); + map1.put("id", "trend-1"); + map1.put("updatedAt", "2019-01-01"); + map1.put("user", Kv.init().set("name", "曲丽丽").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png")); + map1.put("group", Kv.init().set("name", "高逼格设计天团").set("link", "http://github.com/")); + map1.put("project", Kv.init().set("name", "六月迭代").set("link", "http://github.com/")); + map1.put("template", "在 @{group} 新建项目 @{project}"); + list.add(map1); + + Map map2 = new HashMap<>(16); + map2.put("id", "trend-2"); + map2.put("updatedAt", "2019-01-01"); + map2.put("user", Kv.init().set("name", "付小小").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png")); + map2.put("group", Kv.init().set("name", "高逼格设计天团").set("link", "http://github.com/")); + map2.put("project", Kv.init().set("name", "七月月迭代").set("link", "http://github.com/")); + map2.put("template", "在 @{group} 新建项目 @{project}"); + list.add(map2); + + return R.data(list); + } +} diff --git a/src/main/java/org/energy/modules/desk/controller/NoticeController.java b/src/main/java/org/energy/modules/desk/controller/NoticeController.java new file mode 100644 index 0000000..4821a13 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/controller/NoticeController.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.github.xiaoymin.knife4j.annotations.ApiSort; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.energy.common.cache.CacheNames; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.desk.entity.Notice; +import org.energy.modules.desk.service.INoticeService; +import org.energy.modules.desk.vo.NoticeVO; +import org.energy.modules.desk.wrapper.NoticeWrapper; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@RestController +@RequestMapping("/daf-desk/notice") +@AllArgsConstructor +@ApiSort(2) +@Api(value = "用户博客", tags = "博客接口") +public class NoticeController extends DafController implements CacheNames { + + private INoticeService noticeService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入notice") + public R detail(Notice notice) { + Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice)); + return R.data(NoticeWrapper.build().entityVO(detail)); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), + @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入notice") + public R> list(@ApiIgnore @RequestParam Map notice, Query query) { + IPage pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); + return R.data(NoticeWrapper.build().pageVO(pages)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "新增", notes = "传入notice") + public R save(@RequestBody Notice notice) { + return R.status(noticeService.save(notice)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "修改", notes = "传入notice") + public R update(@RequestBody Notice notice) { + return R.status(noticeService.updateById(notice)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增或修改", notes = "传入notice") + public R submit(@RequestBody Notice notice) { + return R.status(noticeService.saveOrUpdate(notice)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "传入notice") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } + + /** + * 获取消息 + * + * @return + */ + @GetMapping("/notices") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "消息", notes = "消息") + public R notices() { + List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); + map1.put("logo", "https://spring.io/img/homepage/icon-spring-framework.svg"); + map1.put("title", "SpringBoot"); + map1.put("description", "现在的web项目几乎都会用到spring框架,而要使用spring难免需要配置大量的xml配置文件,而 springboot的出现解 决了这一问题,一个项目甚至不用部署到服务器上直接开跑,真像springboot所说:“just run”。"); + map1.put("member", "Chill"); + map1.put("href", "http://spring.io/projects/spring-boot"); + list.add(map1); + + Map map2 = new HashMap<>(16); + map2.put("logo", "https://spring.io/img/homepage/icon-spring-cloud.svg"); + map2.put("title", "SpringCloud"); + map2.put("description", "SpringCloud是基于SpringBoot的一整套实现微服务的框架。他提供了微服务开发所需的配置管理、服务发现、断路器、智能路由、微代理、控制总线、全局锁、决策竞选、分布式会话和集群状态管理等组件。"); + map2.put("member", "Chill"); + map2.put("href", "http://spring.io/projects/spring-cloud"); + list.add(map2); + + Map map3 = new HashMap<>(16); + map3.put("logo", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1546359961068&di=05ff9406e6675ca9a58a525a7e7950b9&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D575314515%2C4268715674%26fm%3D214%26gp%3D0.jpg"); + map3.put("title", "Mybatis"); + map3.put("description", "MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Old Java Objects,普通的 Java对象)映射成数据库中的记录。"); + map3.put("member", "Chill"); + map3.put("href", "http://www.mybatis.org/mybatis-3/getting-started.html"); + list.add(map3); + + Map map4 = new HashMap<>(16); + map4.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png"); + map4.put("title", "React"); + map4.put("description", "React 起源于 Facebook 的内部项目,因为该公司对市场上所有 JavaScript MVC 框架,都不满意,就决定自己写一套,用来架设Instagram 的网站。做出来以后,发现这套东西很好用,就在2013年5月开源了。"); + map4.put("member", "Chill"); + map4.put("href", "https://reactjs.org/"); + list.add(map4); + + Map map5 = new HashMap<>(16); + map5.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png"); + map5.put("title", "Ant Design"); + map5.put("description", "蚂蚁金服体验技术部经过大量的项目实践和总结,沉淀出设计语言 Ant Design,这可不单纯只是设计原则、控件规范和视觉尺寸,还配套有前端代码实现方案。也就是说采用Ant Design后,UI设计和前端界面研发可同步完成,效率大大提升。"); + map5.put("member", "Chill"); + map5.put("href", "https://ant.design/docs/spec/introduce-cn"); + list.add(map5); + + Map map6 = new HashMap<>(16); + map6.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png"); + map6.put("title", "Ant Design Pro"); + map6.put("description", "Ant Design Pro 是一个企业级开箱即用的中后台前端/设计解决方案。符合阿里追求的'敏捷的前端+强大的中台'的思想。"); + map6.put("member", "Chill"); + map6.put("href", "https://pro.ant.design"); + list.add(map6); + + return R.data(list); + } + + /** + * 获取我的消息 + * + * @return + */ + @GetMapping("/my-notices") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "消息", notes = "消息") + public R myNotices() { + List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); + map1.put("id", "000000001"); + map1.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"); + map1.put("title", "你收到了 14 份新周报"); + map1.put("datetime", "2018-08-09"); + map1.put("type", "notification"); + list.add(map1); + + Map map2 = new HashMap<>(16); + map2.put("id", "000000002"); + map2.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"); + map2.put("title", "你推荐的 曲妮妮 已通过第三轮面试"); + map2.put("datetime", "2018-08-08"); + map2.put("type", "notification"); + list.add(map2); + + + Map map3 = new HashMap<>(16); + map3.put("id", "000000003"); + map3.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); + map3.put("title", "曲丽丽 评论了你"); + map3.put("description", "描述信息描述信息描述信息"); + map3.put("datetime", "2018-08-07"); + map3.put("type", "message"); + map3.put("clickClose", "true"); + list.add(map3); + + + Map map4 = new HashMap<>(16); + map4.put("id", "000000004"); + map4.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); + map4.put("title", "朱偏右 回复了你"); + map4.put("description", "这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像"); + map4.put("type", "message"); + map4.put("datetime", "2018-08-07"); + map4.put("clickClose", "true"); + list.add(map4); + + + Map map5 = new HashMap<>(16); + map5.put("id", "000000005"); + map5.put("title", "任务名称"); + map5.put("description", "任务需要在 2018-01-12 20:00 前启动"); + map5.put("extra", "未开始"); + map5.put("status", "todo"); + map5.put("type", "event"); + list.add(map5); + + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/desk/entity/Notice.java b/src/main/java/org/energy/modules/desk/entity/Notice.java new file mode 100644 index 0000000..3ab14e4 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/entity/Notice.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.BaseEntity; + +import java.util.Date; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sys_notice") +public class Notice extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 标题 + */ + @ApiModelProperty(value = "标题") + private String title; + + /** + * 通知类型 + */ + @ApiModelProperty(value = "通知类型") + private Integer category; + + /** + * 发布日期 + */ + @ApiModelProperty(value = "发布日期") + private Date releaseTime; + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + private String content; + + +} diff --git a/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.java b/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.java new file mode 100644 index 0000000..0374924 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.desk.entity.Notice; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface NoticeMapper extends BaseMapper { + + /** + * 前N条数据 + * @param number + * @return + */ + List topList(Integer number); + + /** + * 自定义分页 + * @param page + * @param notice + * @return + */ + List selectNoticePage(IPage page, Notice notice); + +} diff --git a/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.xml b/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.xml new file mode 100644 index 0000000..7cac496 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/mapper/NoticeMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + select id, + create_user AS createUser, + create_time AS createTime, + update_user AS updateUser, + update_time AS updateTime, + status, + is_deleted AS isDeleted, + title, content + + + + + + + diff --git a/src/main/java/org/energy/modules/desk/service/INoticeService.java b/src/main/java/org/energy/modules/desk/service/INoticeService.java new file mode 100644 index 0000000..750aa7f --- /dev/null +++ b/src/main/java/org/energy/modules/desk/service/INoticeService.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.desk.entity.Notice; + +/** + * 服务类 + * + * @author Chill + */ +public interface INoticeService extends BaseService { + + /** + * 自定义分页 + * @param page + * @param notice + * @return + */ + IPage selectNoticePage(IPage page, Notice notice); + +} diff --git a/src/main/java/org/energy/modules/desk/service/impl/NoticeServiceImpl.java b/src/main/java/org/energy/modules/desk/service/impl/NoticeServiceImpl.java new file mode 100644 index 0000000..146279b --- /dev/null +++ b/src/main/java/org/energy/modules/desk/service/impl/NoticeServiceImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.desk.entity.Notice; +import org.energy.modules.desk.mapper.NoticeMapper; +import org.energy.modules.desk.service.INoticeService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class NoticeServiceImpl extends BaseServiceImpl implements INoticeService { + + @Override + public IPage selectNoticePage(IPage page, Notice notice) { + return page.setRecords(baseMapper.selectNoticePage(page, notice)); + } + +} diff --git a/src/main/java/org/energy/modules/desk/vo/NoticeVO.java b/src/main/java/org/energy/modules/desk/vo/NoticeVO.java new file mode 100644 index 0000000..4e10a92 --- /dev/null +++ b/src/main/java/org/energy/modules/desk/vo/NoticeVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.desk.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.desk.entity.Notice; + +/** + * 通知公告视图类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class NoticeVO extends Notice { + + @ApiModelProperty(value = "通知类型名") + private String categoryName; + +} diff --git a/src/main/java/org/energy/modules/desk/wrapper/NoticeWrapper.java b/src/main/java/org/energy/modules/desk/wrapper/NoticeWrapper.java new file mode 100644 index 0000000..dcc806e --- /dev/null +++ b/src/main/java/org/energy/modules/desk/wrapper/NoticeWrapper.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.desk.wrapper; + +import org.energy.modules.system.service.IDictService; +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.desk.entity.Notice; +import org.energy.modules.desk.vo.NoticeVO; + +/** + * Notice包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class NoticeWrapper extends DafEntityWrapper { + + private static IDictService dictService; + + static { + dictService = SpringUtil.getBean(IDictService.class); + } + + public static NoticeWrapper build() { + return new NoticeWrapper(); + } + + @Override + public NoticeVO entityVO(Notice notice) { + NoticeVO noticeVO = BeanUtil.copy(notice, NoticeVO.class); + String categoryName = dictService.getValue("notice", noticeVO.getCategory()); + noticeVO.setCategoryName(categoryName); + return noticeVO; + } + +} diff --git a/src/main/java/org/energy/modules/develop/controller/CodeController.java b/src/main/java/org/energy/modules/develop/controller/CodeController.java new file mode 100644 index 0000000..315a5c5 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/controller/CodeController.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.energy.modules.develop.service.ICodeService; +import org.energy.modules.develop.service.IDatasourceService; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.secure.annotation.PreAuth; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.RoleConstant; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.develop.support.DafCodeGenerator; +import org.energy.modules.develop.entity.Code; +import org.energy.modules.develop.entity.Datasource; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.Collection; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/code") +@Api(value = "代码生成", tags = "代码生成") +//@PreAuth(RoleConstant.HAS_ROLE_ADMIN) +public class CodeController extends DafController { + + private ICodeService codeService; + private IDatasourceService datasourceService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入code") + public R detail(Code code) { + Code detail = codeService.getOne(Condition.getQueryWrapper(code)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入code") + public R> list(@ApiIgnore @RequestParam Map code, Query query) { + IPage pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class)); + return R.data(pages); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "新增或修改", notes = "传入code") + public R submit(@Valid @RequestBody Code code) { + return R.status(codeService.submit(code)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(codeService.removeByIds(Func.toLongList(ids))); + } + + /** + * 复制 + */ + @PostMapping("/copy") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "复制", notes = "传入id") + public R copy(@ApiParam(value = "主键", required = true) @RequestParam Long id) { + Code code = codeService.getById(id); + code.setId(null); + code.setCodeName(code.getCodeName() + "-copy"); + return R.status(codeService.save(code)); + } + + /** + * 代码生成 + */ + @PostMapping("/gen-code") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "代码生成", notes = "传入ids") + public R genCode(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) { + Collection codes = codeService.listByIds(Func.toLongList(ids)); + codes.forEach(code -> { + DafCodeGenerator generator = new DafCodeGenerator(); + // 设置数据源 + Datasource datasource = datasourceService.getById(code.getDatasourceId()); + generator.setDriverName(datasource.getDriverClass()); + generator.setUrl(datasource.getUrl()); + generator.setUsername(datasource.getUsername()); + generator.setPassword(datasource.getPassword()); + // 设置基础配置 + generator.setSystemName(system); + generator.setServiceName(code.getServiceName()); + generator.setPackageName(code.getPackageName()); + generator.setPackageDir(code.getApiPath()); + generator.setPackageWebDir(code.getWebPath()); + generator.setTablePrefix(Func.toStrArray(code.getTablePrefix())); + generator.setIncludeTables(Func.toStrArray(code.getTableName())); + // 设置是否继承基础业务字段 + generator.setHasSuperEntity(code.getBaseMode() == 2); + // 控制器添加服务名前缀 + generator.setHasServiceName(Boolean.TRUE); + // 设置是否开启包装器模式 + generator.setHasWrapper(code.getWrapMode() == 2); + generator.run(); + }); + return R.success("代码生成成功"); + } + +} diff --git a/src/main/java/org/energy/modules/develop/controller/DatasourceController.java b/src/main/java/org/energy/modules/develop/controller/DatasourceController.java new file mode 100644 index 0000000..97f0f0a --- /dev/null +++ b/src/main/java/org/energy/modules/develop/controller/DatasourceController.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.energy.modules.develop.service.IDatasourceService; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.develop.entity.Datasource; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 数据源配置表 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/datasource") +@Api(value = "数据源配置表", tags = "数据源配置表接口") +public class DatasourceController extends DafController { + + private IDatasourceService datasourceService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入datasource") + public R detail(Datasource datasource) { + Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource)); + return R.data(detail); + } + + /** + * 分页 数据源配置表 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入datasource") + public R> list(Datasource datasource, Query query) { + IPage pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource)); + return R.data(pages); + } + + /** + * 新增 数据源配置表 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入datasource") + public R save(@Valid @RequestBody Datasource datasource) { + return R.status(datasourceService.save(datasource)); + } + + /** + * 修改 数据源配置表 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入datasource") + public R update(@Valid @RequestBody Datasource datasource) { + return R.status(datasourceService.updateById(datasource)); + } + + /** + * 新增或修改 数据源配置表 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入datasource") + public R submit(@Valid @RequestBody Datasource datasource) { + datasource.setUrl(datasource.getUrl().replace("&", "&")); + return R.status(datasourceService.saveOrUpdate(datasource)); + } + + + /** + * 删除 数据源配置表 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(datasourceService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 数据源列表 + */ + @GetMapping("/select") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉数据源", notes = "查询列表") + public R> select() { + List list = datasourceService.list(); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/develop/entity/Code.java b/src/main/java/org/energy/modules/develop/entity/Code.java new file mode 100644 index 0000000..045c3b5 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/entity/Code.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_code") +@ApiModel(value = "Code对象", description = "Code对象") +public class Code implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 数据源主键 + */ + @ApiModelProperty(value = "数据源主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long datasourceId; + + /** + * 模块名称 + */ + @ApiModelProperty(value = "服务名称") + private String serviceName; + + /** + * 模块名称 + */ + @ApiModelProperty(value = "模块名称") + private String codeName; + + /** + * 表名 + */ + @ApiModelProperty(value = "表名") + private String tableName; + + /** + * 实体名 + */ + @ApiModelProperty(value = "表前缀") + private String tablePrefix; + + /** + * 主键名 + */ + @ApiModelProperty(value = "主键名") + private String pkName; + + /** + * 基础业务模式 + */ + @ApiModelProperty(value = "基础业务模式") + private Integer baseMode; + + /** + * 包装器模式 + */ + @ApiModelProperty(value = "包装器模式") + private Integer wrapMode; + + /** + * 后端包名 + */ + @ApiModelProperty(value = "后端包名") + private String packageName; + + /** + * 后端路径 + */ + @ApiModelProperty(value = "后端路径") + private String apiPath; + + /** + * 前端路径 + */ + @ApiModelProperty(value = "前端路径") + private String webPath; + + /** + * 是否已删除 + */ + @TableLogic + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + + +} diff --git a/src/main/java/org/energy/modules/develop/entity/Datasource.java b/src/main/java/org/energy/modules/develop/entity/Datasource.java new file mode 100644 index 0000000..9bb6bd2 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/entity/Datasource.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.BaseEntity; + +/** + * 数据源配置表实体类 + * + * @author Chill + */ +@Data +@TableName("sys_datasource") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Datasource对象", description = "数据源配置表") +public class Datasource extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + private String name; + /** + * 驱动类 + */ + @ApiModelProperty(value = "驱动类") + private String driverClass; + /** + * 连接地址 + */ + @ApiModelProperty(value = "连接地址") + private String url; + /** + * 用户名 + */ + @ApiModelProperty(value = "用户名") + private String username; + /** + * 密码 + */ + @ApiModelProperty(value = "密码") + private String password; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + +} diff --git a/src/main/java/org/energy/modules/develop/mapper/CodeMapper.java b/src/main/java/org/energy/modules/develop/mapper/CodeMapper.java new file mode 100644 index 0000000..5ed7ca5 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/mapper/CodeMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.develop.entity.Code; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface CodeMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/develop/mapper/CodeMapper.xml b/src/main/java/org/energy/modules/develop/mapper/CodeMapper.xml new file mode 100644 index 0000000..31103f5 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/mapper/CodeMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.java b/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.java new file mode 100644 index 0000000..b2bed60 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.develop.entity.Datasource; + +/** + * 数据源配置表 Mapper 接口 + * + * @author Chill + */ +public interface DatasourceMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.xml b/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.xml new file mode 100644 index 0000000..4d6c53e --- /dev/null +++ b/src/main/java/org/energy/modules/develop/mapper/DatasourceMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/develop/service/ICodeService.java b/src/main/java/org/energy/modules/develop/service/ICodeService.java new file mode 100644 index 0000000..466cafe --- /dev/null +++ b/src/main/java/org/energy/modules/develop/service/ICodeService.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.develop.entity.Code; + +/** + * 服务类 + * + * @author Chill + */ +public interface ICodeService extends IService { + + /** + * 提交 + * + * @param code + * @return + */ + boolean submit(Code code); + +} diff --git a/src/main/java/org/energy/modules/develop/service/IDatasourceService.java b/src/main/java/org/energy/modules/develop/service/IDatasourceService.java new file mode 100644 index 0000000..ff940d4 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/service/IDatasourceService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.service; + +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.develop.entity.Datasource; + +/** + * 数据源配置表 服务类 + * + * @author Chill + */ +public interface IDatasourceService extends BaseService { + +} diff --git a/src/main/java/org/energy/modules/develop/service/impl/CodeServiceImpl.java b/src/main/java/org/energy/modules/develop/service/impl/CodeServiceImpl.java new file mode 100644 index 0000000..c085bf3 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/service/impl/CodeServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.tool.constant.DafConstant; +import org.energy.modules.develop.entity.Code; +import org.energy.modules.develop.mapper.CodeMapper; +import org.energy.modules.develop.service.ICodeService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class CodeServiceImpl extends ServiceImpl implements ICodeService { + + @Override + public boolean submit(Code code) { + code.setIsDeleted(DafConstant.DB_NOT_DELETED); + return saveOrUpdate(code); + } + +} diff --git a/src/main/java/org/energy/modules/develop/service/impl/DatasourceServiceImpl.java b/src/main/java/org/energy/modules/develop/service/impl/DatasourceServiceImpl.java new file mode 100644 index 0000000..cd0f141 --- /dev/null +++ b/src/main/java/org/energy/modules/develop/service/impl/DatasourceServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.develop.service.impl; + +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.develop.entity.Datasource; +import org.energy.modules.develop.mapper.DatasourceMapper; +import org.energy.modules.develop.service.IDatasourceService; +import org.springframework.stereotype.Service; + +/** + * 数据源配置表 服务实现类 + * + * @author Chill + */ +@Service +public class DatasourceServiceImpl extends BaseServiceImpl implements IDatasourceService { + +} diff --git a/src/main/java/org/energy/modules/inspection/controller/InspectionObjectController.java b/src/main/java/org/energy/modules/inspection/controller/InspectionObjectController.java new file mode 100644 index 0000000..6e22fb6 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/controller/InspectionObjectController.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionObjectExcel; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.inspection.vo.InspectionObjectVO; +import org.energy.modules.inspection.service.IInspectionObjectService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 巡检对象一览 控制器 + * + * @author Daf + * @since 2024-07-11 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspection/inspectionobject") +@Api(value = "巡检对象一览", tags = "巡检对象一览接口") +public class InspectionObjectController extends DafController { + + private IInspectionObjectService inspectionObjectService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionObject") + public R detail(InspectionObject inspectionObject) { + InspectionObject detail = inspectionObjectService.getOne(Condition.getQueryWrapper(inspectionObject)); + return R.data(detail); + } + + /** + * 分页 巡检对象一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionObject") + public R> list(InspectionObject inspectionObject, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("object_No"); + if (StringUtil.isNotEmpty(inspectionObject.getObjectNo())) { + qw.lambda().like(InspectionObject::getObjectNo, inspectionObject.getObjectNo()); + } + if (StringUtil.isNotEmpty(inspectionObject.getObjectName())) { + qw.lambda().like(InspectionObject::getObjectName, inspectionObject.getObjectName()); + } + if (null != inspectionObject.getStation()) { + qw.lambda().eq(InspectionObject::getStation, inspectionObject.getStation()); + } + if (null != inspectionObject.getIstatus()) { + qw.lambda().eq(InspectionObject::getIstatus, inspectionObject.getIstatus()); + } + if (StringUtil.isNotEmpty(inspectionObject.getObjectArea())){ + qw.lambda().like(InspectionObject::getObjectArea, inspectionObject.getObjectArea()); + } + IPage pages = inspectionObjectService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 巡检对象一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionObject") + public R> page(InspectionObjectVO inspectionObject, Query query) { + IPage pages = inspectionObjectService.selectInspectionObjectPage(Condition.getPage(query), inspectionObject); + return R.data(pages); + } + + /** + * 新增 巡检对象一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionObject") + public R save(@Valid @RequestBody InspectionObject inspectionObject) { + return R.status(inspectionObjectService.save(inspectionObject)); + } + + /** + * 修改 巡检对象一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionObject") + public R update(@Valid @RequestBody InspectionObject inspectionObject) { + return R.status(inspectionObjectService.updateById(inspectionObject)); + } + + /** + * 新增或修改 巡检对象一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionObject") + public R submit(@Valid @RequestBody InspectionObject inspectionObject) { + inspectionObject.setIstatus(1); + String date = LocalDate.now().toString().replace("-",""); + String maxNo = inspectionObjectService.getMaxNo("'%" + date + "%'"); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(9)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String no = "D" + date + numFormat; + inspectionObject.setObjectNo(no); + return R.status(inspectionObjectService.saveOrUpdate(inspectionObject)); + } + + + /** + * 删除 巡检对象一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionObjectService.deleteLogic(Func.toLongList(ids))); + } + /** + * 生效 + */ + @PostMapping("/takeEffect") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "生效", notes = "传入ids") + public R takeEffect(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.updateInspectionObject(1, "", ids); + } + + /** + * 失效 + */ + @PostMapping("/lapse") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "失效", notes = "传入ids") + public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids,@ApiParam(value = "取消原因", required = true) @RequestParam String reason) { + return this.updateInspectionObject(0, reason, ids); + } + + /** + * 生效OR失效 + */ + public R updateInspectionObject(Integer status, String reason, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + InspectionObject inspectionObject = new InspectionObject(); + inspectionObject.setId(Long.parseLong(id)); + inspectionObject.setCancelReason(reason); + inspectionObject.setIstatus(status); + list.add(inspectionObject); + } + return R.status(inspectionObjectService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportInspectionObject(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + InspectionObjectVO vo = DataUtils.mapToEntity(entity, InspectionObjectVO::new); + List list = inspectionObjectService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("巡检对象数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), InspectionObjectExcel.class).sheet("巡检对象").doWrite(list); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getObjectList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取对象编号", notes = "获取对象编号") + public R> getObjectNoList() { + List routeList = inspectionObjectService.getObjectList(); + return R.data(routeList); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取对象信息", notes = "获取对象信息") + public R getDetailList(String objectNo) { + InspectionObject DetailList = inspectionObjectService.getDetailList("'" + objectNo + "'"); + return R.data(DetailList); + } +} diff --git a/src/main/java/org/energy/modules/inspection/controller/InspectionPlanController.java b/src/main/java/org/energy/modules/inspection/controller/InspectionPlanController.java new file mode 100644 index 0000000..3cddf13 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/controller/InspectionPlanController.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.inspection.excel.InspectionPlanExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.entity.InspectionPlan; +import org.energy.modules.inspection.vo.InspectionPlanVO; +import org.energy.modules.inspection.service.IInspectionPlanService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 巡检计划 控制器 + * + * @author Daf + * @since 2024-07-12 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspection/inspectionplan") +@Api(value = "巡检计划", tags = "巡检计划接口") +public class InspectionPlanController extends DafController { + + private IInspectionPlanService inspectionPlanService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionPlan") + public R detail(InspectionPlan inspectionPlan) { + InspectionPlan detail = inspectionPlanService.getOne(Condition.getQueryWrapper(inspectionPlan)); + return R.data(detail); + } + + /** + * 分页 巡检计划 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionPlan") + public R> list(InspectionPlan inspectionPlan, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("plan_no"); + if (StringUtil.isNotEmpty(inspectionPlan.getPlanNo())) { + qw.lambda().like(InspectionPlan::getPlanNo, inspectionPlan.getPlanNo()); + } + if (StringUtil.isNotEmpty(inspectionPlan.getPlanName())) { + qw.lambda().like(InspectionPlan::getPlanName, inspectionPlan.getPlanName()); + } + if (StringUtil.isNotEmpty(inspectionPlan.getPeriodType())) { + qw.lambda().like(InspectionPlan::getPeriodType, inspectionPlan.getPeriodType()); + } + if (null != inspectionPlan.getPlanStatus()) { + qw.lambda().eq(InspectionPlan::getPlanStatus, inspectionPlan.getPlanStatus()); + } + IPage pages = inspectionPlanService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 巡检计划 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionPlan") + public R> page(InspectionPlanVO inspectionPlan, Query query) { + IPage pages = inspectionPlanService.selectInspectionPlanPage(Condition.getPage(query), inspectionPlan); + return R.data(pages); + } + + /** + * 新增 巡检计划 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionPlan") + public R save(@Valid @RequestBody InspectionPlan inspectionPlan) { + return R.status(inspectionPlanService.save(inspectionPlan)); + } + + /** + * 修改 巡检计划 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionPlan") + public R update(@Valid @RequestBody InspectionPlan inspectionPlan) { + return R.status(inspectionPlanService.updateById(inspectionPlan)); + } + + /** + * 新增或修改 巡检计划 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionPlan") + public R submit(@Valid @RequestBody InspectionPlan inspectionPlan) { + inspectionPlan.setPlanStatus(1); + String date = LocalDate.now().toString().replace("-",""); + String maxNo = inspectionPlanService.getMaxNo(date); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(9)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String no = "J" + date + numFormat; + inspectionPlan.setPlanNo(no); + return R.status(inspectionPlanService.saveOrUpdate(inspectionPlan)); + } + + + /** + * 删除 巡检计划 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionPlanService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 生效 + */ + @PostMapping("/takeEffect") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "生效", notes = "传入ids") + public R takeEffect(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.updateInspectionPlan(1, "", ids); + } + + /** + * 失效 + */ + @PostMapping("/lapse") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "失效", notes = "传入ids") + public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "取消原因", required = true) @RequestParam String reason) { + return this.updateInspectionPlan(0, reason, ids); + } + + /** + * 生效OR失效 + */ + public R updateInspectionPlan(Integer status, String reason, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + InspectionPlan inspectionPlan = new InspectionPlan(); + inspectionPlan.setId(Long.parseLong(id)); + inspectionPlan.setCancelReason(reason); + inspectionPlan.setPlanStatus(status); + list.add(inspectionPlan); + } + return R.status(inspectionPlanService.updateBatchById(list)); + } + + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportInspectionRoute(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + InspectionPlan vo = DataUtils.mapToEntity(entity, InspectionPlan::new); + List list = inspectionPlanService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("巡检计划数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), InspectionPlanExcel.class).sheet("巡检计划").doWrite(list); + } + + /** + * 获取路线编号 + */ + @GetMapping("/getPlanList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取路线编号", notes = "获取路线编号") + public R> getPlanList() { + List routeList = inspectionPlanService.getPlanList(); + return R.data(routeList); + } + + /** + * 获取路线编号 + */ + @GetMapping("/getDetail") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取路线信息", notes = "获取路线信息") + public R getDetail(String planNo) { + InspectionPlan detail = inspectionPlanService.getDetail(planNo); + return R.data(detail); + } +} diff --git a/src/main/java/org/energy/modules/inspection/controller/InspectionResultController.java b/src/main/java/org/energy/modules/inspection/controller/InspectionResultController.java new file mode 100644 index 0000000..ee761cd --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/controller/InspectionResultController.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.controller; + +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.leger.entity.InventoryDocument; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.entity.InspectionResult; +import org.energy.modules.inspection.vo.InspectionResultVO; +import org.energy.modules.inspection.service.IInspectionResultService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 巡检结果 控制器 + * + * @author Daf + * @since 2024-07-10 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspection/inspectionresult") +@Api(value = "巡检结果", tags = "巡检结果接口") +public class InspectionResultController extends DafController { + + private IInspectionResultService inspectionResultService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionResult") + public R detail(InspectionResult inspectionResult) { + InspectionResult detail = inspectionResultService.getOne(Condition.getQueryWrapper(inspectionResult)); + return R.data(detail); + } + + /** + * 分页 巡检结果 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionResult") + public R> list(InspectionResult inspectionResult, Query query) { + IPage pages = inspectionResultService.page(Condition.getPage(query), Condition.getQueryWrapper(inspectionResult)); + return R.data(pages); + } + + /** + * 自定义分页 巡检结果 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionResult") + public R> page(InspectionResultVO inspectionResult, Query query) { + IPage pages = inspectionResultService.selectInspectionResultPage(Condition.getPage(query), inspectionResult); + return R.data(pages); + } + + /** + * 新增 巡检结果 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionResult") + public R save(@Valid @RequestBody InspectionResult inspectionResult) { + return R.status(inspectionResultService.save(inspectionResult)); + } + + /** + * 修改 巡检结果 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionResult") + public R update(@Valid @RequestBody InspectionResult inspectionResult) { + return R.status(inspectionResultService.updateById(inspectionResult)); + } + + /** + * 新增或修改 巡检结果 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionResult") + public R submit(@Valid @RequestBody InspectionResult inspectionResult) { + String maxResultNo = inspectionResultService.getMaxResultNo("'%" + inspectionResult.getTaskNo() + "%'"); + int number; + if (StringUtil.isNotEmpty(maxResultNo)){ + number = Integer.parseInt(maxResultNo.substring(13)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String resultNo = inspectionResult.getTaskNo() + numFormat; + inspectionResult.setResultNo(resultNo); + return R.status(inspectionResultService.saveOrUpdate(inspectionResult)); + } + + /** + * 删除 巡检结果 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionResultService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 技术参数一览 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入inventoryDocument") + public R> getList(InspectionResult inspectionResult) { + List list = inspectionResultService.list(Condition.getQueryWrapper(inspectionResult)); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/inspection/controller/InspectionRouteController.java b/src/main/java/org/energy/modules/inspection/controller/InspectionRouteController.java new file mode 100644 index 0000000..639c344 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/controller/InspectionRouteController.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.vo.InspectionRouteVO; +import org.energy.modules.inspection.service.IInspectionRouteService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 巡检路线 控制器 + * + * @author Daf + * @since 2024-07-10 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspection/inspectionRoute") +@Api(value = "巡检路线", tags = "巡检路线接口") +public class InspectionRouteController extends DafController { + + private IInspectionRouteService inspectionRouteService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionRoute") + public R detail(InspectionRoute inspectionRoute) { + InspectionRoute detail = inspectionRouteService.getOne(Condition.getQueryWrapper(inspectionRoute)); + return R.data(detail); + } + + /** + * 分页 巡检路线 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionRoute") + public R> list(InspectionRoute inspectionRoute, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("route_no"); + if (StringUtil.isNotEmpty(inspectionRoute.getRouteNo())) { + qw.lambda().like(InspectionRoute::getRouteNo, inspectionRoute.getRouteNo()); + } + if (StringUtil.isNotEmpty(inspectionRoute.getRouteName())) { + qw.lambda().like(InspectionRoute::getRouteName, inspectionRoute.getRouteName()); + } + if (StringUtil.isNotEmpty(inspectionRoute.getType())) { + qw.lambda().like(InspectionRoute::getType, inspectionRoute.getType()); + } + if (null != inspectionRoute.getIstatus()) { + qw.lambda().eq(InspectionRoute::getIstatus, inspectionRoute.getIstatus()); + } + IPage pages = inspectionRouteService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 巡检路线 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionRoute") + public R> page(InspectionRouteVO inspectionRoute, Query query) { + IPage pages = inspectionRouteService.selectInspectionRoutePage(Condition.getPage(query), inspectionRoute); + return R.data(pages); + } + + /** + * 新增 巡检路线 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionRoute") + public R save(@Valid @RequestBody InspectionRoute inspectionRoute) { + return R.status(inspectionRouteService.save(inspectionRoute)); + } + + /** + * 修改 巡检路线 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionRoute") + public R update(@Valid @RequestBody InspectionRoute inspectionRoute) { + return R.status(inspectionRouteService.updateById(inspectionRoute)); + } + + /** + * 新增或修改 巡检路线 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionRoute") + public R submit(@Valid @RequestBody InspectionRoute inspectionRoute) { + inspectionRoute.setIstatus(1); + String date = LocalDate.now().toString().replace("-",""); + String maxNo = inspectionRouteService.getMaxNo(date); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(9)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String no = "L" + date + numFormat; + inspectionRoute.setRouteNo(no); + return R.status(inspectionRouteService.saveOrUpdate(inspectionRoute)); + } + + + /** + * 删除 巡检路线 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionRouteService.deleteLogic(Func.toLongList(ids))); + } + + + + /** + * 生效 + */ + @PostMapping("/takeEffect") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "生效", notes = "传入ids") + public R takeEffect(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.updateInspectionRoute(1, "", ids); + } + + /** + * 失效 + */ + @PostMapping("/lapse") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "失效", notes = "传入ids") + public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "取消原因", required = true) @RequestParam String reason) { + return this.updateInspectionRoute(0, reason, ids); + } + + /** + * 生效OR失效 + */ + public R updateInspectionRoute(Integer status, String reason, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + InspectionRoute inspectionRoute = new InspectionRoute(); + inspectionRoute.setId(Long.parseLong(id)); + inspectionRoute.setCancelReason(reason); + inspectionRoute.setIstatus(status); + list.add(inspectionRoute); + } + return R.status(inspectionRouteService.updateBatchById(list)); + } + + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportInspectionRoute(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + InspectionRoute vo = DataUtils.mapToEntity(entity, InspectionRoute::new); + List list = inspectionRouteService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("巡检路线数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), InspectionRouteExcel.class).sheet("巡检路线").doWrite(list); + } + + /** + * 获取路线编号 + */ + @GetMapping("/getRouteList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取路线编号", notes = "获取路线编号") + public R> getRouteList() { + List routeList = inspectionRouteService.getRouteList(); + return R.data(routeList); + } + + /** + * 获取路线编号 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取路线信息", notes = "获取路线信息") + public R getDetailList(String routeNo) { + InspectionRoute DetailList = inspectionRouteService.getDetailList(routeNo); + return R.data(DetailList); + } + +} diff --git a/src/main/java/org/energy/modules/inspection/controller/InspectionTasksController.java b/src/main/java/org/energy/modules/inspection/controller/InspectionTasksController.java new file mode 100644 index 0000000..85a05db --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/controller/InspectionTasksController.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.excel.InspectionTasksExcel; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.vo.InspectionTasksVO; +import org.energy.modules.inspection.service.IInspectionTasksService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 巡检任务 控制器 + * + * @author Daf + * @since 2024-07-10 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspection/inspectiontasks") +@Api(value = "巡检任务", tags = "巡检任务接口") +public class InspectionTasksController extends DafController { + + private IInspectionTasksService inspectionTasksService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionTasks") + public R detail(InspectionTasks inspectionTasks) { + InspectionTasks detail = inspectionTasksService.getOne(Condition.getQueryWrapper(inspectionTasks)); + return R.data(detail); + } + + /** + * 分页 巡检任务 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionTasks") + public R> list(InspectionTasks inspectionTasks, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("task_no"); + // 场站 + if (null != inspectionTasks.getStation()) { + qw.lambda().eq(InspectionTasks::getStation, inspectionTasks.getStation()); + } + // 状态 + if (null != inspectionTasks.getTaskStatus()) { + qw.lambda().eq(InspectionTasks::getTaskStatus, inspectionTasks.getTaskStatus()); + } + // 任务编号 + if (StringUtil.isNotEmpty(inspectionTasks.getTaskNo())) { + qw.lambda().like(InspectionTasks::getTaskNo, inspectionTasks.getTaskNo()); + } + // 任务名称 + if (StringUtil.isNotEmpty(inspectionTasks.getTaskName())) { + qw.lambda().like(InspectionTasks::getTaskName, inspectionTasks.getTaskName()); + } + // 任务生成日期 + if (StringUtil.isNotEmpty(inspectionTasks.getTaskStartDate())) { + qw.lambda().like(InspectionTasks::getTaskStartDate, inspectionTasks.getTaskStartDate()); + } + // 任务完成日期 + if (StringUtil.isNotEmpty(inspectionTasks.getTaskEndDate())) { + qw.lambda().like(InspectionTasks::getTaskEndDate, inspectionTasks.getTaskEndDate()); + } + // 责任人 + if (StringUtil.isNotEmpty(inspectionTasks.getResponsiblePerson())) { + qw.lambda().like(InspectionTasks::getResponsiblePerson, inspectionTasks.getResponsiblePerson()); + } + IPage pages = inspectionTasksService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 巡检任务 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionTasks") + public R> page(InspectionTasksVO inspectionTasks, Query query) { + IPage pages = inspectionTasksService.selectInspectionTasksPage(Condition.getPage(query), inspectionTasks); + return R.data(pages); + } + + /** + * 新增 巡检任务 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionTasks") + public R save(@Valid @RequestBody InspectionTasks inspectionTasks) { + return R.status(inspectionTasksService.save(inspectionTasks)); + } + + /** + * 修改 巡检任务 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionTasks") + public R update(@Valid @RequestBody InspectionTasks inspectionTasks) { + return R.status(inspectionTasksService.updateById(inspectionTasks)); + } + + /** + * 新增或修改 巡检任务 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionTasks") + public R submit(@Valid @RequestBody InspectionTasks inspectionTasks) { + inspectionTasks.setTaskStatus(1L); + String date = LocalDate.now().toString().replace("-",""); + String maxTaskNo = inspectionTasksService.getMaxTaskNo(date); + int number; + if (StringUtil.isNotEmpty(maxTaskNo)){ + number = Integer.parseInt(maxTaskNo.substring(9)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String taskNo = "R" + date + numFormat; + inspectionTasks.setTaskNo(taskNo); + return R.status(inspectionTasksService.saveOrUpdate(inspectionTasks)); + } + + + /** + * 删除 巡检任务 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionTasksService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 启动 巡检任务 + */ + @PostMapping("/action") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve("1",ids, ""); + } + + /** + * 停止 巡检任务 + */ + @PostMapping("/stop") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R stop(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam String reason) { + return this.approve("2",ids, reason); + } + + /** + * 启动OR停止 巡检任务 + */ + public R approve(String status, String ids, String reason) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + InspectionTasks inspectionTasks = new InspectionTasks(); + inspectionTasks.setId(Long.parseLong(id)); + inspectionTasks.setTaskStatus(Long.parseLong(status)); + inspectionTasks.setCancelReason(reason); + list.add(inspectionTasks); + } + return R.status(inspectionTasksService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + InspectionTasks vo = DataUtils.mapToEntity(entity, InspectionTasks::new); + List list = inspectionTasksService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("巡检任务数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), InspectionTasksExcel.class).sheet("巡检任务").doWrite(list); + } + + @GetMapping("/getListByToolsCodeId") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "通过工器具编码获取巡检任务", notes = "通过工器具编码获取巡检任务") + public R> getListByToolsCodeId(String toolsCodeId) { + List pages = inspectionTasksService.getListByToolsCodeId(toolsCodeId); + return R.data(pages); + } + + +} diff --git a/src/main/java/org/energy/modules/inspection/dto/InspectionObjectDTO.java b/src/main/java/org/energy/modules/inspection/dto/InspectionObjectDTO.java new file mode 100644 index 0000000..d6d0856 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/dto/InspectionObjectDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.inspection.dto; + +import org.energy.modules.inspection.entity.InspectionObject; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 巡检对象一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionObjectDTO extends InspectionObject { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/dto/InspectionPlanDTO.java b/src/main/java/org/energy/modules/inspection/dto/InspectionPlanDTO.java new file mode 100644 index 0000000..a3053c1 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/dto/InspectionPlanDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.inspection.dto; + +import org.energy.modules.inspection.entity.InspectionPlan; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 巡检计划数据传输对象实体类 + * + * @author Daf + * @since 2024-07-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionPlanDTO extends InspectionPlan { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/dto/InspectionResultDTO.java b/src/main/java/org/energy/modules/inspection/dto/InspectionResultDTO.java new file mode 100644 index 0000000..0b8dfb2 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/dto/InspectionResultDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.inspection.dto; + +import org.energy.modules.inspection.entity.InspectionResult; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 巡检结果数据传输对象实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionResultDTO extends InspectionResult { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/dto/InspectionRouteDTO.java b/src/main/java/org/energy/modules/inspection/dto/InspectionRouteDTO.java new file mode 100644 index 0000000..0b3f333 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/dto/InspectionRouteDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.inspection.dto; + +import org.energy.modules.inspection.entity.InspectionRoute; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 巡检路线数据传输对象实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionRouteDTO extends InspectionRoute { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/dto/InspectionTasksDTO.java b/src/main/java/org/energy/modules/inspection/dto/InspectionTasksDTO.java new file mode 100644 index 0000000..eb8426e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/dto/InspectionTasksDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.inspection.dto; + +import org.energy.modules.inspection.entity.InspectionTasks; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 巡检任务数据传输对象实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionTasksDTO extends InspectionTasks { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/entity/InspectionObject.java b/src/main/java/org/energy/modules/inspection/entity/InspectionObject.java new file mode 100644 index 0000000..32d97bd --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/entity/InspectionObject.java @@ -0,0 +1,83 @@ +package org.energy.modules.inspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 巡检对象一览实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@TableName("i_inspection_object") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionObject对象", description = "巡检对象一览") +public class InspectionObject extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 对象编号 + */ + @ApiModelProperty(value = "对象编号") + private String objectNo; + /** + * 对象名称 + */ + @ApiModelProperty(value = "对象名称") + private String objectName; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer station; + /** + * 对象状态 + */ + @ApiModelProperty(value = "对象状态") + private Integer istatus; + /** + * 对象类型 + */ + @ApiModelProperty(value = "对象类型") + private String objectType; + /** + * 对象区域 + */ + @ApiModelProperty(value = "对象区域") + private String objectArea; + + /** + * KKS编号 + */ + @ApiModelProperty(value = "KKS编号") + private String kksNo; + + /** + * KKS编号 + */ + @ApiModelProperty(value = "工器具编号") + private String toolsCodeId; + /** + * 取消原因 + */ + @ApiModelProperty(value = "取消原因") + private String cancelReason; + + +} diff --git a/src/main/java/org/energy/modules/inspection/entity/InspectionPlan.java b/src/main/java/org/energy/modules/inspection/entity/InspectionPlan.java new file mode 100644 index 0000000..c020a70 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/entity/InspectionPlan.java @@ -0,0 +1,86 @@ +package org.energy.modules.inspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 巡检计划实体类 + * + * @author Daf + * @since 2024-07-12 + */ +@Data +@TableName("i_inspection_plan") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionPlan对象", description = "巡检计划") +public class InspectionPlan extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 计划编号 + */ + @ApiModelProperty(value = "计划编号") + private String planNo; + /** + * 计划名称 + */ + @ApiModelProperty(value = "计划名称") + private String planName; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer station; + /** + * 计划类型 + */ + @ApiModelProperty(value = "计划类型") + private String planType; + /** + * 周期类型 + */ + @ApiModelProperty(value = "周期类型") + private String periodType; + /** + * 周期值 + */ + @ApiModelProperty(value = "周期值") + private String periodValue; + /** + * 计划起始时间 + */ + @ApiModelProperty(value = "计划起始时间") + private String startTime; + /** + * 计划终了时间 + */ + @ApiModelProperty(value = "计划终了时间") + private String endTime; + /** + * 计划状态 + */ + @ApiModelProperty(value = "计划状态") + private Integer planStatus; + /** + * 取消原因 + */ + @ApiModelProperty(value = "取消原因") + private String cancelReason; + + +} diff --git a/src/main/java/org/energy/modules/inspection/entity/InspectionResult.java b/src/main/java/org/energy/modules/inspection/entity/InspectionResult.java new file mode 100644 index 0000000..4ef0496 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/entity/InspectionResult.java @@ -0,0 +1,70 @@ +package org.energy.modules.inspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 巡检结果实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@TableName("i_inspection_result") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionResult对象", description = "巡检结果") +public class InspectionResult extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 结果编码 + */ + @ApiModelProperty(value = "结果编码") + private String resultNo; + /** + * 任务编码 + */ + @ApiModelProperty(value = "任务编码") + private String taskNo; + /** + * 任务执行开始时间 + */ + @ApiModelProperty(value = "任务执行开始时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + private LocalDateTime executeStartDate; + /** + * 任务执行结束时间 + */ + @ApiModelProperty(value = "任务执行结束时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + private LocalDateTime executeEndDate; + /** + * 巡检结果 + */ + @ApiModelProperty(value = "巡检结果") + private String inspectiontResult; + /** + * 巡检报告 + */ + @ApiModelProperty(value = "巡检报告") + private String inspectionReport; + + +} diff --git a/src/main/java/org/energy/modules/inspection/entity/InspectionRoute.java b/src/main/java/org/energy/modules/inspection/entity/InspectionRoute.java new file mode 100644 index 0000000..8d05f92 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/entity/InspectionRoute.java @@ -0,0 +1,71 @@ +package org.energy.modules.inspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 巡检路线实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@TableName("i_inspection_route") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionRoute对象", description = "巡检路线") +public class InspectionRoute extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 路线编号 + */ + @ApiModelProperty(value = "路线编号") + private String routeNo; + /** + * 路线名称 + */ + @ApiModelProperty(value = "路线名称") + private String routeName; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer stations; + /** + * 类型 + */ + @ApiModelProperty(value = "类型") + private String type; + /** + * 巡检状态 + */ + @ApiModelProperty(value = "巡检状态") + private Integer istatus; + /** + * 维护工厂 + */ + @ApiModelProperty(value = "维护工厂") + private String factory; + /** + * 取消原因 + */ + @ApiModelProperty(value = "取消原因") + private String cancelReason; + + +} diff --git a/src/main/java/org/energy/modules/inspection/entity/InspectionTasks.java b/src/main/java/org/energy/modules/inspection/entity/InspectionTasks.java new file mode 100644 index 0000000..892d08e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/entity/InspectionTasks.java @@ -0,0 +1,121 @@ +package org.energy.modules.inspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 巡检任务实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@TableName("i_inspection_tasks") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionTasks对象", description = "巡检任务") +public class InspectionTasks extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 任务编码 + */ + @ApiModelProperty(value = "任务编码") + private String taskNo; + /** + * 对象编码 + */ + @ApiModelProperty(value = "对象编码") + private String objectNo; + /** + * 路线编码 + */ + @ApiModelProperty(value = "路线编码") + private String routeNo; + /** + * 计划编码 + */ + @ApiModelProperty(value = "计划编码") + private String planNo; + /** + * 任务名称 + */ + @ApiModelProperty(value = "任务名称") + private String taskName; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Long station; + /** + * 责任人 + */ + @ApiModelProperty(value = "责任人") + private String responsiblePerson; + /** + * 任务生成日期时间 + */ + @ApiModelProperty(value = "任务生成日期时间") + private String taskStartDate; + /** + * 任务结束日期时间 + */ + @ApiModelProperty(value = "任务结束日期时间") + private String taskEndDate; + /** + * 取消原因 + */ + @ApiModelProperty(value = "取消原因") + private String cancelReason; + /** + * 任务状态 + */ + @ApiModelProperty(value = "任务状态") + private Long taskStatus; + /** + * 对象名称 + */ + @ApiModelProperty(value = "对象名称") + private String objectName; + /** + * 对象类型 + */ + @ApiModelProperty(value = "对象类型") + private String objectType; + /** + * 路线名称 + */ + @ApiModelProperty(value = "路线名称") + private String routeName; + /** + * 路线类型 + */ + @ApiModelProperty(value = "路线类型") + private String routeType; + /** + * 计划名称 + */ + @ApiModelProperty(value = "计划名称") + private String planName; + /** + * 计划类型 + */ + @ApiModelProperty(value = "计划类型") + private String planType; + + +} diff --git a/src/main/java/org/energy/modules/inspection/excel/InspectionObjectExcel.java b/src/main/java/org/energy/modules/inspection/excel/InspectionObjectExcel.java new file mode 100644 index 0000000..3340325 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/excel/InspectionObjectExcel.java @@ -0,0 +1,53 @@ +package org.energy.modules.inspection.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class InspectionObjectExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "对象编号") + private String objectNo; + + @ColumnWidth(15) + @ExcelProperty(value = "对象名称") + private String objectName; + + @ColumnWidth(15) + @ExcelProperty(value = "场站") + private String station; + + @ColumnWidth(15) + @ExcelProperty(value = "对象类型") + private String objectType; + + @ColumnWidth(15) + @ExcelProperty(value = "对象区域") + private String objectArea; + + @ColumnWidth(15) + @ExcelProperty(value = "对象状态") + private String istatus; + + @ColumnWidth(15) + @ExcelProperty(value = "KKS编号") + private String kksNo; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具台账编码") + private String toolsCodeId; + + @ColumnWidth(15) + @ExcelProperty(value = "取消原因") + private String cancelReason; +} diff --git a/src/main/java/org/energy/modules/inspection/excel/InspectionPlanExcel.java b/src/main/java/org/energy/modules/inspection/excel/InspectionPlanExcel.java new file mode 100644 index 0000000..03a97ca --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/excel/InspectionPlanExcel.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class InspectionPlanExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "计划编号") + private String planNo; + + @ColumnWidth(15) + @ExcelProperty(value = "计划名称") + private String planName; + + @ColumnWidth(15) + @ExcelProperty(value = "计划类型") + private String planType; + + @ColumnWidth(15) + @ExcelProperty(value = "周期类型") + private String periodType; + + @ColumnWidth(15) + @ExcelProperty(value = "周期值") + private String periodValue; + + @ColumnWidth(20) + @ExcelProperty(value = "计划起始时间") + private String startTime; + + @ColumnWidth(20) + @ExcelProperty(value = "计划终了时间") + private String endTime; + + @ColumnWidth(15) + @ExcelProperty(value = "状态") + private String planStatusName; + + @ColumnWidth(15) + @ExcelProperty(value = "取消原因") + private String cancelReason; + +} diff --git a/src/main/java/org/energy/modules/inspection/excel/InspectionRouteExcel.java b/src/main/java/org/energy/modules/inspection/excel/InspectionRouteExcel.java new file mode 100644 index 0000000..f0809ef --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/excel/InspectionRouteExcel.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class InspectionRouteExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "路线编号") + private String routeNo; + + @ColumnWidth(15) + @ExcelProperty(value = "路线名称") + private String routeName; + + @ColumnWidth(15) + @ExcelProperty(value = "类型") + private String type; + + @ColumnWidth(15) + @ExcelProperty(value = "巡检状态") + private String istatusName; + + @ColumnWidth(15) + @ExcelProperty(value = "维护工厂") + private String factory; + + @ColumnWidth(15) + @ExcelProperty(value = "取消原因") + private String cancelReason; + +} diff --git a/src/main/java/org/energy/modules/inspection/excel/InspectionTasksExcel.java b/src/main/java/org/energy/modules/inspection/excel/InspectionTasksExcel.java new file mode 100644 index 0000000..d6de300 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/excel/InspectionTasksExcel.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.inspection.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class InspectionTasksExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "任务编号") + private String taskNo; + + @ColumnWidth(15) + @ExcelProperty(value = "任务名称") + private String taskName; + + @ColumnWidth(15) + @ExcelProperty(value = "场站") + private String stationExt; + + @ColumnWidth(20) + @ExcelProperty(value = "任务生成日期") + private String taskStartDate; + + @ColumnWidth(20) + @ExcelProperty(value = "任务完成日期") + private String taskEndDate; + + @ColumnWidth(15) + @ExcelProperty(value = "责任人") + private String responsiblePerson; + + @ColumnWidth(15) + @ExcelProperty(value = "状态") + private String taskStatusExt; + + @ColumnWidth(15) + @ExcelProperty(value = "取消原因") + private String cancelReason; + + +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.java b/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.java new file mode 100644 index 0000000..2cfe86d --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.java @@ -0,0 +1,48 @@ +package org.energy.modules.inspection.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionObjectExcel; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.vo.InspectionObjectVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 巡检对象一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-11 + */ +public interface InspectionObjectMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionObject + * @return + */ + List selectInspectionObjectPage(IPage page, InspectionObjectVO inspectionObject); + + List exportData(@Param("vo") InspectionObjectVO inspectionObject); + + /** + * 获取路线编号 + */ + List getObjectList(); + + /** + * 获取最大编号 + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionObject getDetailList(String routeNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.xml b/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.xml new file mode 100644 index 0000000..024a11e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.java b/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.java new file mode 100644 index 0000000..f6741e7 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.java @@ -0,0 +1,45 @@ +package org.energy.modules.inspection.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionPlan; +import org.energy.modules.inspection.excel.InspectionPlanExcel; +import org.energy.modules.inspection.vo.InspectionPlanVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 巡检计划 Mapper 接口 + * + * @author Daf + * @since 2024-07-12 + */ +public interface InspectionPlanMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionPlan + * @return + */ + List selectInspectionPlanPage(IPage page, InspectionPlanVO inspectionPlan); + + List exportData(@Param("entity") InspectionPlan inspectionPlan); + + /** + * 获取路线编号 + */ + List getPlanList(); + + /** + * 获取最大编号 + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionPlan getDetail(String planNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.xml b/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.xml new file mode 100644 index 0000000..c26f7e1 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.java b/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.java new file mode 100644 index 0000000..7a7c65f --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.java @@ -0,0 +1,31 @@ +package org.energy.modules.inspection.mapper; + +import org.energy.modules.inspection.entity.InspectionResult; +import org.energy.modules.inspection.vo.InspectionResultVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 巡检结果 Mapper 接口 + * + * @author Daf + * @since 2024-07-11 + */ +public interface InspectionResultMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionResult + * @return + */ + List selectInspectionResultPage(IPage page, InspectionResultVO inspectionResult); + + /** + * 获取最大结果编号 + */ + String getMaxResultNo(String taskNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.xml b/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.xml new file mode 100644 index 0000000..985b6dd --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionResultMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.java b/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.java new file mode 100644 index 0000000..ef9bbc9 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.java @@ -0,0 +1,45 @@ +package org.energy.modules.inspection.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.vo.InspectionRouteVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检路线 Mapper 接口 + * + * @author Daf + * @since 2024-07-10 + */ +public interface InspectionRouteMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionRoute + * @return + */ + List selectInspectionRoutePage(IPage page, InspectionRouteVO inspectionRoute); + + List exportData(@Param("entity") InspectionRoute inspectionRoute); + + /** + * 获取路线编号 + */ + List getRouteList(); + + /** + * 获取最大编号 + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionRoute getDetailList(String routeNo); +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.xml b/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.xml new file mode 100644 index 0000000..37e27a6 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.java b/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.java new file mode 100644 index 0000000..e68de5d --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.java @@ -0,0 +1,44 @@ +package org.energy.modules.inspection.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.excel.InspectionTasksExcel; +import org.energy.modules.inspection.vo.InspectionTasksVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; + +import java.util.List; + +/** + * 巡检任务 Mapper 接口 + * + * @author Daf + * @since 2024-07-10 + */ +public interface InspectionTasksMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionTasks + * @return + */ + List selectInspectionTasksPage(IPage page, InspectionTasksVO inspectionTasks); + + /** + * 导出 + */ + List exportData(@Param("entity") InspectionTasks inspectionTasks); + + /** + * 获取最大任务编号 + */ + String getMaxTaskNO(String date); + + List getListByToolsCodeId(String toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.xml b/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.xml new file mode 100644 index 0000000..e48629d --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/inspection/service/IInspectionObjectService.java b/src/main/java/org/energy/modules/inspection/service/IInspectionObjectService.java new file mode 100644 index 0000000..83d9f9f --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/IInspectionObjectService.java @@ -0,0 +1,57 @@ +package org.energy.modules.inspection.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionObjectExcel; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.vo.InspectionObjectVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检对象一览 服务类 + * + * @author Daf + * @since 2024-07-11 + */ +public interface IInspectionObjectService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionObject + * @return + */ + IPage selectInspectionObjectPage(IPage page, InspectionObjectVO inspectionObject); + + /** + * 获取导出数据 + * + * @param inspectionObject + * @return + */ + List export(InspectionObjectVO inspectionObject); + + + /** + * 获取路线编号 + */ + List getObjectList(); + + /** + * 获取最大任务编号 + * + * @param date + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionObject getDetailList(String objectNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/service/IInspectionPlanService.java b/src/main/java/org/energy/modules/inspection/service/IInspectionPlanService.java new file mode 100644 index 0000000..f048af0 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/IInspectionPlanService.java @@ -0,0 +1,53 @@ +package org.energy.modules.inspection.service; + +import org.energy.modules.inspection.entity.InspectionPlan; +import org.energy.modules.inspection.excel.InspectionPlanExcel; +import org.energy.modules.inspection.vo.InspectionPlanVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检计划 服务类 + * + * @author Daf + * @since 2024-07-12 + */ +public interface IInspectionPlanService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionPlan + * @return + */ + IPage selectInspectionPlanPage(IPage page, InspectionPlanVO inspectionPlan); + + /** + * 获取导出数据 + * + * @param inspectionRoute + * @return + */ + List export(InspectionPlan inspectionRoute); + + /** + * 获取路线编号 + */ + List getPlanList(); + + /** + * 获取最大任务编号 + * + * @param date + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionPlan getDetail(String planNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/service/IInspectionResultService.java b/src/main/java/org/energy/modules/inspection/service/IInspectionResultService.java new file mode 100644 index 0000000..550157c --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/IInspectionResultService.java @@ -0,0 +1,32 @@ +package org.energy.modules.inspection.service; + +import org.energy.modules.inspection.entity.InspectionResult; +import org.energy.modules.inspection.vo.InspectionResultVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 巡检结果 服务类 + * + * @author Daf + * @since 2024-07-10 + */ +public interface IInspectionResultService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionResult + * @return + */ + IPage selectInspectionResultPage(IPage page, InspectionResultVO inspectionResult); + + /** + * 获取最大结果编号 + * + * @param taskNo + */ + String getMaxResultNo(String taskNo); + +} diff --git a/src/main/java/org/energy/modules/inspection/service/IInspectionRouteService.java b/src/main/java/org/energy/modules/inspection/service/IInspectionRouteService.java new file mode 100644 index 0000000..04040b5 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/IInspectionRouteService.java @@ -0,0 +1,46 @@ +package org.energy.modules.inspection.service; + +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.vo.InspectionRouteVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.inspection.excel.InspectionRouteExcel; + +import java.util.List; + +/** + * 巡检路线 服务类 + * + * @author Daf + * @since 2024-07-10 + */ +public interface IInspectionRouteService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionRoute + * @return + */ + IPage selectInspectionRoutePage(IPage page, InspectionRouteVO inspectionRoute); + + List export(InspectionRoute InspectionRoute); + + /** + * 获取路线编号 + */ + List getRouteList(); + + /** + * 获取最大任务编号 + * + * @param date + */ + String getMaxNo(String date); + + /** + * 获取路线的信息 + */ + InspectionRoute getDetailList(String routeNo); +} diff --git a/src/main/java/org/energy/modules/inspection/service/IInspectionTasksService.java b/src/main/java/org/energy/modules/inspection/service/IInspectionTasksService.java new file mode 100644 index 0000000..c7d5f7e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/IInspectionTasksService.java @@ -0,0 +1,47 @@ +package org.energy.modules.inspection.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.excel.InspectionTasksExcel; +import org.energy.modules.inspection.vo.InspectionTasksVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; + +import java.util.List; + +/** + * 巡检任务 服务类 + * + * @author Daf + * @since 2024-07-10 + */ +public interface IInspectionTasksService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionTasks + * @return + */ + IPage selectInspectionTasksPage(IPage page, InspectionTasksVO inspectionTasks); + + /** + * 获取导出数据 + */ + List export(InspectionTasks InspectionTasks); + + /** + * 获取最大任务编号 + * + * @param date + */ + String getMaxTaskNo(String date); + + List getListByToolsCodeId(String toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/inspection/service/impl/InspectionObjectServiceImpl.java b/src/main/java/org/energy/modules/inspection/service/impl/InspectionObjectServiceImpl.java new file mode 100644 index 0000000..a99430f --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/impl/InspectionObjectServiceImpl.java @@ -0,0 +1,64 @@ +package org.energy.modules.inspection.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionObjectExcel; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.vo.InspectionObjectVO; +import org.energy.modules.inspection.mapper.InspectionObjectMapper; +import org.energy.modules.inspection.service.IInspectionObjectService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检对象一览 服务实现类 + * + * @author Daf + * @since 2024-07-11 + */ +@Service +public class InspectionObjectServiceImpl extends BaseServiceImpl implements IInspectionObjectService { + @Autowired + IDictService dictService; + + @Override + public IPage selectInspectionObjectPage(IPage page, InspectionObjectVO inspectionObject) { + return page.setRecords(baseMapper.selectInspectionObjectPage(page, inspectionObject)); + } + @Override + public List export(InspectionObjectVO inspectionObject) { + List list = baseMapper.exportData(inspectionObject); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getStation())) + item.setStation(dictService.getValue("station", Integer.parseInt(item.getStation()))); + if (StringUtils.isNotEmpty(item.getIstatus())) + item.setIstatus(dictService.getValue("istatus", Integer.parseInt(item.getIstatus()))); + }); + return list; + } + @Override + public List getObjectList() { + List list = baseMapper.getObjectList(); + return list; + } + + @Override + public String getMaxNo(String date){ + String maxNo = baseMapper.getMaxNo(date); + return maxNo; + } + + @Override + public InspectionObject getDetailList(String objectNo) { + InspectionObject DetailList = baseMapper.getDetailList(objectNo); + return DetailList; + } +} diff --git a/src/main/java/org/energy/modules/inspection/service/impl/InspectionPlanServiceImpl.java b/src/main/java/org/energy/modules/inspection/service/impl/InspectionPlanServiceImpl.java new file mode 100644 index 0000000..ad66dd5 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/impl/InspectionPlanServiceImpl.java @@ -0,0 +1,52 @@ +package org.energy.modules.inspection.service.impl; + +import org.energy.modules.inspection.entity.InspectionPlan; +import org.energy.modules.inspection.excel.InspectionPlanExcel; +import org.energy.modules.inspection.vo.InspectionPlanVO; +import org.energy.modules.inspection.mapper.InspectionPlanMapper; +import org.energy.modules.inspection.service.IInspectionPlanService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检计划 服务实现类 + * + * @author Daf + * @since 2024-07-12 + */ +@Service +public class InspectionPlanServiceImpl extends BaseServiceImpl implements IInspectionPlanService { + + @Override + public IPage selectInspectionPlanPage(IPage page, InspectionPlanVO inspectionPlan) { + return page.setRecords(baseMapper.selectInspectionPlanPage(page, inspectionPlan)); + } + + @Override + public List export(InspectionPlan inspectionPlan) { + List list = baseMapper.exportData(inspectionPlan); + return list; + } + + @Override + public List getPlanList() { + List list = baseMapper.getPlanList(); + return list; + } + + @Override + public String getMaxNo(String date){ + String maxNo = baseMapper.getMaxNo(date); + return maxNo; + } + + @Override + public InspectionPlan getDetail(String planNo) { + InspectionPlan detail = baseMapper.getDetail(planNo); + return detail; + } + +} diff --git a/src/main/java/org/energy/modules/inspection/service/impl/InspectionResultServiceImpl.java b/src/main/java/org/energy/modules/inspection/service/impl/InspectionResultServiceImpl.java new file mode 100644 index 0000000..b05fef2 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/impl/InspectionResultServiceImpl.java @@ -0,0 +1,36 @@ +package org.energy.modules.inspection.service.impl; + +import org.energy.modules.inspection.entity.InspectionResult; +import org.energy.modules.inspection.vo.InspectionResultVO; +import org.energy.modules.inspection.mapper.InspectionResultMapper; +import org.energy.modules.inspection.service.IInspectionResultService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 巡检结果 服务实现类 + * + * @author Daf + * @since 2024-07-10 + */ +@Service +public class InspectionResultServiceImpl extends BaseServiceImpl implements IInspectionResultService { + + @Override + public IPage selectInspectionResultPage(IPage page, InspectionResultVO inspectionResult) { + return page.setRecords(baseMapper.selectInspectionResultPage(page, inspectionResult)); + } + + /** + * 获取最大结果编号 + * + * @param taskNo + */ + @Override + public String getMaxResultNo(String taskNo){ + String maxResultNo = baseMapper.getMaxResultNo(taskNo); + return maxResultNo; + } + +} diff --git a/src/main/java/org/energy/modules/inspection/service/impl/InspectionRouteServiceImpl.java b/src/main/java/org/energy/modules/inspection/service/impl/InspectionRouteServiceImpl.java new file mode 100644 index 0000000..183e58a --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/impl/InspectionRouteServiceImpl.java @@ -0,0 +1,52 @@ +package org.energy.modules.inspection.service.impl; + +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.vo.InspectionRouteVO; +import org.energy.modules.inspection.mapper.InspectionRouteMapper; +import org.energy.modules.inspection.service.IInspectionRouteService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检路线 服务实现类 + * + * @author Daf + * @since 2024-07-10 + */ +@Service +public class InspectionRouteServiceImpl extends BaseServiceImpl implements IInspectionRouteService { + + @Override + public IPage selectInspectionRoutePage(IPage page, InspectionRouteVO inspectionRoute) { + return page.setRecords(baseMapper.selectInspectionRoutePage(page, inspectionRoute)); + } + + @Override + public List export(InspectionRoute inspectionRoute) { + List list = baseMapper.exportData(inspectionRoute); + return list; + } + + @Override + public List getRouteList() { + List list = baseMapper.getRouteList(); + return list; + } + + @Override + public String getMaxNo(String date){ + String maxNo = baseMapper.getMaxNo(date); + return maxNo; + } + + @Override + public InspectionRoute getDetailList(String routeNo) { + InspectionRoute DetailList = baseMapper.getDetailList(routeNo); + return DetailList; + } + +} diff --git a/src/main/java/org/energy/modules/inspection/service/impl/InspectionTasksServiceImpl.java b/src/main/java/org/energy/modules/inspection/service/impl/InspectionTasksServiceImpl.java new file mode 100644 index 0000000..7e7fb6d --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/service/impl/InspectionTasksServiceImpl.java @@ -0,0 +1,54 @@ +package org.energy.modules.inspection.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.excel.InspectionTasksExcel; +import org.energy.modules.inspection.vo.InspectionTasksVO; +import org.energy.modules.inspection.mapper.InspectionTasksMapper; +import org.energy.modules.inspection.service.IInspectionTasksService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 巡检任务 服务实现类 + * + * @author Daf + * @since 2024-07-10 + */ +@Service +public class InspectionTasksServiceImpl extends BaseServiceImpl implements IInspectionTasksService { + + @Override + public IPage selectInspectionTasksPage(IPage page, InspectionTasksVO inspectionTasks) { + return page.setRecords(baseMapper.selectInspectionTasksPage(page, inspectionTasks)); + } + + @Override + public List export(InspectionTasks inspectionTasks) { + List list = baseMapper.exportData(inspectionTasks); + return list; + } + + /** + * 获取最大任务编号 + * + * @param date + */ + @Override + public String getMaxTaskNo(String date){ + String maxTakNo = baseMapper.getMaxTaskNO(date); + return maxTakNo; + } + + @Override + public List getListByToolsCodeId(String toolsCodeId) { + List list = baseMapper.getListByToolsCodeId(toolsCodeId); + return list; + } + +} diff --git a/src/main/java/org/energy/modules/inspection/vo/InspectionObjectVO.java b/src/main/java/org/energy/modules/inspection/vo/InspectionObjectVO.java new file mode 100644 index 0000000..280bf3e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/vo/InspectionObjectVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.inspection.vo; + +import org.energy.modules.inspection.entity.InspectionObject; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 巡检对象一览视图实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionObjectVO对象", description = "巡检对象一览") +public class InspectionObjectVO extends InspectionObject { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/vo/InspectionPlanVO.java b/src/main/java/org/energy/modules/inspection/vo/InspectionPlanVO.java new file mode 100644 index 0000000..1ee3a4e --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/vo/InspectionPlanVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.inspection.vo; + +import org.energy.modules.inspection.entity.InspectionPlan; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 巡检计划视图实体类 + * + * @author Daf + * @since 2024-07-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionPlanVO对象", description = "巡检计划") +public class InspectionPlanVO extends InspectionPlan { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/vo/InspectionResultVO.java b/src/main/java/org/energy/modules/inspection/vo/InspectionResultVO.java new file mode 100644 index 0000000..1e49e80 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/vo/InspectionResultVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.inspection.vo; + +import org.energy.modules.inspection.entity.InspectionResult; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 巡检结果视图实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionResultVO对象", description = "巡检结果") +public class InspectionResultVO extends InspectionResult { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/vo/InspectionRouteVO.java b/src/main/java/org/energy/modules/inspection/vo/InspectionRouteVO.java new file mode 100644 index 0000000..784134a --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/vo/InspectionRouteVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.inspection.vo; + +import org.energy.modules.inspection.entity.InspectionRoute; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 巡检路线视图实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionRouteVO对象", description = "巡检路线") +public class InspectionRouteVO extends InspectionRoute { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/inspection/vo/InspectionTasksVO.java b/src/main/java/org/energy/modules/inspection/vo/InspectionTasksVO.java new file mode 100644 index 0000000..453c3b0 --- /dev/null +++ b/src/main/java/org/energy/modules/inspection/vo/InspectionTasksVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.inspection.vo; + +import org.energy.modules.inspection.entity.InspectionTasks; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 巡检任务视图实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionTasksVO对象", description = "巡检任务") +public class InspectionTasksVO extends InspectionTasks { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/controller/DynamicledgerController.java b/src/main/java/org/energy/modules/leger/controller/DynamicledgerController.java new file mode 100644 index 0000000..6e14ab5 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/DynamicledgerController.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.smart.entity.OperationItem; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.Dynamicledger; +import org.energy.modules.leger.vo.DynamicledgerVO; +import org.energy.modules.leger.service.IDynamicledgerService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * L_DYNAMICLEDGER 控制器 + * + * @author Daf + * @since 2024-07-17 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/leger/dynamicledger") +@Api(value = "L_DYNAMICLEDGER", tags = "L_DYNAMICLEDGER接口") +public class DynamicledgerController extends DafController { + + private IDynamicledgerService dynamicledgerService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入dynamicledger") + public R detail(Dynamicledger dynamicledger) { + Dynamicledger detail = dynamicledgerService.getOne(Condition.getQueryWrapper(dynamicledger)); + return R.data(detail); + } + + /** + * 分页 L_DYNAMICLEDGER + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入dynamicledger") + public R> list(Dynamicledger dynamicledger, Query query) { + + IPage pages = dynamicledgerService.selectDynamicledgerPageExt(Condition.getPage(query), dynamicledger); + return R.data(pages); + } + + /** + * 自定义分页 L_DYNAMICLEDGER + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入dynamicledger") + public R> page(DynamicledgerVO dynamicledger, Query query) { + + IPage pages = dynamicledgerService.selectDynamicledgerPage(Condition.getPage(query), dynamicledger); + return R.data(pages); + } + + /** + * 新增 L_DYNAMICLEDGER + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入dynamicledger") + public R save(@Valid @RequestBody Dynamicledger dynamicledger) { + return R.status(dynamicledgerService.save(dynamicledger)); + } + + /** + * 修改 L_DYNAMICLEDGER + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入dynamicledger") + public R update(@Valid @RequestBody Dynamicledger dynamicledger) { + return R.status(dynamicledgerService.updateById(dynamicledger)); + } + + /** + * 新增或修改 L_DYNAMICLEDGER + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入dynamicledger") + public R submit(@Valid @RequestBody Dynamicledger dynamicledger) { + return R.status(dynamicledgerService.saveOrUpdate(dynamicledger)); + } + + + /** + * 删除 L_DYNAMICLEDGER + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(dynamicledgerService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 工单 + */ + @GetMapping("/workOrder") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "分页", notes = "传入dynamicledger") + public R> getWorkOrederList(Dynamicledger dynamicledger) { + List list = dynamicledgerService.getWorkOrederListbyKksCd(dynamicledger); + return R.data(list); + } + /** + * 工作票 + */ + @GetMapping("/workticket") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "分页", notes = "传入dynamicledger") + public R> getWorkticketList(Dynamicledger dynamicledger) { + List list = dynamicledgerService.getWorkticketListbyKksCd(dynamicledger); + return R.data(list); + } + /** + * 操作票 + */ + @GetMapping("/operation") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "分页", notes = "传入dynamicledger") + public R> getoOperationList(Dynamicledger dynamicledger) { + List list = dynamicledgerService.getOperationListbyKksCd( dynamicledger); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/leger/controller/EquipmentLedgerController.java b/src/main/java/org/energy/modules/leger/controller/EquipmentLedgerController.java new file mode 100644 index 0000000..095f87c --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/EquipmentLedgerController.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.micrometer.core.instrument.util.StringUtils; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.leger.service.IInventoryDocumentService; +import org.energy.modules.leger.service.ITechParametersService; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.vo.WorkPermitVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.leger.service.IEquipmentLedgerService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 设备台账编码一览 控制器 + * + * @author Daf + * @since 2024-07-04 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/equipmentledger") +@Api(value = "设备台账编码一览", tags = "设备台账编码一览接口") +public class EquipmentLedgerController extends DafController { + + private IEquipmentLedgerService equipmentLedgerService; + private IInventoryDocumentService inventoryDocumentService; + private ITechParametersService techParametersService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入equipmentLedger") + public R detail(EquipmentLedger equipmentLedger) { + EquipmentLedger detail = equipmentLedgerService.getOne(Condition.getQueryWrapper(equipmentLedger)); + return R.data(detail); + } + + /** + * 分页 设备台账编码一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入equipmentLedger") + public R> list(EquipmentLedger equipmentLedger, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("eq_ledger_code"); + if (StringUtil.isNotEmpty(equipmentLedger.getMajor())) { + qw.lambda().like(EquipmentLedger::getMajor, equipmentLedger.getMajor()); + } + if (null != equipmentLedger.getUserStatus()) { + qw.lambda().eq(EquipmentLedger::getUserStatus, equipmentLedger.getUserStatus()); + } + if (null != equipmentLedger.getStation()) { + qw.lambda().eq(EquipmentLedger::getStation, equipmentLedger.getStation()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getInstallationLocation())) { + qw.lambda().like(EquipmentLedger::getInstallationLocation, equipmentLedger.getInstallationLocation()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getEqLedgerCode())) { + qw.lambda().like(EquipmentLedger::getEqLedgerCode, equipmentLedger.getEqLedgerCode()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getDeviceDescription())) { + qw.lambda().like(EquipmentLedger::getDeviceDescription, equipmentLedger.getDeviceDescription()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getEqType())) { + qw.lambda().like(EquipmentLedger::getEqType, equipmentLedger.getEqType()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getMaintenanceTeam())) { + qw.lambda().like(EquipmentLedger::getMaintenanceTeam, equipmentLedger.getMaintenanceTeam()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getManufacturingSerialNo())) { + qw.lambda().like(EquipmentLedger::getManufacturingSerialNo, equipmentLedger.getManufacturingSerialNo()); + } + IPage pages = equipmentLedgerService.page(Condition.getPage(query), qw); + + return R.data(pages); + } + + /** + * 自定义分页 设备台账编码一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入equipmentLedger") + public R> page(EquipmentLedgerVO equipmentLedger, Query query) { + IPage pages = equipmentLedgerService.selectEquipmentLedgerPage(Condition.getPage(query), equipmentLedger); + return R.data(pages); + } + + /** + * 新增 设备台账编码一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入equipmentLedger") + public R save(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.save(equipmentLedger)); + } + + /** + * 修改 设备台账编码一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入equipmentLedger") + public R update(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.updateById(equipmentLedger)); + } + + /** + * 新增或修改 设备台账编码一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入equipmentLedger") + public R submit(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.saveOrUpdate(equipmentLedger)); + } + + + /** + * 删除 设备台账编码一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + for (String id : ids.split(",")) { + inventoryDocumentService.delInventoryDocument(Long.parseLong(id)); + techParametersService.delTechParameters(Long.parseLong(id)); + } + return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 设备台账编码一览 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 设备台账编码一览 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 修改 设备台账编码一览 + */ + @PostMapping("/kai") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "更新", notes = "传入ids") + public R kai(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(4, ids); + } + /** + * 驳回OR审核 设备台账编码一览 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + EquipmentLedger equipmentLedger = equipmentLedgerService.getById(Long.parseLong(id)); + equipmentLedger.setCheckStatus(status); + list.add(equipmentLedger); + } + return R.status(equipmentLedgerService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + EquipmentLedgerVO vo = DataUtils.mapToEntity(entity, EquipmentLedgerVO::new); + List list = equipmentLedgerService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("静态台账数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), EquipmentLedgerExcel.class).sheet("静态台账").doWrite(list); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getKksList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R> getKksNoList() { + List kksList = equipmentLedgerService.getKksNoList(); + return R.data(kksList); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取kks信息", notes = "获取kks信息") + public R getDetailList(String KksNo) { + EquipmentLedger DetailList = equipmentLedgerService.getDetailList("'" + KksNo + "'"); + return R.data(DetailList); + } + + /** + * 远程搜索 + */ + @GetMapping("/listByCoding") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "远程搜索", notes = "传入") + public R> listByCoding(String coding) { +// boolean isNumId = false; + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(coding)) { + if (coding.matches("\\d+")) { +// isNumId = true; + queryWrapper.nested(wrapper -> wrapper.eq("id", Long.parseLong(coding)) + .or().lambda().like(EquipmentLedger::getKksEncoding, coding)); + } else { + queryWrapper.lambda().like(EquipmentLedger::getKksEncoding, coding); + } + } + queryWrapper.lambda().eq(EquipmentLedger::getCheckStatus, 2); + queryWrapper.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); + queryWrapper.lambda().orderByAsc(EquipmentLedger::getKksEncoding); + queryWrapper.lambda().last(" LIMIT 50"); + List list = equipmentLedgerService.list(queryWrapper); + +// int listSize = list.size(); + +// if (isNumId && listSize < 50) { +// int lastLen = 50 - listSize; +// List notQueryIds = new ArrayList<>(); +// for (EquipmentLedger ledger: list) { +// notQueryIds.add(ledger.getId()); +// } +// QueryWrapper queryWrapperExt = new QueryWrapper<>(); +// if (notQueryIds.size() > 0) { +// queryWrapperExt.lambda().notIn(EquipmentLedger::getId, notQueryIds); +// } +// +// queryWrapperExt.lambda().eq(EquipmentLedger::getCheckStatus, 2); +// queryWrapperExt.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); +// queryWrapperExt.lambda().orderByAsc(EquipmentLedger::getKksEncoding); +// queryWrapperExt.lambda().last(" LIMIT " + lastLen); +// List listExt = equipmentLedgerService.list(queryWrapperExt); +// list.addAll(listExt); +// } + return R.data(list); + } + + /** + * 获取kkskey + */ + @GetMapping("/getKksKey") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R getKksKey(String KksNo) { + EquipmentLedger DetailList = equipmentLedgerService.getKksKey("'" + KksNo + "'"); + return R.data(DetailList); + } + + /** + * 获取kkskey + */ + @GetMapping("/getEqLedgerCode") + @ApiOperationSupport(order = 13) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R getEqLedgerCode(String eqLedgerCode) { + EquipmentLedger DetailList = equipmentLedgerService.getEqLedgerCode("'" + eqLedgerCode + "'"); + return R.data(DetailList); + } +} diff --git a/src/main/java/org/energy/modules/leger/controller/InspectionStandardsController.java b/src/main/java/org/energy/modules/leger/controller/InspectionStandardsController.java new file mode 100644 index 0000000..1312e0b --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/InspectionStandardsController.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.entity.InventoryDocument; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.InspectionStandards; +import org.energy.modules.leger.vo.InspectionStandardsVO; +import org.energy.modules.leger.service.IInspectionStandardsService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 检验标准一览 控制器 + * + * @author Daf + * @since 2024-07-09 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspectionstandards") +@Api(value = "检验标准一览", tags = "检验标准一览接口") +public class InspectionStandardsController extends DafController { + + private IInspectionStandardsService inspectionStandardsService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inspectionStandards") + public R detail(InspectionStandards inspectionStandards) { + InspectionStandards detail = inspectionStandardsService.getOne(Condition.getQueryWrapper(inspectionStandards)); + return R.data(detail); + } + + /** + * 分页 检验标准一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inspectionStandards") + public R> list(InspectionStandards inspectionStandards, Query query) { + IPage pages = inspectionStandardsService.page(Condition.getPage(query), Condition.getQueryWrapper(inspectionStandards)); + return R.data(pages); + } + + /** + * 自定义分页 检验标准一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inspectionStandards") + public R> page(InspectionStandardsVO inspectionStandards, Query query) { + IPage pages = inspectionStandardsService.selectInspectionStandardsPage(Condition.getPage(query), inspectionStandards); + return R.data(pages); + } + + /** + * 新增 检验标准一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inspectionStandards") + public R save(@Valid @RequestBody InspectionStandards inspectionStandards) { + return R.status(inspectionStandardsService.save(inspectionStandards)); + } + + /** + * 修改 检验标准一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inspectionStandards") + public R update(@Valid @RequestBody InspectionStandards inspectionStandards) { + return R.status(inspectionStandardsService.updateById(inspectionStandards)); + } + + /** + * 新增或修改 检验标准一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inspectionStandards") + public R submit(@Valid @RequestBody InspectionStandards inspectionStandards) { + return R.status(inspectionStandardsService.saveOrUpdate(inspectionStandards)); + } + + + /** + * 删除 检验标准一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionStandardsService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 检验标准一览 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入inspectionStandards") + public R> getList(InspectionStandards inspectionStandards) { + List list = inspectionStandardsService.list(Condition.getQueryWrapper(inspectionStandards)); + return R.data(list); + } + + /** + * 删除 检验标准一览 + */ + @GetMapping("/del") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "逻辑删除", notes = "传入toolscodeid") + public R del(@ApiParam(value = "主键集合", required = true) @RequestParam Long toolsCodeId) { + return R.status(inspectionStandardsService.delInspectionStandards(toolsCodeId)); + } + +} diff --git a/src/main/java/org/energy/modules/leger/controller/InventoryDocumentController.java b/src/main/java/org/energy/modules/leger/controller/InventoryDocumentController.java new file mode 100644 index 0000000..4b60da1 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/InventoryDocumentController.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.entity.TechParameters; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.InventoryDocument; +import org.energy.modules.leger.vo.InventoryDocumentVO; +import org.energy.modules.leger.service.IInventoryDocumentService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 文档清册一览 控制器 + * + * @author Daf + * @since 2024-07-04 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inventorydocument") +@Api(value = "文档清册一览", tags = "文档清册一览接口") +public class InventoryDocumentController extends DafController { + + private IInventoryDocumentService inventoryDocumentService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inventoryDocument") + public R detail(InventoryDocument inventoryDocument) { + InventoryDocument detail = inventoryDocumentService.getOne(Condition.getQueryWrapper(inventoryDocument)); + return R.data(detail); + } + + /** + * 分页 文档清册一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inventoryDocument") + public R> list(InventoryDocument inventoryDocument, Query query) { + IPage pages = inventoryDocumentService.page(Condition.getPage(query), Condition.getQueryWrapper(inventoryDocument)); + return R.data(pages); + } + + /** + * 自定义分页 文档清册一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inventoryDocument") + public R> page(InventoryDocumentVO inventoryDocument, Query query) { + IPage pages = inventoryDocumentService.selectInventoryDocumentPage(Condition.getPage(query), inventoryDocument); + return R.data(pages); + } + + /** + * 新增 文档清册一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inventoryDocument") + public R save(@Valid @RequestBody InventoryDocument inventoryDocument) { + return R.status(inventoryDocumentService.save(inventoryDocument)); + } + + /** + * 修改 文档清册一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inventoryDocument") + public R update(@Valid @RequestBody InventoryDocument inventoryDocument) { + return R.status(inventoryDocumentService.updateById(inventoryDocument)); + } + + /** + * 新增或修改 文档清册一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inventoryDocument") + public R submit(@Valid @RequestBody InventoryDocument inventoryDocument) { + return R.status(inventoryDocumentService.saveOrUpdate(inventoryDocument)); + } + + + /** + * 删除 文档清册一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inventoryDocumentService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 技术参数一览 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入inventoryDocument") + public R> getList(InventoryDocument inventoryDocument) { + List list = inventoryDocumentService.list(Condition.getQueryWrapper(inventoryDocument)); + return R.data(list); + } + + /** + * 删除 技术参数一览 + */ + @GetMapping("/del") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "逻辑删除", notes = "传入eqLedgerId") + public R del(@ApiParam(value = "主键集合", required = true) @RequestParam Long eqLedgerId) { + return R.status(inventoryDocumentService.delInventoryDocument(eqLedgerId)); + } +} diff --git a/src/main/java/org/energy/modules/leger/controller/TechParametersController.java b/src/main/java/org/energy/modules/leger/controller/TechParametersController.java new file mode 100644 index 0000000..f927b54 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/TechParametersController.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Dict; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.leger.vo.TechParametersVO; +import org.energy.modules.leger.service.ITechParametersService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 技术参数一览 控制器 + * + * @author Daf + * @since 2024-07-04 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/techparameters") +@Api(value = "技术参数一览", tags = "技术参数一览接口") +public class TechParametersController extends DafController { + + private ITechParametersService techParametersService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入techParameters") + public R detail(TechParameters techParameters) { + TechParameters detail = techParametersService.getOne(Condition.getQueryWrapper(techParameters)); + return R.data(detail); + } + + /** + * 分页 技术参数一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入techParameters") + public R> list(TechParameters techParameters, Query query) { + IPage pages = techParametersService.page(Condition.getPage(query), Condition.getQueryWrapper(techParameters)); + return R.data(pages); + } + + /** + * 自定义分页 技术参数一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入techParameters") + public R> page(TechParametersVO techParameters, Query query) { + IPage pages = techParametersService.selectTechParametersPage(Condition.getPage(query), techParameters); + return R.data(pages); + } + + /** + * 新增 技术参数一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入techParameters") + public R save(@Valid @RequestBody TechParameters techParameters) { + return R.status(techParametersService.save(techParameters)); + } + + /** + * 修改 技术参数一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入techParameters") + public R update(@Valid @RequestBody TechParameters techParameters) { + return R.status(techParametersService.updateById(techParameters)); + } + + /** + * 新增或修改 技术参数一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入techParameters") + public R submit(@Valid @RequestBody TechParameters techParameters) { + return R.status(techParametersService.saveOrUpdate(techParameters)); + } + + + /** + * 删除 技术参数一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(techParametersService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 技术参数一览 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入techParameters") + public R> getList(TechParameters techParameters) { + List list = techParametersService.list(Condition.getQueryWrapper(techParameters)); + return R.data(list); + } + + /** + * 删除 技术参数一览 + */ + @GetMapping("/del") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "逻辑删除", notes = "传入eqLedgerId") + public R del(@ApiParam(value = "主键集合", required = true) @RequestParam Long eqLedgerId) { + return R.status(techParametersService.delTechParameters(eqLedgerId)); + } +} diff --git a/src/main/java/org/energy/modules/leger/controller/ToolInventoryRecordController.java b/src/main/java/org/energy/modules/leger/controller/ToolInventoryRecordController.java new file mode 100644 index 0000000..34f7b5b --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/ToolInventoryRecordController.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.service.*; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.ArrayList; +import java.util.List; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.Map; + +/** + * 工器具编码一览 控制器 + * + * @author Daf + * @since 2024-07-09 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/leger/toolinventoryrecord") +@Api(value = "工器具编码一览", tags = "工器具编码一览接口") +public class ToolInventoryRecordController extends DafController { + + private IToolInventoryRecordService toolInventoryRecordService; + private IInventoryDocumentService inventoryDocumentService; + private ITechParametersService techParametersService; + private IInspectionStandardsService inspectionStandardsService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入toolInventoryRecord") + public R detail(ToolInventoryRecord toolInventoryRecord) { + ToolInventoryRecord detail = toolInventoryRecordService.getOne(Condition.getQueryWrapper(toolInventoryRecord)); + return R.data(detail); + } + + /** + * 分页 工器具编码一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入toolInventoryRecord") + public R> list(ToolInventoryRecord toolInventoryRecord, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("tools_code_id"); + if (StringUtil.isNotEmpty(toolInventoryRecord.getToolsCodeId())) { + qw.lambda().like(ToolInventoryRecord::getToolsCodeId, toolInventoryRecord.getToolsCodeId()); + } + if (StringUtil.isNotEmpty(toolInventoryRecord.getToolName())) { + qw.lambda().like(ToolInventoryRecord::getToolName, toolInventoryRecord.getToolName()); + } + if (StringUtil.isNotEmpty(toolInventoryRecord.getToolCategory())) { + qw.lambda().like(ToolInventoryRecord::getToolCategory, toolInventoryRecord.getToolCategory()); + } + if (StringUtil.isNotEmpty(toolInventoryRecord.getToolStatus())) { + qw.lambda().like(ToolInventoryRecord::getToolStatus, toolInventoryRecord.getToolStatus()); + } + if (null != toolInventoryRecord.getIsInspectionPeriod()) { + qw.lambda().eq(ToolInventoryRecord::getIsInspectionPeriod, toolInventoryRecord.getIsInspectionPeriod()); + } + if (null != toolInventoryRecord.getStations()) { + qw.lambda().eq(ToolInventoryRecord::getStations, toolInventoryRecord.getStations()); + } + + IPage pages = toolInventoryRecordService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 工器具编码一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入toolInventoryRecord") + public R> page(ToolInventoryRecordVO toolInventoryRecord, Query query) { + IPage pages = toolInventoryRecordService.selectToolInventoryRecordPage(Condition.getPage(query), toolInventoryRecord); + return R.data(pages); + } + + /** + * 新增 工器具编码一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入toolInventoryRecord") + public R save(@Valid @RequestBody ToolInventoryRecord toolInventoryRecord) { + return R.status(toolInventoryRecordService.save(toolInventoryRecord)); + } + + /** + * 修改 工器具编码一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入toolInventoryRecord") + public R update(@Valid @RequestBody ToolInventoryRecord toolInventoryRecord) { + return R.status(toolInventoryRecordService.updateById(toolInventoryRecord)); + } + + /** + * 新增或修改 工器具编码一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入toolInventoryRecord") + public R submit(@Valid @RequestBody ToolInventoryRecord toolInventoryRecord) { + return R.status(toolInventoryRecordService.saveOrUpdate(toolInventoryRecord)); + } + + + /** + * 删除 工器具编码一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + for (String id : ids.split(",")) { + inventoryDocumentService.delInventoryDocument(Long.parseLong(id)); + techParametersService.delTechParameters(Long.parseLong(id)); + inspectionStandardsService.delInspectionStandards(Long.parseLong(id)); + } + return R.status(toolInventoryRecordService.deleteLogic(Func.toLongList(ids))); + } + /** + * 审核 工器具台账编码一览 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 工器具台账编码一览 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 工器具台账编码一览 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + ToolInventoryRecord toolInventoryRecord = toolInventoryRecordService.getById(Long.parseLong(id)); + toolInventoryRecord.setCheckStatus(status); + list.add(toolInventoryRecord); + } + return R.status(toolInventoryRecordService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + ToolInventoryRecordVO vo = DataUtils.mapToEntity(entity, ToolInventoryRecordVO::new); + List list = toolInventoryRecordService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("工器具台账数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), ToolInventoryRecordExcel.class).sheet("工器具台账").doWrite(list); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getToolsCodeIdList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取工器具编码", notes = "获取工器具编码") + public R> getToolsCodeIdList() { + List kksList = toolInventoryRecordService.getToolsCodeIdList(); + return R.data(kksList); + } + + /** + * 获取工器具明细 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取工器具信息", notes = "获取工器具信息") + public R getDetailList(String toolsCodeId) { + ToolInventoryRecord DetailList = toolInventoryRecordService.getDetailList("'" + toolsCodeId + "'"); + return R.data(DetailList); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getToolsCodeId") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取工器具信息", notes = "获取工器具信息") + public R getToolsCodeId(String toolsCodeId) { + ToolInventoryRecord DetailList = toolInventoryRecordService.getToolsCodeId("'" + toolsCodeId + "'"); + return R.data(DetailList); + } + +} diff --git a/src/main/java/org/energy/modules/leger/controller/postmanagementController.java b/src/main/java/org/energy/modules/leger/controller/postmanagementController.java new file mode 100644 index 0000000..a1450fe --- /dev/null +++ b/src/main/java/org/energy/modules/leger/controller/postmanagementController.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.utils.Func; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.xkcoding.http.util.StringUtil; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.service.IEquipmentLedgerService; +import org.energy.modules.leger.service.IInventoryDocumentService; +import org.energy.modules.leger.service.ITechParametersService; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 设备台账编码一览 控制器 + * + * @author Daf + * @since 2024-07-04 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/postmanagement") +@Api(value = "设备台账编码一览", tags = "设备台账编码一览接口") +public class postmanagementController extends DafController { + + private IEquipmentLedgerService equipmentLedgerService; + private IInventoryDocumentService inventoryDocumentService; + private ITechParametersService techParametersService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入equipmentLedger") + public R detail(EquipmentLedger equipmentLedger) { + EquipmentLedger detail = equipmentLedgerService.getOne(Condition.getQueryWrapper(equipmentLedger)); + return R.data(detail); + } + + /** + * 分页 设备台账编码一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入equipmentLedger") + public R> list(EquipmentLedger equipmentLedger, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("eq_ledger_code"); + if (StringUtil.isNotEmpty(equipmentLedger.getMajor())) { + qw.lambda().like(EquipmentLedger::getMajor, equipmentLedger.getMajor()); + } + if (null != equipmentLedger.getUserStatus()) { + qw.lambda().eq(EquipmentLedger::getUserStatus, equipmentLedger.getUserStatus()); + } + if (null != equipmentLedger.getStation()) { + qw.lambda().eq(EquipmentLedger::getStation, equipmentLedger.getStation()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getInstallationLocation())) { + qw.lambda().like(EquipmentLedger::getInstallationLocation, equipmentLedger.getInstallationLocation()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getEqLedgerCode())) { + qw.lambda().like(EquipmentLedger::getEqLedgerCode, equipmentLedger.getEqLedgerCode()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getDeviceDescription())) { + qw.lambda().like(EquipmentLedger::getDeviceDescription, equipmentLedger.getDeviceDescription()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getEqType())) { + qw.lambda().like(EquipmentLedger::getEqType, equipmentLedger.getEqType()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getMaintenanceTeam())) { + qw.lambda().like(EquipmentLedger::getMaintenanceTeam, equipmentLedger.getMaintenanceTeam()); + } + if (StringUtil.isNotEmpty(equipmentLedger.getManufacturingSerialNo())) { + qw.lambda().like(EquipmentLedger::getManufacturingSerialNo, equipmentLedger.getManufacturingSerialNo()); + } + IPage pages = equipmentLedgerService.page(Condition.getPage(query), qw); + + return R.data(pages); + } + + /** + * 自定义分页 设备台账编码一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入equipmentLedger") + public R> page(EquipmentLedgerVO equipmentLedger, Query query) { + IPage pages = equipmentLedgerService.selectEquipmentLedgerPage(Condition.getPage(query), equipmentLedger); + return R.data(pages); + } + + /** + * 新增 设备台账编码一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入equipmentLedger") + public R save(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.save(equipmentLedger)); + } + + /** + * 修改 设备台账编码一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入equipmentLedger") + public R update(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.updateById(equipmentLedger)); + } + + /** + * 新增或修改 设备台账编码一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入equipmentLedger") + public R submit(@Valid @RequestBody EquipmentLedger equipmentLedger) { + return R.status(equipmentLedgerService.saveOrUpdate(equipmentLedger)); + } + + + /** + * 删除 设备台账编码一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + for (String id : ids.split(",")) { + inventoryDocumentService.delInventoryDocument(Long.parseLong(id)); + techParametersService.delTechParameters(Long.parseLong(id)); + } + return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 驳回OR审核 设备台账编码一览 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + EquipmentLedger equipmentLedger = equipmentLedgerService.getById(Long.parseLong(id)); + equipmentLedger.setCheckStatus(status); + list.add(equipmentLedger); + } + return R.status(equipmentLedgerService.updateBatchById(list)); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getKksList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R> getKksNoList() { + List kksList = equipmentLedgerService.getKksNoList(); + return R.data(kksList); + } + + /** + * 获取对象编号 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取kks信息", notes = "获取kks信息") + public R getDetailList(String KksNo) { + EquipmentLedger DetailList = equipmentLedgerService.getDetailList("'" + KksNo + "'"); + return R.data(DetailList); + } + + /** + * 远程搜索 + */ + @GetMapping("/listByCoding") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "远程搜索", notes = "传入") + public R> listByCoding(String coding) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(coding)) { + if (coding.matches("\\d+")) { + queryWrapper.nested(wrapper -> wrapper.eq("id", Long.parseLong(coding)) + .or().lambda().like(EquipmentLedger::getKksEncoding, coding)); + } else { + queryWrapper.lambda().like(EquipmentLedger::getKksEncoding, coding); + } + } + queryWrapper.lambda().eq(EquipmentLedger::getCheckStatus, 2); + queryWrapper.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); + queryWrapper.lambda().orderByAsc(EquipmentLedger::getKksEncoding); + queryWrapper.lambda().last(" LIMIT 50"); + List list = equipmentLedgerService.list(queryWrapper); + + return R.data(list); + } + + /** + * 获取kkskey + */ + @GetMapping("/getKksKey") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R getKksKey(String KksNo) { + EquipmentLedger DetailList = equipmentLedgerService.getKksKey("'" + KksNo + "'"); + return R.data(DetailList); + } + + /** + * 获取kkskey + */ + @GetMapping("/getEqLedgerCode") + @ApiOperationSupport(order = 13) + @ApiOperation(value = "获取kks编号", notes = "获取kks编号") + public R getEqLedgerCode(String eqLedgerCode) { + EquipmentLedger DetailList = equipmentLedgerService.getEqLedgerCode("'" + eqLedgerCode + "'"); + return R.data(DetailList); + } +} diff --git a/src/main/java/org/energy/modules/leger/dto/DynamicledgerDTO.java b/src/main/java/org/energy/modules/leger/dto/DynamicledgerDTO.java new file mode 100644 index 0000000..a8adf8e --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/DynamicledgerDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.Dynamicledger; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * L_DYNAMICLEDGER数据传输对象实体类 + * + * @author Daf + * @since 2024-07-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DynamicledgerDTO extends Dynamicledger { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/dto/EquipmentLedgerDTO.java b/src/main/java/org/energy/modules/leger/dto/EquipmentLedgerDTO.java new file mode 100644 index 0000000..97d7003 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/EquipmentLedgerDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.EquipmentLedger; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 设备台账编码一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EquipmentLedgerDTO extends EquipmentLedger { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/dto/InspectionStandardsDTO.java b/src/main/java/org/energy/modules/leger/dto/InspectionStandardsDTO.java new file mode 100644 index 0000000..8d4713e --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/InspectionStandardsDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.InspectionStandards; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 检验标准一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionStandardsDTO extends InspectionStandards { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/dto/InventoryDocumentDTO.java b/src/main/java/org/energy/modules/leger/dto/InventoryDocumentDTO.java new file mode 100644 index 0000000..fbfcc6a --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/InventoryDocumentDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.InventoryDocument; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文档清册一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InventoryDocumentDTO extends InventoryDocument { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/dto/TechParametersDTO.java b/src/main/java/org/energy/modules/leger/dto/TechParametersDTO.java new file mode 100644 index 0000000..8fea5cf --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/TechParametersDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.TechParameters; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 技术参数一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TechParametersDTO extends TechParameters { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/dto/ToolInventoryRecordDTO.java b/src/main/java/org/energy/modules/leger/dto/ToolInventoryRecordDTO.java new file mode 100644 index 0000000..531d92b --- /dev/null +++ b/src/main/java/org/energy/modules/leger/dto/ToolInventoryRecordDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.leger.dto; + +import org.energy.modules.leger.entity.ToolInventoryRecord; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工器具编码一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ToolInventoryRecordDTO extends ToolInventoryRecord { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/entity/Dynamicledger.java b/src/main/java/org/energy/modules/leger/entity/Dynamicledger.java new file mode 100644 index 0000000..592e2af --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/Dynamicledger.java @@ -0,0 +1,72 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * L_DYNAMICLEDGER实体类 + * + * @author Daf + * @since 2024-07-17 + */ +@Data +@TableName("l_dynamicledger") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Dynamicledger对象", description = "L_DYNAMICLEDGER") +public class Dynamicledger extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + private Long id; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer station; + /** + * KKS编码 + */ + @ApiModelProperty(value = "KKS编码") + private String kksEncoding; + /** + * KSS描述 + */ + @ApiModelProperty(value = "KSS描述") + private String kksDescription; + /** + * 工单 + */ + @ApiModelProperty(value = "工单") + private Integer workOrder; + /** + * 工作票 + */ + @ApiModelProperty(value = "工作票") + private Integer workTicket; + /** + * 操作票 + */ + @ApiModelProperty(value = "操作票") + private Integer operation; + /** + * 开始日期 + */ + @ApiModelProperty(value = "开始日期") + private String startDate; + /** + * 结束日期 + */ + @ApiModelProperty(value = "结束日期") + private String endDate; + + +} diff --git a/src/main/java/org/energy/modules/leger/entity/EquipmentLedger.java b/src/main/java/org/energy/modules/leger/entity/EquipmentLedger.java new file mode 100644 index 0000000..dbd2fdb --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/EquipmentLedger.java @@ -0,0 +1,232 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 设备台账编码一览实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@TableName("l_equipment_ledger") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "EquipmentLedger对象", description = "设备台账编码一览") +public class EquipmentLedger extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 设备台账编码 + */ + @ApiModelProperty(value = "设备台账编码") + private String eqLedgerCode; + /** + * 用户状态 + */ + @ApiModelProperty(value = "用户状态") + private Integer userStatus; + /** + * KKS编码 + */ + @ApiModelProperty(value = "KKS编码") + private String kksEncoding; + /** + * 设备种类 + */ + @ApiModelProperty(value = "设备种类") + private String eqType; + /** + * 专业 + */ + @ApiModelProperty(value = "专业") + private String major; + /** + * 计划员组 + */ + @ApiModelProperty(value = "计划员组") + private String plannerGroup; + /** + * 计划工厂 + */ + @ApiModelProperty(value = "计划工厂") + private String plannedFactory; + /** + * 设备定级 + */ + @ApiModelProperty(value = "设备定级") + private String eqRank; + /** + * 设备责任人姓名 + */ + @ApiModelProperty(value = "设备责任人姓名") + private String eqResponsibleName; + /** + * 制造商 + */ + @ApiModelProperty(value = "制造商") + private String manufacturer; + /** + * 制造商国家 + */ + @ApiModelProperty(value = "制造商国家") + private String manufacturerCountry; + /** + * 供应商 + */ + @ApiModelProperty(value = "供应商") + private String supplier; + /** + * 型号 + */ + @ApiModelProperty(value = "型号") + private String model; + /** + * 出厂编号 + */ + @ApiModelProperty(value = "出厂编号") + private String factoryNo; + /** + * 出厂日期 + */ + @ApiModelProperty(value = "出厂日期") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String productionDate; + /** + * 安装日期 + */ + @ApiModelProperty(value = "安装日期") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String installDate; + /** + * 调试单位 + */ + @ApiModelProperty(value = "调试单位") + private String debuggingUnit; + /** + * 设备分类 + */ + @ApiModelProperty(value = "设备分类") + private String eqClass; + /** + * 图纸编码 + */ + @ApiModelProperty(value = "图纸编码") + private String drawingCode; + /** + * 设备描述 + */ + @ApiModelProperty(value = "设备描述") + private String deviceDescription; + /** + * KKS描述 + */ + @ApiModelProperty(value = "KKS描述") + private String kksDescription; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer station; + /** + * 系统状态 + */ + @ApiModelProperty(value = "系统状态") + private Integer systemState; + /** + * 工厂区域 + */ + @ApiModelProperty(value = "工厂区域") + private String factoryArea; + /** + * 资产编码 + */ + @ApiModelProperty(value = "资产编码") + private String assetCode; + /** + * 设备责任人工号 + */ + @ApiModelProperty(value = "设备责任人工号") + private String eqResponsibleNo; + /** + * 检修班组 + */ + @ApiModelProperty(value = "检修班组") + private String maintenanceTeam; + /** + * 制造商零件号 + */ + @ApiModelProperty(value = "制造商零件号") + private String manufacturerPartNo; + /** + * 制造年月 + */ + @ApiModelProperty(value = "制造年月") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String manufactureDate; + /** + * 大小尺寸 + */ + @ApiModelProperty(value = "大小尺寸") + private String sizeAndSize; + /** + * 制造序列号 + */ + @ApiModelProperty(value = "制造序列号") + private String manufacturingSerialNo; + /** + * 设计单位 + */ + @ApiModelProperty(value = "设计单位") + private String designUnit; + /** + * 对象重量 + */ + @ApiModelProperty(value = "对象重量") + private String objectWeight; + /** + * 投运日期 + */ + @ApiModelProperty(value = "投运日期") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String operationDate; + /** + * 安装单位 + */ + @ApiModelProperty(value = "安装单位") + private String installationUnit; + /** + * 安装位置 + */ + @ApiModelProperty(value = "安装位置") + private String installationLocation; + /** + * 成本中心 + */ + @ApiModelProperty(value = "成本中心") + private String costCenter; + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Integer checkStatus; + + +} diff --git a/src/main/java/org/energy/modules/leger/entity/InspectionStandards.java b/src/main/java/org/energy/modules/leger/entity/InspectionStandards.java new file mode 100644 index 0000000..24572ae --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/InspectionStandards.java @@ -0,0 +1,52 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 检验标准一览实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@TableName("l_inspection_standards") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionStandards对象", description = "检验标准一览") +public class InspectionStandards extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 工器具编码 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "工器具编码") + private Long toolsCodeId; + /** + * 检验内容 + */ + @ApiModelProperty(value = "检验内容") + private String inspectionContent; + /** + * 检验标准 + */ + @ApiModelProperty(value = "检验标准") + private String inspectionStandards; + + +} diff --git a/src/main/java/org/energy/modules/leger/entity/InventoryDocument.java b/src/main/java/org/energy/modules/leger/entity/InventoryDocument.java new file mode 100644 index 0000000..5ca0419 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/InventoryDocument.java @@ -0,0 +1,93 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 文档清册一览实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@TableName("l_inventory_document") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InventoryDocument对象", description = "文档清册一览") +public class InventoryDocument extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 设备台账主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "设备台账主键") + private Long eqLedgerId; + /** + * 工器具编码主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "工器具编码主键") + private Long toolsCodeId; + /** + * 标题 + */ + @ApiModelProperty(value = "标题") + private String title; + /** + * 作者 + */ + @ApiModelProperty(value = "作者") + private String author; + /** + * 日期 + */ + @ApiModelProperty(value = "日期") + private String date; + /** + * 页数 + */ + @ApiModelProperty(value = "页数") + private Integer page; + /** + * 关键字 + */ + @ApiModelProperty(value = "关键字") + private String keyword; + /** + * 主题 + */ + @ApiModelProperty(value = "主题") + private String thead; + /** + * 附件地址 + */ + @ApiModelProperty(value = "附件地址") + private String accessoryPath; + /** + * 附件名称 + */ + @ApiModelProperty(value = "附件名称") + private String accessoryName; + /** + * 原附件名称 + */ + @ApiModelProperty(value = "原附件名称") + private String prAccessoryName; + + +} diff --git a/src/main/java/org/energy/modules/leger/entity/TechParameters.java b/src/main/java/org/energy/modules/leger/entity/TechParameters.java new file mode 100644 index 0000000..d22b5d8 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/TechParameters.java @@ -0,0 +1,68 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 技术参数一览实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@TableName("l_tech_parameters") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "TechParameters对象", description = "技术参数一览") +public class TechParameters extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 设备台账编码主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "设备台账编码主键") + private Long eqLedgerId; + /** + * 工器具编码主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "工器具编码主键") + private Long toolsCodeId; + /** + * 分类 + */ + @ApiModelProperty(value = "分类") + private String classification; + /** + * 分类描述 + */ + @ApiModelProperty(value = "分类描述") + private String description; + /** + * 技术参数 + */ + @ApiModelProperty(value = "技术参数") + private String techParameters; + /** + * 参数 + */ + @ApiModelProperty(value = "参数") + private String parameters; + + +} diff --git a/src/main/java/org/energy/modules/leger/entity/ToolInventoryRecord.java b/src/main/java/org/energy/modules/leger/entity/ToolInventoryRecord.java new file mode 100644 index 0000000..5650042 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/entity/ToolInventoryRecord.java @@ -0,0 +1,116 @@ +package org.energy.modules.leger.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 工器具编码一览实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@TableName("l_tool_inventory_record") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ToolInventoryRecord对象", description = "工器具编码一览") +public class ToolInventoryRecord extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 工器具编码 + */ + @ApiModelProperty(value = "工器具编码") + private String toolsCodeId; + /** + * 工器具名称 + */ + @ApiModelProperty(value = "工器具名称") + private String toolName; + /** + * 规格型号 + */ + @ApiModelProperty(value = "规格型号") + private String modelSpecification; + /** + * 配置日期 + */ + @ApiModelProperty(value = "配置日期") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String configurationDate; + /** + * 责任班组 + */ + @ApiModelProperty(value = "责任班组") + private String responsibleTeam; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer stations; + /** + * 工器具类别 + */ + @ApiModelProperty(value = "工器具类别") + private String toolCategory; + /** + * 工器具状态 + */ + @ApiModelProperty(value = "工器具状态") + private String toolStatus; + /** + * 已用年限 + */ + @ApiModelProperty(value = "已用年限") + private String yearsInUsed; + /** + * 责任人 + */ + @ApiModelProperty(value = "责任人") + private String responsiblPerson; + /** + * 工器具类别描述 + */ + @ApiModelProperty(value = "工器具类别描述") + private String toolTypeDescription; + /** + * 工器具状态描述 + */ + @ApiModelProperty(value = "工器具状态描述") + private String toolStatusDescription; + /** + * 出厂编号 + */ + @ApiModelProperty(value = "出厂编号") + private String factoryNo; + /** + * 是否检验周期内 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "是否检验周期内") + private Integer isInspectionPeriod; + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Integer checkStatus; + + +} diff --git a/src/main/java/org/energy/modules/leger/excel/EquipmentLedgerExcel.java b/src/main/java/org/energy/modules/leger/excel/EquipmentLedgerExcel.java new file mode 100644 index 0000000..85238aa --- /dev/null +++ b/src/main/java/org/energy/modules/leger/excel/EquipmentLedgerExcel.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class EquipmentLedgerExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "设备台账编码") + private String eqLedgerCode; + + @ColumnWidth(15) + @ExcelProperty(value = "设备描述") + private String deviceDescription; + + @ColumnWidth(15) + @ExcelProperty(value = "KKS编码") + private String kksEncoding; + + @ColumnWidth(15) + @ExcelProperty(value = "设备种类") + private String eqType; + + @ColumnWidth(15) + @ExcelProperty(value = "资产编码") + private String assetCode; + + @ColumnWidth(15) + @ExcelProperty(value = "制造商") + private String manufacturer; + + @ColumnWidth(15) + @ExcelProperty(value = "制造商国家") + private String manufacturerCountry; + + @ColumnWidth(15) + @ExcelProperty(value = "制造商零件号") + private String manufacturerPartNo; + + @ColumnWidth(15) + @ExcelProperty(value = "制造年月") + private String manufactureDate; + + @ColumnWidth(15) + @ExcelProperty(value = "制造序列号") + private String manufacturingSerialNo; + + @ColumnWidth(15) + @ExcelProperty(value = "型号") + private String model; + + @ColumnWidth(15) + @ExcelProperty(value = "大小尺寸") + private String sizeAndSize; + + @ColumnWidth(15) + @ExcelProperty(value = "对象重量") + private String objectWeight; + + @ColumnWidth(15) + @ExcelProperty(value = "审核状态") + private String checkStatus; + +} diff --git a/src/main/java/org/energy/modules/leger/excel/ToolInventoryRecordExcel.java b/src/main/java/org/energy/modules/leger/excel/ToolInventoryRecordExcel.java new file mode 100644 index 0000000..524c93b --- /dev/null +++ b/src/main/java/org/energy/modules/leger/excel/ToolInventoryRecordExcel.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.leger.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class ToolInventoryRecordExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "工器具编码") + private String toolsCodeId; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具名称") + private String toolName; + + @ColumnWidth(15) + @ExcelProperty(value = "规格型号") + private String modelSpecification; + + @ColumnWidth(15) + @ExcelProperty(value = "配置日期") + private String configurationDate; + + @ColumnWidth(15) + @ExcelProperty(value = "责任班组") + private String responsibleTeam; + + @ColumnWidth(15) + @ExcelProperty(value = "场站") + private String stations; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具类别") + private String toolCategory; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具状态") + private String toolStatus; + + @ColumnWidth(15) + @ExcelProperty(value = "已用年限") + private String yearsInUsed; + + @ColumnWidth(15) + @ExcelProperty(value = "责任人") + private String responsiblPerson; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具类别描述") + private String toolTypeDescription; + + @ColumnWidth(15) + @ExcelProperty(value = "工器具状态描述") + private String toolStatusDescription; + + @ColumnWidth(15) + @ExcelProperty(value = "出厂编号") + private String factoryNo; + + @ColumnWidth(15) + @ExcelProperty(value = "是否检验周期内") + private String isInspectionPeriod; + + @ColumnWidth(15) + @ExcelProperty(value = "审核状态") + private String checkStatus; + +} diff --git a/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.java b/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.java new file mode 100644 index 0000000..8ea3d76 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.java @@ -0,0 +1,38 @@ +package org.energy.modules.leger.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.leger.entity.Dynamicledger; +import org.energy.modules.leger.vo.DynamicledgerVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; + +import java.util.List; + +/** + * L_DYNAMICLEDGER Mapper 接口 + * + * @author Daf + * @since 2024-07-17 + */ +public interface DynamicledgerMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param dynamicledger + * @return + */ + List selectDynamicledgerPage(IPage page, DynamicledgerVO dynamicledger); + + List selectDynamicledgerPageExt(IPage page, @Param("entity")Dynamicledger dynamicledger); + + List getWorkOrederListbyKksCd( @Param("entity")Dynamicledger dynamicledger); + + List getWorkticketListbyKksCd(@Param("entity") Dynamicledger dynamicledger); + + List getOperationListbyKksCd( @Param("entity")Dynamicledger dynamicledger); +} diff --git a/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.xml b/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.xml new file mode 100644 index 0000000..f9cd366 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.xml @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.java b/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.java new file mode 100644 index 0000000..eeefbd1 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.java @@ -0,0 +1,50 @@ +package org.energy.modules.leger.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; + +import java.util.List; + +/** + * 设备台账编码一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-04 + */ +public interface EquipmentLedgerMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param equipmentLedger + * @return + */ + List selectEquipmentLedgerPage(IPage page, EquipmentLedgerVO equipmentLedger); + + List exportData(@Param("vo") EquipmentLedgerVO equipmentLedger); + + /** + * 获取kks编号 + */ + List getKksNoList(); + /** + * 获取kksKey + */ + EquipmentLedger getKksKey(String kksNo); + /** + * 获取kks的信息 + */ + EquipmentLedger getDetailList(String kksNo); + + /** + * 获取kksKey + */ + EquipmentLedger getEqLedgerCode(String kksNo); +} diff --git a/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.xml b/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.xml new file mode 100644 index 0000000..ef04476 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/EquipmentLedgerMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.java b/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.java new file mode 100644 index 0000000..7117e98 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.leger.mapper; + +import org.energy.modules.leger.entity.InspectionStandards; +import org.energy.modules.leger.vo.InspectionStandardsVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 检验标准一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-09 + */ +public interface InspectionStandardsMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inspectionStandards + * @return + */ + List selectInspectionStandardsPage(IPage page, InspectionStandardsVO inspectionStandards); + + /** + * 自定义分页 + * + * @param toolsCodeId + * @return + */ + boolean delInspectionStandards(Long toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.xml b/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.xml new file mode 100644 index 0000000..76f2150 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/InspectionStandardsMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + update l_inspection_standards set is_deleted = 1 where tools_code_id = #{_parameter} + + diff --git a/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.java b/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.java new file mode 100644 index 0000000..8ccdbec --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.java @@ -0,0 +1,33 @@ +package org.energy.modules.leger.mapper; + +import org.energy.modules.leger.entity.InventoryDocument; +import org.energy.modules.leger.vo.InventoryDocumentVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 文档清册一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-04 + */ +public interface InventoryDocumentMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inventoryDocument + * @return + */ + List selectInventoryDocumentPage(IPage page, InventoryDocumentVO inventoryDocument); + + /** + * 自定义分页 + * + * @param eqLedgerId + * @return + */ + boolean delInventoryDocument(Long eqLedgerId); +} diff --git a/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.xml b/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.xml new file mode 100644 index 0000000..8afc78a --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/InventoryDocumentMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update l_inventory_document set is_deleted = 1 where eq_ledger_id = #{_parameter} + + + diff --git a/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.java b/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.java new file mode 100644 index 0000000..9355cae --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.leger.mapper; + +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.leger.vo.TechParametersVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 技术参数一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-04 + */ +public interface TechParametersMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param techParameters + * @return + */ + List selectTechParametersPage(IPage page, TechParametersVO techParameters); + + /** + * 自定义分页 + * + * @param eqLedgerId + * @return + */ + boolean delTechParameters(Long eqLedgerId); + +} diff --git a/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.xml b/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.xml new file mode 100644 index 0000000..a417792 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/TechParametersMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + update l_tech_parameters set is_deleted = 1 where eq_ledger_id = #{_parameter} + + + diff --git a/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.java b/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.java new file mode 100644 index 0000000..1a3d2d5 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.java @@ -0,0 +1,47 @@ +package org.energy.modules.leger.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; + +/** + * 工器具编码一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-09 + */ +public interface ToolInventoryRecordMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param toolInventoryRecord + * @return + */ + List selectToolInventoryRecordPage(IPage page, ToolInventoryRecordVO toolInventoryRecord); + + List exportData(@Param("vo") ToolInventoryRecordVO ToolInventoryRecord); + + /** + * 获取kks编号 + */ + List getToolsCodeIdList(); + /** + * 获取工器具明细 + */ + ToolInventoryRecord getDetailList(String toolsCodeId); + + /** + * 获取工器具编码 + */ + ToolInventoryRecord getToolsCodeId(String toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.xml b/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.xml new file mode 100644 index 0000000..312ef5a --- /dev/null +++ b/src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/leger/service/IDynamicledgerService.java b/src/main/java/org/energy/modules/leger/service/IDynamicledgerService.java new file mode 100644 index 0000000..8d34a98 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/IDynamicledgerService.java @@ -0,0 +1,38 @@ +package org.energy.modules.leger.service; + +import org.energy.modules.leger.entity.Dynamicledger; +import org.energy.modules.leger.vo.DynamicledgerVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; + + +import java.util.List; + +/** + * L_DYNAMICLEDGER 服务类 + * + * @author Daf + * @since 2024-07-17 + */ +public interface IDynamicledgerService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param dynamicledger + * @return + */ + IPage selectDynamicledgerPage(IPage page, DynamicledgerVO dynamicledger); + + IPage selectDynamicledgerPageExt(IPage page, Dynamicledger dynamicledger); + + List getWorkOrederListbyKksCd(Dynamicledger dynamicledger); + + List getWorkticketListbyKksCd(Dynamicledger dynamicledger); + + List getOperationListbyKksCd( Dynamicledger dynamicledger); +} diff --git a/src/main/java/org/energy/modules/leger/service/IEquipmentLedgerService.java b/src/main/java/org/energy/modules/leger/service/IEquipmentLedgerService.java new file mode 100644 index 0000000..30fa557 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/IEquipmentLedgerService.java @@ -0,0 +1,55 @@ +package org.energy.modules.leger.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; + +import java.util.List; + +/** + * 设备台账编码一览 服务类 + * + * @author Daf + * @since 2024-07-04 + */ +public interface IEquipmentLedgerService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param equipmentLedger + * @return + */ + IPage selectEquipmentLedgerPage(IPage page, EquipmentLedgerVO equipmentLedger); + + /** + * 获取导出数据 + * + * @param equipmentLedger + * @return + */ + List export(EquipmentLedgerVO equipmentLedger); + + /** + * 获取kksNo + */ + List getKksNoList(); + /** + * 获取kks编码 + */ + EquipmentLedger getKksKey(String KksNo); + /** + * 获取路线的信息 + */ + EquipmentLedger getDetailList(String objectNo); + + /** + * 获取kks编码 + */ + EquipmentLedger getEqLedgerCode(String eqLedgerCode); +} diff --git a/src/main/java/org/energy/modules/leger/service/IInspectionStandardsService.java b/src/main/java/org/energy/modules/leger/service/IInspectionStandardsService.java new file mode 100644 index 0000000..e40b40e --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/IInspectionStandardsService.java @@ -0,0 +1,33 @@ +package org.energy.modules.leger.service; + +import org.energy.modules.leger.entity.InspectionStandards; +import org.energy.modules.leger.vo.InspectionStandardsVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 检验标准一览 服务类 + * + * @author Daf + * @since 2024-07-09 + */ +public interface IInspectionStandardsService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inspectionStandards + * @return + */ + IPage selectInspectionStandardsPage(IPage page, InspectionStandardsVO inspectionStandards); + + /** + * 自定义分页 + * + * @param toolsCodeId + * @return + */ + boolean delInspectionStandards(Long toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/leger/service/IInventoryDocumentService.java b/src/main/java/org/energy/modules/leger/service/IInventoryDocumentService.java new file mode 100644 index 0000000..e25a598 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/IInventoryDocumentService.java @@ -0,0 +1,33 @@ +package org.energy.modules.leger.service; + +import org.energy.modules.leger.entity.InventoryDocument; +import org.energy.modules.leger.vo.InventoryDocumentVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 文档清册一览 服务类 + * + * @author Daf + * @since 2024-07-04 + */ +public interface IInventoryDocumentService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inventoryDocument + * @return + */ + IPage selectInventoryDocumentPage(IPage page, InventoryDocumentVO inventoryDocument); + + /** + * 自定义分页 + * + * @param eqLedgerId + * @return + */ + boolean delInventoryDocument(Long eqLedgerId); + +} diff --git a/src/main/java/org/energy/modules/leger/service/ITechParametersService.java b/src/main/java/org/energy/modules/leger/service/ITechParametersService.java new file mode 100644 index 0000000..4d81dd8 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/ITechParametersService.java @@ -0,0 +1,33 @@ +package org.energy.modules.leger.service; + +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.leger.vo.TechParametersVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 技术参数一览 服务类 + * + * @author Daf + * @since 2024-07-04 + */ +public interface ITechParametersService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param techParameters + * @return + */ + IPage selectTechParametersPage(IPage page, TechParametersVO techParameters); + + /** + * 自定义分页 + * + * @param eqLedgerId + * @return + */ + boolean delTechParameters(Long eqLedgerId); + +} diff --git a/src/main/java/org/energy/modules/leger/service/IToolInventoryRecordService.java b/src/main/java/org/energy/modules/leger/service/IToolInventoryRecordService.java new file mode 100644 index 0000000..29d651c --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/IToolInventoryRecordService.java @@ -0,0 +1,53 @@ +package org.energy.modules.leger.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 工器具编码一览 服务类 + * + * @author Daf + * @since 2024-07-09 + */ +public interface IToolInventoryRecordService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param toolInventoryRecord + * @return + */ + IPage selectToolInventoryRecordPage(IPage page, ToolInventoryRecordVO toolInventoryRecord); + + /** + * 获取导出数据 + * + * @param ToolInventoryRecord + * @return + */ + List export(ToolInventoryRecordVO ToolInventoryRecord); + + /** + * 获取路线编号 + */ + List getToolsCodeIdList(); + /** + * 获取工器具明细 + */ + ToolInventoryRecord getDetailList(String toolsCodeId); + /** + * 获取工器具编码 + */ + ToolInventoryRecord getToolsCodeId(String toolsCodeId); + +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/DynamicledgerServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/DynamicledgerServiceImpl.java new file mode 100644 index 0000000..e700232 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/DynamicledgerServiceImpl.java @@ -0,0 +1,52 @@ +package org.energy.modules.leger.service.impl; + +import org.energy.modules.leger.entity.Dynamicledger; +import org.energy.modules.leger.vo.DynamicledgerVO; +import org.energy.modules.leger.mapper.DynamicledgerMapper; +import org.energy.modules.leger.service.IDynamicledgerService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * L_DYNAMICLEDGER 服务实现类 + * + * @author Daf + * @since 2024-07-17 + */ +@Service +public class DynamicledgerServiceImpl extends BaseServiceImpl implements IDynamicledgerService { + + @Override + public IPage selectDynamicledgerPage(IPage page, DynamicledgerVO dynamicledger) { + return page.setRecords(baseMapper.selectDynamicledgerPage(page, dynamicledger)); + } + + @Override + public IPage selectDynamicledgerPageExt(IPage page, Dynamicledger dynamicledger) { + return page.setRecords(baseMapper.selectDynamicledgerPageExt(page, dynamicledger)); + } + + @Override + public List getWorkOrederListbyKksCd(Dynamicledger dynamicledger) { + + return baseMapper.getWorkOrederListbyKksCd(dynamicledger); + } + + @Override + public List getWorkticketListbyKksCd( Dynamicledger dynamicledger) { + return baseMapper.getWorkticketListbyKksCd(dynamicledger); + } + + @Override + public List getOperationListbyKksCd(Dynamicledger dynamicledger) { + return baseMapper.getOperationListbyKksCd(dynamicledger); + } + +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/EquipmentLedgerServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/EquipmentLedgerServiceImpl.java new file mode 100644 index 0000000..393cdae --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/EquipmentLedgerServiceImpl.java @@ -0,0 +1,71 @@ +package org.energy.modules.leger.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.inspection.entity.InspectionObject; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.leger.mapper.EquipmentLedgerMapper; +import org.energy.modules.leger.service.IEquipmentLedgerService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.vo.WorkPermitVO; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 设备台账编码一览 服务实现类 + * + * @author Daf + * @since 2024-07-04 + */ +@Service +public class EquipmentLedgerServiceImpl extends BaseServiceImpl implements IEquipmentLedgerService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectEquipmentLedgerPage(IPage page, EquipmentLedgerVO equipmentLedger) { + return page.setRecords(baseMapper.selectEquipmentLedgerPage(page, equipmentLedger)); + } + + @Override + public List export(EquipmentLedgerVO equipmentLedger) { + List list = baseMapper.exportData(equipmentLedger); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getCheckStatus())) + item.setCheckStatus(dictService.getValue("check_status", Integer.parseInt(item.getCheckStatus()))); + }); + return list; + } + + @Override + public List getKksNoList() { + List list = baseMapper.getKksNoList(); + return list; + } + + @Override + public EquipmentLedger getDetailList(String KkstNo) { + EquipmentLedger DetailList = baseMapper.getDetailList(KkstNo); + return DetailList; + } + + @Override + public EquipmentLedger getEqLedgerCode(String eqLedgerCode) { + EquipmentLedger DetailList = baseMapper.getEqLedgerCode(eqLedgerCode); + return DetailList; + } + + @Override + public EquipmentLedger getKksKey(String KksNo) { + EquipmentLedger DetailList = baseMapper.getKksKey(KksNo); + return DetailList; + } +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/InspectionStandardsServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/InspectionStandardsServiceImpl.java new file mode 100644 index 0000000..127733f --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/InspectionStandardsServiceImpl.java @@ -0,0 +1,28 @@ +package org.energy.modules.leger.service.impl; + +import org.energy.modules.leger.entity.InspectionStandards; +import org.energy.modules.leger.vo.InspectionStandardsVO; +import org.energy.modules.leger.mapper.InspectionStandardsMapper; +import org.energy.modules.leger.service.IInspectionStandardsService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 检验标准一览 服务实现类 + * + * @author Daf + * @since 2024-07-09 + */ +@Service +public class InspectionStandardsServiceImpl extends BaseServiceImpl implements IInspectionStandardsService { + + @Override + public IPage selectInspectionStandardsPage(IPage page, InspectionStandardsVO inspectionStandards) { + return page.setRecords(baseMapper.selectInspectionStandardsPage(page, inspectionStandards)); + } + @Override + public boolean delInspectionStandards(Long toolsCodeId) { + return baseMapper.delInspectionStandards(toolsCodeId); + } +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/InventoryDocumentServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/InventoryDocumentServiceImpl.java new file mode 100644 index 0000000..8c1e809 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/InventoryDocumentServiceImpl.java @@ -0,0 +1,29 @@ +package org.energy.modules.leger.service.impl; + +import org.energy.modules.leger.entity.InventoryDocument; +import org.energy.modules.leger.vo.InventoryDocumentVO; +import org.energy.modules.leger.mapper.InventoryDocumentMapper; +import org.energy.modules.leger.service.IInventoryDocumentService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 文档清册一览 服务实现类 + * + * @author Daf + * @since 2024-07-04 + */ +@Service +public class InventoryDocumentServiceImpl extends BaseServiceImpl implements IInventoryDocumentService { + + @Override + public IPage selectInventoryDocumentPage(IPage page, InventoryDocumentVO inventoryDocument) { + return page.setRecords(baseMapper.selectInventoryDocumentPage(page, inventoryDocument)); + } + + @Override + public boolean delInventoryDocument(Long eqLedgerId) { + return baseMapper.delInventoryDocument(eqLedgerId); + } +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/TechParametersServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/TechParametersServiceImpl.java new file mode 100644 index 0000000..69afb83 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/TechParametersServiceImpl.java @@ -0,0 +1,30 @@ +package org.energy.modules.leger.service.impl; + +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.leger.vo.TechParametersVO; +import org.energy.modules.leger.mapper.TechParametersMapper; +import org.energy.modules.leger.service.ITechParametersService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 技术参数一览 服务实现类 + * + * @author Daf + * @since 2024-07-04 + */ +@Service +public class TechParametersServiceImpl extends BaseServiceImpl implements ITechParametersService { + + @Override + public IPage selectTechParametersPage(IPage page, TechParametersVO techParameters) { + return page.setRecords(baseMapper.selectTechParametersPage(page, techParameters)); + } + + @Override + public boolean delTechParameters(Long eqLedgerId) { + return baseMapper.delTechParameters(eqLedgerId); + } + +} diff --git a/src/main/java/org/energy/modules/leger/service/impl/ToolInventoryRecordServiceImpl.java b/src/main/java/org/energy/modules/leger/service/impl/ToolInventoryRecordServiceImpl.java new file mode 100644 index 0000000..debdcc3 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/service/impl/ToolInventoryRecordServiceImpl.java @@ -0,0 +1,69 @@ +package org.energy.modules.leger.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.leger.vo.EquipmentLedgerVO; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import org.energy.modules.leger.mapper.ToolInventoryRecordMapper; +import org.energy.modules.leger.service.IToolInventoryRecordService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; + +import java.util.List; + +/** + * 工器具编码一览 服务实现类 + * + * @author Daf + * @since 2024-07-09 + */ +@Service +public class ToolInventoryRecordServiceImpl extends BaseServiceImpl implements IToolInventoryRecordService { + @Autowired + IDictService dictService; + + @Override + public IPage selectToolInventoryRecordPage(IPage page, ToolInventoryRecordVO toolInventoryRecord) { + return page.setRecords(baseMapper.selectToolInventoryRecordPage(page, toolInventoryRecord)); + } + + @Override + public List export(ToolInventoryRecordVO toolInventoryRecord) { + List list = baseMapper.exportData(toolInventoryRecord); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getCheckStatus())) + item.setCheckStatus(dictService.getValue("check_status", Integer.parseInt(item.getCheckStatus()))); + if (StringUtils.isNotEmpty(item.getStations())) + item.setStations(dictService.getValue("station", Integer.parseInt(item.getStations()))); + if (StringUtils.isNotEmpty(item.getIsInspectionPeriod())) + item.setIsInspectionPeriod(dictService.getValue("yes_no", Integer.parseInt(item.getIsInspectionPeriod()))); + }); + return list; + } + + @Override + public List getToolsCodeIdList() { + List list = baseMapper.getToolsCodeIdList(); + return list; + } + + @Override + public ToolInventoryRecord getDetailList(String toolsCodeId) { + ToolInventoryRecord DetailList = baseMapper.getDetailList(toolsCodeId); + return DetailList; + } + + @Override + public ToolInventoryRecord getToolsCodeId(String toolsCodeId) { + ToolInventoryRecord KksNoDetail = baseMapper.getToolsCodeId(toolsCodeId); + return KksNoDetail; + } + +} diff --git a/src/main/java/org/energy/modules/leger/vo/DynamicledgerVO.java b/src/main/java/org/energy/modules/leger/vo/DynamicledgerVO.java new file mode 100644 index 0000000..1ab1587 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/DynamicledgerVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.Dynamicledger; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * L_DYNAMICLEDGER视图实体类 + * + * @author Daf + * @since 2024-07-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DynamicledgerVO对象", description = "L_DYNAMICLEDGER") +public class DynamicledgerVO extends Dynamicledger { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/vo/EquipmentLedgerVO.java b/src/main/java/org/energy/modules/leger/vo/EquipmentLedgerVO.java new file mode 100644 index 0000000..4daf747 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/EquipmentLedgerVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.EquipmentLedger; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 设备台账编码一览视图实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "EquipmentLedgerVO对象", description = "设备台账编码一览") +public class EquipmentLedgerVO extends EquipmentLedger { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/vo/InspectionStandardsVO.java b/src/main/java/org/energy/modules/leger/vo/InspectionStandardsVO.java new file mode 100644 index 0000000..7932b25 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/InspectionStandardsVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.InspectionStandards; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 检验标准一览视图实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InspectionStandardsVO对象", description = "检验标准一览") +public class InspectionStandardsVO extends InspectionStandards { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/vo/InventoryDocumentVO.java b/src/main/java/org/energy/modules/leger/vo/InventoryDocumentVO.java new file mode 100644 index 0000000..97de731 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/InventoryDocumentVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.InventoryDocument; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 文档清册一览视图实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InventoryDocumentVO对象", description = "文档清册一览") +public class InventoryDocumentVO extends InventoryDocument { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/vo/TechParametersVO.java b/src/main/java/org/energy/modules/leger/vo/TechParametersVO.java new file mode 100644 index 0000000..c69ae23 --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/TechParametersVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.TechParameters; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 技术参数一览视图实体类 + * + * @author Daf + * @since 2024-07-04 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "TechParametersVO对象", description = "技术参数一览") +public class TechParametersVO extends TechParameters { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/leger/vo/ToolInventoryRecordVO.java b/src/main/java/org/energy/modules/leger/vo/ToolInventoryRecordVO.java new file mode 100644 index 0000000..d29656f --- /dev/null +++ b/src/main/java/org/energy/modules/leger/vo/ToolInventoryRecordVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.leger.vo; + +import org.energy.modules.leger.entity.ToolInventoryRecord; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 工器具编码一览视图实体类 + * + * @author Daf + * @since 2024-07-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ToolInventoryRecordVO对象", description = "工器具编码一览") +public class ToolInventoryRecordVO extends ToolInventoryRecord { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/master/controller/EquipmentInspectionController.java b/src/main/java/org/energy/modules/master/controller/EquipmentInspectionController.java new file mode 100644 index 0000000..000de43 --- /dev/null +++ b/src/main/java/org/energy/modules/master/controller/EquipmentInspectionController.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.master.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.master.entity.EquipmentInspection; +import org.energy.modules.master.vo.EquipmentInspectionVO; +import org.energy.modules.master.service.IEquipmentInspectionService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 工器具检查 控制器 + * + * @author Daf + * @since 2025-01-09 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/master/equipmentinspection") +@Api(value = "工器具检查", tags = "工器具检查接口") +public class EquipmentInspectionController extends DafController { + + private IEquipmentInspectionService equipmentInspectionService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入equipmentInspection") + public R detail(EquipmentInspection equipmentInspection) { + EquipmentInspection detail = equipmentInspectionService.selectDetail(equipmentInspection.getId()); + return R.data(detail); + } + + /** + * 检查内容详情 + */ + @GetMapping("/detail2") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "详情", notes = "传入equipmentInspection") + public R> detail2(EquipmentInspection equipmentInspection) { + List detail2 = equipmentInspectionService.selectDetail2(equipmentInspection.getId()); + return R.data(detail2); + } + + /** + * 分页 工器具检查 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入equipmentInspection") + public R> list(EquipmentInspection equipmentInspection, Query query) { + IPage pages = equipmentInspectionService.page(Condition.getPage(query), Condition.getQueryWrapper(equipmentInspection)); + return R.data(pages); + } + + /** + * 自定义分页 工器具检查 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入equipmentInspection") + public R> page(EquipmentInspectionVO equipmentInspection, Query query) { + IPage pages = equipmentInspectionService.selectEquipmentInspectionPage(Condition.getPage(query), equipmentInspection); + return R.data(pages); + } + + /** + * 新增 工器具检查 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入equipmentInspection") + public R save(@Valid @RequestBody EquipmentInspection equipmentInspection) { + return R.status(equipmentInspectionService.save(equipmentInspection)); + } + + /** + * 修改 工器具检查 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入equipmentInspection") + public R update(@Valid @RequestBody EquipmentInspection equipmentInspection) { + return R.status(equipmentInspectionService.updateById(equipmentInspection)); + } + + /** + * 新增或修改 工器具检查 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入equipmentInspection") + public R submit(@Valid @RequestBody EquipmentInspection equipmentInspection) { + equipmentInspection.setInspectionStatus(1); + + return R.status(equipmentInspectionService.saveOrUpdate(equipmentInspection)); + } + + + /** + * 删除 工器具检查 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(equipmentInspectionService.deleteLogic(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/master/controller/HistoryRecordController.java b/src/main/java/org/energy/modules/master/controller/HistoryRecordController.java new file mode 100644 index 0000000..1113ec6 --- /dev/null +++ b/src/main/java/org/energy/modules/master/controller/HistoryRecordController.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.master.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.master.entity.HistoryRecord; +import org.energy.modules.master.vo.HistoryRecordVO; +import org.energy.modules.master.service.IHistoryRecordService; +import com.dayu.daf.core.boot.ctrl.DafController; + +/** + * 历史记录 控制器 + * + * @author Daf + * @since 2025-01-07 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/master/historyrecord") +@Api(value = "历史记录", tags = "历史记录接口") +public class HistoryRecordController extends DafController { + + private IHistoryRecordService historyRecordService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入historyRecord") + public R detail(HistoryRecord historyRecord) { + HistoryRecord detail = historyRecordService.selectDetail(historyRecord.getHistoryNumber()); + return R.data(detail); + } + + /** + * 分页 历史记录 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入historyRecord") + public R> list(HistoryRecord historyRecord, Query query) { + IPage pages = historyRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(historyRecord)); + return R.data(pages); + } + + /** + * 自定义分页 历史记录 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入historyRecord") + public R> page(HistoryRecordVO historyRecord, Query query) { + IPage pages = historyRecordService.selectHistoryRecordPage(Condition.getPage(query), historyRecord); + return R.data(pages); + } + + /** + * 新增 历史记录 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入historyRecord") + public R save(@Valid @RequestBody HistoryRecord historyRecord) { + return R.status(historyRecordService.save(historyRecord)); + } + + /** + * 修改 历史记录 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入historyRecord") + public R update(@Valid @RequestBody HistoryRecord historyRecord) { + return R.status(historyRecordService.updateById(historyRecord)); + } + + /** + * 新增或修改 历史记录 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入historyRecord") + public R submit(@Valid @RequestBody HistoryRecord historyRecord) { + return R.status(historyRecordService.saveOrUpdate(historyRecord)); + } + + + /** + * 删除 历史记录 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(historyRecordService.deleteLogic(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/master/dto/EquipmentInspectionDTO.java b/src/main/java/org/energy/modules/master/dto/EquipmentInspectionDTO.java new file mode 100644 index 0000000..b2cf825 --- /dev/null +++ b/src/main/java/org/energy/modules/master/dto/EquipmentInspectionDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.master.dto; + +import org.energy.modules.master.entity.EquipmentInspection; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工器具检查数据传输对象实体类 + * + * @author Daf + * @since 2025-01-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EquipmentInspectionDTO extends EquipmentInspection { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/master/dto/HistoryRecordDTO.java b/src/main/java/org/energy/modules/master/dto/HistoryRecordDTO.java new file mode 100644 index 0000000..9c0fcbd --- /dev/null +++ b/src/main/java/org/energy/modules/master/dto/HistoryRecordDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.master.dto; + +import org.energy.modules.master.entity.HistoryRecord; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 历史记录数据传输对象实体类 + * + * @author Daf + * @since 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class HistoryRecordDTO extends HistoryRecord { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/master/entity/EquipmentInspection.java b/src/main/java/org/energy/modules/master/entity/EquipmentInspection.java new file mode 100644 index 0000000..637433e --- /dev/null +++ b/src/main/java/org/energy/modules/master/entity/EquipmentInspection.java @@ -0,0 +1,107 @@ +package org.energy.modules.master.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 工器具检查实体类 + * + * @author Daf + * @since 2025-01-09 + */ +@Data +@TableName("master_equipment_inspection") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "EquipmentInspection对象", description = "工器具检查") +public class EquipmentInspection extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 工器具编码 + */ + @ApiModelProperty(value = "工器具编码") + private String toolsCodeId; + /** + * 检验周期开始日期 + */ + @ApiModelProperty(value = "检验周期开始日期") + private LocalDate inspectionStartDate; + /** + * 检验周期结束日期 + */ + @ApiModelProperty(value = "检验周期结束日期") + private LocalDate inspectionEndDate; + /** + * 检验频率 + */ + @ApiModelProperty(value = "检验频率") + private Integer inspectionFrequency; + /** + * 频率单位 + */ + @ApiModelProperty(value = "频率单位") + private Integer frequencyUnit; + /** + * 开始日期 + */ + @ApiModelProperty(value = "开始日期") + private LocalDate startDate; + /** + * 计划检查日期 + */ + @ApiModelProperty(value = "计划检查日期") + private LocalDate inspectionPlanDate; + /** + * 计划检查流水号 + */ + @ApiModelProperty(value = "计划检查流水号") + private String inspectionPlanId; + /** + * 实际检查日期 + */ + @ApiModelProperty(value = "实际检查日期") + private LocalDate inspectionDate; + /** + * 检查人 + */ + @ApiModelProperty(value = "检查人") + private Long inspectorStaffId; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + /** + * 工器具名称 + */ + @ApiModelProperty(value = "工器具名称") + private String toolsCodeName; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 执行状态 + */ + @ApiModelProperty(value = "执行状态") + private Integer inspectionStatus; + + +} diff --git a/src/main/java/org/energy/modules/master/entity/HistoryRecord.java b/src/main/java/org/energy/modules/master/entity/HistoryRecord.java new file mode 100644 index 0000000..6edf5c3 --- /dev/null +++ b/src/main/java/org/energy/modules/master/entity/HistoryRecord.java @@ -0,0 +1,96 @@ +package org.energy.modules.master.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 历史记录实体类 + * + * @author Daf + * @since 2025-01-07 + */ +@Data +@TableName("master_history_record") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "HistoryRecord对象", description = "历史记录") +public class HistoryRecord extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * KKS编码 + */ + @ApiModelProperty(value = "KKS编码") + private String kksCode; + /** + * 设备台账编码 + */ + @ApiModelProperty(value = "设备台账编码") + private String eqLedgerCode; + /** + * 工器具编码 + */ + @ApiModelProperty(value = "工器具编码") + private String toolsCodeId; + /** + * 变更类型 + */ + @ApiModelProperty(value = "变更类型") + private Integer changeType; + /** + * 提交时间 + */ + @ApiModelProperty(value = "提交时间") + private LocalDateTime submitTime; + /** + * 审批时间 + */ + @ApiModelProperty(value = "审批时间") + private LocalDateTime approvalTime; + /** + * 审批状态 + */ + @ApiModelProperty(value = "审批状态") + private Integer approvalStatus; + /** + * 审批结果 + */ + @ApiModelProperty(value = "审批结果") + private Integer approvalResult; + /** + * 变更人 + */ + @ApiModelProperty(value = "变更人") + private Long changeStaffId; + /** + * 审批人 + */ + @ApiModelProperty(value = "审批人") + private Long approverStaffId; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + /** + * 工器具编码 + */ + @ApiModelProperty(value = "记录编号") + private String historyNumber; + +} diff --git a/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.java b/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.java new file mode 100644 index 0000000..6fe8e42 --- /dev/null +++ b/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.java @@ -0,0 +1,40 @@ +package org.energy.modules.master.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.master.entity.EquipmentInspection; +import org.energy.modules.master.vo.EquipmentInspectionVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.vo.DepartmentInfoVO; + +import java.util.List; + +/** + * 工器具检查 Mapper 接口 + * + * @author Daf + * @since 2025-01-09 + */ +public interface EquipmentInspectionMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param equipmentInspection + * @return + */ + List selectEquipmentInspectionPage(IPage page, @Param("entity")EquipmentInspectionVO equipmentInspection); + + /** + * 基本信息 + * + */ + EquipmentInspectionVO selectDetail(@Param("id") Long id); + + /** + * 检查内容信息 + * + */ + List selectDetail2(@Param("id") Long id); +} diff --git a/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.xml b/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.xml new file mode 100644 index 0000000..c5e9699 --- /dev/null +++ b/src/main/java/org/energy/modules/master/mapper/EquipmentInspectionMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.java b/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.java new file mode 100644 index 0000000..fb2a23a --- /dev/null +++ b/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.java @@ -0,0 +1,30 @@ +package org.energy.modules.master.mapper; + +import org.energy.modules.master.entity.HistoryRecord; +import org.energy.modules.master.vo.HistoryRecordVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.vo.StationInfoVO; + +import java.util.List; + +/** + * 历史记录 Mapper 接口 + * + * @author Daf + * @since 2025-01-07 + */ +public interface HistoryRecordMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param historyRecord + * @return + */ + List selectHistoryRecordPage(IPage page, @Param("entity")HistoryRecordVO historyRecord); + + HistoryRecordVO selectDetail(@Param("historyNumber") String historyNumber); +} diff --git a/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.xml b/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.xml new file mode 100644 index 0000000..f642de0 --- /dev/null +++ b/src/main/java/org/energy/modules/master/mapper/HistoryRecordMapper.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/master/service/IEquipmentInspectionService.java b/src/main/java/org/energy/modules/master/service/IEquipmentInspectionService.java new file mode 100644 index 0000000..c764371 --- /dev/null +++ b/src/main/java/org/energy/modules/master/service/IEquipmentInspectionService.java @@ -0,0 +1,41 @@ +package org.energy.modules.master.service; + +import org.energy.modules.master.entity.EquipmentInspection; +import org.energy.modules.master.vo.EquipmentInspectionVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.vo.DepartmentInfoVO; + +import java.util.List; + +/** + * 工器具检查 服务类 + * + * @author Daf + * @since 2025-01-09 + */ +public interface IEquipmentInspectionService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param equipmentInspection + * @return + */ + IPage selectEquipmentInspectionPage(IPage page, EquipmentInspectionVO equipmentInspection); + + /** + * 获取详情 + * @param id + * @return + */ + EquipmentInspectionVO selectDetail(Long id); + + /** + * 获取详情 + * @param id + * @return + */ + List selectDetail2(Long id); +} diff --git a/src/main/java/org/energy/modules/master/service/IHistoryRecordService.java b/src/main/java/org/energy/modules/master/service/IHistoryRecordService.java new file mode 100644 index 0000000..75c8644 --- /dev/null +++ b/src/main/java/org/energy/modules/master/service/IHistoryRecordService.java @@ -0,0 +1,32 @@ +package org.energy.modules.master.service; + +import org.energy.modules.master.entity.HistoryRecord; +import org.energy.modules.master.vo.HistoryRecordVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.vo.StationInfoVO; + +/** + * 历史记录 服务类 + * + * @author Daf + * @since 2025-01-07 + */ +public interface IHistoryRecordService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param historyRecord + * @return + */ + IPage selectHistoryRecordPage(IPage page, HistoryRecordVO historyRecord); + + /** + * 获取详情 + * @param historyNumber + * @return + */ + HistoryRecordVO selectDetail(String historyNumber); +} diff --git a/src/main/java/org/energy/modules/master/service/impl/EquipmentInspectionServiceImpl.java b/src/main/java/org/energy/modules/master/service/impl/EquipmentInspectionServiceImpl.java new file mode 100644 index 0000000..a6d8243 --- /dev/null +++ b/src/main/java/org/energy/modules/master/service/impl/EquipmentInspectionServiceImpl.java @@ -0,0 +1,36 @@ +package org.energy.modules.master.service.impl; + +import org.energy.modules.master.entity.EquipmentInspection; +import org.energy.modules.master.vo.EquipmentInspectionVO; +import org.energy.modules.master.mapper.EquipmentInspectionMapper; +import org.energy.modules.master.service.IEquipmentInspectionService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 工器具检查 服务实现类 + * + * @author Daf + * @since 2025-01-09 + */ +@Service +public class EquipmentInspectionServiceImpl extends BaseServiceImpl implements IEquipmentInspectionService { + + @Override + public IPage selectEquipmentInspectionPage(IPage page, EquipmentInspectionVO equipmentInspection) { + return page.setRecords(baseMapper.selectEquipmentInspectionPage(page, equipmentInspection)); + } + + @Override + public EquipmentInspectionVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + + @Override + public List selectDetail2(Long id) { + return (List) baseMapper.selectDetail2(id); + } +} diff --git a/src/main/java/org/energy/modules/master/service/impl/HistoryRecordServiceImpl.java b/src/main/java/org/energy/modules/master/service/impl/HistoryRecordServiceImpl.java new file mode 100644 index 0000000..3daf54b --- /dev/null +++ b/src/main/java/org/energy/modules/master/service/impl/HistoryRecordServiceImpl.java @@ -0,0 +1,31 @@ +package org.energy.modules.master.service.impl; + +import org.energy.modules.master.entity.HistoryRecord; +import org.energy.modules.master.vo.HistoryRecordVO; +import org.energy.modules.master.mapper.HistoryRecordMapper; +import org.energy.modules.master.service.IHistoryRecordService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.org.vo.StationInfoVO; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 历史记录 服务实现类 + * + * @author Daf + * @since 2025-01-07 + */ +@Service +public class HistoryRecordServiceImpl extends BaseServiceImpl implements IHistoryRecordService { + + @Override + public IPage selectHistoryRecordPage(IPage page, HistoryRecordVO historyRecord) { + return page.setRecords(baseMapper.selectHistoryRecordPage(page, historyRecord)); + } + + @Override + public HistoryRecordVO selectDetail(String historyNumber) { + return baseMapper.selectDetail(historyNumber); + } + +} diff --git a/src/main/java/org/energy/modules/master/vo/EquipmentInspectionVO.java b/src/main/java/org/energy/modules/master/vo/EquipmentInspectionVO.java new file mode 100644 index 0000000..72d7163 --- /dev/null +++ b/src/main/java/org/energy/modules/master/vo/EquipmentInspectionVO.java @@ -0,0 +1,29 @@ +package org.energy.modules.master.vo; + +import org.energy.modules.master.entity.EquipmentInspection; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 工器具检查视图实体类 + * + * @author Daf + * @since 2025-01-09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "EquipmentInspectionVO对象", description = "工器具检查") +public class EquipmentInspectionVO extends EquipmentInspection { + private static final long serialVersionUID = 1L; + + private String stationName; + private String inspectionStatus1; + + private String name; + private String inspectionInfo; + private String inspectionStandard; + private String isQuakified; + private String remark2; + +} diff --git a/src/main/java/org/energy/modules/master/vo/HistoryRecordVO.java b/src/main/java/org/energy/modules/master/vo/HistoryRecordVO.java new file mode 100644 index 0000000..5896042 --- /dev/null +++ b/src/main/java/org/energy/modules/master/vo/HistoryRecordVO.java @@ -0,0 +1,58 @@ +package org.energy.modules.master.vo; + +import org.energy.modules.master.entity.HistoryRecord; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 历史记录视图实体类 + * + * @author Daf + * @since 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "HistoryRecordVO对象", description = "历史记录") +public class HistoryRecordVO extends HistoryRecord { + private static final long serialVersionUID = 1L; + + + private String changeType1; + private String approvalStatus1; + private String approvalResult1; + private String submit; + + + private String applicantNumber; + private Date applicantDate; + private String applicantName; + private String applicantDeptId; + private String urgencyLevel1; + private String changeReason; + + private String kksDescription; + private String eqLedgerCode1; + private String eqType; + private String factoryArea; + private String eqRank; + private String manufacturer; + private String manufacturerCountry; + private Date manufactureDate; + private String supplier; + private String supplierContact; + private String factoryNumber; + private Date productionDate; + private Date installDate; + private String designUnit; + private String installationUnit; + private String debuggingUnit; + private String installationLocation; + private String operationDate; + private String assetNumber; + private String costCenter; + private String drawingCode; + +} diff --git a/src/main/java/org/energy/modules/org/controller/DepartmentInfoController.java b/src/main/java/org/energy/modules/org/controller/DepartmentInfoController.java new file mode 100644 index 0000000..74e0c28 --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/DepartmentInfoController.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.org.vo.PositionInfoVO; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.DepartmentInfo; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.service.IDepartmentInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 部门信息 控制器 + * + * @author Daf + * @since 2024-12-26 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/departmentinfo") +@Api(value = "部门信息", tags = "部门信息接口") +public class DepartmentInfoController extends DafController { + + private IDepartmentInfoService departmentInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入departmentInfo") + public R detail(DepartmentInfo departmentInfo) { + DepartmentInfo detail = departmentInfoService.selectDetail(departmentInfo.getId()); + return R.data(detail); + } + + /** + * 分页 部门信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入departmentInfo") + public R> list(DepartmentInfo departmentInfo, Query query) { + IPage pages = departmentInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(departmentInfo)); + return R.data(pages); + } + + /** + * 自定义分页 部门信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入departmentInfo") + public R> page(DepartmentInfoVO departmentInfo, Query query) { + IPage pages = departmentInfoService.selectDepartmentInfoPage(Condition.getPage(query), departmentInfo); + return R.data(pages); + } + + /** + * 新增 部门信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入departmentInfo") + public R save(@Valid @RequestBody DepartmentInfo departmentInfo) { + return R.status(departmentInfoService.save(departmentInfo)); + } + + /** + * 修改 部门信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入departmentInfo") + public R update(@Valid @RequestBody DepartmentInfo departmentInfo) { + return R.status(departmentInfoService.updateById(departmentInfo)); + } + + /** + * 新增或修改 部门信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入departmentInfo") + public R submit(@Valid @RequestBody DepartmentInfo departmentInfo) { + return R.status(departmentInfoService.saveOrUpdate(departmentInfo)); + } + + + /** + * 删除 部门信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(departmentInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 部門下拉列表信息 + */ + @GetMapping("/selectDepartmentInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List departmentSelectInfo(String stationCode) { + List departmentInfoList= departmentInfoService.departmentInfoData(stationCode); + return departmentInfoList; + } + + /** + * 部門狀態下拉列表信息 + */ + @GetMapping("/selectDepartmentStatusInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List departmentStatusSelectInfo(String stationCode) { + List departmentStatusInfoList= departmentInfoService.departmentStatusInfoData(); + return departmentStatusInfoList; + } + +} diff --git a/src/main/java/org/energy/modules/org/controller/PositionInfoController.java b/src/main/java/org/energy/modules/org/controller/PositionInfoController.java new file mode 100644 index 0000000..4dff55d --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/PositionInfoController.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.service.IInspectionStandardsService; +import org.energy.modules.leger.service.IInventoryDocumentService; +import org.energy.modules.leger.service.ITechParametersService; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.PositionInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.service.IPositionInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 岗位信息 控制器 + * + * @author Daf + * @since 2024-12-17 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/positioninfo") +@Api(value = "岗位信息", tags = "岗位信息接口") +public class PositionInfoController extends DafController { + + private IPositionInfoService positionInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入positionInfo") + public R detail(PositionInfo positionInfo) { + PositionInfoVO detail = positionInfoService.selectDetail(positionInfo.getId()); + return R.data(detail); + } + + /** + * 分页 岗位信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入positionInfo") + public R> list(PositionInfo positionInfo, Query query) { + IPage pages = positionInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(positionInfo)); + return R.data(pages); + } + + /** + * 自定义分页 岗位信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入positionInfo") + public R> page(PositionInfoVO positionInfo, Query query) { + IPage pages = positionInfoService.selectPositionInfoPage(Condition.getPage(query), positionInfo); + return R.data(pages); + } + + /** + * 新增 岗位信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入positionInfo") + public R save(@Valid @RequestBody PositionInfo positionInfo) { + return R.status(positionInfoService.save(positionInfo)); + } + + /** + * 修改 岗位信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入positionInfo") + public R update(@Valid @RequestBody PositionInfo positionInfo) { + return R.status(positionInfoService.updateById(positionInfo)); + } + + /** + * 新增或修改 岗位信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入positionInfo") + public R submit(@Valid @RequestBody PositionInfo positionInfo) { + return R.status(positionInfoService.saveOrUpdate(positionInfo)); + } + + + /** + * 删除 岗位信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(positionInfoService.deleteLogic(Func.toLongList(ids))); + } + /** + * 岗位下拉列表信息 + */ + @GetMapping("/selectInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List positionSelectInfo(String stationCode) { + List positionInfoList= positionInfoService.positionInfoData(stationCode); + return positionInfoList; + } + +} diff --git a/src/main/java/org/energy/modules/org/controller/ShiftInfoController.java b/src/main/java/org/energy/modules/org/controller/ShiftInfoController.java new file mode 100644 index 0000000..f0cec4b --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/ShiftInfoController.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.vo.PositionInfoVO; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.ShiftInfo; +import org.energy.modules.org.vo.ShiftInfoVO; +import org.energy.modules.org.service.IShiftInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 值别信息 控制器 + * + * @author Daf + * @since 2024-12-30 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/shiftinfo") +@Api(value = "值别信息", tags = "值别信息接口") +public class ShiftInfoController extends DafController { + + private IShiftInfoService shiftInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入shiftInfo") + public R detail(ShiftInfo shiftInfo) { + ShiftInfo detail = shiftInfoService.selectDetail(shiftInfo.getId()); + return R.data(detail); + } + + /** + * 分页 值别信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入shiftInfo") + public R> list(ShiftInfo shiftInfo, Query query) { + IPage pages = shiftInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(shiftInfo)); + return R.data(pages); + } + + /** + * 自定义分页 值别信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入shiftInfo") + public R> page(ShiftInfoVO shiftInfo, Query query) { + IPage pages = shiftInfoService.selectShiftInfoPage(Condition.getPage(query), shiftInfo); + return R.data(pages); + } + + /** + * 新增 值别信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入shiftInfo") + public R save(@Valid @RequestBody ShiftInfo shiftInfo) { + return R.status(shiftInfoService.save(shiftInfo)); + } + + /** + * 修改 值别信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入shiftInfo") + public R update(@Valid @RequestBody ShiftInfo shiftInfo) { + return R.status(shiftInfoService.updateById(shiftInfo)); + } + + /** + * 新增或修改 值别信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入shiftInfo") + public R submit(@Valid @RequestBody ShiftInfo shiftInfo) { + return R.status(shiftInfoService.saveOrUpdate(shiftInfo)); + } + + + /** + * 删除 值别信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(shiftInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 值别下拉列表信息 + */ + @GetMapping("/selectShiftInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List shiftSelectInfo(String stationCode) { + List shiftInfoList= shiftInfoService.shiftInfoData(stationCode); + return shiftInfoList; + } +} diff --git a/src/main/java/org/energy/modules/org/controller/StaffInfoController.java b/src/main/java/org/energy/modules/org/controller/StaffInfoController.java new file mode 100644 index 0000000..ca32eda --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/StaffInfoController.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import com.alibaba.excel.EasyExcel; +import com.dayu.daf.core.log.annotation.ApiLog; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import org.energy.modules.org.excel.StaffInfoExcel; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.StaffInfo; +import org.energy.modules.org.vo.StaffInfoVO; +import org.energy.modules.org.service.IStaffInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; + +/** + * 人员信息 控制器 + * + * @author Daf + * @since 2024-12-20 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/staffinfo") +@Api(value = "人员信息", tags = "人员信息接口") +public class StaffInfoController extends DafController { + + private IStaffInfoService staffInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入staffInfo") + public R detail(StaffInfo staffInfo) { + StaffInfoVO detail = staffInfoService.selectDetail(staffInfo.getId()); + return R.data(detail); + } + + /** + * 分页 人员信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入staffInfo") + public R> list(StaffInfo staffInfo, Query query) { + IPage pages = staffInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(staffInfo)); + return R.data(pages); + } + + /** + * 自定义分页 人员信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入staffInfo") + public R> page(StaffInfoVO staffInfo, Query query) { + IPage pages = staffInfoService.selectStaffInfoPage(Condition.getPage(query), staffInfo); + return R.data(pages); + } + + /** + * 新增 人员信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入staffInfo") + public R save(@Valid @RequestBody StaffInfo staffInfo) { + return R.status(staffInfoService.save(staffInfo)); + } + + /** + * 修改 人员信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入staffInfo") + public R update(@Valid @RequestBody StaffInfo staffInfo) { + return R.status(staffInfoService.updateById(staffInfo)); + } + + /** + * 新增或修改 人员信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入staffInfo") + public R submit(@Valid @RequestBody StaffInfo staffInfo) { + return R.status(staffInfoService.saveOrUpdate(staffInfo)); + } + + + /** + * 删除 人员信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(staffInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + StaffInfoVO vo = DataUtils.mapToEntity(entity, StaffInfoVO::new); + List list = staffInfoService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("人员管理数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), StaffInfoExcel.class).sheet("人员管理").doWrite(list); + } + + /** + * 人員性別下拉列表信息 + */ + @GetMapping("/selectStaffSexInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List staffSexSelectInfo(String stationCode) { + List staffSexInfoList= staffInfoService.staffSexInfoData(); + return staffSexInfoList; + } + + /** + * 人員下拉列表信息(值别用) + */ + @GetMapping("/selectStaffInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List staffSelectInfo(String stationCode) { + List staffInfoList= staffInfoService.staffInfoData(); + return staffInfoList; + } + +} diff --git a/src/main/java/org/energy/modules/org/controller/StationInfoController.java b/src/main/java/org/energy/modules/org/controller/StationInfoController.java new file mode 100644 index 0000000..59e98c8 --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/StationInfoController.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.swing.text.html.parser.Entity; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.smart.entity.WorkPermit; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.StationInfo; +import org.energy.modules.org.vo.StationInfoVO; +import org.energy.modules.org.service.IStationInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +/** + * 场站信息 控制器 + * + * @author Daf + * @since 2024-12-31 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/stationinfo") +@Api(value = "场站信息", tags = "场站信息接口") +public class StationInfoController extends DafController { + + private IStationInfoService stationInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入stationInfo") + public R detail(StationInfo stationInfo) { + StationInfo detail = stationInfoService.selectDetail(stationInfo.getId()); + return R.data(detail); + } + + /** + * 分页 场站信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入stationInfo") + public R> list(StationInfo stationInfo, Query query) { + IPage pages = stationInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(stationInfo)); + return R.data(pages); + } + + /** + * 自定义分页 场站信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入stationInfo") + public R> page(StationInfoVO stationInfo, Query query) { + IPage pages = stationInfoService.selectStationInfoPage(Condition.getPage(query), stationInfo); + return R.data(pages); + } + + /** + * 新增 场站信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入stationInfo") + public R save(@Valid @RequestBody StationInfo stationInfo) { + return R.status(stationInfoService.save(stationInfo)); + } + + /** + * 修改 场站信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入stationInfo") + public R update(@Valid @RequestBody StationInfo stationInfo) { + return R.status(stationInfoService.updateById(stationInfo)); + } + + /** + * 新增或修改 场站信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入stationInfo") + public R submit(@Valid @RequestBody StationInfo stationInfo) { + String date = LocalDate.now().toString().replace("-",""); + String maxNo = stationInfoService.getMaxNo(date); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(9)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + String no = "L" + date + numFormat; + + String id = date + numFormat; + long formFillerId = Long.parseLong(id); + + stationInfo.setFormFillerId(formFillerId); + stationInfo.setStationCode(no); + stationInfo.setStationStatus(1); + return R.status(stationInfoService.saveOrUpdate(stationInfo)); + } + + + /** + * 删除 场站信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(stationInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 电站下拉列表信息 + */ + @GetMapping("/selectStationInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List stationSelectInfo(String stationCode) { + List stationInfoList= stationInfoService.stationInfoData(stationCode); + return stationInfoList; + } + + /** + * 电站下拉列表信息 + */ + @GetMapping("/selectStationTypeInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List stationTypeSelectInfo(String stationCode) { + List stationTypeInfoList= stationInfoService.stationTypeInfoData(stationCode); + return stationTypeInfoList; + } + + /** + * 电站下拉列表信息 + */ + @GetMapping("/selectMaintenanceStatusInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List maintenanceStatusSelectInfo(String stationCode) { + List maintenanceStatusInfoList= stationInfoService.maintenanceStatusInfoData(stationCode); + return maintenanceStatusInfoList; + } + + /** + * 停用电站一览 + */ + @PostMapping("/closeStation") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R closeStation(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + StationInfo stationInfo = new StationInfo(); + stationInfo.setId(Long.parseLong(ids)); + stationInfo.setStationStatus(2); + return R.status(stationInfoService.updateById(stationInfo)); + } + + +} diff --git a/src/main/java/org/energy/modules/org/controller/TeamInfoController.java b/src/main/java/org/energy/modules/org/controller/TeamInfoController.java new file mode 100644 index 0000000..ea0558f --- /dev/null +++ b/src/main/java/org/energy/modules/org/controller/TeamInfoController.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.org.vo.PositionInfoVO; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.entity.TeamInfo; +import org.energy.modules.org.vo.TeamInfoVO; +import org.energy.modules.org.service.ITeamInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 班组信息 控制器 + * + * @author Daf + * @since 2024-12-25 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/org/teaminfo") +@Api(value = "班组信息", tags = "班组信息接口") +public class TeamInfoController extends DafController { + + private ITeamInfoService teamInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入teamInfo") + public R detail(TeamInfo teamInfo) { + TeamInfo detail = teamInfoService.selectDetail(teamInfo.getId()); + return R.data(detail); + } + + /** + * 分页 班组信息 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入teamInfo") + public R> list(TeamInfo teamInfo, Query query) { + IPage pages = teamInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(teamInfo)); + return R.data(pages); + } + + /** + * 自定义分页 班组信息 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入teamInfo") + public R> page(TeamInfoVO teamInfo, Query query) { + IPage pages = teamInfoService.selectTeamInfoPage(Condition.getPage(query), teamInfo); + return R.data(pages); + } + + /** + * 新增 班组信息 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入teamInfo") + public R save(@Valid @RequestBody TeamInfo teamInfo) { + return R.status(teamInfoService.save(teamInfo)); + } + + /** + * 修改 班组信息 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入teamInfo") + public R update(@Valid @RequestBody TeamInfo teamInfo) { + return R.status(teamInfoService.updateById(teamInfo)); + } + + /** + * 新增或修改 班组信息 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入teamInfo") + public R submit(@Valid @RequestBody TeamInfo teamInfo) { + return R.status(teamInfoService.saveOrUpdate(teamInfo)); + } + + + /** + * 删除 班组信息 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(teamInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 班组下拉列表信息 + */ + @GetMapping("/selectTeamInfo") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉", notes = "") + public List teamSelectInfo(String stationCode) { + List teamInfoList= teamInfoService.teamInfoData(stationCode); + return teamInfoList; + } +} diff --git a/src/main/java/org/energy/modules/org/dto/DepartmentInfoDTO.java b/src/main/java/org/energy/modules/org/dto/DepartmentInfoDTO.java new file mode 100644 index 0000000..272351f --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/DepartmentInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.DepartmentInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 部门信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-26 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DepartmentInfoDTO extends DepartmentInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/dto/PositionInfoDTO.java b/src/main/java/org/energy/modules/org/dto/PositionInfoDTO.java new file mode 100644 index 0000000..1916732 --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/PositionInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.PositionInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 岗位信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class PositionInfoDTO extends PositionInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/dto/ShiftInfoDTO.java b/src/main/java/org/energy/modules/org/dto/ShiftInfoDTO.java new file mode 100644 index 0000000..73dd52e --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/ShiftInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.ShiftInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 值别信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ShiftInfoDTO extends ShiftInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/dto/StaffInfoDTO.java b/src/main/java/org/energy/modules/org/dto/StaffInfoDTO.java new file mode 100644 index 0000000..745ba1e --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/StaffInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.StaffInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 人员信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StaffInfoDTO extends StaffInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/dto/StationInfoDTO.java b/src/main/java/org/energy/modules/org/dto/StationInfoDTO.java new file mode 100644 index 0000000..6b40fe7 --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/StationInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.StationInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 场站信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-31 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StationInfoDTO extends StationInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/dto/TeamInfoDTO.java b/src/main/java/org/energy/modules/org/dto/TeamInfoDTO.java new file mode 100644 index 0000000..eab0ceb --- /dev/null +++ b/src/main/java/org/energy/modules/org/dto/TeamInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.org.dto; + +import org.energy.modules.org.entity.TeamInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 班组信息数据传输对象实体类 + * + * @author Daf + * @since 2024-12-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TeamInfoDTO extends TeamInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/org/entity/DepartmentInfo.java b/src/main/java/org/energy/modules/org/entity/DepartmentInfo.java new file mode 100644 index 0000000..ebe4fb5 --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/DepartmentInfo.java @@ -0,0 +1,67 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 部门信息实体类 + * + * @author Daf + * @since 2024-12-26 + */ +@Data +@TableName("org_department_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DepartmentInfo对象", description = "部门信息") +public class DepartmentInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 部门编号 + */ + @ApiModelProperty(value = "部门编号") + private String departmentNumber; + /** + * 部门名称 + */ + @ApiModelProperty(value = "部门名称") + private String departmentName; + /** + * 创建日期 + */ + @ApiModelProperty(value = "创建日期") + private LocalDate creationDate; + /** + * 部门状态 + */ + @ApiModelProperty(value = "部门状态") + private String departmentStatus; + /** + * 部门简介 + */ + @ApiModelProperty(value = "部门简介") + private String departmentDescription; + + +} diff --git a/src/main/java/org/energy/modules/org/entity/PositionInfo.java b/src/main/java/org/energy/modules/org/entity/PositionInfo.java new file mode 100644 index 0000000..876b615 --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/PositionInfo.java @@ -0,0 +1,72 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 岗位信息实体类 + * + * @author Daf + * @since 2024-12-17 + */ +@Data +@TableName("org_position_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "PositionInfo对象", description = "岗位信息") +public class PositionInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 岗位编号 + */ + @ApiModelProperty(value = "岗位编号") + private String postNumber; + /** + * 岗位名称 + */ + @ApiModelProperty(value = "岗位名称") + private String postName; + /** + * 创建日期 + */ + @ApiModelProperty(value = "创建日期") + private LocalDate creationDate; + /** + * 岗位简介 + */ + @ApiModelProperty(value = "岗位简介") + private String positionDescription; + /** + * 班组编号 + */ + @ApiModelProperty(value = "班组编号") + private String teamNumber; + /** + * 部门编号 + */ + @ApiModelProperty(value = "部门编号") + private String departmentNumber; + + +} diff --git a/src/main/java/org/energy/modules/org/entity/ShiftInfo.java b/src/main/java/org/energy/modules/org/entity/ShiftInfo.java new file mode 100644 index 0000000..01cc537 --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/ShiftInfo.java @@ -0,0 +1,72 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 值别信息实体类 + * + * @author Daf + * @since 2024-12-30 + */ +@Data +@TableName("org_shift_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ShiftInfo对象", description = "值别信息") +public class ShiftInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 值别编号 + */ + @ApiModelProperty(value = "值别编号") + private String shiftNumber; + /** + * 值别名称 + */ + @ApiModelProperty(value = "值别名称") + private String shiftName; + /** + * 创建日期 + */ + @ApiModelProperty(value = "创建日期") + private LocalDate creationDate; + /** + * 班组编号 + */ + @ApiModelProperty(value = "班组编号") + private String teamNumber; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactPhone; + /** + * 值别简介 + */ + @ApiModelProperty(value = "值别简介") + private String shiftDescription; + + +} diff --git a/src/main/java/org/energy/modules/org/entity/StaffInfo.java b/src/main/java/org/energy/modules/org/entity/StaffInfo.java new file mode 100644 index 0000000..7de2376 --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/StaffInfo.java @@ -0,0 +1,121 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 人员信息实体类 + * + * @author Daf + * @since 2024-12-20 + */ +@Data +@TableName("org_staff_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "StaffInfo对象", description = "人员信息") +public class StaffInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 账号 + */ + @ApiModelProperty(value = "账号") + private String account; + /** + * 姓名 + */ + @ApiModelProperty(value = "姓名") + private String name; + /** + * 性别 + */ + @ApiModelProperty(value = "性别") + private String sex; + /** + * 电话号码 + */ + @ApiModelProperty(value = "电话号码") + private String phoneNumber; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 部门编号 + */ + @ApiModelProperty(value = "部门编号") + private String departmentNumber; + /** + * 岗位编号 + */ + @ApiModelProperty(value = "岗位编号") + private String postNumber; + /** + * 班组编号 + */ + @ApiModelProperty(value = "班组编号") + private String teamNumber; + /** + * 值别编码 + */ + @ApiModelProperty(value = "值别编码") + private String shiftNumber; + /** + * 生效日期 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING,pattern="yyyy-MM-dd") + @ApiModelProperty(value = "生效日期") + private Date effectiveDate; + /** + * 失效日期 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING,pattern="yyyy-MM-dd") + @ApiModelProperty(value = "失效日期") + private Date invalidDate; + /** + * 场站负责人 + */ + @ApiModelProperty(value = "场站负责人") + private Integer stationHead; + /** + * 部门负责人 + */ + @ApiModelProperty(value = "部门负责人") + private Integer deptHead; + /** + * 岗位负责人 + */ + @ApiModelProperty(value = "岗位负责人") + private Integer positionHead; + /** + * 班组负责人 + */ + @ApiModelProperty(value = "班组负责人") + private Integer teamHead; + /** + * 值长 + */ + @ApiModelProperty(value = "值长") + private Integer shiftLeader; + + +} diff --git a/src/main/java/org/energy/modules/org/entity/StationInfo.java b/src/main/java/org/energy/modules/org/entity/StationInfo.java new file mode 100644 index 0000000..959114a --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/StationInfo.java @@ -0,0 +1,135 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 场站信息实体类 + * + * @author Daf + * @since 2024-12-31 + */ +@Data +@TableName("org_station_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "StationInfo对象", description = "场站信息") +public class StationInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 填表人 + */ + @ApiModelProperty(value = "填表人") + private Long formFillerId; + /** + * 填表日期 + */ + @ApiModelProperty(value = "填表日期") + private Date formFillDate; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 场站名称 + */ + @ApiModelProperty(value = "场站名称") + private String stationName; + /** + * 类型 + */ + @ApiModelProperty(value = "类型") + private String stationType; + /** + * 地理位置 + */ + @ApiModelProperty(value = "地理位置") + private String geoLocation; + /** + * 装机容量 + */ + @ApiModelProperty(value = "装机容量") + private String installedCapacity; + /** + * 电压等级 + */ + @ApiModelProperty(value = "电压等级") + private String voltageLevel; + /** + * 负荷率 + */ + @ApiModelProperty(value = "负荷率") + private String loadRate; + /** + * 电压输入等级 + */ + @ApiModelProperty(value = "电压输入等级") + private String inputVoltageLevel; + /** + * 电压输出等级 + */ + @ApiModelProperty(value = "电压输出等级") + private String outputVoltageLevel; + /** + * 投运日期 + */ + @ApiModelProperty(value = "投运日期") + private Date operationDate; + /** + * 运维状态 + */ + @ApiModelProperty(value = "运维状态") + private String maintenanceStatus; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactPhone; + /** + * 最近巡检日期 + */ + @ApiModelProperty(value = "最近巡检日期") + private Date lastInspectionDate; + /** + * 下次巡检日期 + */ + @ApiModelProperty(value = "下次巡检日期") + private Date nextInspectionDate; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 电站状态 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "电站状态") + private Integer stationStatus; + + /** + * 班组编号 + */ + @ApiModelProperty(value = "班组编号") + private String teamNumber; + +} diff --git a/src/main/java/org/energy/modules/org/entity/TeamInfo.java b/src/main/java/org/energy/modules/org/entity/TeamInfo.java new file mode 100644 index 0000000..0a4e7be --- /dev/null +++ b/src/main/java/org/energy/modules/org/entity/TeamInfo.java @@ -0,0 +1,71 @@ +package org.energy.modules.org.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 班组信息实体类 + * + * @author Daf + * @since 2024-12-25 + */ +@Data +@TableName("org_team_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "TeamInfo对象", description = "班组信息") +public class TeamInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 场站编码 + */ + @ApiModelProperty(value = "场站编码") + private String stationCode; + /** + * 班组编号 + */ + @ApiModelProperty(value = "班组编号") + private String teamNumber; + /** + * 班组名称 + */ + @ApiModelProperty(value = "班组名称") + private String teamName; + /** + * 创建日期 + */ + @ApiModelProperty(value = "创建日期") + private LocalDate creationDate; + /** + * 班组简介 + */ + @ApiModelProperty(value = "班组简介") + private String teamDescription; + /** + * 责任班组 + */ + @ApiModelProperty(value = "责任班组") + private String responsibleTeam; + /** + * 部门编号 + */ + @ApiModelProperty(value = "部门编号") + private String departmentNumber; + +} diff --git a/src/main/java/org/energy/modules/org/excel/StaffInfoExcel.java b/src/main/java/org/energy/modules/org/excel/StaffInfoExcel.java new file mode 100644 index 0000000..54ad769 --- /dev/null +++ b/src/main/java/org/energy/modules/org/excel/StaffInfoExcel.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.org.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class StaffInfoExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "场站") + private String stationCode; + + @ColumnWidth(15) + @ExcelProperty(value = "账号") + private String account; + + @ColumnWidth(15) + @ExcelProperty(value = "姓名") + private String name; + + @ColumnWidth(15) + @ExcelProperty(value = "电话号") + private String phoneNumber; + + + +} diff --git a/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.java new file mode 100644 index 0000000..eef7f0c --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.entity.DepartmentInfo; +import org.energy.modules.org.vo.DepartmentInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.vo.TeamInfoVO; + +import java.util.List; + +/** + * 部门信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-26 + */ +public interface DepartmentInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param departmentInfo + * @return + */ + List selectDepartmentInfoPage(IPage page, @Param("entity")DepartmentInfoVO departmentInfo); + + DepartmentInfoVO selectDetail(@Param("id") Long id); + + List departmentInfoData(@Param("stationCode") String stationCode); + + List departmentStatusInfoData(); +} diff --git a/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.xml new file mode 100644 index 0000000..dbcd9ef --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/DepartmentInfoMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.java new file mode 100644 index 0000000..f46b1f6 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.java @@ -0,0 +1,33 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.entity.PositionInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * 岗位信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-17 + */ +public interface PositionInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param positionInfo + * @return + */ + List selectPositionInfoPage(IPage page, @Param("entity")PositionInfoVO positionInfo); + + PositionInfoVO selectDetail(@Param("id") Long id); + + List positionInfoData(@Param("stationCode") String stationCode); + +} diff --git a/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.xml new file mode 100644 index 0000000..de3d923 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/PositionInfoMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.java new file mode 100644 index 0000000..717c54e --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.java @@ -0,0 +1,31 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.entity.ShiftInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.ShiftInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 值别信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-30 + */ +public interface ShiftInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param shiftInfo + * @return + */ + List selectShiftInfoPage(IPage page, @Param("entity")ShiftInfoVO shiftInfo); + + ShiftInfoVO selectDetail(@Param("id") Long id); + + List shiftInfoData(@Param("stationCode") String stationCode); +} diff --git a/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.xml new file mode 100644 index 0000000..5de8050 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/ShiftInfoMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.java new file mode 100644 index 0000000..b6814a5 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.java @@ -0,0 +1,43 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import org.energy.modules.org.entity.StaffInfo; +import org.energy.modules.org.excel.StaffInfoExcel; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.StaffInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * 人员信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-20 + */ +public interface StaffInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param staffInfo + * @return + */ + List selectStaffInfoPage(IPage page, @Param("entity")StaffInfoVO staffInfo); + + StaffInfoVO selectDetail(@Param("id") Long id); + + List exportData(@Param("vo") StaffInfoVO staffInfo); + + List staffSexInfoData(); + + List staffInfoData(); + + +} diff --git a/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.xml new file mode 100644 index 0000000..c86f6b7 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/StaffInfoMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.java new file mode 100644 index 0000000..601f0fb --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.java @@ -0,0 +1,40 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.entity.StationInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.StationInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.Collection; +import java.util.List; + +/** + * 场站信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-31 + */ +public interface StationInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param stationInfo + * @return + */ + List selectStationInfoPage(IPage page, @Param("entity")StationInfoVO stationInfo); + + StationInfoVO selectDetail(@Param("id") Long id); + + List stationInfoData(@Param("stationCode") String stationCode); + List stationTypeInfoData(@Param("stationCode") String stationCode); + List maintenanceStatusInfoData(@Param("stationCode") String stationCode); + + /** + * 获取最大编号 + */ + String getMaxNo(String date); +} diff --git a/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.xml new file mode 100644 index 0000000..7a3ed89 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/StationInfoMapper.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.java b/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.java new file mode 100644 index 0000000..40b7455 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.java @@ -0,0 +1,31 @@ +package org.energy.modules.org.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.org.entity.TeamInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.TeamInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 班组信息 Mapper 接口 + * + * @author Daf + * @since 2024-12-25 + */ +public interface TeamInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param teamInfo + * @return + */ + List selectTeamInfoPage(IPage page, @Param("entity")TeamInfoVO teamInfo); + + TeamInfoVO selectDetail(@Param("id") Long id); + + List teamInfoData(@Param("stationCode") String stationCode); +} diff --git a/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.xml b/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.xml new file mode 100644 index 0000000..4a49797 --- /dev/null +++ b/src/main/java/org/energy/modules/org/mapper/TeamInfoMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/org/service/IDepartmentInfoService.java b/src/main/java/org/energy/modules/org/service/IDepartmentInfoService.java new file mode 100644 index 0000000..bcf41d6 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/IDepartmentInfoService.java @@ -0,0 +1,48 @@ +package org.energy.modules.org.service; + +import org.energy.modules.org.entity.DepartmentInfo; +import org.energy.modules.org.vo.DepartmentInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.org.vo.TeamInfoVO; + +import java.util.List; + +/** + * 部门信息 服务类 + * + * @author Daf + * @since 2024-12-26 + */ +public interface IDepartmentInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param departmentInfo + * @return + */ + IPage selectDepartmentInfoPage(IPage page, DepartmentInfoVO departmentInfo); + + /** + * 获取详情 + * @param id + * @return + */ + DepartmentInfoVO selectDetail(Long id); + + /** + * 获取部門下拉详情 + * + * @return + */ + List departmentInfoData(String stationCode); + + /** + * 获取部门状态下拉详情 + * + * @return + */ + List departmentStatusInfoData(); +} diff --git a/src/main/java/org/energy/modules/org/service/IPositionInfoService.java b/src/main/java/org/energy/modules/org/service/IPositionInfoService.java new file mode 100644 index 0000000..6f692e0 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/IPositionInfoService.java @@ -0,0 +1,42 @@ +package org.energy.modules.org.service; + +import org.energy.modules.org.entity.PositionInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * 岗位信息 服务类 + * + * @author Daf + * @since 2024-12-17 + */ +public interface IPositionInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param positionInfo + * @return + */ + IPage selectPositionInfoPage(IPage page, PositionInfoVO positionInfo); + + /** + * 获取详情 + * @param id + * @return + */ + PositionInfoVO selectDetail(Long id); + + /** + * 获取下拉详情 + * + * @return + */ + List positionInfoData(String stationCode); + +} diff --git a/src/main/java/org/energy/modules/org/service/IShiftInfoService.java b/src/main/java/org/energy/modules/org/service/IShiftInfoService.java new file mode 100644 index 0000000..51fe77b --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/IShiftInfoService.java @@ -0,0 +1,41 @@ +package org.energy.modules.org.service; + +import org.energy.modules.org.entity.ShiftInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.ShiftInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 值别信息 服务类 + * + * @author Daf + * @since 2024-12-30 + */ +public interface IShiftInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param shiftInfo + * @return + */ + IPage selectShiftInfoPage(IPage page, ShiftInfoVO shiftInfo); + + /** + * 获取详情 + * @param id + * @return + */ + ShiftInfoVO selectDetail(Long id); + + /** + * 获取下拉详情 + * + * @return + */ + List shiftInfoData(String stationCode); +} diff --git a/src/main/java/org/energy/modules/org/service/IStaffInfoService.java b/src/main/java/org/energy/modules/org/service/IStaffInfoService.java new file mode 100644 index 0000000..fdd5f1e --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/IStaffInfoService.java @@ -0,0 +1,60 @@ +package org.energy.modules.org.service; + +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import org.energy.modules.org.entity.StaffInfo; +import org.energy.modules.org.excel.StaffInfoExcel; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.vo.StaffInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * 人员信息 服务类 + * + * @author Daf + * @since 2024-12-20 + */ +public interface IStaffInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param staffInfo + * @return + */ + IPage selectStaffInfoPage(IPage page, StaffInfoVO staffInfo); + + /** + * 获取详情 + * @param id + * @return + */ + StaffInfoVO selectDetail(Long id); + + /** + * 获取导出数据 + * + * @param staffInfo + * @return + */ + List export(StaffInfoVO staffInfo); + + /** + * 获取性別下拉详情 + * + * @return + */ + List staffSexInfoData(); + + /** + * 获取人员下拉详情 + * + * @return + */ + List staffInfoData(); +} diff --git a/src/main/java/org/energy/modules/org/service/IStationInfoService.java b/src/main/java/org/energy/modules/org/service/IStationInfoService.java new file mode 100644 index 0000000..d92fd3e --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/IStationInfoService.java @@ -0,0 +1,63 @@ +package org.energy.modules.org.service; + +import org.energy.modules.org.entity.StationInfo; +import org.energy.modules.org.vo.StationInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.Collection; +import java.util.List; + +/** + * 场站信息 服务类 + * + * @author Daf + * @since 2024-12-31 + */ +public interface IStationInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param stationInfo + * @return + */ + IPage selectStationInfoPage(IPage page, StationInfoVO stationInfo); + + /** + * 获取详情 + * @param id + * @return + */ + StationInfoVO selectDetail(Long id); + + /** + * 下拉 + * + * @return + */ + List stationInfoData(String stationCode); + + /** + * 下拉 + * + * @return + */ + List stationTypeInfoData(String stationCode); + + /** + * 下拉 + * + * @return + */ + List maintenanceStatusInfoData(String stationCode); + + /** + * 获取最大场站编号 + * + * @param date + */ + String getMaxNo(String date); + +} diff --git a/src/main/java/org/energy/modules/org/service/ITeamInfoService.java b/src/main/java/org/energy/modules/org/service/ITeamInfoService.java new file mode 100644 index 0000000..2b44211 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/ITeamInfoService.java @@ -0,0 +1,42 @@ +package org.energy.modules.org.service; + +import org.energy.modules.org.entity.TeamInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.TeamInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 班组信息 服务类 + * + * @author Daf + * @since 2024-12-25 + */ +public interface ITeamInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param teamInfo + * @return + */ + IPage selectTeamInfoPage(IPage page, TeamInfoVO teamInfo); + + /** + * 获取详情 + * @param id + * @return + */ + TeamInfoVO selectDetail(Long id); + + /** + * 获取下拉详情 + * + * @return + */ + List teamInfoData(String stationCode); + +} diff --git a/src/main/java/org/energy/modules/org/service/impl/DepartmentInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/DepartmentInfoServiceImpl.java new file mode 100644 index 0000000..f6e7012 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/DepartmentInfoServiceImpl.java @@ -0,0 +1,42 @@ +package org.energy.modules.org.service.impl; + +import org.energy.modules.org.entity.DepartmentInfo; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.mapper.DepartmentInfoMapper; +import org.energy.modules.org.service.IDepartmentInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.org.vo.TeamInfoVO; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 部门信息 服务实现类 + * + * @author Daf + * @since 2024-12-26 + */ +@Service +public class DepartmentInfoServiceImpl extends BaseServiceImpl implements IDepartmentInfoService { + + @Override + public IPage selectDepartmentInfoPage(IPage page, DepartmentInfoVO departmentInfo) { + return page.setRecords(baseMapper.selectDepartmentInfoPage(page, departmentInfo)); + } + + @Override + public DepartmentInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + @Override + public List departmentInfoData(String stationCode) { + return baseMapper.departmentInfoData(stationCode); + } + + @Override + public List departmentStatusInfoData() { + return baseMapper.departmentStatusInfoData(); + } + +} diff --git a/src/main/java/org/energy/modules/org/service/impl/PositionInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/PositionInfoServiceImpl.java new file mode 100644 index 0000000..bfda6f8 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/PositionInfoServiceImpl.java @@ -0,0 +1,36 @@ +package org.energy.modules.org.service.impl; + +import org.energy.modules.org.entity.PositionInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.mapper.PositionInfoMapper; +import org.energy.modules.org.service.IPositionInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 岗位信息 服务实现类 + * + * @author Daf + * @since 2024-12-17 + */ +@Service +public class PositionInfoServiceImpl extends BaseServiceImpl implements IPositionInfoService { + + @Override + public IPage selectPositionInfoPage(IPage page, PositionInfoVO positionInfo) { + return page.setRecords(baseMapper.selectPositionInfoPage(page, positionInfo)); + } + + @Override + public PositionInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + @Override + public List positionInfoData(String stationCode) { + return baseMapper.positionInfoData(stationCode); + } +} diff --git a/src/main/java/org/energy/modules/org/service/impl/ShiftInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/ShiftInfoServiceImpl.java new file mode 100644 index 0000000..5a7467d --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/ShiftInfoServiceImpl.java @@ -0,0 +1,37 @@ +package org.energy.modules.org.service.impl; + +import org.energy.modules.org.entity.ShiftInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.ShiftInfoVO; +import org.energy.modules.org.mapper.ShiftInfoMapper; +import org.energy.modules.org.service.IShiftInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 值别信息 服务实现类 + * + * @author Daf + * @since 2024-12-30 + */ +@Service +public class ShiftInfoServiceImpl extends BaseServiceImpl implements IShiftInfoService { + + @Override + public IPage selectShiftInfoPage(IPage page, ShiftInfoVO shiftInfo) { + return page.setRecords(baseMapper.selectShiftInfoPage(page, shiftInfo)); + } + + @Override + public ShiftInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + + @Override + public List shiftInfoData(String stationCode) { + return baseMapper.shiftInfoData(stationCode); + } +} diff --git a/src/main/java/org/energy/modules/org/service/impl/StaffInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/StaffInfoServiceImpl.java new file mode 100644 index 0000000..ebf01a5 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/StaffInfoServiceImpl.java @@ -0,0 +1,55 @@ +package org.energy.modules.org.service.impl; + +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.leger.excel.ToolInventoryRecordExcel; +import org.energy.modules.leger.vo.ToolInventoryRecordVO; +import org.energy.modules.org.entity.StaffInfo; +import org.energy.modules.org.excel.StaffInfoExcel; +import org.energy.modules.org.vo.DepartmentInfoVO; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.StaffInfoVO; +import org.energy.modules.org.mapper.StaffInfoMapper; +import org.energy.modules.org.service.IStaffInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 人员信息 服务实现类 + * + * @author Daf + * @since 2024-12-20 + */ +@Service +public class StaffInfoServiceImpl extends BaseServiceImpl implements IStaffInfoService { + + @Override + public IPage selectStaffInfoPage(IPage page, StaffInfoVO staffInfo) { + return page.setRecords(baseMapper.selectStaffInfoPage(page, staffInfo)); + } + + @Override + public StaffInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + + @Override + public List export(StaffInfoVO StaffInfo) { + List list = baseMapper.exportData(StaffInfo); + return list; + } + + @Override + public List staffSexInfoData() { + return baseMapper.staffSexInfoData(); + } + + @Override + public List staffInfoData() { + return baseMapper.staffInfoData(); + } + + +} diff --git a/src/main/java/org/energy/modules/org/service/impl/StationInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/StationInfoServiceImpl.java new file mode 100644 index 0000000..d3c6550 --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/StationInfoServiceImpl.java @@ -0,0 +1,54 @@ +package org.energy.modules.org.service.impl; + +import org.energy.modules.org.entity.StationInfo; +import org.energy.modules.org.vo.StationInfoVO; +import org.energy.modules.org.mapper.StationInfoMapper; +import org.energy.modules.org.service.IStationInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.Collection; +import java.util.List; + +/** + * 场站信息 服务实现类 + * + * @author Daf + * @since 2024-12-31 + */ +@Service +public class StationInfoServiceImpl extends BaseServiceImpl implements IStationInfoService { + + @Override + public IPage selectStationInfoPage(IPage page, StationInfoVO stationInfo) { + return page.setRecords(baseMapper.selectStationInfoPage(page, stationInfo)); + } + + @Override + public StationInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + + @Override + public List stationInfoData(String stationCode) { + return baseMapper.stationInfoData(stationCode); + } + + @Override + public List stationTypeInfoData(String stationCode) { + return baseMapper.stationTypeInfoData(stationCode); + } + + @Override + public List maintenanceStatusInfoData(String stationCode) { + return baseMapper.maintenanceStatusInfoData(stationCode); + } + + @Override + public String getMaxNo(String date){ + String maxNo = baseMapper.getMaxNo(date); + return maxNo; + } + +} diff --git a/src/main/java/org/energy/modules/org/service/impl/TeamInfoServiceImpl.java b/src/main/java/org/energy/modules/org/service/impl/TeamInfoServiceImpl.java new file mode 100644 index 0000000..7a4cafd --- /dev/null +++ b/src/main/java/org/energy/modules/org/service/impl/TeamInfoServiceImpl.java @@ -0,0 +1,37 @@ +package org.energy.modules.org.service.impl; + +import org.energy.modules.org.entity.TeamInfo; +import org.energy.modules.org.vo.PositionInfoVO; +import org.energy.modules.org.vo.TeamInfoVO; +import org.energy.modules.org.mapper.TeamInfoMapper; +import org.energy.modules.org.service.ITeamInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 班组信息 服务实现类 + * + * @author Daf + * @since 2024-12-25 + */ +@Service +public class TeamInfoServiceImpl extends BaseServiceImpl implements ITeamInfoService { + + @Override + public IPage selectTeamInfoPage(IPage page, TeamInfoVO teamInfo) { + return page.setRecords(baseMapper.selectTeamInfoPage(page, teamInfo)); + } + + @Override + public TeamInfoVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + @Override + public List teamInfoData(String stationCode) { + return baseMapper.teamInfoData(stationCode); + } + +} diff --git a/src/main/java/org/energy/modules/org/vo/DepartmentInfoVO.java b/src/main/java/org/energy/modules/org/vo/DepartmentInfoVO.java new file mode 100644 index 0000000..72d9403 --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/DepartmentInfoVO.java @@ -0,0 +1,26 @@ +package org.energy.modules.org.vo; + +import org.energy.modules.org.entity.DepartmentInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 部门信息视图实体类 + * + * @author Daf + * @since 2024-12-26 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DepartmentInfoVO对象", description = "部门信息") +public class DepartmentInfoVO extends DepartmentInfo { + private static final long serialVersionUID = 1L; + + private String stationName; + private String name; + private String teamQuantity; + private Date createTime; +} diff --git a/src/main/java/org/energy/modules/org/vo/PositionInfoVO.java b/src/main/java/org/energy/modules/org/vo/PositionInfoVO.java new file mode 100644 index 0000000..a1d8391 --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/PositionInfoVO.java @@ -0,0 +1,36 @@ +package org.energy.modules.org.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.energy.modules.org.entity.PositionInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 岗位信息视图实体类 + * + * @author Daf + * @since 2024-12-17 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "PositionInfoVO对象", description = "岗位信息") +public class PositionInfoVO extends PositionInfo { + private static final long serialVersionUID = 1L; + + private String stationName; + + private String name; + + private String teamName; + + private String departmentName; + + private String personnelQuantity; + + private Date createTime; + + +} diff --git a/src/main/java/org/energy/modules/org/vo/ShiftInfoVO.java b/src/main/java/org/energy/modules/org/vo/ShiftInfoVO.java new file mode 100644 index 0000000..e3c3237 --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/ShiftInfoVO.java @@ -0,0 +1,32 @@ +package org.energy.modules.org.vo; + +import org.energy.modules.org.entity.ShiftInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 值别信息视图实体类 + * + * @author Daf + * @since 2024-12-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ShiftInfoVO对象", description = "值别信息") +public class ShiftInfoVO extends ShiftInfo { + private static final long serialVersionUID = 1L; + + private String stationName; + + private String name; + + private String name2; + + private String teamName; + + private Date createTime; + +} diff --git a/src/main/java/org/energy/modules/org/vo/StaffInfoVO.java b/src/main/java/org/energy/modules/org/vo/StaffInfoVO.java new file mode 100644 index 0000000..8b324cf --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/StaffInfoVO.java @@ -0,0 +1,30 @@ +package org.energy.modules.org.vo; + +import org.energy.modules.org.entity.StaffInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 人员信息视图实体类 + * + * @author Daf + * @since 2024-12-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "StaffInfoVO对象", description = "人员信息") +public class StaffInfoVO extends StaffInfo { + private static final long serialVersionUID = 1L; + +// private String dictValue; + private String stationName; + private String postName; + private String teamName; + private String departmentName; + private String shiftName; + + +} diff --git a/src/main/java/org/energy/modules/org/vo/StationInfoVO.java b/src/main/java/org/energy/modules/org/vo/StationInfoVO.java new file mode 100644 index 0000000..195f65c --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/StationInfoVO.java @@ -0,0 +1,33 @@ +package org.energy.modules.org.vo; + +import org.energy.modules.org.entity.StationInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 场站信息视图实体类 + * + * @author Daf + * @since 2024-12-31 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "StationInfoVO对象", description = "场站信息") +public class StationInfoVO extends StationInfo { + private static final long serialVersionUID = 1L; + + private String formFillerName; + + private String name; + + private String teamName; + + private Date createTime; + + private String dictValue; + + +} diff --git a/src/main/java/org/energy/modules/org/vo/TeamInfoVO.java b/src/main/java/org/energy/modules/org/vo/TeamInfoVO.java new file mode 100644 index 0000000..479171b --- /dev/null +++ b/src/main/java/org/energy/modules/org/vo/TeamInfoVO.java @@ -0,0 +1,29 @@ +package org.energy.modules.org.vo; + +import org.energy.modules.org.entity.TeamInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +import java.util.Date; + +/** + * 班组信息视图实体类 + * + * @author Daf + * @since 2024-12-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "TeamInfoVO对象", description = "班组信息") +public class TeamInfoVO extends TeamInfo { + private static final long serialVersionUID = 1L; + + private String stationName; + private String name; + private String departmentName; + private String shiftQuantity; + private Date createTime; + + +} diff --git a/src/main/java/org/energy/modules/release/controller/ProductionInformationController.java b/src/main/java/org/energy/modules/release/controller/ProductionInformationController.java new file mode 100644 index 0000000..5d7a340 --- /dev/null +++ b/src/main/java/org/energy/modules/release/controller/ProductionInformationController.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.release.controller; + +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.smart.entity.OperationTicket; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.release.vo.ProductionInformationVO; +import org.energy.modules.release.service.IProductionInformationService; +import com.dayu.daf.core.boot.ctrl.DafController; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; + +/** + * 生产信息发布 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/release/productioninformation") +@Api(value = "生产信息发布", tags = "生产信息发布接口") +public class ProductionInformationController extends DafController { + + private IProductionInformationService productionInformationService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入productionInformation") + public R detail(ProductionInformation productionInformation) { + ProductionInformation detail = productionInformationService.getOne(Condition.getQueryWrapper(productionInformation)); + return R.data(detail); + } + + /** + * 分页 生产信息发布 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入productionInformation") + public R> list(ProductionInformation productionInformation, Query query) { + IPage pages = productionInformationService.page(Condition.getPage(query), Condition.getQueryWrapper(productionInformation)); + return R.data(pages); + } + + /** + * 自定义分页 生产信息发布 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入productionInformation") + public R> page(ProductionInformationVO productionInformation, Query query) { + IPage pages = productionInformationService.selectProductionInformationPage(Condition.getPage(query), productionInformation); + return R.data(pages); + } + + /** + * 新增 生产信息发布 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入productionInformation") + public R save(@Valid @RequestBody ProductionInformation productionInformation) { + return R.status(productionInformationService.save(productionInformation)); + } + + /** + * 修改 生产信息发布 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入productionInformation") + public R update(@Valid @RequestBody ProductionInformation productionInformation) { + return R.status(productionInformationService.updateById(productionInformation)); + } + + /** + * 新增或修改 生产信息发布 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入productionInformation") + public R submit(@Valid @RequestBody ProductionInformation productionInformation) { + LocalDate currentDate = LocalDate.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + String formattedDate = currentDate.format(formatter); + //获取最大消息编码 + String maxMessageCd = productionInformationService.getMaxMessageCd("'"+formattedDate+"%'"); + int number; + if (StringUtil.isNotEmpty(maxMessageCd)){ + number = Integer.parseInt(maxMessageCd.substring(maxMessageCd.length()-4)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + productionInformation.setMessageEncoding(formattedDate+numFormat); + + return R.status(productionInformationService.saveOrUpdate(productionInformation)); + } + + + /** + * 删除 生产信息发布 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(productionInformationService.deleteLogic(Func.toLongList(ids))); + } + /** + * 审核 生产信息发布 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 生产信息发布 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) + { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 生产信息发布 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + ProductionInformation productionInformation = new ProductionInformation(); + productionInformation.setId(Long.parseLong(id)); + productionInformation.setCheckstatus(status); + list.add(productionInformation); + } + return R.status(productionInformationService.updateBatchById(list)); + } + + /** + * 停用 生产信息发布 + */ + @PostMapping("/stop") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R stop(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.changeRelease(2,ids); + } + + /** + * 发布 生产信息发布 + */ + @PostMapping("/release") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R release(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) + { + return this.changeRelease(1,ids); + } + + /** + * 发布R停用 生产信息发布 + */ + public R changeRelease(Integer discontinue, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + ProductionInformation productionInformation = new ProductionInformation(); + productionInformation.setId(Long.parseLong(id)); + productionInformation.setIsDiscontinue(discontinue); + list.add(productionInformation); + } + return R.status(productionInformationService.updateBatchById(list)); + } + +} diff --git a/src/main/java/org/energy/modules/release/dto/ProductionInformationDTO.java b/src/main/java/org/energy/modules/release/dto/ProductionInformationDTO.java new file mode 100644 index 0000000..29f7e31 --- /dev/null +++ b/src/main/java/org/energy/modules/release/dto/ProductionInformationDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.release.dto; + +import org.energy.modules.release.entity.ProductionInformation; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 生产信息发布数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductionInformationDTO extends ProductionInformation { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/release/entity/ProductionInformation.java b/src/main/java/org/energy/modules/release/entity/ProductionInformation.java new file mode 100644 index 0000000..c491a73 --- /dev/null +++ b/src/main/java/org/energy/modules/release/entity/ProductionInformation.java @@ -0,0 +1,81 @@ +package org.energy.modules.release.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 生产信息发布实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("rel_production_information") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ProductionInformation对象", description = "生产信息发布") +public class ProductionInformation extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 消息编码 + */ + @ApiModelProperty(value = "消息编码") + private String messageEncoding; + /** + * 消息主题 + */ + @ApiModelProperty(value = "消息主题") + private String messageTopic; + /** + * 消息类型 + */ + @ApiModelProperty(value = "消息类型") + private String messageType; + /** + * 消息内容 + */ + @ApiModelProperty(value = "消息内容") + private String messageContent; + /** + * 发布人 + */ + @ApiModelProperty(value = "发布人") + private String publisher; + /** + * 消息等级 + */ + @ApiModelProperty(value = "消息等级") + private String messageLevel; + /** + * 是否停用 + */ + @ApiModelProperty(value = "是否停用") + private Integer isDiscontinue; + /** + * 发布时间 + */ + @ApiModelProperty(value = "发布时间") + private String releaseTime; + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Integer checkstatus; + + +} diff --git a/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.java b/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.java new file mode 100644 index 0000000..fb3d395 --- /dev/null +++ b/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.java @@ -0,0 +1,27 @@ +package org.energy.modules.release.mapper; + +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.release.vo.ProductionInformationVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 生产信息发布 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface ProductionInformationMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param productionInformation + * @return + */ + List selectProductionInformationPage(IPage page, ProductionInformationVO productionInformation); + + String getMaxMessageCd(String data); +} diff --git a/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.xml b/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.xml new file mode 100644 index 0000000..a3db19b --- /dev/null +++ b/src/main/java/org/energy/modules/release/mapper/ProductionInformationMapper.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/release/service/IProductionInformationService.java b/src/main/java/org/energy/modules/release/service/IProductionInformationService.java new file mode 100644 index 0000000..9963756 --- /dev/null +++ b/src/main/java/org/energy/modules/release/service/IProductionInformationService.java @@ -0,0 +1,26 @@ +package org.energy.modules.release.service; + +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.release.vo.ProductionInformationVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 生产信息发布 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IProductionInformationService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param productionInformation + * @return + */ + IPage selectProductionInformationPage(IPage page, ProductionInformationVO productionInformation); + + String getMaxMessageCd(String data); +} diff --git a/src/main/java/org/energy/modules/release/service/impl/ProductionInformationServiceImpl.java b/src/main/java/org/energy/modules/release/service/impl/ProductionInformationServiceImpl.java new file mode 100644 index 0000000..6395763 --- /dev/null +++ b/src/main/java/org/energy/modules/release/service/impl/ProductionInformationServiceImpl.java @@ -0,0 +1,29 @@ +package org.energy.modules.release.service.impl; + +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.release.vo.ProductionInformationVO; +import org.energy.modules.release.mapper.ProductionInformationMapper; +import org.energy.modules.release.service.IProductionInformationService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 生产信息发布 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class ProductionInformationServiceImpl extends BaseServiceImpl implements IProductionInformationService { + + @Override + public IPage selectProductionInformationPage(IPage page, ProductionInformationVO productionInformation) { + return page.setRecords(baseMapper.selectProductionInformationPage(page, productionInformation)); + } + @Override + public String getMaxMessageCd(String data){ + return baseMapper.getMaxMessageCd(data); + } + +} diff --git a/src/main/java/org/energy/modules/release/vo/ProductionInformationVO.java b/src/main/java/org/energy/modules/release/vo/ProductionInformationVO.java new file mode 100644 index 0000000..fc7acbc --- /dev/null +++ b/src/main/java/org/energy/modules/release/vo/ProductionInformationVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.release.vo; + +import org.energy.modules.release.entity.ProductionInformation; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 生产信息发布视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ProductionInformationVO对象", description = "生产信息发布") +public class ProductionInformationVO extends ProductionInformation { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/resource/OssEndpoint.java b/src/main/java/org/energy/modules/resource/OssEndpoint.java new file mode 100644 index 0000000..9f8090e --- /dev/null +++ b/src/main/java/org/energy/modules/resource/OssEndpoint.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.resource; + +import com.dayu.daf.core.oss.QiniuTemplate; +import com.dayu.daf.core.oss.model.DafFile; +import com.dayu.daf.core.oss.model.OssFile; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import io.swagger.annotations.Api; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 对象存储端点 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/daf-resource/oss/endpoint") +@Api(value = "对象存储端点", tags = "对象存储端点") +public class OssEndpoint { + + private QiniuTemplate qiniuTemplate; + + /** + * 创建存储桶 + * + * @param bucketName 存储桶名称 + * @return Bucket + */ + @SneakyThrows + @PostMapping("/make-bucket") + public R makeBucket(@RequestParam String bucketName) { + qiniuTemplate.makeBucket(bucketName); + return R.success("创建成功"); + } + + /** + * 创建存储桶 + * + * @param bucketName 存储桶名称 + * @return R + */ + @SneakyThrows + @PostMapping("/remove-bucket") + public R removeBucket(@RequestParam String bucketName) { + qiniuTemplate.removeBucket(bucketName); + return R.success("删除成功"); + } + + /** + * 拷贝文件 + * + * @param fileName 存储桶对象名称 + * @param destBucketName 目标存储桶名称 + * @param destFileName 目标存储桶对象名称 + * @return R + */ + @SneakyThrows + @PostMapping("/copy-file") + public R copyFile(@RequestParam String fileName, @RequestParam String destBucketName, String destFileName) { + qiniuTemplate.copyFile(fileName, destBucketName, destFileName); + return R.success("操作成功"); + } + + /** + * 获取文件信息 + * + * @param fileName 存储桶对象名称 + * @return InputStream + */ + @SneakyThrows + @GetMapping("/stat-file") + public R statFile(@RequestParam String fileName) { + return R.data(qiniuTemplate.statFile(fileName)); + } + + /** + * 获取文件相对路径 + * + * @param fileName 存储桶对象名称 + * @return String + */ + @SneakyThrows + @GetMapping("/file-path") + public R filePath(@RequestParam String fileName) { + return R.data(qiniuTemplate.filePath(fileName)); + } + + + /** + * 获取文件外链 + * + * @param fileName 存储桶对象名称 + * @return String + */ + @SneakyThrows + @GetMapping("/file-link") + public R fileLink(@RequestParam String fileName) { + return R.data(qiniuTemplate.fileLink(fileName)); + } + + /** + * 上传文件 + * + * @param file 文件 + * @return ObjectStat + */ + @SneakyThrows + @PostMapping("/put-file") + public R putFile(@RequestParam MultipartFile file) { + DafFile DafFile = qiniuTemplate.putFile(file.getOriginalFilename(), file.getInputStream()); + return R.data(DafFile); + } + + /** + * 上传文件 + * + * @param fileName 存储桶对象名称 + * @param file 文件 + * @return ObjectStat + */ + @SneakyThrows + @PostMapping("/put-file-by-name") + public R putFile(@RequestParam String fileName, @RequestParam MultipartFile file) { + DafFile DafFile = qiniuTemplate.putFile(fileName, file.getInputStream()); + return R.data(DafFile); + } + + /** + * 删除文件 + * + * @param fileName 存储桶对象名称 + * @return R + */ + @SneakyThrows + @PostMapping("/remove-file") + public R removeFile(@RequestParam String fileName) { + qiniuTemplate.removeFile(fileName); + return R.success("操作成功"); + } + + /** + * 批量删除文件 + * + * @param fileNames 存储桶对象名称集合 + * @return R + */ + @SneakyThrows + @PostMapping("/remove-files") + public R removeFiles(@RequestParam String fileNames) { + qiniuTemplate.removeFiles(Func.toStrList(fileNames)); + return R.success("操作成功"); + } + +} diff --git a/src/main/java/org/energy/modules/smart/controller/OperationItemController.java b/src/main/java/org/energy/modules/smart/controller/OperationItemController.java new file mode 100644 index 0000000..3603a3c --- /dev/null +++ b/src/main/java/org/energy/modules/smart/controller/OperationItemController.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.entity.InventoryDocument; +import org.energy.modules.smart.entity.OperationTicket; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.OperationItem; +import org.energy.modules.smart.vo.OperationItemVO; +import org.energy.modules.smart.service.IOperationItemService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 操作项目表 控制器 + * + * @author Daf + * @since 2024-07-11 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/smart/operationitem") +@Api(value = "操作项目表", tags = "操作项目表接口") +public class OperationItemController extends DafController { + + private IOperationItemService operationItemService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入operationItem") + public R detail(OperationItem operationItem) { + OperationItem detail = operationItemService.getOne(Condition.getQueryWrapper(operationItem)); + return R.data(detail); + } + + /** + * 分页 操作项目表 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入operationItem") + public R> list(OperationItem operationItem, Query query) { + IPage pages = operationItemService.page(Condition.getPage(query), Condition.getQueryWrapper(operationItem)); + return R.data(pages); + } + + /** + * 自定义分页 操作项目表 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入operationItem") + public R> page(OperationItemVO operationItem, Query query) { + IPage pages = operationItemService.selectOperationItemPage(Condition.getPage(query), operationItem); + return R.data(pages); + } + + /** + * 新增 操作项目表 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入operationItem") + public R save(@Valid @RequestBody OperationItem operationItem) { + return R.status(operationItemService.save(operationItem)); + } + + /** + * 修改 操作项目表 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入operationItem") + public R update(@Valid @RequestBody OperationItem operationItem) { + return R.status(operationItemService.updateById(operationItem)); + } + + /** + * 新增或修改 操作项目表 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入operationItem") + public R submit(@Valid @RequestBody OperationItem operationItem) { + String perationItemNo = operationItem.getOperationTicketNo()+"XM"; + String maxOperationItemNo = + operationItemService.getMaxOperationItemNo("'"+operationItem.getOperationTicketNo()+"'"); + int number; + if (StringUtil.isNotEmpty(maxOperationItemNo)){ + number = Integer.parseInt(maxOperationItemNo.substring(maxOperationItemNo.length()-4)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%04d", number); + operationItem.setOperationItemNo(perationItemNo+numFormat); + return R.status(operationItemService.saveOrUpdate(operationItem)); + } + + + /** + * 删除 操作项目表 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(operationItemService.deleteLogic(Func.toLongList(ids))); + } + /** + * 列表 操作项目 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入OperationItem") + public R> getList(OperationItem operationItem) { + List list = operationItemService.list(Condition.getQueryWrapper(operationItem)); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/smart/controller/OperationTicketController.java b/src/main/java/org/energy/modules/smart/controller/OperationTicketController.java new file mode 100644 index 0000000..d9849c4 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/controller/OperationTicketController.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.smart.excel.OperationTicketExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.vo.OperationTicketVO; +import org.energy.modules.smart.service.IOperationTicketService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 操作票一览 控制器 + * + * @author Daf + * @since 2024-07-10 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/smart/operationticket") +@Api(value = "操作票一览", tags = "操作票一览接口") +public class OperationTicketController extends DafController { + + private IOperationTicketService operationTicketService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入operationTicket") + public R detail(OperationTicket operationTicket) { + OperationTicket detail = operationTicketService.getOne(Condition.getQueryWrapper(operationTicket)); + return R.data(detail); + } + + /** + * 分页 操作票一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入operationTicket") + public R> list(OperationTicket operationTicket, Query query) { + IPage pages = operationTicketService.page(Condition.getPage(query), Condition.getQueryWrapper(operationTicket)); + return R.data(pages); + } + + /** + * 自定义分页 操作票一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入operationTicket") + public R> page(OperationTicketVO operationTicket, Query query) { + IPage pages = operationTicketService.selectOperationTicketPageExt(Condition.getPage(query), operationTicket); + return R.data(pages); + } + + /** + * 新增 操作票一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入operationTicket") + public R save(@Valid @RequestBody OperationTicket operationTicket) { + return R.status(operationTicketService.save(operationTicket)); + } + + /** + * 修改 操作票一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入operationTicket") + public R update(@Valid @RequestBody OperationTicket operationTicket) { + return R.status(operationTicketService.updateById(operationTicket)); + } + + /** + * 新增或修改 操作票一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入operationTicket") + public R submit(@Valid @RequestBody OperationTicket operationTicket) { + return R.status(operationTicketService.saveOrUpdate(operationTicket)); + } + + + /** + * 删除 操作票一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(operationTicketService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 操作票一览 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 操作票一览 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) + { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 操作票一览 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + OperationTicket operationTicket = new OperationTicket(); + operationTicket.setId(Long.parseLong(id)); + operationTicket.setReviewStatus(status); + list.add(operationTicket); + } + return R.status(operationTicketService.updateBatchById(list)); + } + /** + * 失效 + */ + @PostMapping("/closeticket") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "失效", notes = "传入ids") + public R lapse(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "是否合格", required = true) @RequestParam Integer isQuakified,@RequestParam String riskControlEvaluation) { + return this.updateInspectionRoute(3, isQuakified, ids , riskControlEvaluation); + } + + /** + * 生效OR失效 + */ + public R updateInspectionRoute(Integer status, Integer isQuakified, String ids , String riskControlEvaluation) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + OperationTicket operationTicket = new OperationTicket(); + operationTicket.setId(Long.parseLong(id)); + operationTicket.setIsQuakified(isQuakified); + operationTicket.setRiskControlEvaluation(riskControlEvaluation); + operationTicket.setSts(status); + list.add(operationTicket); + } + return R.status(operationTicketService.updateBatchById(list)); + } + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportInspectionRoute(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + entity.forEach((key, value) -> { + if (!"station".equals(key) && !"isQuakified".equals(key) && !"sts".equals(key)) + { + entity.put(key, "%" + value + "%"); + } + }); + OperationTicket vo = DataUtils.mapToEntity(entity, OperationTicket::new); + + List list = operationTicketService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("操作票数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), OperationTicketExcel.class).sheet("操作票").doWrite(list); + } +} diff --git a/src/main/java/org/energy/modules/smart/controller/WorkOrderController.java b/src/main/java/org/energy/modules/smart/controller/WorkOrderController.java new file mode 100644 index 0000000..7030fa1 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/controller/WorkOrderController.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.auth.utils.TokenUtil; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.service.IWorkOrderService; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 控制器 + * + * @author Daf + * @since 2024-07-12 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/workorder") +@Api(value = "", tags = "接口") +public class WorkOrderController extends DafController { + + private IWorkOrderService workOrderService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入workOrder") + public R detail(WorkOrder workOrder) { + WorkOrderVO detail = workOrderService.selectDetail(workOrder.getId()); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入workOrder") + public R> list(WorkOrder workOrder, Query query) { + IPage pages = workOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(workOrder)); + return R.data(pages); + } + + /** + * 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入workOrder") + public R> page(WorkOrderVO workOrderVO, Query query) { + IPage pages = workOrderService.selectWorkOrderPage(Condition.getPage(query), workOrderVO); + return R.data(pages); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入workOrder") + public R save(@Valid @RequestBody WorkOrder workOrder) { + return R.status(workOrderService.save(workOrder)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入workOrder") + public R update(@Valid @RequestBody WorkOrder workOrder) { + return R.status(workOrderService.updateById(workOrder)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入workOrder") + public R submit(@Valid @RequestBody WorkOrder workOrder) { + return R.status(workOrderService.saveOrUpdate(workOrder)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(workOrderService.removeByIds(Func.toLongList(ids))); + } + + /** + * 审核 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + WorkOrder workOrder = workOrderService.getById(Long.parseLong(id)); + if (workOrder == null) { + throw new ServiceException(TokenUtil.SYSTEM_NOT_DATA); + } + workOrder.setId(Long.parseLong(id)); + workOrder.setApprovalStatus(status); + list.add(workOrder); + } + return R.status(workOrderService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + WorkOrderVO vo = DataUtils.mapToEntity(entity, WorkOrderVO::new); + List list = workOrderService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("工单数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), WorkOrderExcel.class).sheet("工单").doWrite(list); + } + +} diff --git a/src/main/java/org/energy/modules/smart/controller/WorkPermitAttachmentController.java b/src/main/java/org/energy/modules/smart/controller/WorkPermitAttachmentController.java new file mode 100644 index 0000000..7392346 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/controller/WorkPermitAttachmentController.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.leger.entity.TechParameters; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.WorkPermitAttachment; +import org.energy.modules.smart.vo.WorkPermitAttachmentVO; +import org.energy.modules.smart.service.IWorkPermitAttachmentService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.util.List; + +/** + * 工作票附票一览 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/smart/workpermitattachment") +@Api(value = "工作票附票一览", tags = "工作票附票一览接口") +public class WorkPermitAttachmentController extends DafController { + + private IWorkPermitAttachmentService workPermitAttachmentService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入workPermitAttachment") + public R detail(WorkPermitAttachment workPermitAttachment) { + WorkPermitAttachment detail = workPermitAttachmentService.getOne(Condition.getQueryWrapper(workPermitAttachment)); + return R.data(detail); + } + + /** + * 分页 工作票附票一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入workPermitAttachment") + public R> list(WorkPermitAttachment workPermitAttachment, Query query) { + IPage pages = workPermitAttachmentService.page(Condition.getPage(query), Condition.getQueryWrapper(workPermitAttachment)); + return R.data(pages); + } + + /** + * 自定义分页 工作票附票一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入workPermitAttachment") + public R> page(WorkPermitAttachmentVO workPermitAttachment, Query query) { + IPage pages = workPermitAttachmentService.selectWorkPermitAttachmentPage(Condition.getPage(query), workPermitAttachment); + return R.data(pages); + } + + /** + * 新增 工作票附票一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入workPermitAttachment") + public R save(@Valid @RequestBody WorkPermitAttachment workPermitAttachment) { + return R.status(workPermitAttachmentService.save(workPermitAttachment)); + } + + /** + * 修改 工作票附票一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入workPermitAttachment") + public R update(@Valid @RequestBody WorkPermitAttachment workPermitAttachment) { + return R.status(workPermitAttachmentService.updateById(workPermitAttachment)); + } + + /** + * 新增或修改 工作票附票一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入workPermitAttachment") + public R submit(@Valid @RequestBody WorkPermitAttachment workPermitAttachment) { + String ticketNo =workPermitAttachment.getTicketCode(); + Integer ticketType =workPermitAttachment.getTicketType(); + Integer maxNo= workPermitAttachmentService.getCount(workPermitAttachment.getWorkTicketNo())+1; + String ticketIndex =String.format("%02d", maxNo); + workPermitAttachment.setTicketCode(ticketNo + ticketType.toString() + ticketIndex); + return R.status(workPermitAttachmentService.saveOrUpdate(workPermitAttachment)); + } + + /** + * 删除 工作票附票一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(workPermitAttachmentService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 技术参数一览 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "列表", notes = "workPermitAttachment") + public R> getList(WorkPermitAttachment workPermitAttachment) { + List list = workPermitAttachmentService.list(Condition.getQueryWrapper(workPermitAttachment)); + return R.data(list); + } +} diff --git a/src/main/java/org/energy/modules/smart/controller/WorkPermitController.java b/src/main/java/org/energy/modules/smart/controller/WorkPermitController.java new file mode 100644 index 0000000..2d761d2 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/controller/WorkPermitController.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.service.IWorkPermitAttachmentService; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.vo.WorkPermitVO; +import org.energy.modules.smart.service.IWorkPermitService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 工作票一览 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/smart/workpermit") +@Api(value = "工作票一览", tags = "工作票一览接口") +public class WorkPermitController extends DafController { + + private IWorkPermitService workPermitService; + private IWorkPermitAttachmentService workPermitAttachmentService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入workPermit") + public R detail(WorkPermit workPermit) { + WorkPermit detail = workPermitService.getOne(Condition.getQueryWrapper(workPermit)); + return R.data(detail); + } + + /** + * 分页 工作票一览 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入workPermit") + public R> list(WorkPermitVO workPermit, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + //场站 + if (null != workPermit.getStations()) { + qw.lambda().eq(WorkPermit::getStations, workPermit.getStations()); + } + //工作票编号 + if (StringUtil.isNotEmpty(workPermit.getWorkTicketNo())) { + qw.lambda().like(WorkPermit::getWorkTicketNo, workPermit.getWorkTicketNo()); + } + //工作票类型 + if (StringUtil.isNotEmpty(workPermit.getWorkTicketType())) { + qw.lambda().like(WorkPermit::getWorkTicketType, workPermit.getWorkTicketType()); + } + //状态 + if (null != workPermit.getWorkState()) { + qw.lambda().eq(WorkPermit::getWorkState, workPermit.getWorkState()); + } + //许可人 + if (StringUtil.isNotEmpty(workPermit.getLicensors())) { + qw.lambda().like(WorkPermit::getLicensors, workPermit.getLicensors()); + } + //签发人 + if (StringUtil.isNotEmpty(workPermit.getIssuer())) { + qw.lambda().like(WorkPermit::getIssuer, workPermit.getIssuer()); + } + + //工作负责人 + if (StringUtil.isNotEmpty(workPermit.getWorkChargePerson())) { + qw.lambda().like(WorkPermit::getWorkChargePerson, workPermit.getWorkChargePerson()); + } + + //计划开始时间 + if (null != workPermit.getPlanStartDateExt()) { + String planStartDate = workPermit.getPlanStartDateExt().substring(0,10); + qw.lambda().last(" and plan_start_date >= TO_TIMESTAMP('"+planStartDate + " 00:00:00','YYYY-MM-DD HH24:MI:SS')"); + } + IPage pages = workPermitService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 工作票一览 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入workPermit") + public R> page(WorkPermitVO workPermit, Query query) { + IPage pages = workPermitService.selectWorkPermitPage(Condition.getPage(query), workPermit); + return R.data(pages); + } + + /** + * 新增 工作票一览 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入workPermit") + public R save(@Valid @RequestBody WorkPermit workPermit) { + return R.status(workPermitService.save(workPermit)); + } + + /** + * 修改 工作票一览 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入workPermit") + public R update(@Valid @RequestBody WorkPermit workPermit) { + return R.status(workPermitService.updateById(workPermit)); + } + + /** + * 新增或修改 工作票一览 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入workPermit") + public R submit(@Valid @RequestBody WorkPermit workPermit) { + return R.status(workPermitService.saveOrUpdate(workPermit)); + } + + /** + * 删除 工作票一览 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + for (String id : ids.split(",")) { + workPermitAttachmentService.delWorkPermitAttachment(Long.parseLong(id)); + } + return R.status(workPermitService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 工作票一览 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 工作票一览 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 工作票一览 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + WorkPermit workPermit = new WorkPermit(); + workPermit.setId(Long.parseLong(id)); + workPermit.setCheckStatus(status); + list.add(workPermit); + } + return R.status(workPermitService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + WorkPermitVO vo = DataUtils.mapToEntity(entity, WorkPermitVO::new); + List list = workPermitService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("工作票数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), WorkPermitExcel.class).sheet("工作票").doWrite(list); + } + + /** + * 关票工作票一览 + */ + @PostMapping("/closeTicket") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "更新", notes = "传入ids") + public R closeTicket(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + WorkPermit workPermit = new WorkPermit(); + workPermit.setId(Long.parseLong(id)); + workPermit.setWorkState(4); + list.add(workPermit); + } + return R.status(workPermitService.updateBatchById(list)); + } +} + diff --git a/src/main/java/org/energy/modules/smart/dto/OperationItemDTO.java b/src/main/java/org/energy/modules/smart/dto/OperationItemDTO.java new file mode 100644 index 0000000..9b3427e --- /dev/null +++ b/src/main/java/org/energy/modules/smart/dto/OperationItemDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.smart.dto; + +import org.energy.modules.smart.entity.OperationItem; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 操作项目表数据传输对象实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class OperationItemDTO extends OperationItem { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/dto/OperationTicketDTO.java b/src/main/java/org/energy/modules/smart/dto/OperationTicketDTO.java new file mode 100644 index 0000000..56bb4e0 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/dto/OperationTicketDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.smart.dto; + +import org.energy.modules.smart.entity.OperationTicket; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 操作票一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class OperationTicketDTO extends OperationTicket { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/dto/WorkOrderDTO.java b/src/main/java/org/energy/modules/smart/dto/WorkOrderDTO.java new file mode 100644 index 0000000..f034595 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/dto/WorkOrderDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.smart.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.smart.entity.WorkOrder; + +/** + * 数据传输对象实体类 + * + * @author Daf + * @since 2024-07-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WorkOrderDTO extends WorkOrder { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/dto/WorkPermitAttachmentDTO.java b/src/main/java/org/energy/modules/smart/dto/WorkPermitAttachmentDTO.java new file mode 100644 index 0000000..d145237 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/dto/WorkPermitAttachmentDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.smart.dto; + +import org.energy.modules.smart.entity.WorkPermitAttachment; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工作票附票一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WorkPermitAttachmentDTO extends WorkPermitAttachment { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/dto/WorkPermitDTO.java b/src/main/java/org/energy/modules/smart/dto/WorkPermitDTO.java new file mode 100644 index 0000000..ebeffbb --- /dev/null +++ b/src/main/java/org/energy/modules/smart/dto/WorkPermitDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.smart.dto; + +import org.energy.modules.smart.entity.WorkPermit; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 工作票一览数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WorkPermitDTO extends WorkPermit { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/entity/OperationItem.java b/src/main/java/org/energy/modules/smart/entity/OperationItem.java new file mode 100644 index 0000000..c58c2a2 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/entity/OperationItem.java @@ -0,0 +1,65 @@ +package org.energy.modules.smart.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 操作项目表实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@TableName("smt_operation_item") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "OperationItem对象", description = "操作项目表") +public class OperationItem extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 操作票编号 + */ + @ApiModelProperty(value = "操作票编号") + private String operationTicketNo; + /** + * 操作项目编号 + */ + @ApiModelProperty(value = "操作项目编号") + private String operationItemNo; + /** + * 项目名称 + */ + @ApiModelProperty(value = "项目名称") + private String itmeName; + /** + * 危害因素 + */ + @ApiModelProperty(value = "危害因素") + private String securityMeasures; + /** + * 风险等级 + */ + @ApiModelProperty(value = "风险等级") + private String riskLevel; + /** + * 其他 + */ + @ApiModelProperty(value = "其他") + private String other; + + +} diff --git a/src/main/java/org/energy/modules/smart/entity/OperationTicket.java b/src/main/java/org/energy/modules/smart/entity/OperationTicket.java new file mode 100644 index 0000000..d9fa31e --- /dev/null +++ b/src/main/java/org/energy/modules/smart/entity/OperationTicket.java @@ -0,0 +1,178 @@ +package org.energy.modules.smart.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 操作票一览实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@TableName("smt_operation_ticket") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "OperationTicket对象", description = "操作票一览") +public class OperationTicket extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * KKS编码 + */ + @ApiModelProperty(value = "KKS编码") + private String kksEncoding; + /** + * KSS描述 + */ + @ApiModelProperty(value = "KSS描述") + private String kksDescription; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer station; + /** + * 操作票编号 + */ + @ApiModelProperty(value = "操作票编号") + private String operationTicketNo; + /** + * 操作票类型 + */ + @ApiModelProperty(value = "操作票类型") + private String operationTicketType; + /** + * 工作班组 + */ + @ApiModelProperty(value = "工作班组") + private String workTeam; + /** + * 工作负责人 + */ + @ApiModelProperty(value = "工作负责人") + private String workLeader; + /** + * 监护人 + */ + @ApiModelProperty(value = "监护人") + private String guardian; + /** + * 发令人 + */ + @ApiModelProperty(value = "发令人") + private String givingOrdersUser; + /** + * 作业风险等级 + */ + @ApiModelProperty(value = "作业风险等级") + private String jobRiskLevel; + /** + * 控制等级 + */ + @ApiModelProperty(value = "控制等级") + private String controlLevel; + /** + * 计划开始时间 + */ + @ApiModelProperty(value = "计划开始时间") + private String plannedStartTime; + /** + * 计划结束时间 + */ + @ApiModelProperty(value = "计划结束时间") + private String plannedEndTime; + /** + * 工作签发时间 + */ + @ApiModelProperty(value = "工作签发时间") + private String workIssuanceTime; + /** + * 人员资格 + */ + @ApiModelProperty(value = "人员资格") + private String personnelQualification; + /** + * 人员状态 + */ + @ApiModelProperty(value = "人员状态") + private String personnelState; + /** + * 人员防护 + */ + @ApiModelProperty(value = "人员防护") + private String personnelPritection; + /** + * 安全距离 + */ + @ApiModelProperty(value = "安全距离") + private String safeDistance; + /** + * 走错间隔 + */ + @ApiModelProperty(value = "走错间隔") + private String wrongInterval; + /** + * 安全措施落实 + */ + @ApiModelProperty(value = "安全措施落实") + private String securityMeasuresImplement; + /** + * 开展过程检查 + */ + @ApiModelProperty(value = "开展过程检查") + private String conductProcessInspections; + /** + * 安全培训落实 + */ + @ApiModelProperty(value = "安全培训落实") + private String securityTrainingImplement; + /** + * 其他 + */ + @ApiModelProperty(value = "其他") + private String other; + /** + * 安全技术措施交底 + */ + @ApiModelProperty(value = "安全技术措施交底") + private String securityMeasuresDisclosure; + /** + * 作业后风险管控情况评价 + */ + @ApiModelProperty(value = "作业后风险管控情况评价") + private String riskControlEvaluation; + /** + * 状态 + */ + @ApiModelProperty(value = "状态") + private Integer sts; + /** + * 是否合格 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "是否合格") + private Integer isQuakified; + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Integer reviewStatus; + + +} diff --git a/src/main/java/org/energy/modules/smart/entity/WorkOrder.java b/src/main/java/org/energy/modules/smart/entity/WorkOrder.java new file mode 100644 index 0000000..98e16a4 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/entity/WorkOrder.java @@ -0,0 +1,139 @@ +package org.energy.modules.smart.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; + +/** + * 实体类 + * + * @author Daf + * @since 2024-07-@TableField(updateStrategy = FieldStrategy.IGNORED) + */ +@Data +@TableName("smt_work_order") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkOrder对象", description = "WorkOrder对象") +public class WorkOrder extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 台账id + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "台账id") + private Long equipmentLedgerId; + /** + * 工单编号 + */ + @ApiModelProperty(value = "工单编号") + private String workOrderNo; + /** + * 工单类型 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "工单类型") + private Integer workOrderType; + /** + * 内容描述 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "内容描述") + private String description; + /** + * 负责人 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "负责人") + private Long managerUserId; + /** + * 责任班组 + */ + @ApiModelProperty(value = "责任班组") + private String responsibilityTeam; + /** + * 计划工厂 + */ + @ApiModelProperty(value = "计划工厂") + private String plannedFactory; + /** + * 维护作业类型 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "维护作业类型") + private String maintenanceTaskType; + /** + * 用户状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "用户状态") + private Integer userStatus; + /** + * 发生时间 + */ + @ApiModelProperty(value = "发生时间") + private LocalDateTime occurrenceTime; + /** + * 执行班组 + */ + @ApiModelProperty(value = "执行班组") + private String taskTeam; + /** + * 处理时间 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "处理时间") + private LocalDateTime processingTime; + /** + * 发生原因 + */ + @ApiModelProperty(value = "发生原因") + private String causeIncident; + /** + * 处理过程描述 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "处理过程描述") + private String processDescription; + /** + * 结束时间 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "结束时间") + private LocalDateTime endTime; + /** + * 处理结果 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @TableField(updateStrategy = FieldStrategy.IGNORED) + @ApiModelProperty(value = "处理结果") + private Integer handlingResult; + /** + * 审核状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "审核状态") + private Integer approvalStatus; + + + +} diff --git a/src/main/java/org/energy/modules/smart/entity/WorkPermit.java b/src/main/java/org/energy/modules/smart/entity/WorkPermit.java new file mode 100644 index 0000000..bb99402 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/entity/WorkPermit.java @@ -0,0 +1,186 @@ +package org.energy.modules.smart.entity; + +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 工作票一览实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("smt_work_permit") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkPermit对象", description = "工作票一览") +public class WorkPermit extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * KKS编码 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "KKS编码") + private String kksEncoding; + /** + * KKS描述 + */ + @ApiModelProperty(value = "KKS描述") + private String kksDescription; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Integer stations; + /** + * 工作票编号 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "工作票编号") + private String workTicketNo; + /** + * 工作票类型 + */ + @ApiModelProperty(value = "工作票类型") + private String workTicketType; + /** + * 工单 + */ + @ApiModelProperty(value = "工单") + private String tickets; + /** + * 班组 + */ + @ApiModelProperty(value = "班组") + private String team; + /** + * 工作负责人 + */ + @ApiModelProperty(value = "工作负责人") + private String workChargePerson; + /** + * 工作班成员 + */ + @ApiModelProperty(value = "工作班成员") + private String workClassMembers; + /** + * 许可人 + */ + @ApiModelProperty(value = "许可人") + private String licensors; + /** + * 签发人 + */ + @ApiModelProperty(value = "签发人") + private String issuer; + /** + * 功能位置 + */ + @ApiModelProperty(value = "功能位置") + private String functionalLocation; + /** + * 工作地点 + */ + @ApiModelProperty(value = "工作地点") + private String placeWork; + /** + * 工作内容 + */ + @ApiModelProperty(value = "工作内容") + private String jobDescription; + /** + * 计划开始时间 + */ + @ApiModelProperty(value = "计划开始时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + private LocalDateTime planStartDate; + /** + * 计划结束时间 + */ + @ApiModelProperty(value = "计划结束时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime planEndDate; + /** + * 工作条件 + */ + @ApiModelProperty(value = "工作条件") + private String workingConditions; + /** + * 实际结束时间 + */ + @ApiModelProperty(value = "实际结束时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime actualEndDate; + /** + * 是否延期 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "是否延期") + private Integer isExtended; + /** + * 计划延期时间 + */ + @ApiModelProperty(value = "计划延期时间") + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime plannedExtensionDate; + /** + * 延期申请理由 + */ + @ApiModelProperty(value = "延期申请理由") + private String extRegReason; + /** + * 是否变更 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "是否变更") + private Integer ischanged; + /** + * 变更申请理由 + */ + @ApiModelProperty(value = "变更申请理由") + private String changeReason; + /** + * 总结 + */ + @ApiModelProperty(value = "总结") + private String summary; + /** + * 工作状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "工作状态") + private Integer workState; + + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Integer checkStatus; + + +} diff --git a/src/main/java/org/energy/modules/smart/entity/WorkPermitAttachment.java b/src/main/java/org/energy/modules/smart/entity/WorkPermitAttachment.java new file mode 100644 index 0000000..7ae729d --- /dev/null +++ b/src/main/java/org/energy/modules/smart/entity/WorkPermitAttachment.java @@ -0,0 +1,74 @@ +package org.energy.modules.smart.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 工作票附票一览实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("smt_work_permit_attachment") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkPermitAttachment对象", description = "工作票附票一览") +public class WorkPermitAttachment extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + + /** + * 工作票主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "工作票主键") + private Long workTicketNo; + /** + * 附票编码 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "附票编码") + private String ticketCode; + /** + * 附票类型 + */ + @ApiModelProperty(value = "附票类型") + private Integer ticketType; + /** + * 专项作业名称 + */ + @ApiModelProperty(value = "专项作业名称") + private String specialJobName; + /** + * 工作内容 + */ + @ApiModelProperty(value = "工作内容") + private String jobDescription; + /** + * 工作状态 + */ + @ApiModelProperty(value = "工作状态") + private Integer workStatus; + /** + * 工作地点 + */ + @ApiModelProperty(value = "工作地点") + private String placeWork; + + +} diff --git a/src/main/java/org/energy/modules/smart/excel/OperationTicketExcel.java b/src/main/java/org/energy/modules/smart/excel/OperationTicketExcel.java new file mode 100644 index 0000000..8ef5d7b --- /dev/null +++ b/src/main/java/org/energy/modules/smart/excel/OperationTicketExcel.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class OperationTicketExcel implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * KKS编码 + */ + @ColumnWidth(20) + @ExcelProperty(value = "KKS编码") + private String kksEncoding; + /** + * KSS描述 + */ + @ColumnWidth(20) + @ExcelProperty(value ="KSS描述") + private String kksDescription; + /** + * 场站 + */ + @ColumnWidth(20) + @ExcelProperty(value = "场站") + private String stationName; + /** + * 操作票编号 + */ + @ColumnWidth(20) + @ExcelProperty(value ="操作票编号") + private String operationTicketNo; + + /** + * 工作班组 + */ + @ColumnWidth(20) + @ExcelProperty(value = "工作班组") + private String workTeam; + /** + * 工作负责人 + */ + @ColumnWidth(20) + @ExcelProperty(value = "工作负责人") + private String workLeader; + /** + * 监护人 + */ + @ColumnWidth(20) + @ExcelProperty(value = "监护人") + private String guardian; + /** + * 发令人 + */ + @ColumnWidth(20) + @ExcelProperty(value = "发令人") + private String givingOrdersUser; + /** + * 作业风险等级 + */ + @ColumnWidth(20) + @ExcelProperty(value ="作业风险等级") + private String jobRiskLevel; + /** + * 控制等级 + */ + @ColumnWidth(20) + @ExcelProperty(value = "控制等级") + private String controlLevel; + /** + * 计划开始时间 + */ + @ColumnWidth(20) + @ExcelProperty(value = "计划开始时间") + private String plannedStartTime; + /** + * 计划结束时间 + */ + @ColumnWidth(20) + @ExcelProperty(value = "计划结束时间") + private String plannedEndTime; + /** + * 工作签发时间 + */ + @ColumnWidth(20) + @ExcelProperty(value ="工作签发时间") + private String workIssuanceTime; + /** + * 人员资格 + */ + @ColumnWidth(20) + @ExcelProperty(value ="人员资格") + private String personnelQualification; + /** + * 人员状态 + */ + @ColumnWidth(20) + @ExcelProperty(value = "人员状态") + private String personnelState; + /** + * 人员防护 + */ + @ColumnWidth(20) + @ExcelProperty(value = "人员防护") + private String personnelPritection; + /** + * 安全距离 + */ + @ColumnWidth(20) + @ExcelProperty(value = "安全距离") + private String safeDistance; + /** + * 走错间隔 + */ + @ColumnWidth(20) + @ExcelProperty(value = "走错间隔") + private String wrongInterval; + /** + * 安全措施落实 + */ + @ColumnWidth(20) + @ExcelProperty(value = "安全措施落实") + private String securityMeasuresImplement; + /** + * 开展过程检查 + */ + @ColumnWidth(20) + @ExcelProperty(value = "开展过程检查") + private String conductProcessInspections; + /** + * 安全培训落实 + */ + @ColumnWidth(20) + @ExcelProperty(value = "安全培训落实") + private String securityTrainingImplement; + /** + * 其他 + */ + @ColumnWidth(20) + @ExcelProperty(value = "其他") + private String other; + /** + * 安全技术措施交底 + */ + @ColumnWidth(20) + @ExcelProperty(value = "安全技术措施交底") + private String securityMeasuresDisclosure; + /** + * 作业后风险管控情况评价 + */ + @ColumnWidth(20) + @ExcelProperty(value ="作业后风险管控情况评价") + private String riskControlEvaluation; + /** + * 状态 + */ + @ColumnWidth(20) + @ExcelProperty(value ="状态") + private String stsName; + /** + * 是否合格 + */ + @ColumnWidth(20) + @ExcelProperty(value = "是否合格") + private String isQuakifiedName; + /** + * 审核状态 + */ + @ColumnWidth(20) + @ExcelProperty(value = "审核状态") + private String reviewStatus; + +} diff --git a/src/main/java/org/energy/modules/smart/excel/WorkOrderExcel.java b/src/main/java/org/energy/modules/smart/excel/WorkOrderExcel.java new file mode 100644 index 0000000..a9d8bc9 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/excel/WorkOrderExcel.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.smart.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class WorkOrderExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "KKS编码") + private String kksEncoding; + + @ColumnWidth(20) + @ExcelProperty(value = "工单编号") + private String workOrderNo; + + @ColumnWidth(20) + @ExcelProperty(value = "内容描述") + private String description; + + @ColumnWidth(20) + @ExcelProperty(value = "工单类型") + private String workOrderType; + + @ColumnWidth(20) + @ExcelProperty(value = "维护作业类型") + private String maintenanceTaskType; + + @ColumnWidth(20) + @ExcelProperty(value = "所属场站") + private String plannedFactory; + + @ColumnWidth(20) + @ExcelProperty(value = "负责人") + private String managerUserName; + + @ColumnWidth(20) + @ExcelProperty(value = "责任班组") + private String responsibilityTeam; + + @ColumnWidth(20) + @ExcelProperty(value = "工单完成") + private String handlingResult; + + @ColumnWidth(20) + @ExcelProperty(value = "审核状态") + private String approvalStatus; + +} diff --git a/src/main/java/org/energy/modules/smart/excel/WorkPermitExcel.java b/src/main/java/org/energy/modules/smart/excel/WorkPermitExcel.java new file mode 100644 index 0000000..f7a8c42 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/excel/WorkPermitExcel.java @@ -0,0 +1,106 @@ +package org.energy.modules.smart.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * WorkPermit model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class WorkPermitExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "KKS编码") + private String kksEncoding; + + @ColumnWidth(20) + @ExcelProperty(value = "KKS描述") + private String kksDescription; + + @ColumnWidth(20) + @ExcelProperty(value = "场站") + private String stations; + + @ColumnWidth(20) + @ExcelProperty(value = "工作票编号") + private String workTicketNo; + + @ColumnWidth(20) + @ExcelProperty(value = "工作票类型") + private String workTicketType; + + @ColumnWidth(20) + @ExcelProperty(value = "工单") + private String tickets; + + @ColumnWidth(20) + @ExcelProperty(value = "班组") + private String team; + + @ColumnWidth(20) + @ExcelProperty(value = "工作负责人") + private String workChargePerson; + + @ColumnWidth(20) + @ExcelProperty(value = "工作班成员") + private String workClassMembers; + + @ColumnWidth(20) + @ExcelProperty(value = "许可人") + private String licensors; + + @ColumnWidth(20) + @ExcelProperty(value = "签发人") + private String issuer; + + @ColumnWidth(20) + @ExcelProperty(value = "功能位置") + private String functionalLocation; + + @ColumnWidth(20) + @ExcelProperty(value = "工作地点") + private String placeWork; + + @ColumnWidth(20) + @ExcelProperty(value = "工作内容") + private String jobDescription; + + @ColumnWidth(20) + @ExcelProperty(value = "计划开始时间") + private String planStartDate; + + @ColumnWidth(20) + @ExcelProperty(value = "工作条件") + private String workingConditions; + + @ColumnWidth(20) + @ExcelProperty(value = "计划结束时间") + private String planEndDate; + + @ColumnWidth(20) + @ExcelProperty(value = "实际结束时间") + private String actualEndDate; + + @ColumnWidth(20) + @ExcelProperty(value = "是否延期") + private String isExtended; + + @ColumnWidth(20) + @ExcelProperty(value = "状态") + private String workState; + + @ColumnWidth(20) + @ExcelProperty(value = "审核状态") + private String checkStatus; + +} diff --git a/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.java b/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.java new file mode 100644 index 0000000..e7a45f8 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.java @@ -0,0 +1,27 @@ +package org.energy.modules.smart.mapper; + +import org.energy.modules.smart.entity.OperationItem; +import org.energy.modules.smart.vo.OperationItemVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 操作项目表 Mapper 接口 + * + * @author Daf + * @since 2024-07-11 + */ +public interface OperationItemMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param operationItem + * @return + */ + List selectOperationItemPage(IPage page, OperationItemVO operationItem); + + String getMaxOperationItemNo(String operationTicketNo); +} diff --git a/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.xml b/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.xml new file mode 100644 index 0000000..d5d4de1 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/OperationItemMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.java b/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.java new file mode 100644 index 0000000..8cee9ff --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.smart.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.excel.OperationTicketExcel; +import org.energy.modules.smart.vo.OperationTicketVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 操作票一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-10 + */ +public interface OperationTicketMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param operationTicket + * @return + */ + List selectOperationTicketPage(IPage page, OperationTicketVO operationTicket); + + List exportData(@Param("entity")OperationTicket operationTicket); + + List selectOperationTicketPageExt(IPage page, @Param("entity")OperationTicket operationTicket); +} diff --git a/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.xml b/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.xml new file mode 100644 index 0000000..9c4001f --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/OperationTicketMapper.xml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.java b/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.java new file mode 100644 index 0000000..987387d --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.java @@ -0,0 +1,35 @@ +package org.energy.modules.smart.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Daf + * @since 2024-07-12 + */ +public interface WorkOrderMapper extends BaseMapper { + + WorkOrderVO selectDetail(@Param("id") Long id); + + /** + * 自定义分页 + * + * @param page + * @param workOrder + * @return + */ + List selectWorkOrderPage(IPage page,@Param("vo") WorkOrderVO workOrder); + + List exportData(@Param("vo") WorkOrderVO workOrder); +} diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.xml b/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.xml new file mode 100644 index 0000000..7342261 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkOrderMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.java b/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.java new file mode 100644 index 0000000..11d2224 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.java @@ -0,0 +1,39 @@ +package org.energy.modules.smart.mapper; + +import org.energy.modules.smart.entity.WorkPermitAttachment; +import org.energy.modules.smart.vo.WorkPermitAttachmentVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 工作票附票一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface WorkPermitAttachmentMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param workPermitAttachment + * @return + */ + List selectWorkPermitAttachmentPage(IPage page, WorkPermitAttachmentVO workPermitAttachment); + + /** + * 获取最大条数 + */ + Integer getCount(Long workTicketNo); + + /** + * 删除 + * + * @param workTicketNo + * @return + */ + boolean delWorkPermitAttachment(Long workTicketNo); + +} diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.xml b/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.xml new file mode 100644 index 0000000..ddf3939 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkPermitAttachmentMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update smt_work_permit_attachment set is_deleted = 1 where work_ticket_no = #{workTicketNo} + + diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.java b/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.java new file mode 100644 index 0000000..fc61cd8 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.java @@ -0,0 +1,32 @@ +package org.energy.modules.smart.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.energy.modules.smart.vo.WorkPermitVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 工作票一览 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface WorkPermitMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param workPermit + * @return + */ + List selectWorkPermitPage(IPage page, WorkPermitVO workPermit); + + List exportData(@Param("vo") WorkPermitVO workPermit); + +} diff --git a/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.xml b/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.xml new file mode 100644 index 0000000..95ad774 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/smart/service/IOperationItemService.java b/src/main/java/org/energy/modules/smart/service/IOperationItemService.java new file mode 100644 index 0000000..a3211c4 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/IOperationItemService.java @@ -0,0 +1,26 @@ +package org.energy.modules.smart.service; + +import org.energy.modules.smart.entity.OperationItem; +import org.energy.modules.smart.vo.OperationItemVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 操作项目表 服务类 + * + * @author Daf + * @since 2024-07-11 + */ +public interface IOperationItemService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param operationItem + * @return + */ + IPage selectOperationItemPage(IPage page, OperationItemVO operationItem); + + String getMaxOperationItemNo(String operationTicketNo); +} diff --git a/src/main/java/org/energy/modules/smart/service/IOperationTicketService.java b/src/main/java/org/energy/modules/smart/service/IOperationTicketService.java new file mode 100644 index 0000000..ed3177c --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/IOperationTicketService.java @@ -0,0 +1,38 @@ +package org.energy.modules.smart.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.smart.excel.OperationTicketExcel; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.vo.OperationTicketVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 操作票一览 服务类 + * + * @author Daf + * @since 2024-07-10 + */ +public interface IOperationTicketService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param operationTicket + * @return + */ + IPage selectOperationTicketPage(IPage page, OperationTicketVO operationTicket); + + IPage selectOperationTicketPageExt(IPage page,OperationTicket operationTicket); + + /** + * 获取导出数据 + * + * @param operationTicket + * @return + */ + List export(OperationTicket operationTicket); +} diff --git a/src/main/java/org/energy/modules/smart/service/IWorkOrderService.java b/src/main/java/org/energy/modules/smart/service/IWorkOrderService.java new file mode 100644 index 0000000..fe75ae0 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/IWorkOrderService.java @@ -0,0 +1,39 @@ +package org.energy.modules.smart.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.vo.WorkOrderVO; + +import java.util.List; + +/** + * 服务类 + * + * @author Daf + * @since 2024-07-12 + */ +public interface IWorkOrderService extends BaseService { + + /** + * 获取详情 + * @param id + * @return + */ + WorkOrderVO selectDetail(Long id); + + /** + * 自定义分页 + * + * @param page + * @param workOrder + * @return + */ + IPage selectWorkOrderPage(IPage page, WorkOrderVO workOrder); + + List export(WorkOrderVO workOrder); + + +} diff --git a/src/main/java/org/energy/modules/smart/service/IWorkPermitAttachmentService.java b/src/main/java/org/energy/modules/smart/service/IWorkPermitAttachmentService.java new file mode 100644 index 0000000..aa8ecca --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/IWorkPermitAttachmentService.java @@ -0,0 +1,43 @@ +package org.energy.modules.smart.service; + +import org.energy.modules.smart.entity.WorkPermitAttachment; +import org.energy.modules.smart.vo.WorkPermitAttachmentVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.function.LongFunction; + +/** + * 工作票附票一览 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IWorkPermitAttachmentService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param workPermitAttachment + * @return + */ + IPage selectWorkPermitAttachmentPage(IPage page, WorkPermitAttachmentVO workPermitAttachment); + + + /** + * 获取最大条数 + * + * @param workTicketNo + */ + Integer getCount(Long workTicketNo); + + /** + * 删除 + * + * @param workTicketNo + * @return + */ + boolean delWorkPermitAttachment(Long workTicketNo); + +} diff --git a/src/main/java/org/energy/modules/smart/service/IWorkPermitService.java b/src/main/java/org/energy/modules/smart/service/IWorkPermitService.java new file mode 100644 index 0000000..3afec63 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/IWorkPermitService.java @@ -0,0 +1,41 @@ +package org.energy.modules.smart.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.energy.modules.smart.vo.WorkPermitVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 工作票一览 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IWorkPermitService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param workPermit + * @return + */ + IPage selectWorkPermitPage(IPage page, WorkPermitVO workPermit); + + /** + * 获取导出数据 + * + * @param workPermit + * @return + */ + List export(WorkPermitVO workPermit); + +} diff --git a/src/main/java/org/energy/modules/smart/service/impl/OperationItemServiceImpl.java b/src/main/java/org/energy/modules/smart/service/impl/OperationItemServiceImpl.java new file mode 100644 index 0000000..eb2ec92 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/impl/OperationItemServiceImpl.java @@ -0,0 +1,30 @@ +package org.energy.modules.smart.service.impl; + +import org.energy.modules.smart.entity.OperationItem; +import org.energy.modules.smart.vo.OperationItemVO; +import org.energy.modules.smart.mapper.OperationItemMapper; +import org.energy.modules.smart.service.IOperationItemService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 操作项目表 服务实现类 + * + * @author Daf + * @since 2024-07-11 + */ +@Service +public class OperationItemServiceImpl extends BaseServiceImpl implements IOperationItemService { + + @Override + public IPage selectOperationItemPage(IPage page, OperationItemVO operationItem) { + return page.setRecords(baseMapper.selectOperationItemPage(page, operationItem)); + } + @Override + public String getMaxOperationItemNo(String operationTicketNo){ + String operationItemNo = baseMapper.getMaxOperationItemNo(operationTicketNo); + return operationItemNo; + } + +} diff --git a/src/main/java/org/energy/modules/smart/service/impl/OperationTicketServiceImpl.java b/src/main/java/org/energy/modules/smart/service/impl/OperationTicketServiceImpl.java new file mode 100644 index 0000000..85cfe8b --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/impl/OperationTicketServiceImpl.java @@ -0,0 +1,39 @@ +package org.energy.modules.smart.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.energy.modules.smart.excel.OperationTicketExcel; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.vo.OperationTicketVO; +import org.energy.modules.smart.mapper.OperationTicketMapper; +import org.energy.modules.smart.service.IOperationTicketService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 操作票一览 服务实现类 + * + * @author Daf + * @since 2024-07-10 + */ +@Service +public class OperationTicketServiceImpl extends BaseServiceImpl implements IOperationTicketService { + + @Override + public IPage selectOperationTicketPage(IPage page, OperationTicketVO operationTicket) { + return page.setRecords(baseMapper.selectOperationTicketPage(page, operationTicket)); + } + + @Override + public IPage selectOperationTicketPageExt(IPage page, OperationTicket operationTicket) { + return page.setRecords(baseMapper.selectOperationTicketPageExt(page, operationTicket)); + } + + @Override + public List export(OperationTicket operationTicket) { + List list = baseMapper.exportData(operationTicket); + return list; + } +} diff --git a/src/main/java/org/energy/modules/smart/service/impl/WorkOrderServiceImpl.java b/src/main/java/org/energy/modules/smart/service/impl/WorkOrderServiceImpl.java new file mode 100644 index 0000000..8078cf6 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/impl/WorkOrderServiceImpl.java @@ -0,0 +1,56 @@ +package org.energy.modules.smart.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.mapper.WorkOrderMapper; +import org.energy.modules.smart.service.IWorkOrderService; +import org.energy.modules.smart.vo.WorkOrderVO; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 服务实现类 + * + * @author Daf + * @since 2024-07-12 + */ +@Service +public class WorkOrderServiceImpl extends BaseServiceImpl implements IWorkOrderService { + + @Autowired + IDictService dictService; + + @Override + public WorkOrderVO selectDetail(Long id) { + return baseMapper.selectDetail(id); + } + + @Override + public IPage selectWorkOrderPage(IPage page, WorkOrderVO workOrder) { + return page.setRecords(baseMapper.selectWorkOrderPage(page, workOrder)); + } + + @Override + public List export(WorkOrderVO workOrder) { + List list = baseMapper.exportData(workOrder); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getWorkOrderType())) + item.setWorkOrderType(dictService.getValue("workorder_type", Integer.parseInt(item.getWorkOrderType()))); + if (StringUtils.isNotEmpty(item.getMaintenanceTaskType())) + item.setMaintenanceTaskType(dictService.getValue("maintenance_job_type", Integer.parseInt(item.getMaintenanceTaskType()))); + if (StringUtils.isNotEmpty(item.getHandlingResult())) + item.setHandlingResult(dictService.getValue("workorder_process_res", Integer.parseInt(item.getHandlingResult()))); + if (StringUtils.isNotEmpty(item.getApprovalStatus())) + item.setApprovalStatus(dictService.getValue("check_status", Integer.parseInt(item.getApprovalStatus()))); + }); + return list; + } + +} diff --git a/src/main/java/org/energy/modules/smart/service/impl/WorkPermitAttachmentServiceImpl.java b/src/main/java/org/energy/modules/smart/service/impl/WorkPermitAttachmentServiceImpl.java new file mode 100644 index 0000000..99db0d7 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/impl/WorkPermitAttachmentServiceImpl.java @@ -0,0 +1,34 @@ +package org.energy.modules.smart.service.impl; + +import org.energy.modules.smart.entity.WorkPermitAttachment; +import org.energy.modules.smart.vo.WorkPermitAttachmentVO; +import org.energy.modules.smart.mapper.WorkPermitAttachmentMapper; +import org.energy.modules.smart.service.IWorkPermitAttachmentService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 工作票附票一览 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class WorkPermitAttachmentServiceImpl extends BaseServiceImpl implements IWorkPermitAttachmentService { + + @Override + public IPage selectWorkPermitAttachmentPage(IPage page, WorkPermitAttachmentVO workPermitAttachment) { + return page.setRecords(baseMapper.selectWorkPermitAttachmentPage(page, workPermitAttachment)); + } + @Override + public Integer getCount(Long workTicketNo){ + Integer maxCount = baseMapper.getCount(workTicketNo); + return maxCount; + } + + @Override + public boolean delWorkPermitAttachment(Long workTicketNo) { + return baseMapper.delWorkPermitAttachment(workTicketNo); + } +} diff --git a/src/main/java/org/energy/modules/smart/service/impl/WorkPermitServiceImpl.java b/src/main/java/org/energy/modules/smart/service/impl/WorkPermitServiceImpl.java new file mode 100644 index 0000000..ebb0c69 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/service/impl/WorkPermitServiceImpl.java @@ -0,0 +1,53 @@ +package org.energy.modules.smart.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.excel.EquipmentLedgerExcel; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.smart.excel.WorkPermitExcel; +import org.energy.modules.smart.vo.WorkPermitVO; +import org.energy.modules.smart.mapper.WorkPermitMapper; +import org.energy.modules.smart.service.IWorkPermitService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 工作票一览 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class WorkPermitServiceImpl extends BaseServiceImpl implements IWorkPermitService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectWorkPermitPage(IPage page, WorkPermitVO workPermit) { + return page.setRecords(baseMapper.selectWorkPermitPage(page, workPermit)); + } + + @Override + public List export(WorkPermitVO workPermit) { + List list = baseMapper.exportData(workPermit); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getIsExtended())) + item.setIsExtended(dictService.getValue("yes_no", Integer.parseInt(item.getIsExtended()))); + if (StringUtils.isNotEmpty(item.getStations())) + item.setStations(dictService.getValue("station", Integer.parseInt(item.getStations()))); + if (StringUtils.isNotEmpty(item.getWorkState())) + item.setWorkState(dictService.getValue("work_status", Integer.parseInt(item.getWorkState()))); + if (StringUtils.isNotEmpty(item.getCheckStatus())) + item.setCheckStatus(dictService.getValue("check_status", Integer.parseInt(item.getCheckStatus()))); + }); + return list; + } +} diff --git a/src/main/java/org/energy/modules/smart/vo/OperationItemVO.java b/src/main/java/org/energy/modules/smart/vo/OperationItemVO.java new file mode 100644 index 0000000..4dbb58d --- /dev/null +++ b/src/main/java/org/energy/modules/smart/vo/OperationItemVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.smart.vo; + +import org.energy.modules.smart.entity.OperationItem; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 操作项目表视图实体类 + * + * @author Daf + * @since 2024-07-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "OperationItemVO对象", description = "操作项目表") +public class OperationItemVO extends OperationItem { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/vo/OperationTicketVO.java b/src/main/java/org/energy/modules/smart/vo/OperationTicketVO.java new file mode 100644 index 0000000..1f532ce --- /dev/null +++ b/src/main/java/org/energy/modules/smart/vo/OperationTicketVO.java @@ -0,0 +1,23 @@ +package org.energy.modules.smart.vo; + +import org.energy.modules.smart.entity.OperationTicket; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 操作票一览视图实体类 + * + * @author Daf + * @since 2024-07-10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "OperationTicketVO对象", description = "操作票一览") +public class OperationTicketVO extends OperationTicket { +// private static final long serialVersionUID = 1L; + + //操作项目数 + private int operationItemsCount; + +} diff --git a/src/main/java/org/energy/modules/smart/vo/WorkOrderVO.java b/src/main/java/org/energy/modules/smart/vo/WorkOrderVO.java new file mode 100644 index 0000000..adfce8c --- /dev/null +++ b/src/main/java/org/energy/modules/smart/vo/WorkOrderVO.java @@ -0,0 +1,29 @@ +package org.energy.modules.smart.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.smart.entity.WorkOrder; + +/** + * 视图实体类 + * + * @author Daf + * @since 2024-07-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkOrderVO对象", description = "WorkOrderVO对象") +public class WorkOrderVO extends WorkOrder { + private static final long serialVersionUID = 1L; + + private String kksEncoding; + + private String kksDescription; + + private Integer station; + + private String managerUserName; + + +} diff --git a/src/main/java/org/energy/modules/smart/vo/WorkPermitAttachmentVO.java b/src/main/java/org/energy/modules/smart/vo/WorkPermitAttachmentVO.java new file mode 100644 index 0000000..7c9fe35 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/vo/WorkPermitAttachmentVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.smart.vo; + +import org.energy.modules.smart.entity.WorkPermitAttachment; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 工作票附票一览视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkPermitAttachmentVO对象", description = "工作票附票一览") +public class WorkPermitAttachmentVO extends WorkPermitAttachment { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/smart/vo/WorkPermitVO.java b/src/main/java/org/energy/modules/smart/vo/WorkPermitVO.java new file mode 100644 index 0000000..9934013 --- /dev/null +++ b/src/main/java/org/energy/modules/smart/vo/WorkPermitVO.java @@ -0,0 +1,22 @@ +package org.energy.modules.smart.vo; + +import org.energy.modules.smart.entity.WorkPermit; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 工作票一览视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorkPermitVO对象", description = "工作票一览") +public class WorkPermitVO extends WorkPermit { + private static final long serialVersionUID = 1L; + + private String planStartDateExt; + +} diff --git a/src/main/java/org/energy/modules/spares/controller/InboundController.java b/src/main/java/org/energy/modules/spares/controller/InboundController.java new file mode 100644 index 0000000..11f0c76 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/InboundController.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.Data; +import org.energy.modules.leger.entity.TechParameters; +import org.energy.modules.spares.service.IMaterialService; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.Inbound; +import org.energy.modules.spares.vo.InboundVO; +import org.energy.modules.spares.service.IInboundService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * 入库 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/spares/inbound") +@Api(value = "入库", tags = "入库接口") +public class InboundController extends DafController { + + private IInboundService inboundService; + private IMaterialService materialService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入inbound") + public R detail(Inbound inbound) { + Inbound detail = inboundService.getOne(Condition.getQueryWrapper(inbound)); + return R.data(detail); + } + + /** + * 分页 入库 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入inbound") + public R> list(Inbound inbound, Query query) { + IPage pages = inboundService.page(Condition.getPage(query), Condition.getQueryWrapper(inbound)); + return R.data(pages); + } + + /** + * 自定义分页 入库 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入inbound") + public R> page(InboundVO inbound, Query query) { + IPage pages = inboundService.selectInboundPage(Condition.getPage(query), inbound); + return R.data(pages); + } + + /** + * 新增 入库 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入inbound") + public R save(@Valid @RequestBody Inbound inbound) { + return R.status(inboundService.save(inbound)); + } + + /** + * 修改 入库 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入inbound") + public R update(@Valid @RequestBody Inbound inbound) { + if (inbound.getIstatus() == 2) + { + materialService.updateNum(inbound.getMaterialNo(), inbound.getInboundCount()); + } + return R.status(inboundService.updateById(inbound)); + } + + /** + * 新增或修改 入库 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入inbound") + public R submit(@Valid @RequestBody Inbound inbound) { + String maxNo = inboundService.getMaxNo("'%" + inbound.getMaterialNo() + "%'"); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(10)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%06d", number); + String no = inbound.getMaterialNo() + "IN" + numFormat; + inbound.setInboundNo(no); + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + String time = sdf.format(date); + inbound.setInboundTime(time); + inbound.setIstatus(1L); + return R.status(inboundService.saveOrUpdate(inbound)); + } + + + /** + * 删除 入库 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(inboundService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 入库详细 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入inbound") + public R> getList(Inbound inbound) { + List list = inboundService.list(Condition.getQueryWrapper(inbound)); + return R.data(list); + } + + +} diff --git a/src/main/java/org/energy/modules/spares/controller/ManufacturerInfoController.java b/src/main/java/org/energy/modules/spares/controller/ManufacturerInfoController.java new file mode 100644 index 0000000..4791031 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/ManufacturerInfoController.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.spares.excel.ManufacturerInfoExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.ManufacturerInfo; +import org.energy.modules.spares.vo.ManufacturerInfoVO; +import org.energy.modules.spares.service.IManufacturerInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * spt_manufacturer_info 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/manufacturerinfo") +@Api(value = "spt_manufacturer_info", tags = "spt_manufacturer_info接口") +public class ManufacturerInfoController extends DafController { + + private IManufacturerInfoService manufacturerInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入manufacturerInfo") + public R detail(ManufacturerInfo manufacturerInfo) { + ManufacturerInfo detail = manufacturerInfoService.getOne(Condition.getQueryWrapper(manufacturerInfo)); + return R.data(detail); + } + + /** + * 分页 spt_manufacturer_info + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入manufacturerInfo") + public R> list(ManufacturerInfo manufacturerInfo, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(manufacturerInfo.getCreditCode())) { + qw.lambda().like(ManufacturerInfo::getCreditCode, manufacturerInfo.getCreditCode()); + } + if (StringUtils.isNotEmpty(manufacturerInfo.getManufacturerName())) { + qw.lambda().like(ManufacturerInfo::getManufacturerName, manufacturerInfo.getManufacturerName()); + } + qw.lambda().eq(ManufacturerInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); + qw.lambda().orderByDesc(ManufacturerInfo::getUpdateTime); + IPage pages = manufacturerInfoService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 spt_manufacturer_info + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入manufacturerInfo") + public R> page(ManufacturerInfoVO manufacturerInfo, Query query) { + IPage pages = manufacturerInfoService.selectManufacturerInfoPage(Condition.getPage(query), manufacturerInfo); + return R.data(pages); + } + + /** + * 新增 spt_manufacturer_info + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入manufacturerInfo") + public R save(@Valid @RequestBody ManufacturerInfo manufacturerInfo) { + return R.status(manufacturerInfoService.save(manufacturerInfo)); + } + + /** + * 修改 spt_manufacturer_info + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入manufacturerInfo") + public R update(@Valid @RequestBody ManufacturerInfo manufacturerInfo) { + return R.status(manufacturerInfoService.updateById(manufacturerInfo)); + } + + /** + * 新增或修改 spt_manufacturer_info + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入manufacturerInfo") + public R submit(@Valid @RequestBody ManufacturerInfo manufacturerInfo) { + return R.status(manufacturerInfoService.saveOrUpdate(manufacturerInfo)); + } + + + /** + * 删除 spt_manufacturer_info + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(manufacturerInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + ManufacturerInfo manufacturerInfo = new ManufacturerInfo(); + manufacturerInfo.setId(Long.parseLong(id)); + manufacturerInfo.setApprovalStatus(status); + list.add(manufacturerInfo); + } + return R.status(manufacturerInfoService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + ManufacturerInfoVO vo = DataUtils.mapToEntity(entity, ManufacturerInfoVO::new); + List list = manufacturerInfoService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("制造商信息管理数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), ManufacturerInfoExcel.class).sheet("制造商信息管理").doWrite(list); + } + + /** + * 获取制造商 + */ + @GetMapping("/getNoList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取编号", notes = "获取编号") + public R> getNoList() { + List noList = manufacturerInfoService.getNoList(); + return R.data(noList); + } + + /** + * 获取制造商信息 + */ + @GetMapping("/getDetail") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取制造商信息", notes = "获取制造商信息") + public R getDetail(String creditCode) { + ManufacturerInfo detail = manufacturerInfoService.getDetail(creditCode); + return R.data(detail); + } + +} diff --git a/src/main/java/org/energy/modules/spares/controller/MaterialClassificationController.java b/src/main/java/org/energy/modules/spares/controller/MaterialClassificationController.java new file mode 100644 index 0000000..d9fe751 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/MaterialClassificationController.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.spares.excel.MaterialClassExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.MaterialClassification; +import org.energy.modules.spares.vo.MaterialClassificationVO; +import org.energy.modules.spares.service.IMaterialClassificationService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; + +/** + * spt_material_classification 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/materialclassification") +@Api(value = "spt_material_classification", tags = "spt_material_classification接口") +public class MaterialClassificationController extends DafController { + + private IMaterialClassificationService materialClassificationService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入materialClassification") + public R detail(MaterialClassification materialClassification) { + MaterialClassification detail = materialClassificationService.getOne(Condition.getQueryWrapper(materialClassification)); + return R.data(detail); + } + + /** + * 分页 spt_material_classification + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入materialClassification") + public R> list(MaterialClassification materialClassification, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(materialClassification.getCode())) { + qw.lambda().like(MaterialClassification::getCode, materialClassification.getCode()); + } + if (materialClassification.getType() != null) { + qw.lambda().like(MaterialClassification::getType, materialClassification.getType()); + } + qw.lambda().eq(MaterialClassification::getIsDeleted, DafConstant.DB_NOT_DELETED); + qw.lambda().orderByDesc(MaterialClassification::getUpdateTime); + IPage pages = materialClassificationService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 spt_material_classification + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入materialClassification") + public R> page(MaterialClassificationVO materialClassification, Query query) { + IPage pages = materialClassificationService.selectMaterialClassificationPage(Condition.getPage(query), materialClassification); + return R.data(pages); + } + + /** + * 新增 spt_material_classification + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入materialClassification") + public R save(@Valid @RequestBody MaterialClassification materialClassification) { + return R.status(materialClassificationService.save(materialClassification)); + } + + /** + * 修改 spt_material_classification + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入materialClassification") + public R update(@Valid @RequestBody MaterialClassification materialClassification) { + return R.status(materialClassificationService.updateById(materialClassification)); + } + + /** + * 新增或修改 spt_material_classification + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入materialClassification") + public R submit(@Valid @RequestBody MaterialClassification materialClassification) { + return R.status(materialClassificationService.saveOrUpdate(materialClassification)); + } + + + /** + * 删除 spt_material_classification + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(materialClassificationService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + MaterialClassificationVO vo = DataUtils.mapToEntity(entity, MaterialClassificationVO::new); + List list = materialClassificationService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("物资分类码数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), MaterialClassExcel.class).sheet("物资分类码").doWrite(list); + } + + /** + * 分页 物资分类码 + */ + @GetMapping("/getCodeList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取物资分类码", notes = "获取物资分类码") + public R> getCodeList() { + List list = materialClassificationService.getCodeList(); + return R.data(list); + } + + +} diff --git a/src/main/java/org/energy/modules/spares/controller/MaterialController.java b/src/main/java/org/energy/modules/spares/controller/MaterialController.java new file mode 100644 index 0000000..30dc063 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/MaterialController.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.spares.entity.Inbound; +import org.energy.modules.spares.entity.Outbound; +import org.energy.modules.spares.excel.MaterialExcel; +import org.energy.modules.spares.service.IInboundService; +import org.energy.modules.spares.service.IOutboundService; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.Material; +import org.energy.modules.spares.vo.MaterialVO; +import org.energy.modules.spares.service.IMaterialService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; + +/** + * 物资 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/spares/material") +@Api(value = "物资", tags = "物资接口") +public class MaterialController extends DafController { + + private IMaterialService materialService; + private IInboundService inboundService; + private IOutboundService outboundService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入material") + public R detail(Material material) { + Material detail = materialService.getOne(Condition.getQueryWrapper(material)); + return R.data(detail); + } + + /** + * 分页 物资 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入material") + public R> list(Material material, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + qw.orderByAsc("material_no"); + // 物资编号 + if (StringUtil.isNotEmpty(material.getMaterialNo())) { + qw.lambda().like(Material::getMaterialNo, material.getMaterialNo()); + } + + // 物资名称 + if (StringUtil.isNotEmpty(material.getMaterialName())) { + qw.lambda().like(Material::getMaterialName, material.getMaterialName()); + } + + // 规格型号 + if (StringUtil.isNotEmpty(material.getModel())) { + qw.lambda().like(Material::getModel, material.getModel()); + } + + // 场站 + if (null != material.getStation()) { + qw.lambda().eq(Material::getStation, material.getStation()); + } + + // 库存数量 + if (null != material.getInventoryCount()) { + qw.lambda().eq(Material::getInventoryCount, material.getInventoryCount()); + } + + IPage pages = materialService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 物资 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入material") + public R> page(MaterialVO material, Query query) { + IPage pages = materialService.selectMaterialPage(Condition.getPage(query), material); + return R.data(pages); + } + + /** + * 新增 物资 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入material") + public R save(@Valid @RequestBody Material material) { + return R.status(materialService.save(material)); + } + + /** + * 修改 物资 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入material") + public R update(@Valid @RequestBody Material material) { + return R.status(materialService.updateById(material)); + } + + /** + * 新增或修改 物资 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入material") + public R submit(@Valid @RequestBody Material material) { + material.setIstatus(2L); + String maxNo = materialService.getMaxNo(); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(2)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%06d", number); + String no = "WZ" + numFormat; + material.setMaterialNo(no); + return R.status(materialService.saveOrUpdate(material)); + } + + + /** + * 删除 物资 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + for (String id : ids.split(",")) { + // 获取物资编码 + Material sel = new Material(); + sel.setId(Long.parseLong(id)); + Material material = materialService.getOne(Condition.getQueryWrapper(sel)); + // 通过物资编码删除入库数据 + QueryWrapper qw1 = new QueryWrapper<>(); + qw1.lambda().eq(Inbound::getMaterialNo, material.getMaterialNo()); + qw1.lambda().eq(Inbound::getIsDeleted, DafConstant.DB_NOT_DELETED); + inboundService.remove(qw1); + // 通过物资编码删除出库数据 + QueryWrapper qw2 = new QueryWrapper<>(); + qw2.lambda().eq(Outbound::getMaterialNo, material.getMaterialNo()); + qw2.lambda().eq(Outbound::getIsDeleted, DafConstant.DB_NOT_DELETED); + outboundService.remove(qw2); + } + return R.status(materialService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 获取物资编号 + */ + @GetMapping("/getNoList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "获取物资编号", notes = "获取物资编号") + public R> getNoList() { + List noList = materialService.getNoList(); + return R.data(noList); + } + + /** + * 获取物资信息 + */ + @GetMapping("/getDetailList") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "获取物资信息", notes = "获取物资信息") + public R getDetailList(String materialNo) { + MaterialVO DetailList = materialService.getDetailList(materialNo); + return R.data(DetailList); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportMaterial(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + entity.forEach((key, value) -> { + if (!"station".equals(key)) + { + entity.put(key, "%" + value + "%"); + } + }); + Material vo = DataUtils.mapToEntity(entity, Material::new); + List list = materialService.exportData(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("物资数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), MaterialExcel.class).sheet("物资").doWrite(list); + } + +} diff --git a/src/main/java/org/energy/modules/spares/controller/OutboundController.java b/src/main/java/org/energy/modules/spares/controller/OutboundController.java new file mode 100644 index 0000000..569b498 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/OutboundController.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.xkcoding.http.util.StringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.spares.service.IMaterialService; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.Outbound; +import org.energy.modules.spares.vo.OutboundVO; +import org.energy.modules.spares.service.IOutboundService; +import com.dayu.daf.core.boot.ctrl.DafController; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * 出库 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/spares/outbound") +@Api(value = "出库", tags = "出库接口") +public class OutboundController extends DafController { + + private IOutboundService outboundService; + private IMaterialService materialService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入outbound") + public R detail(Outbound outbound) { + Outbound detail = outboundService.getOne(Condition.getQueryWrapper(outbound)); + return R.data(detail); + } + + /** + * 分页 出库 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入outbound") + public R> list(Outbound outbound, Query query) { + IPage pages = outboundService.page(Condition.getPage(query), Condition.getQueryWrapper(outbound)); + return R.data(pages); + } + + /** + * 自定义分页 出库 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入outbound") + public R> page(OutboundVO outbound, Query query) { + IPage pages = outboundService.selectOutboundPage(Condition.getPage(query), outbound); + return R.data(pages); + } + + /** + * 新增 出库 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入outbound") + public R save(@Valid @RequestBody Outbound outbound) { + return R.status(outboundService.save(outbound)); + } + + /** + * 修改 出库 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入outbound") + public R update(@Valid @RequestBody Outbound outbound) { + if (outbound.getIstatus() == 2) + { + materialService.updateNum(outbound.getMaterialNo(), Math.negateExact(outbound.getOutboundCount())); + } + return R.status(outboundService.updateById(outbound)); + } + + /** + * 新增或修改 出库 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入outbound") + public R submit(@Valid @RequestBody Outbound outbound) { + String maxNo = outboundService.getMaxNo("'%" + outbound.getMaterialNo() + "%'"); + int number; + if (StringUtil.isNotEmpty(maxNo)){ + number = Integer.parseInt(maxNo.substring(11)); + number++; + }else{ + number = 1; + } + String numFormat = String.format("%06d", number); + String no = outbound.getMaterialNo() + "OUT" + numFormat; + outbound.setOutboundNo(no); + Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + String time = sdf.format(date); + outbound.setOutboundTime(time); + outbound.setIstatus(1L); + return R.status(outboundService.saveOrUpdate(outbound)); + } + + + /** + * 删除 出库 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(outboundService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 列表 出库详细 + */ + @GetMapping("/getList") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "列表", notes = "传入outbound") + public R> getList(Outbound outbound) { + List list = outboundService.list(Condition.getQueryWrapper(outbound)); + return R.data(list); + } + + +} diff --git a/src/main/java/org/energy/modules/spares/controller/SupplierInfoController.java b/src/main/java/org/energy/modules/spares/controller/SupplierInfoController.java new file mode 100644 index 0000000..29e0d91 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/SupplierInfoController.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.spares.excel.SupplierInfoExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.SupplierInfo; +import org.energy.modules.spares.vo.SupplierInfoVO; +import org.energy.modules.spares.service.ISupplierInfoService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * spt_supplier_info 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/supplierinfo") +@Api(value = "spt_supplier_info", tags = "spt_supplier_info接口") +public class SupplierInfoController extends DafController { + + private ISupplierInfoService supplierInfoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入supplierInfo") + public R detail(SupplierInfo supplierInfo) { + SupplierInfo detail = supplierInfoService.getOne(Condition.getQueryWrapper(supplierInfo)); + return R.data(detail); + } + + /** + * 分页 spt_supplier_info + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入supplierInfo") + public R> list(SupplierInfo supplierInfo, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(supplierInfo.getCreditCode())) { + qw.lambda().like(SupplierInfo::getCreditCode, supplierInfo.getCreditCode()); + } + if (StringUtils.isNotEmpty(supplierInfo.getSupplierName())) { + qw.lambda().like(SupplierInfo::getSupplierName, supplierInfo.getSupplierName()); + } + qw.lambda().eq(SupplierInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); + qw.lambda().orderByDesc(SupplierInfo::getUpdateTime); + IPage pages = supplierInfoService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 spt_supplier_info + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入supplierInfo") + public R> page(SupplierInfoVO supplierInfo, Query query) { + IPage pages = supplierInfoService.selectSupplierInfoPage(Condition.getPage(query), supplierInfo); + return R.data(pages); + } + + /** + * 新增 spt_supplier_info + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入supplierInfo") + public R save(@Valid @RequestBody SupplierInfo supplierInfo) { + return R.status(supplierInfoService.save(supplierInfo)); + } + + /** + * 修改 spt_supplier_info + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入supplierInfo") + public R update(@Valid @RequestBody SupplierInfo supplierInfo) { + return R.status(supplierInfoService.updateById(supplierInfo)); + } + + /** + * 新增或修改 spt_supplier_info + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入supplierInfo") + public R submit(@Valid @RequestBody SupplierInfo supplierInfo) { + return R.status(supplierInfoService.saveOrUpdate(supplierInfo)); + } + + + /** + * 删除 spt_supplier_info + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(supplierInfoService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + SupplierInfo supplierInfo = new SupplierInfo(); + supplierInfo.setId(Long.parseLong(id)); + supplierInfo.setApprovalStatus(status); + list.add(supplierInfo); + } + return R.status(supplierInfoService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + SupplierInfoVO vo = DataUtils.mapToEntity(entity, SupplierInfoVO::new); + List list = supplierInfoService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("供应商信息管理数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), SupplierInfoExcel.class).sheet("供应商信息管理").doWrite(list); + } + + /** + * 获取供应商 + */ + @GetMapping("/getNoList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取编号", notes = "获取编号") + public R> getNoList() { + List noList = supplierInfoService.getNoList(); + return R.data(noList); + } + + /** + * 获取供应商信息 + */ + @GetMapping("/getDetail") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "获取供应商信息", notes = "获取供应商信息") + public R getDetail(String creditCode) { + SupplierInfo detail = supplierInfoService.getDetail(creditCode); + return R.data(detail); + } + + +} diff --git a/src/main/java/org/energy/modules/spares/controller/WarehouseController.java b/src/main/java/org/energy/modules/spares/controller/WarehouseController.java new file mode 100644 index 0000000..40464c1 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/controller/WarehouseController.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.controller; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.tool.constant.DafConstant; +import io.micrometer.core.instrument.util.StringUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.modules.spares.excel.WarehouseExcel; +import org.energy.modules.system.util.DataUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.spares.entity.Warehouse; +import org.energy.modules.spares.vo.WarehouseVO; +import org.energy.modules.spares.service.IWarehouseService; +import com.dayu.daf.core.boot.ctrl.DafController; +import springfox.documentation.annotations.ApiIgnore; + +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * spt_warehouse 控制器 + * + * @author Daf + * @since 2024-07-15 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/warehouse") +@Api(value = "spt_warehouse", tags = "spt_warehouse接口") +public class WarehouseController extends DafController { + + private IWarehouseService warehouseService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入warehouse") + public R detail(Warehouse warehouse) { + Warehouse detail = warehouseService.getOne(Condition.getQueryWrapper(warehouse)); + return R.data(detail); + } + + /** + * 分页 spt_warehouse + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入warehouse") + public R> list(Warehouse warehouse, Query query) { + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotEmpty(warehouse.getCode())) { + qw.lambda().like(Warehouse::getCode, warehouse.getCode()); + } + if (StringUtils.isNotEmpty(warehouse.getName())) { + qw.lambda().like(Warehouse::getName, warehouse.getName()); + } + if (StringUtils.isNotEmpty(warehouse.getAddress())) { + qw.lambda().like(Warehouse::getAddress, warehouse.getAddress()); + } + if (warehouse.getType() != null) { + qw.lambda().eq(Warehouse::getType, warehouse.getType()); + } + qw.lambda().eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED); + qw.lambda().orderByDesc(Warehouse::getUpdateTime); + IPage pages = warehouseService.page(Condition.getPage(query), qw); + return R.data(pages); + } + + /** + * 自定义分页 spt_warehouse + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入warehouse") + public R> page(WarehouseVO warehouse, Query query) { + IPage pages = warehouseService.selectWarehousePage(Condition.getPage(query), warehouse); + return R.data(pages); + } + + /** + * 新增 spt_warehouse + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入warehouse") + public R save(@Valid @RequestBody Warehouse warehouse) { + return R.status(warehouseService.save(warehouse)); + } + + /** + * 修改 spt_warehouse + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入warehouse") + public R update(@Valid @RequestBody Warehouse warehouse) { + return R.status(warehouseService.updateById(warehouse)); + } + + /** + * 新增或修改 spt_warehouse + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入warehouse") + public R submit(@Valid @RequestBody Warehouse warehouse) { + if (warehouse.getId() == null) { + QueryWrapper qw = new QueryWrapper<>(); + qw.lambda().select(Warehouse::getCode) + .eq(Warehouse::getType, warehouse.getType()) + .eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED) + .orderByDesc(Warehouse::getCode) + .last("LIMIT 1"); + String code = ""; + Warehouse warehouseSelect = warehouseService.getOne(qw); + if (warehouseSelect != null) { + String maxCode = warehouseSelect.getCode(); + if ("9999".equals(maxCode)) { + return R.fail("操作失败,编号已越位"); + } + code = "CK" + warehouse.getType() + DataUtils.incrementLast(maxCode, 4); + } else { + code = "CK" + warehouse.getType() + "0001"; + } + warehouse.setCode(code); + } + return R.status(warehouseService.saveOrUpdate(warehouse)); + } + + + /** + * 删除 spt_warehouse + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(warehouseService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 审核 + */ + @PostMapping("/auditing") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "更新", notes = "传入ids") + public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(2,ids); + } + + /** + * 驳回 + */ + @PostMapping("/reject") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "更新", notes = "传入ids") + public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return this.approve(3,ids); + } + + /** + * 驳回OR审核 + */ + public R approve(Integer status, String ids) { + List list = new ArrayList<>(); + for (String id : ids.split(",")) { + Warehouse warehouse = new Warehouse(); + warehouse.setId(Long.parseLong(id)); + warehouse.setApprovalStatus(status); + list.add(warehouse); + } + return R.status(warehouseService.updateBatchById(list)); + } + + /** + * 导出 + */ + @SneakyThrows + @GetMapping("export") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "导出", notes = "传入") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map entity, HttpServletResponse response) { + entity.remove("daf-auth"); + WarehouseVO vo = DataUtils.mapToEntity(entity, WarehouseVO::new); + List list = warehouseService.export(vo); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("仓库数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), WarehouseExcel.class).sheet("仓库").doWrite(list); + } + + /** + * 获取仓库信息 + */ + @GetMapping("/getWarehouseList") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取仓库信息", notes = "获取仓库信息") + public R> getWarehouseList() { + List noList = warehouseService.getWarehouseList(); + return R.data(noList); + } + +} diff --git a/src/main/java/org/energy/modules/spares/dto/InboundDTO.java b/src/main/java/org/energy/modules/spares/dto/InboundDTO.java new file mode 100644 index 0000000..c2f0909 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/InboundDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.Inbound; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 入库数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InboundDTO extends Inbound { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/ManufacturerInfoDTO.java b/src/main/java/org/energy/modules/spares/dto/ManufacturerInfoDTO.java new file mode 100644 index 0000000..96df777 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/ManufacturerInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.ManufacturerInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * spt_manufacturer_info数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ManufacturerInfoDTO extends ManufacturerInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/MaterialClassificationDTO.java b/src/main/java/org/energy/modules/spares/dto/MaterialClassificationDTO.java new file mode 100644 index 0000000..c6ea37c --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/MaterialClassificationDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.MaterialClassification; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * spt_material_classification数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MaterialClassificationDTO extends MaterialClassification { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/MaterialDTO.java b/src/main/java/org/energy/modules/spares/dto/MaterialDTO.java new file mode 100644 index 0000000..5255dbe --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/MaterialDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.Material; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物资数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MaterialDTO extends Material { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/OutboundDTO.java b/src/main/java/org/energy/modules/spares/dto/OutboundDTO.java new file mode 100644 index 0000000..73adb2e --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/OutboundDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.Outbound; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 出库数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class OutboundDTO extends Outbound { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/SupplierInfoDTO.java b/src/main/java/org/energy/modules/spares/dto/SupplierInfoDTO.java new file mode 100644 index 0000000..eeca2b0 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/SupplierInfoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.SupplierInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * spt_supplier_info数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class SupplierInfoDTO extends SupplierInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/dto/WarehouseDTO.java b/src/main/java/org/energy/modules/spares/dto/WarehouseDTO.java new file mode 100644 index 0000000..0445acb --- /dev/null +++ b/src/main/java/org/energy/modules/spares/dto/WarehouseDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.spares.dto; + +import org.energy.modules.spares.entity.Warehouse; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * spt_warehouse数据传输对象实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseDTO extends Warehouse { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/entity/Inbound.java b/src/main/java/org/energy/modules/spares/entity/Inbound.java new file mode 100644 index 0000000..fdea393 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/Inbound.java @@ -0,0 +1,71 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 入库实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("s_inbound") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Inbound对象", description = "入库") +public class Inbound extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 物资编号 + */ + @ApiModelProperty(value = "物资编号") + private String materialNo; + /** + * 入库编号 + */ + @ApiModelProperty(value = "入库编号") + private String inboundNo; + /** + * 入库时间 + */ + @ApiModelProperty(value = "入库时间") + private String inboundTime; + /** + * 入库申领人 + */ + @ApiModelProperty(value = "入库申领人") + private String inboundClaimants; + /** + * 入库经办人 + */ + @ApiModelProperty(value = "入库经办人") + private String inboundManager; + /** + * 入库数量 + */ + @ApiModelProperty(value = "入库数量") + private Long inboundCount; + /** + * 入库审核状态 + */ + @ApiModelProperty(value = "入库审核状态") + private Long istatus; + + +} diff --git a/src/main/java/org/energy/modules/spares/entity/ManufacturerInfo.java b/src/main/java/org/energy/modules/spares/entity/ManufacturerInfo.java new file mode 100644 index 0000000..fcbcb9f --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/ManufacturerInfo.java @@ -0,0 +1,80 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * spt_manufacturer_info实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("spt_manufacturer_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ManufacturerInfo对象", description = "spt_manufacturer_info") +public class ManufacturerInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 统一社会信用代码/组织机构 + */ + @ApiModelProperty(value = "统一社会信用代码/组织机构") + private String creditCode; + /** + * 制造商名称 + */ + @ApiModelProperty(value = "制造商名称") + private String manufacturerName; + /** + * 注册地址 + */ + @ApiModelProperty(value = "注册地址") + private String registeredAddress; + /** + * 生产地址 + */ + @ApiModelProperty(value = "生产地址") + private String productionAddress; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactNumber; + /** + * 电子邮箱 + */ + @ApiModelProperty(value = "电子邮箱") + private String email; + /** + * 经营范围 + */ + @ApiModelProperty(value = "经营范围") + private String businessScope; + /** + * 审核状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "审核状态") + private Integer approvalStatus; + /** + * 执行标准 + */ + @ApiModelProperty(value = "执行标准") + private String executiveStandards; + +} diff --git a/src/main/java/org/energy/modules/spares/entity/Material.java b/src/main/java/org/energy/modules/spares/entity/Material.java new file mode 100644 index 0000000..67dd2a6 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/Material.java @@ -0,0 +1,91 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 物资实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("s_material") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Material对象", description = "物资") +public class Material extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 物资编号 + */ + @ApiModelProperty(value = "物资编号") + private String materialNo; + /** + * 物资名称 + */ + @ApiModelProperty(value = "物资名称") + private String materialName; + /** + * 物资分类码 + */ + @ApiModelProperty(value = "物资分类码") + private String materialClassCode; + /** + * 规格型号 + */ + @ApiModelProperty(value = "规格型号") + private String model; + /** + * 制造商名称 + */ + @ApiModelProperty(value = "制造商名称") + private String manufacturerName; + /** + * 供应商名称 + */ + @ApiModelProperty(value = "供应商名称") + private String supplierName; + /** + * 所属仓库 + */ + @ApiModelProperty(value = "所属仓库") + private String warehouse; + /** + * 库存数量 + */ + @ApiModelProperty(value = "库存数量") + private Long inventoryCount; + /** + * 物资描述 + */ + @ApiModelProperty(value = "物资描述") + private String materialDescription; + /** + * 场站 + */ + @ApiModelProperty(value = "场站") + private Long station; + /** + * 审核状态 + */ + @ApiModelProperty(value = "审核状态") + private Long istatus; + + +} diff --git a/src/main/java/org/energy/modules/spares/entity/MaterialClassification.java b/src/main/java/org/energy/modules/spares/entity/MaterialClassification.java new file mode 100644 index 0000000..fb1e859 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/MaterialClassification.java @@ -0,0 +1,45 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * spt_material_classification实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("spt_material_classification") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "MaterialClassification对象", description = "spt_material_classification") +public class MaterialClassification extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 物资分类码 + */ + @ApiModelProperty(value = "物资分类码") + private String code; + /** + * 物资类型 + */ + @ApiModelProperty(value = "物资类型") + private String type; + + +} diff --git a/src/main/java/org/energy/modules/spares/entity/Outbound.java b/src/main/java/org/energy/modules/spares/entity/Outbound.java new file mode 100644 index 0000000..91b72a6 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/Outbound.java @@ -0,0 +1,71 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 出库实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("s_outbound") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Outbound对象", description = "出库") +public class Outbound extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 物资编号 + */ + @ApiModelProperty(value = "物资编号") + private String materialNo; + /** + * 出库编号 + */ + @ApiModelProperty(value = "出库编号") + private String outboundNo; + /** + * 出库时间 + */ + @ApiModelProperty(value = "出库时间") + private String outboundTime; + /** + * 出库申领人 + */ + @ApiModelProperty(value = "出库申领人") + private String outboundClaimants; + /** + * 出库经办人 + */ + @ApiModelProperty(value = "出库经办人") + private String outboundManager; + /** + * 出库数量 + */ + @ApiModelProperty(value = "出库数量") + private Long outboundCount; + /** + * 出库审核状态 + */ + @ApiModelProperty(value = "出库审核状态") + private Long istatus; + + +} diff --git a/src/main/java/org/energy/modules/spares/entity/SupplierInfo.java b/src/main/java/org/energy/modules/spares/entity/SupplierInfo.java new file mode 100644 index 0000000..2a18d79 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/SupplierInfo.java @@ -0,0 +1,91 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * spt_supplier_info实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("spt_supplier_info") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "SupplierInfo对象", description = "spt_supplier_info") +public class SupplierInfo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 统一社会信用代码/组织机构 + */ + @ApiModelProperty(value = "统一社会信用代码/组织机构") + private String creditCode; + /** + * 供应商名称 + */ + @ApiModelProperty(value = "供应商名称") + private String supplierName; + /** + * 注册地址 + */ + @ApiModelProperty(value = "注册地址") + private String registeredAddress; + /** + * 生产地址 + */ + @ApiModelProperty(value = "生产地址") + private String productionAddress; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactNumber; + /** + * 电子邮箱 + */ + @ApiModelProperty(value = "电子邮箱") + private String email; + /** + * 经营范围 + */ + @ApiModelProperty(value = "经营范围") + private String businessScope; + /** + * 审核状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "审核状态") + private Integer approvalStatus; + /** + * 付款条约 + */ + @ApiModelProperty(value = "付款条约") + private String paymentTerms; + /** + * 价格条款 + */ + @ApiModelProperty(value = "价格条款") + private String priceTerms; + /** + * 执行标准 + */ + @ApiModelProperty(value = "执行标准") + private String executiveStandards; + + +} diff --git a/src/main/java/org/energy/modules/spares/entity/Warehouse.java b/src/main/java/org/energy/modules/spares/entity/Warehouse.java new file mode 100644 index 0000000..171ab2c --- /dev/null +++ b/src/main/java/org/energy/modules/spares/entity/Warehouse.java @@ -0,0 +1,72 @@ +package org.energy.modules.spares.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * spt_warehouse实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@TableName("spt_warehouse") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Warehouse对象", description = "spt_warehouse") +public class Warehouse extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + private Long id; + /** + * 仓库编号 + */ + @ApiModelProperty(value = "仓库编号") + private String code; + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String name; + /** + * 仓库地址 + */ + @ApiModelProperty(value = "仓库地址") + private String address; + /** + * 仓库类型 + */ + @ApiModelProperty(value = "仓库类型") + private Integer type; + /** + * 仓库负责人 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "仓库负责人") + private Long managerUserId; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactNumber; + /** + * 审批状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ApiModelProperty(value = "审批状态") + private Integer approvalStatus; + + +} diff --git a/src/main/java/org/energy/modules/spares/excel/ManufacturerInfoExcel.java b/src/main/java/org/energy/modules/spares/excel/ManufacturerInfoExcel.java new file mode 100644 index 0000000..b62a737 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/excel/ManufacturerInfoExcel.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * Warehouse model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class ManufacturerInfoExcel implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 统一社会信用代码/组织机构 + */ + @ColumnWidth(20) + @ExcelProperty(value = "统一社会信用代码/组织机构") + private String creditCode; + /** + * 制造商名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "制造商名称") + private String manufacturerName; + /** + * 注册地址 + */ + @ColumnWidth(20) + @ExcelProperty(value = "注册地址") + private String registeredAddress; + /** + * 生产地址 + */ + @ColumnWidth(20) + @ExcelProperty(value = "生产地址") + private String productionAddress; + /** + * 联系电话 + */ + @ColumnWidth(20) + @ExcelProperty(value = "联系电话") + private String contactNumber; + /** + * 电子邮箱 + */ + @ColumnWidth(20) + @ExcelProperty(value = "电子邮箱") + private String email; + /** + * 经营范围 + */ + @ColumnWidth(20) + @ExcelProperty(value = "经营范围") + private String businessScope; + /** + * 执行标准 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ColumnWidth(20) + @ExcelProperty(value = "执行标准") + private String executiveStandards; + + /** + * 审核状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ColumnWidth(20) + @ExcelProperty(value = "审核状态") + private String approvalStatus; + +} diff --git a/src/main/java/org/energy/modules/spares/excel/MaterialClassExcel.java b/src/main/java/org/energy/modules/spares/excel/MaterialClassExcel.java new file mode 100644 index 0000000..1cacd10 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/excel/MaterialClassExcel.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * Warehouse model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class MaterialClassExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "物资分类码") + private String code; + + @ColumnWidth(20) + @ExcelProperty(value = "物资类型") + private String type; + + @ColumnWidth(20) + @ExcelProperty(value = "创建时间") + private String createTime; + + @ColumnWidth(20) + @ExcelProperty(value = "创建人") + private String createUserName; + +} diff --git a/src/main/java/org/energy/modules/spares/excel/MaterialExcel.java b/src/main/java/org/energy/modules/spares/excel/MaterialExcel.java new file mode 100644 index 0000000..0b02677 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/excel/MaterialExcel.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * EquipmentLedge model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class MaterialExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "物资编号") + private String materialNo; + + @ColumnWidth(15) + @ExcelProperty(value = "场站") + private String stationExt; + + @ColumnWidth(15) + @ExcelProperty(value = "物资名称") + private String materialName; + + @ColumnWidth(15) + @ExcelProperty(value = "规格型号") + private String model; + + @ColumnWidth(15) + @ExcelProperty(value = "库存数量") + private Long inventoryCount; + + @ColumnWidth(20) + @ExcelProperty(value = "物资描述") + private String materialDescription; + +} diff --git a/src/main/java/org/energy/modules/spares/excel/SupplierInfoExcel.java b/src/main/java/org/energy/modules/spares/excel/SupplierInfoExcel.java new file mode 100644 index 0000000..8b062a3 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/excel/SupplierInfoExcel.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * SupplierInfo model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class SupplierInfoExcel implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 统一社会信用代码/组织机构 + */ + @ColumnWidth(20) + @ExcelProperty(value = "统一社会信用代码/组织机构") + private String creditCode; + /** + * 供应商名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "供应商名称") + private String supplierName; + /** + * 注册地址 + */ + /** + * 生产地址 + */ + @ColumnWidth(20) + @ExcelProperty(value = "生产地址") + private String productionAddress; + /** + * 联系电话 + */ + @ColumnWidth(20) + @ExcelProperty(value = "联系电话") + private String contactNumber; + /** + * 电子邮箱 + */ + @ColumnWidth(20) + @ExcelProperty(value = "电子邮箱") + private String email; + /** + * 经营范围 + */ + @ColumnWidth(20) + @ExcelProperty(value = "经营范围") + private String businessScope; + /** + * 执行标准 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ColumnWidth(20) + @ExcelProperty(value = "执行标准") + private String executiveStandards; + /** + * 付款条约 + */ + @ColumnWidth(20) + @ExcelProperty(value = "付款条约") + private String paymentTerms; + /** + * 价格条款 + */ + @ColumnWidth(20) + @ExcelProperty(value = "价格条款") + private String priceTerms; + + /** + * 审核状态 + */ + @JsonSerialize(nullsUsing = NullSerializer.class) + @ColumnWidth(20) + @ExcelProperty(value = "审核状态") + private String approvalStatus; + +} diff --git a/src/main/java/org/energy/modules/spares/excel/WarehouseExcel.java b/src/main/java/org/energy/modules/spares/excel/WarehouseExcel.java new file mode 100644 index 0000000..9084c2a --- /dev/null +++ b/src/main/java/org/energy/modules/spares/excel/WarehouseExcel.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.spares.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * Warehouse model export + * @author edwong + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(16) +public class WarehouseExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(20) + @ExcelProperty(value = "仓库编号") + private String code; + + @ColumnWidth(20) + @ExcelProperty(value = "仓库名称") + private String name; + + @ColumnWidth(20) + @ExcelProperty(value = "仓库地址") + private String address; + + @ColumnWidth(20) + @ExcelProperty(value = "仓库类型") + private String type; + + @ColumnWidth(20) + @ExcelProperty(value = "仓库负责人") + private String managerUserName; + + @ColumnWidth(20) + @ExcelProperty(value = "联系电话") + private String contactNumber; + + @ColumnWidth(20) + @ExcelProperty(value = "审批状态") + private String approvalStatus; + + +} diff --git a/src/main/java/org/energy/modules/spares/mapper/InboundMapper.java b/src/main/java/org/energy/modules/spares/mapper/InboundMapper.java new file mode 100644 index 0000000..5825fd0 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/InboundMapper.java @@ -0,0 +1,31 @@ +package org.energy.modules.spares.mapper; + +import org.energy.modules.spares.entity.Inbound; +import org.energy.modules.spares.vo.InboundVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 入库 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface InboundMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param inbound + * @return + */ + List selectInboundPage(IPage page, InboundVO inbound); + + /** + * 获取最大编号 + */ + String getMaxNo(String materialNo); + +} diff --git a/src/main/java/org/energy/modules/spares/mapper/InboundMapper.xml b/src/main/java/org/energy/modules/spares/mapper/InboundMapper.xml new file mode 100644 index 0000000..618bfa3 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/InboundMapper.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.java b/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.java new file mode 100644 index 0000000..f6e549e --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.spares.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.spares.entity.ManufacturerInfo; +import org.energy.modules.spares.excel.ManufacturerInfoExcel; +import org.energy.modules.spares.vo.ManufacturerInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_manufacturer_info Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface ManufacturerInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param manufacturerInfo + * @return + */ + List selectManufacturerInfoPage(IPage page, ManufacturerInfoVO manufacturerInfo); + + List exportData(@Param("vo") ManufacturerInfoVO manufacturerInfo); + + List getNoList(); + + ManufacturerInfo getDetail(String creditCode); +} diff --git a/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.xml b/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.xml new file mode 100644 index 0000000..ed03a5c --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.java b/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.java new file mode 100644 index 0000000..85c5532 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.java @@ -0,0 +1,32 @@ +package org.energy.modules.spares.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.spares.entity.MaterialClassification; +import org.energy.modules.spares.excel.MaterialClassExcel; +import org.energy.modules.spares.vo.MaterialClassificationVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_material_classification Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface MaterialClassificationMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param materialClassification + * @return + */ + List selectMaterialClassificationPage(IPage page, MaterialClassificationVO materialClassification); + + List exportData(@Param("vo") MaterialClassificationVO materialClassification); + + List getCodeList(); +} diff --git a/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.xml b/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.xml new file mode 100644 index 0000000..1ff8e25 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.java b/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.java new file mode 100644 index 0000000..a360e6e --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.java @@ -0,0 +1,53 @@ +package org.energy.modules.spares.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.inspection.excel.InspectionTasksExcel; +import org.energy.modules.spares.entity.Material; +import org.energy.modules.spares.excel.MaterialExcel; +import org.energy.modules.spares.vo.MaterialVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 物资 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface MaterialMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param material + * @return + */ + List selectMaterialPage(IPage page, MaterialVO material); + + /** + * 导出 + */ + List exportData(@Param("entity") Material material); + + /** + * 获取物资编号 + */ + List getNoList(); + + /** + * 获取最大编号 + */ + String getMaxNo(); + + /** + * 获取物资的信息 + */ + MaterialVO getDetailList(String materialNo); + +} diff --git a/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.xml b/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.xml new file mode 100644 index 0000000..f902586 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/MaterialMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.java b/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.java new file mode 100644 index 0000000..36d71b5 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.java @@ -0,0 +1,31 @@ +package org.energy.modules.spares.mapper; + +import org.energy.modules.spares.entity.Outbound; +import org.energy.modules.spares.vo.OutboundVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 出库 Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface OutboundMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param outbound + * @return + */ + List selectOutboundPage(IPage page, OutboundVO outbound); + + /** + * 获取最大编号 + */ + String getMaxNo(String materialNo); + +} diff --git a/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.xml b/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.xml new file mode 100644 index 0000000..297e4ab --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/OutboundMapper.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.java b/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.java new file mode 100644 index 0000000..9047a98 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.java @@ -0,0 +1,34 @@ +package org.energy.modules.spares.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.spares.entity.SupplierInfo; +import org.energy.modules.spares.excel.SupplierInfoExcel; +import org.energy.modules.spares.vo.SupplierInfoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_supplier_info Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface SupplierInfoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param supplierInfo + * @return + */ + List selectSupplierInfoPage(IPage page, SupplierInfoVO supplierInfo); + + List exportData(@Param("vo") SupplierInfoVO supplierInfo); + + List getNoList(); + + SupplierInfo getDetail(String creditCode); +} diff --git a/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.xml b/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.xml new file mode 100644 index 0000000..7daf699 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.java b/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.java new file mode 100644 index 0000000..93c9d62 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.java @@ -0,0 +1,32 @@ +package org.energy.modules.spares.mapper; + +import org.apache.ibatis.annotations.Param; +import org.energy.modules.spares.entity.Warehouse; +import org.energy.modules.spares.excel.WarehouseExcel; +import org.energy.modules.spares.vo.WarehouseVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * spt_warehouse Mapper 接口 + * + * @author Daf + * @since 2024-07-15 + */ +public interface WarehouseMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param warehouse + * @return + */ + List selectWarehousePage(IPage page, WarehouseVO warehouse); + + List exportData(@Param("vo") WarehouseVO warehouseVO); + + List getWarehouseList(); + +} diff --git a/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.xml b/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.xml new file mode 100644 index 0000000..f804faf --- /dev/null +++ b/src/main/java/org/energy/modules/spares/mapper/WarehouseMapper.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/spares/service/IInboundService.java b/src/main/java/org/energy/modules/spares/service/IInboundService.java new file mode 100644 index 0000000..cf5c3f7 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IInboundService.java @@ -0,0 +1,30 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.Inbound; +import org.energy.modules.spares.vo.InboundVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 入库 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IInboundService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param inbound + * @return + */ + IPage selectInboundPage(IPage page, InboundVO inbound); + + /** + * 获取最大编号 + */ + String getMaxNo(String materialNo); + +} diff --git a/src/main/java/org/energy/modules/spares/service/IManufacturerInfoService.java b/src/main/java/org/energy/modules/spares/service/IManufacturerInfoService.java new file mode 100644 index 0000000..65c147b --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IManufacturerInfoService.java @@ -0,0 +1,39 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.ManufacturerInfo; +import org.energy.modules.spares.excel.ManufacturerInfoExcel; +import org.energy.modules.spares.vo.ManufacturerInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_manufacturer_info 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IManufacturerInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param manufacturerInfo + * @return + */ + IPage selectManufacturerInfoPage(IPage page, ManufacturerInfoVO manufacturerInfo); + + List export(ManufacturerInfoVO manufacturerInfoVO); + + /** + * 获取制造商 + */ + List getNoList(); + + /** + * 获取制造商信息 + */ + ManufacturerInfo getDetail(String creditCode); +} diff --git a/src/main/java/org/energy/modules/spares/service/IMaterialClassificationService.java b/src/main/java/org/energy/modules/spares/service/IMaterialClassificationService.java new file mode 100644 index 0000000..d77cb16 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IMaterialClassificationService.java @@ -0,0 +1,32 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.MaterialClassification; +import org.energy.modules.spares.excel.MaterialClassExcel; +import org.energy.modules.spares.vo.MaterialClassificationVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_material_classification 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IMaterialClassificationService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param materialClassification + * @return + */ + IPage selectMaterialClassificationPage(IPage page, MaterialClassificationVO materialClassification); + + List export(MaterialClassificationVO materialClassificationVO); + + List getCodeList(); + +} diff --git a/src/main/java/org/energy/modules/spares/service/IMaterialService.java b/src/main/java/org/energy/modules/spares/service/IMaterialService.java new file mode 100644 index 0000000..4b90001 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IMaterialService.java @@ -0,0 +1,52 @@ +package org.energy.modules.spares.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.spares.entity.Material; +import org.energy.modules.spares.excel.MaterialExcel; +import org.energy.modules.spares.vo.MaterialVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 物资 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IMaterialService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param material + * @return + */ + IPage selectMaterialPage(IPage page, MaterialVO material); + + /** + * 导出 + */ + List exportData(Material material); + + /** + * 获取物资编号 + */ + List getNoList(); + + /** + * 获取最大编号 + */ + String getMaxNo(); + + /** + * 获取物资的信息 + */ + MaterialVO getDetailList(String materialNo); + + void updateNum(String materialNo, long num); + +} diff --git a/src/main/java/org/energy/modules/spares/service/IOutboundService.java b/src/main/java/org/energy/modules/spares/service/IOutboundService.java new file mode 100644 index 0000000..4c6f0bf --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IOutboundService.java @@ -0,0 +1,30 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.Outbound; +import org.energy.modules.spares.vo.OutboundVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 出库 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IOutboundService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param outbound + * @return + */ + IPage selectOutboundPage(IPage page, OutboundVO outbound); + + /** + * 获取最大编号 + */ + String getMaxNo(String materialNo); + +} diff --git a/src/main/java/org/energy/modules/spares/service/ISupplierInfoService.java b/src/main/java/org/energy/modules/spares/service/ISupplierInfoService.java new file mode 100644 index 0000000..352c39f --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/ISupplierInfoService.java @@ -0,0 +1,39 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.SupplierInfo; +import org.energy.modules.spares.excel.SupplierInfoExcel; +import org.energy.modules.spares.vo.SupplierInfoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_supplier_info 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface ISupplierInfoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param supplierInfo + * @return + */ + IPage selectSupplierInfoPage(IPage page, SupplierInfoVO supplierInfo); + + List export(SupplierInfoVO supplierInfo); + + /** + * 获取制造商 + */ + List getNoList(); + + /** + * 获取制造商信息 + */ + SupplierInfo getDetail(String creditCode); +} diff --git a/src/main/java/org/energy/modules/spares/service/IWarehouseService.java b/src/main/java/org/energy/modules/spares/service/IWarehouseService.java new file mode 100644 index 0000000..15ae11c --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/IWarehouseService.java @@ -0,0 +1,32 @@ +package org.energy.modules.spares.service; + +import org.energy.modules.spares.entity.Warehouse; +import org.energy.modules.spares.excel.WarehouseExcel; +import org.energy.modules.spares.vo.WarehouseVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_warehouse 服务类 + * + * @author Daf + * @since 2024-07-15 + */ +public interface IWarehouseService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param warehouse + * @return + */ + IPage selectWarehousePage(IPage page, WarehouseVO warehouse); + + List export(WarehouseVO warehouseVO); + + List getWarehouseList(); + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/InboundServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/InboundServiceImpl.java new file mode 100644 index 0000000..af3975c --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/InboundServiceImpl.java @@ -0,0 +1,31 @@ +package org.energy.modules.spares.service.impl; + +import org.energy.modules.spares.entity.Inbound; +import org.energy.modules.spares.vo.InboundVO; +import org.energy.modules.spares.mapper.InboundMapper; +import org.energy.modules.spares.service.IInboundService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 入库 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class InboundServiceImpl extends BaseServiceImpl implements IInboundService { + + @Override + public IPage selectInboundPage(IPage page, InboundVO inbound) { + return page.setRecords(baseMapper.selectInboundPage(page, inbound)); + } + + @Override + public String getMaxNo(String materialNo){ + String maxNo = baseMapper.getMaxNo(materialNo); + return maxNo; + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/ManufacturerInfoServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/ManufacturerInfoServiceImpl.java new file mode 100644 index 0000000..0af2c82 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/ManufacturerInfoServiceImpl.java @@ -0,0 +1,56 @@ +package org.energy.modules.spares.service.impl; + +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.spares.entity.ManufacturerInfo; +import org.energy.modules.spares.excel.ManufacturerInfoExcel; +import org.energy.modules.spares.vo.ManufacturerInfoVO; +import org.energy.modules.spares.mapper.ManufacturerInfoMapper; +import org.energy.modules.spares.service.IManufacturerInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_manufacturer_info 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class ManufacturerInfoServiceImpl extends BaseServiceImpl implements IManufacturerInfoService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectManufacturerInfoPage(IPage page, ManufacturerInfoVO manufacturerInfo) { + return page.setRecords(baseMapper.selectManufacturerInfoPage(page, manufacturerInfo)); + } + + @Override + public List export(ManufacturerInfoVO manufacturerInfoVO) { + List list = baseMapper.exportData(manufacturerInfoVO); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getApprovalStatus())) + item.setApprovalStatus(dictService.getValue("check_status", Integer.parseInt(item.getApprovalStatus()))); + }); + return list; + } + + @Override + public List getNoList() { + List list = baseMapper.getNoList(); + return list; + } + + @Override + public ManufacturerInfo getDetail(String creditCode) { + ManufacturerInfo detail = baseMapper.getDetail(creditCode); + return detail; + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/MaterialClassificationServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/MaterialClassificationServiceImpl.java new file mode 100644 index 0000000..5925123 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/MaterialClassificationServiceImpl.java @@ -0,0 +1,50 @@ +package org.energy.modules.spares.service.impl; + +import com.dayu.daf.core.tool.api.R; +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.spares.entity.MaterialClassification; +import org.energy.modules.spares.excel.MaterialClassExcel; +import org.energy.modules.spares.vo.MaterialClassificationVO; +import org.energy.modules.spares.mapper.MaterialClassificationMapper; +import org.energy.modules.spares.service.IMaterialClassificationService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_material_classification 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class MaterialClassificationServiceImpl extends BaseServiceImpl implements IMaterialClassificationService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectMaterialClassificationPage(IPage page, MaterialClassificationVO materialClassification) { + return page.setRecords(baseMapper.selectMaterialClassificationPage(page, materialClassification)); + } + + @Override + public List export(MaterialClassificationVO materialClassificationVO) { + List list = baseMapper.exportData(materialClassificationVO); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getType())) + item.setType(dictService.getValue("supplies_type", Integer.parseInt(item.getType()))); + }); + return list; + } + + @Override + public List getCodeList() { + return baseMapper.getCodeList(); + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/MaterialServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/MaterialServiceImpl.java new file mode 100644 index 0000000..f5ff856 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/MaterialServiceImpl.java @@ -0,0 +1,65 @@ +package org.energy.modules.spares.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.dayu.daf.core.mp.support.Condition; +import org.energy.modules.inspection.entity.InspectionRoute; +import org.energy.modules.inspection.excel.InspectionRouteExcel; +import org.energy.modules.spares.entity.Material; +import org.energy.modules.spares.excel.MaterialExcel; +import org.energy.modules.spares.vo.MaterialVO; +import org.energy.modules.spares.mapper.MaterialMapper; +import org.energy.modules.spares.service.IMaterialService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * 物资 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class MaterialServiceImpl extends BaseServiceImpl implements IMaterialService { + + @Override + public IPage selectMaterialPage(IPage page, MaterialVO material) { + return page.setRecords(baseMapper.selectMaterialPage(page, material)); + } + + @Override + public List exportData(Material material) { + List list = baseMapper.exportData(material); + return list; + } + + @Override + public List getNoList() { + List list = baseMapper.getNoList(); + return list; + } + + @Override + public String getMaxNo(){ + String maxNo = baseMapper.getMaxNo(); + return maxNo; + } + + @Override + public MaterialVO getDetailList(String materialNo) { + MaterialVO DetailList = baseMapper.getDetailList(materialNo); + return DetailList; + } + + @Override + public void updateNum(String materialNo, long num) { + Material sel = new Material(); + sel.setMaterialNo(materialNo); + Material entity = getOne(Condition.getQueryWrapper(sel)); + entity.setInventoryCount(entity.getInventoryCount() + num); + updateById(entity); + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/OutboundServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/OutboundServiceImpl.java new file mode 100644 index 0000000..b2d908e --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/OutboundServiceImpl.java @@ -0,0 +1,31 @@ +package org.energy.modules.spares.service.impl; + +import org.energy.modules.spares.entity.Outbound; +import org.energy.modules.spares.vo.OutboundVO; +import org.energy.modules.spares.mapper.OutboundMapper; +import org.energy.modules.spares.service.IOutboundService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 出库 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class OutboundServiceImpl extends BaseServiceImpl implements IOutboundService { + + @Override + public IPage selectOutboundPage(IPage page, OutboundVO outbound) { + return page.setRecords(baseMapper.selectOutboundPage(page, outbound)); + } + + @Override + public String getMaxNo(String materialNo){ + String maxNo = baseMapper.getMaxNo(materialNo); + return maxNo; + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/SupplierInfoServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/SupplierInfoServiceImpl.java new file mode 100644 index 0000000..9c8287b --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/SupplierInfoServiceImpl.java @@ -0,0 +1,56 @@ +package org.energy.modules.spares.service.impl; + +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.spares.entity.SupplierInfo; +import org.energy.modules.spares.excel.SupplierInfoExcel; +import org.energy.modules.spares.vo.SupplierInfoVO; +import org.energy.modules.spares.mapper.SupplierInfoMapper; +import org.energy.modules.spares.service.ISupplierInfoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_supplier_info 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class SupplierInfoServiceImpl extends BaseServiceImpl implements ISupplierInfoService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectSupplierInfoPage(IPage page, SupplierInfoVO supplierInfo) { + return page.setRecords(baseMapper.selectSupplierInfoPage(page, supplierInfo)); + } + + @Override + public List export(SupplierInfoVO supplierInfo) { + List list = baseMapper.exportData(supplierInfo); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getApprovalStatus())) + item.setApprovalStatus(dictService.getValue("check_status", Integer.parseInt(item.getApprovalStatus()))); + }); + return list; + } + + @Override + public List getNoList() { + List list = baseMapper.getNoList(); + return list; + } + + @Override + public SupplierInfo getDetail(String creditCode) { + SupplierInfo detail = baseMapper.getDetail(creditCode); + return detail; + } + +} diff --git a/src/main/java/org/energy/modules/spares/service/impl/WarehouseServiceImpl.java b/src/main/java/org/energy/modules/spares/service/impl/WarehouseServiceImpl.java new file mode 100644 index 0000000..e691e95 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/service/impl/WarehouseServiceImpl.java @@ -0,0 +1,50 @@ +package org.energy.modules.spares.service.impl; + +import io.micrometer.core.instrument.util.StringUtils; +import org.energy.modules.smart.excel.WorkOrderExcel; +import org.energy.modules.spares.entity.Warehouse; +import org.energy.modules.spares.excel.WarehouseExcel; +import org.energy.modules.spares.vo.WarehouseVO; +import org.energy.modules.spares.mapper.WarehouseMapper; +import org.energy.modules.spares.service.IWarehouseService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.service.IDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.List; + +/** + * spt_warehouse 服务实现类 + * + * @author Daf + * @since 2024-07-15 + */ +@Service +public class WarehouseServiceImpl extends BaseServiceImpl implements IWarehouseService { + + @Autowired + IDictService dictService; + + @Override + public IPage selectWarehousePage(IPage page, WarehouseVO warehouse) { + return page.setRecords(baseMapper.selectWarehousePage(page, warehouse)); + } + + @Override + public List export(WarehouseVO warehouseVO) { + List list = baseMapper.exportData(warehouseVO); + list.forEach(item -> { + if (StringUtils.isNotEmpty(item.getApprovalStatus())) + item.setApprovalStatus(dictService.getValue("check_status", Integer.parseInt(item.getApprovalStatus()))); + }); + return list; + } + + @Override + public List getWarehouseList() { + List list = baseMapper.getWarehouseList(); + return list; + } +} diff --git a/src/main/java/org/energy/modules/spares/vo/InboundVO.java b/src/main/java/org/energy/modules/spares/vo/InboundVO.java new file mode 100644 index 0000000..29b59bf --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/InboundVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.Inbound; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 入库视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InboundVO对象", description = "入库") +public class InboundVO extends Inbound { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/vo/ManufacturerInfoVO.java b/src/main/java/org/energy/modules/spares/vo/ManufacturerInfoVO.java new file mode 100644 index 0000000..573e29d --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/ManufacturerInfoVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.ManufacturerInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * spt_manufacturer_info视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ManufacturerInfoVO对象", description = "spt_manufacturer_info") +public class ManufacturerInfoVO extends ManufacturerInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/vo/MaterialClassificationVO.java b/src/main/java/org/energy/modules/spares/vo/MaterialClassificationVO.java new file mode 100644 index 0000000..82d9dcd --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/MaterialClassificationVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.MaterialClassification; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * spt_material_classification视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "MaterialClassificationVO对象", description = "spt_material_classification") +public class MaterialClassificationVO extends MaterialClassification { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/vo/MaterialVO.java b/src/main/java/org/energy/modules/spares/vo/MaterialVO.java new file mode 100644 index 0000000..cb6199b --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/MaterialVO.java @@ -0,0 +1,25 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.Material; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 物资视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "MaterialVO对象", description = "物资") +public class MaterialVO extends Material { + private static final long serialVersionUID = 1L; + + // 仓库名 + private String warehouseName; + + + +} diff --git a/src/main/java/org/energy/modules/spares/vo/OutboundVO.java b/src/main/java/org/energy/modules/spares/vo/OutboundVO.java new file mode 100644 index 0000000..7669305 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/OutboundVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.Outbound; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 出库视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "OutboundVO对象", description = "出库") +public class OutboundVO extends Outbound { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/vo/SupplierInfoVO.java b/src/main/java/org/energy/modules/spares/vo/SupplierInfoVO.java new file mode 100644 index 0000000..26005b2 --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/SupplierInfoVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.SupplierInfo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * spt_supplier_info视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "SupplierInfoVO对象", description = "spt_supplier_info") +public class SupplierInfoVO extends SupplierInfo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/spares/vo/WarehouseVO.java b/src/main/java/org/energy/modules/spares/vo/WarehouseVO.java new file mode 100644 index 0000000..a66909a --- /dev/null +++ b/src/main/java/org/energy/modules/spares/vo/WarehouseVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.spares.vo; + +import org.energy.modules.spares.entity.Warehouse; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * spt_warehouse视图实体类 + * + * @author Daf + * @since 2024-07-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WarehouseVO对象", description = "spt_warehouse") +public class WarehouseVO extends Warehouse { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/config/DataConfig.java b/src/main/java/org/energy/modules/system/config/DataConfig.java new file mode 100644 index 0000000..1696444 --- /dev/null +++ b/src/main/java/org/energy/modules/system/config/DataConfig.java @@ -0,0 +1,18 @@ +package org.energy.modules.system.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +/** + * Created by edwong on 2018/4/28. + */ +@Component +@Data +public class DataConfig { + + @Value("${file.upload_path}") + private String uploadPath; + + +} diff --git a/src/main/java/org/energy/modules/system/controller/AuthClientController.java b/src/main/java/org/energy/modules/system/controller/AuthClientController.java new file mode 100644 index 0000000..fc054d9 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/AuthClientController.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.secure.annotation.PreAuth; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.RoleConstant; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.AuthClient; +import org.energy.modules.system.service.IAuthClientService; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; + +/** + * 应用管理控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/client") +@ApiIgnore +@Api(value = "应用管理", tags = "接口") +@PreAuth(RoleConstant.HAS_ROLE_ADMIN) +public class AuthClientController extends DafController { + + private IAuthClientService clientService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入client") + public R detail(AuthClient authClient) { + AuthClient detail = clientService.getOne(Condition.getQueryWrapper(authClient)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入client") + public R> list(AuthClient authClient, Query query) { + IPage pages = clientService.page(Condition.getPage(query), Condition.getQueryWrapper(authClient)); + return R.data(pages); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "新增", notes = "传入client") + public R save(@Valid @RequestBody AuthClient authClient) { + return R.status(clientService.save(authClient)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "修改", notes = "传入client") + public R update(@Valid @RequestBody AuthClient authClient) { + return R.status(clientService.updateById(authClient)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增或修改", notes = "传入client") + public R submit(@Valid @RequestBody AuthClient authClient) { + return R.status(clientService.saveOrUpdate(authClient)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(clientService.deleteLogic(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/AuthClientController.java.### b/src/main/java/org/energy/modules/system/controller/AuthClientController.java.### new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/org/energy/modules/system/controller/DataScopeController.java b/src/main/java/org/energy/modules/system/controller/DataScopeController.java new file mode 100644 index 0000000..418cdf4 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/DataScopeController.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.CacheUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.DataScope; +import org.energy.modules.system.service.IDataScopeService; +import org.energy.modules.system.vo.DataScopeVO; +import org.energy.modules.system.wrapper.DataScopeWrapper; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + +import static com.dayu.daf.core.tool.utils.CacheUtil.SYS_CACHE; + +/** + * 数据权限控制器 + * + * @author DafX + */ +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/data-scope") +@Api(value = "数据权限", tags = "数据权限") +public class DataScopeController extends DafController { + + private final IDataScopeService dataScopeService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入dataScope") + public R detail(DataScope dataScope) { + DataScope detail = dataScopeService.getOne(Condition.getQueryWrapper(dataScope)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入dataScope") + public R> list(DataScope dataScope, Query query) { + IPage pages = dataScopeService.page(Condition.getPage(query), Condition.getQueryWrapper(dataScope)); + return R.data(DataScopeWrapper.build().pageVO(pages)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "新增", notes = "传入dataScope") + public R save(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.save(dataScope)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "修改", notes = "传入dataScope") + public R update(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.updateById(dataScope)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增或修改", notes = "传入dataScope") + public R submit(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.saveOrUpdate(dataScope)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.deleteLogic(Func.toLongList(ids))); + } + +} + diff --git a/src/main/java/org/energy/modules/system/controller/DemoController.java b/src/main/java/org/energy/modules/system/controller/DemoController.java new file mode 100644 index 0000000..2665bcc --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/DemoController.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Demo; +import org.energy.modules.system.vo.DemoVO; +import org.energy.modules.system.service.IDemoService; +import com.dayu.daf.core.boot.ctrl.DafController; + +/** + * 控制器 + * + * @author Daf + * @since 2024-10-25 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/system/demo") +@Api(value = "", tags = "接口") +public class DemoController extends DafController { + + private IDemoService demoService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入demo") + public R detail(Demo demo) { + Demo detail = demoService.getOne(Condition.getQueryWrapper(demo)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入demo") + public R> list(Demo demo, Query query) { + IPage pages = demoService.page(Condition.getPage(query), Condition.getQueryWrapper(demo)); + return R.data(pages); + } + + /** + * 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入demo") + public R> page(DemoVO demo, Query query) { + IPage pages = demoService.selectDemoPage(Condition.getPage(query), demo); + return R.data(pages); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入demo") + public R save(@Valid @RequestBody Demo demo) { + return R.status(demoService.save(demo)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入demo") + public R update(@Valid @RequestBody Demo demo) { + return R.status(demoService.updateById(demo)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入demo") + public R submit(@Valid @RequestBody Demo demo) { + return R.status(demoService.saveOrUpdate(demo)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(demoService.deleteLogic(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/DeptController.java b/src/main/java/org/energy/modules/system/controller/DeptController.java new file mode 100644 index 0000000..9d43321 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/DeptController.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Dept; +import org.energy.modules.system.service.IDeptService; +import org.energy.modules.system.vo.DeptVO; +import org.energy.modules.system.wrapper.DeptWrapper; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/dept") +@ApiIgnore +@Api(value = "部门", tags = "部门") +public class DeptController extends DafController { + + private IDeptService deptService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入dept") + public R detail(Dept dept) { + Dept detail = deptService.getOne(Condition.getQueryWrapper(dept)); + return R.data(DeptWrapper.build().entityVO(detail)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入dept") + public R> list(@ApiIgnore @RequestParam Map dept, DafUser dafUser) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(dept, Dept.class); + List list = deptService.list((!dafUser.getTenantId().equals(DafConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Dept::getTenantId, dafUser.getTenantId()) : queryWrapper); + return R.data(DeptWrapper.build().listNodeVO(list)); + } + + /** + * 获取部门树形结构 + * + * @return + */ + @GetMapping("/tree") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "树形结构", notes = "树形结构") + public R> tree(String tenantId, DafUser DafUser) { + List tree = deptService.tree(Func.toStr(tenantId, DafUser.getTenantId())); + return R.data(tree); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增或修改", notes = "传入dept") + public R submit(@Valid @RequestBody Dept dept) { + return R.status(deptService.submit(dept)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(deptService.removeByIds(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/DictController.java b/src/main/java/org/energy/modules/system/controller/DictController.java new file mode 100644 index 0000000..e51074b --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/DictController.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Dict; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.vo.DictVO; +import org.energy.modules.system.wrapper.DictWrapper; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import static org.energy.common.cache.CacheNames.DICT_LIST; +import static org.energy.common.cache.CacheNames.DICT_VALUE; + +/** + * 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/dict") +@ApiIgnore +@Api(value = "字典", tags = "字典") +public class DictController extends DafController { + + private IDictService dictService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入dict") + public R detail(Dict dict) { + Dict detail = dictService.getOne(Condition.getQueryWrapper(dict)); + return R.data(DictWrapper.build().entityVO(detail)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入dict") + public R> list(@ApiIgnore @RequestParam Map dict) { + @SuppressWarnings("unchecked") + List list = dictService.list(Condition.getQueryWrapper(dict, Dict.class).lambda().orderByAsc(Dict::getSort)); + return R.data(DictWrapper.build().listNodeVO(list)); + } + + /** + * 获取字典树形结构 + * + * @return + */ + @GetMapping("/tree") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "树形结构", notes = "树形结构") + public R> tree() { + List tree = dictService.tree(); + return R.data(tree); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增或修改", notes = "传入dict") + public R submit(@Valid @RequestBody Dict dict) { + return R.status(dictService.submit(dict)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 5) + @CacheEvict(cacheNames = {DICT_LIST, DICT_VALUE}, allEntries = true) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(dictService.removeByIds(Func.toLongList(ids))); + } + + /** + * 获取字典 + * + * @return + */ + @GetMapping("/dictionary") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "获取字典", notes = "获取字典") + public R> dictionary(String code) { + List tree = dictService.getList(code); + return R.data(tree); + } + + + /** + * 通过编号获取列表 + */ + @GetMapping("/listByCode") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入dict") + public R> listByCode(@ApiIgnore @RequestParam Map dict) { + List list = new ArrayList<>(); + if (dict != null && dict.containsKey("code")) { + QueryWrapper qw = new QueryWrapper<>(); + qw.lambda().eq(Dict::getCode, dict.get("code")); + qw.lambda().notIn(Dict::getDictKey, -1); + qw.lambda().eq(Dict::getIsDeleted, DafConstant.DB_NOT_DELETED); + list = dictService.list(qw); + } + return R.data(list); + } +} diff --git a/src/main/java/org/energy/modules/system/controller/FileController.java b/src/main/java/org/energy/modules/system/controller/FileController.java new file mode 100644 index 0000000..7af923c --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/FileController.java @@ -0,0 +1,99 @@ +package org.energy.modules.system.controller; + +import com.alibaba.fastjson.JSON; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.tool.api.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.energy.modules.auth.utils.TokenUtil; +import org.energy.modules.system.config.DataConfig; +import org.energy.modules.system.service.IDeptService; +import org.energy.modules.system.service.IFileService; +import org.energy.modules.system.util.DateTimeUtils; +import org.energy.modules.system.util.EnumFileInfoType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Created by edwong on 2024/7/8. + * 文件控制器 + */ +@RestController +@RequestMapping("/system/file") +@AllArgsConstructor +@ApiIgnore +@Slf4j +@Api(value = "文件", tags = "文件") +public class FileController { + + @Autowired + DataConfig dataConfig; + + @Autowired + private IFileService fileService; + + + /** + * 附件上载 + */ + @ApiOperation("附件上载") + @PostMapping(value = "/upload") + public R upload(@RequestPart("file") MultipartFile picture, + @RequestParam("fileType") String fileType) { + Map resultMap = new HashMap<>(); + try { + if (null != picture) { + String sUniqueNewImageName = UUID.randomUUID().toString(); + String sOriginalFilename = picture.getOriginalFilename();//picture.getOriginalFilename(); + int suffixIndex = sOriginalFilename.lastIndexOf("."); + String suffix = ""; + if (suffixIndex > 0) { + suffix = sOriginalFilename.substring(suffixIndex); + } + String fileSavePath = dataConfig.getUploadPath(); + fileSavePath = fileSavePath + EnumFileInfoType.getKeyDesc(fileType) + "/" + DateTimeUtils.getFormatDate(new Date(), DateTimeUtils.YEAR_MONTH_DATE_FORMAT) + "/"; + + String filePath = "/data/actual/" + EnumFileInfoType.getKeyDesc(fileType) + "/" + DateTimeUtils.getFormatDate(new Date(), DateTimeUtils.YEAR_MONTH_DATE_FORMAT) + "/"; + if (!new File(fileSavePath).exists()) { + new File(fileSavePath).mkdirs(); + } + picture.transferTo(new File(fileSavePath + sUniqueNewImageName + suffix)); + + resultMap = fileService.saveFileInfo(fileType, filePath, sUniqueNewImageName, suffix, sOriginalFilename); + } + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ServiceException("上传图片出错"); + } + return R.data(resultMap); + } + + /** + * 附件上载 + */ + @ApiOperation("附件下载") + @GetMapping(value = "/download") + @ResponseBody + public void download(@RequestParam("fileName") String fileName, HttpServletResponse response) { + fileService.downloadFile(fileName, response); + } + +} + + diff --git a/src/main/java/org/energy/modules/system/controller/LogApiController.java b/src/main/java/org/energy/modules/system/controller/LogApiController.java new file mode 100644 index 0000000..4488e5d --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/LogApiController.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.dayu.daf.core.log.model.LogApi; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.service.ILogApiService; +import org.energy.modules.system.service.IUserService; +import org.energy.modules.system.vo.LogApiRVo; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-log/api") +public class LogApiController { + + private ILogApiService logService; + + private IUserService userService; + + /** + * 查询单条 + */ + @GetMapping("/detail") + public R detail(LogApi log) { + LogApi logApi = logService.getOne(Condition.getQueryWrapper(log)); + LogApiRVo vo = BeanUtil.copy(logApi, LogApiRVo.class); + User user = userService.selectByAccountAndDel(vo.getCreateBy()); + if (user != null) { + vo.setCreateUserName(user.getName()); + } + return R.data(vo); + } + + /** + * 查询多条(分页) + */ + @GetMapping("/list") + public R> list(@ApiIgnore @RequestParam Map log, Query query) { + query.setAscs(StringPool.EMPTY); + query.setDescs("create_time"); + IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogApi.class)); + List records = pages.getRecords().stream().map(logApi -> { + LogApiRVo vo = BeanUtil.copy(logApi, LogApiRVo.class); + vo.setStrId(Func.toStr(logApi.getId())); + User user = userService.selectByAccountAndDel(vo.getCreateBy()); + if (user != null) { + vo.setCreateUserName(user.getName()); + } + return vo; + }).collect(Collectors.toList()); + IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); + pageVo.setRecords(records); + return R.data(pageVo); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/LogErrorController.java b/src/main/java/org/energy/modules/system/controller/LogErrorController.java new file mode 100644 index 0000000..b0ae6d0 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/LogErrorController.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.dayu.daf.core.log.model.LogError; +import com.dayu.daf.core.log.model.LogErrorVo; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import lombok.AllArgsConstructor; +import org.energy.modules.system.service.ILogErrorService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-log/error") +public class LogErrorController { + + private ILogErrorService errorLogService; + + /** + * 查询单条 + */ + @GetMapping("/detail") + public R detail(LogError logError) { + return R.data(errorLogService.getOne(Condition.getQueryWrapper(logError))); + } + + /** + * 查询多条(分页) + */ + @GetMapping("/list") + public R> list(@ApiIgnore @RequestParam Map logError, Query query) { + query.setAscs("create_time"); + query.setDescs(StringPool.EMPTY); + IPage pages = errorLogService.page(Condition.getPage(query), Condition.getQueryWrapper(logError, LogError.class)); + List records = pages.getRecords().stream().map(logApi -> { + LogErrorVo vo = BeanUtil.copy(logApi, LogErrorVo.class); + vo.setStrId(Func.toStr(logApi.getId())); + return vo; + }).collect(Collectors.toList()); + IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); + pageVo.setRecords(records); + return R.data(pageVo); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/LogUsualController.java b/src/main/java/org/energy/modules/system/controller/LogUsualController.java new file mode 100644 index 0000000..63003ce --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/LogUsualController.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.dayu.daf.core.log.model.LogUsual; +import com.dayu.daf.core.log.model.LogUsualVo; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import lombok.AllArgsConstructor; +import org.energy.modules.system.service.ILogUsualService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-log/usual") +public class LogUsualController { + + private ILogUsualService logService; + + /** + * 查询单条 + */ + @GetMapping("/detail") + public R detail(LogUsual log) { + return R.data(logService.getOne(Condition.getQueryWrapper(log))); + } + + /** + * 查询多条(分页) + */ + @GetMapping("/list") + public R> list(@ApiIgnore @RequestParam Map log, Query query) { + query.setAscs("create_time"); + query.setDescs(StringPool.EMPTY); + IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogUsual.class)); + List records = pages.getRecords().stream().map(logApi -> { + LogUsualVo vo = BeanUtil.copy(logApi, LogUsualVo.class); + vo.setStrId(Func.toStr(logApi.getId())); + return vo; + }).collect(Collectors.toList()); + IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); + pageVo.setRecords(records); + return R.data(pageVo); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/MenuController.java b/src/main/java/org/energy/modules/system/controller/MenuController.java new file mode 100644 index 0000000..06a1c22 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/MenuController.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.dayu.daf.core.tool.constant.DafConstant; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.secure.annotation.PreAuth; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.RoleConstant; +import com.dayu.daf.core.tool.support.Kv; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Menu; +import org.energy.modules.system.service.IMenuService; +import org.energy.modules.system.vo.CheckedTreeVO; +import org.energy.modules.system.vo.GrantTreeVO; +import org.energy.modules.system.vo.MenuVO; +import org.energy.modules.system.wrapper.MenuWrapper; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/menu") +@Api(value = "菜单", tags = "菜单") +public class MenuController extends DafController { + + private IMenuService menuService; + + /** + * 详情 + */ + @GetMapping("/detail") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入menu") + public R detail(Menu menu) { + Menu detail = menuService.getOne(Condition.getQueryWrapper(menu)); + return R.data(MenuWrapper.build().entityVO(detail)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") + }) + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入menu") + public R> list(@ApiIgnore @RequestParam Map menu) { + List

list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().orderByAsc(Menu::getSort)); + return R.data(MenuWrapper.build().listNodeVO(list)); + } + + /** + * 菜单列表 + */ + @GetMapping("/menu-list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") + }) + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 3) + @ApiOperation(value = "菜单列表", notes = "传入menu") + public R> menuList(@ApiIgnore @RequestParam Map menu) { + List list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().eq(Menu::getCategory, 1).orderByAsc(Menu::getSort)); + return R.data(MenuWrapper.build().listNodeVO(list)); + } + + /** + * 懒加载菜单列表 + */ + @GetMapping("/lazy-menu-list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") + }) + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 4) + @ApiOperation(value = "懒加载菜单列表", notes = "传入menu") + public R> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map menu) { + List list = menuService.lazyMenuList(parentId, menu); + return R.data(MenuWrapper.build().listNodeLazyVO(list)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增或修改", notes = "传入menu") + public R submit(@Valid @RequestBody Menu menu) { + menu.setIsDeleted(DafConstant.DB_NOT_DELETED); + return R.status(menuService.saveOrUpdate(menu)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 6) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(menuService.removeByIds(Func.toLongList(ids))); + } + + /** + * 前端菜单数据 + */ + @GetMapping("/routes") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "前端菜单数据", notes = "前端菜单数据") + public R> routes(DafUser user) { + List list = menuService.routes((user == null || user.getUserId() == 0L) ? null : user.getRoleId()); + return R.data(list); + } + + /** + * 前端按钮数据 + */ + @GetMapping("/buttons") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "前端按钮数据", notes = "前端按钮数据") + public R> buttons(DafUser user) { + List list = menuService.buttons(user.getRoleId()); + return R.data(list); + } + + /** + * 获取菜单树形结构 + */ + @GetMapping("/tree") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "树形结构", notes = "树形结构") + public R> tree() { + List tree = menuService.tree(); + return R.data(tree); + } + + /** + * 获取权限分配树形结构 + */ + @GetMapping("/grant-tree") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "权限分配树形结构", notes = "权限分配树形结构") + public R grantTree(DafUser user) { + GrantTreeVO vo = new GrantTreeVO(); + vo.setMenu(menuService.grantTree(user)); + vo.setDataScope(menuService.grantDataScopeTree(user)); + return R.data(vo); + } + + /** + * 获取权限分配树形结构 + */ + @GetMapping("/role-tree-keys") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "角色所分配的树", notes = "角色所分配的树") + public R roleTreeKeys(String roleIds) { + CheckedTreeVO vo = new CheckedTreeVO(); + vo.setMenu(menuService.roleTreeKeys(roleIds)); + vo.setDataScope(menuService.dataScopeTreeKeys(roleIds)); + return R.data(vo); + } + + /** + * 获取配置的角色权限 + */ + @GetMapping("auth-routes") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "菜单的角色权限") + public R> authRoutes(DafUser user) { + if (Func.isEmpty(user) || user.getUserId() == 0L) { + return null; + } + return R.data(menuService.authRoutes(user)); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/ParamController.java b/src/main/java/org/energy/modules/system/controller/ParamController.java new file mode 100644 index 0000000..48a3c75 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/ParamController.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Param; +import org.energy.modules.system.service.IParamService; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/param") +@Api(value = "参数管理", tags = "接口") +public class ParamController extends DafController { + + private IParamService paramService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperation(value = "详情", notes = "传入param") + public R detail(Param param) { + Param detail = paramService.getOne(Condition.getQueryWrapper(param)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "paramName", value = "参数名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "paramKey", value = "参数键名", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "paramValue", value = "参数键值", paramType = "query", dataType = "string") + }) + @ApiOperation(value = "分页", notes = "传入param") + public R> list(@ApiIgnore @RequestParam Map param, Query query) { + IPage pages = paramService.page(Condition.getPage(query), Condition.getQueryWrapper(param, Param.class)); + return R.data(pages); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperation(value = "新增或修改", notes = "传入param") + public R submit(@Valid @RequestBody Param param) { + return R.status(paramService.saveOrUpdate(param)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(paramService.deleteLogic(Func.toLongList(ids))); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/PostController.java b/src/main/java/org/energy/modules/system/controller/PostController.java new file mode 100644 index 0000000..266a85d --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/PostController.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.secure.DafUser; +import org.energy.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Post; +import org.energy.modules.system.service.IPostService; +import org.energy.modules.system.vo.PostVO; +import org.energy.modules.system.wrapper.PostWrapper; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 岗位表 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/post") +@Api(value = "岗位表", tags = "岗位表接口") +public class PostController extends DafController { + + private IPostService postService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入post") + public R detail(Post post) { + Post detail = postService.getOne(Condition.getQueryWrapper(post)); + return R.data(PostWrapper.build().entityVO(detail)); + } + + /** + * 分页 岗位表 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入post") + public R> list(Post post, Query query) { + IPage pages = postService.page(Condition.getPage(query), Condition.getQueryWrapper(post)); + return R.data(PostWrapper.build().pageVO(pages)); + } + + + /** + * 自定义分页 岗位表 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入post") + public R> page(PostVO post, Query query) { + IPage pages = postService.selectPostPage(Condition.getPage(query), post); + return R.data(pages); + } + + /** + * 新增 岗位表 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入post") + public R save(@Valid @RequestBody Post post) { + return R.status(postService.save(post)); + } + + /** + * 修改 岗位表 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入post") + public R update(@Valid @RequestBody Post post) { + return R.status(postService.updateById(post)); + } + + /** + * 新增或修改 岗位表 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入post") + public R submit(@Valid @RequestBody Post post) { + post.setTenantId(SecureUtil.getTenantId()); + return R.status(postService.saveOrUpdate(post)); + } + + + /** + * 删除 岗位表 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(postService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 下拉数据源 + */ + @GetMapping("/select") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "下拉数据源", notes = "传入post") + public R> select(String tenantId, DafUser dafUser) { + List list = postService.list(Wrappers.query().lambda().eq(Post::getTenantId, Func.toStr(tenantId, dafUser.getTenantId()))); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/RegionController.java b/src/main/java/org/energy/modules/system/controller/RegionController.java new file mode 100644 index 0000000..ada6973 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/RegionController.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.launch.constant.AppConstant; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.node.INode; +import org.energy.modules.system.entity.Region; +import org.energy.modules.system.service.IRegionService; +import org.energy.modules.system.vo.RegionVO; +import org.energy.modules.system.wrapper.RegionWrapper; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +/** + * 行政区划表 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/region") +@Api(value = "行政区划表", tags = "行政区划表接口") +public class RegionController extends DafController { + + private final IRegionService regionService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入region") + public R detail(Region region) { + Region detail = regionService.getOne(Condition.getQueryWrapper(region)); + return R.data(RegionWrapper.build().entityVO(detail)); + } + + /** + * 分页 行政区划表 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入region") + public R> list(Region region, Query query) { + IPage pages = regionService.page(Condition.getPage(query), Condition.getQueryWrapper(region)); + return R.data(pages); + } + + /** + * 懒加载列表 + */ + @GetMapping("/lazy-list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "区划编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "区划名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 3) + @ApiOperation(value = "懒加载列表", notes = "传入menu") + public R> lazyList(String parentCode, @ApiIgnore @RequestParam Map menu) { + List list = regionService.lazyList(parentCode, menu); + return R.data(RegionWrapper.build().listNodeLazyVO(list)); + } + + /** + * 懒加载列表 + */ + @GetMapping("/lazy-tree") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "区划编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "区划名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 4) + @ApiOperation(value = "懒加载列表", notes = "传入menu") + public R> lazyTree(String parentCode, @ApiIgnore @RequestParam Map menu) { + List list = regionService.lazyTree(parentCode, menu); + return R.data(RegionWrapper.build().listNodeLazyVO(list)); + } + + /** + * 新增 行政区划表 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增", notes = "传入region") + public R save(@Valid @RequestBody Region region) { + return R.status(regionService.save(region)); + } + + /** + * 修改 行政区划表 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "修改", notes = "传入region") + public R update(@Valid @RequestBody Region region) { + return R.status(regionService.updateById(region)); + } + + /** + * 新增或修改 行政区划表 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "新增或修改", notes = "传入region") + public R submit(@Valid @RequestBody Region region) { + return R.status(regionService.submit(region)); + } + + + /** + * 删除 行政区划表 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "删除", notes = "传入主键") + public R remove(@ApiParam(value = "主键", required = true) @RequestParam String id) { + return R.status(regionService.removeRegion(id)); + } + + /** + * 行政区划下拉数据源 + */ + @GetMapping("/select") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "下拉数据源", notes = "传入tenant") + public R> select(@RequestParam(required = false, defaultValue = "00") String code) { + List list = regionService.list(Wrappers.query().lambda().eq(Region::getParentCode, code)); + return R.data(list); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/RoleController.java b/src/main/java/org/energy/modules/system/controller/RoleController.java new file mode 100644 index 0000000..2d3cc6d --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/RoleController.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.CacheUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.Role; +import org.energy.modules.system.service.IRoleDataService; +import org.energy.modules.system.service.IRoleService; +import org.energy.modules.system.vo.GrantVO; +import org.energy.modules.system.vo.HomePageVO; +import org.energy.modules.system.vo.RoleVO; +import org.energy.modules.system.wrapper.RoleWrapper; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +import static com.dayu.daf.core.tool.utils.CacheUtil.SYS_CACHE; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/role") +@Api(value = "角色", tags = "角色") +public class RoleController extends DafController { + + private IRoleService roleService; + + private IRoleDataService roleDataService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入role") + @ApiLog + public R detail(Role role) { + Role detail = roleService.getOne(Condition.getQueryWrapper(role)); + return R.data(RoleWrapper.build().entityVO(detail)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleName", value = "参数名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "roleAlias", value = "角色别名", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入role") + @ApiLog + public R> list(@ApiIgnore @RequestParam Map role, DafUser dafUser) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(role, Role.class); + List list = roleService.list((!dafUser.getTenantId().equals(DafConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Role::getTenantId, dafUser.getTenantId()) : queryWrapper); + return R.data(RoleWrapper.build().listNodeVO(list)); + } + + /** + * 获取角色树形结构 + */ + @GetMapping("/tree") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "树形结构", notes = "树形结构") + @ApiLog + public R> tree(String tenantId, DafUser dafUser) { + List tree = roleService.tree(Func.toStr(tenantId, dafUser.getTenantId())); + return R.data(tree); + } + + /** + * 获取指定角色树形结构 + */ + @GetMapping("/tree-by-id") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "树形结构", notes = "树形结构") + @ApiLog + public R> treeById(Long roleId, DafUser dafUser) { + Role role = roleService.getById(roleId); + List tree = roleService.tree(Func.notNull(role) ? role.getTenantId() : dafUser.getTenantId()); + return R.data(tree); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "新增或修改", notes = "传入role") + @ApiLog + public R submit(@Valid @RequestBody Role role, DafUser user) { + CacheUtil.clear(SYS_CACHE); + if (Func.isEmpty(role.getId())) { + role.setTenantId(user.getTenantId()); + } + if (Func.isEmpty(role.getParentId())) { + role.setParentId(0L); + } + return R.status(roleService.saveOrUpdate(role)); + } + + /** + * 删除L + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "删除", notes = "传入ids") + @ApiLog + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + CacheUtil.clear(SYS_CACHE); + return R.status(roleService.removeByIds(Func.toLongList(ids))); + } + + /** + * 设置菜单权限 + */ + @PostMapping("/grant") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合") + @ApiLog + public R grant(@RequestBody GrantVO grantVO) { + CacheUtil.clear(SYS_CACHE); + boolean temp = roleService.grant(grantVO.getRoleIds(), grantVO.getMenuIds(), grantVO.getDataScopeIds()); + return R.status(temp); + } + + @GetMapping("/honePageData") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "首页数据", notes = "传入") + public R honePageData() { + return R.data(roleDataService.findCurrHomePageInfo()); + } + +} diff --git a/src/main/java/org/energy/modules/system/controller/TenantController.java b/src/main/java/org/energy/modules/system/controller/TenantController.java new file mode 100644 index 0000000..dc860b5 --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/TenantController.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.boot.ctrl.DafController; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.support.Kv; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Tenant; +import org.energy.modules.system.service.ITenantService; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +/** + * 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/daf-system/tenant") +@ApiIgnore +@Api(value = "租户管理", tags = "接口") +public class TenantController extends DafController { + + private ITenantService tenantService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperation(value = "详情", notes = "传入tenant") + public R detail(Tenant tenant) { + Tenant detail = tenantService.getOne(Condition.getQueryWrapper(tenant)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "tenantId", value = "参数名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "tenantName", value = "角色别名", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "contactNumber", value = "联系电话", paramType = "query", dataType = "string") + }) + @ApiOperation(value = "分页", notes = "传入tenant") + public R> list(@ApiIgnore @RequestParam Map tenant, Query query, DafUser dafUser) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(tenant, Tenant.class); + IPage pages = tenantService.page(Condition.getPage(query), (!dafUser.getTenantId().equals(DafConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, dafUser.getTenantId()) : queryWrapper); + return R.data(pages); + } + + /** + * 下拉数据源 + */ + @GetMapping("/select") + @ApiOperation(value = "下拉数据源", notes = "传入tenant") + public R> select(Tenant tenant, DafUser dafUser) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(tenant); + List list = tenantService.list((!dafUser.getTenantId().equals(DafConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, dafUser.getTenantId()) : queryWrapper); + return R.data(list); + } + + /** + * 自定义分页 + */ + @GetMapping("/page") + @ApiOperation(value = "分页", notes = "传入tenant") + public R> page(Tenant tenant, Query query) { + IPage pages = tenantService.selectTenantPage(Condition.getPage(query), tenant); + return R.data(pages); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperation(value = "新增或修改", notes = "传入tenant") + public R submit(@Valid @RequestBody Tenant tenant) { + return R.status(tenantService.saveTenant(tenant)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(tenantService.deleteLogic(Func.toLongList(ids))); + } + + /** + * 根据域名查询信息 + * + * @param domain 域名 + */ + @GetMapping("/info") + @ApiOperation(value = "配置信息", notes = "传入domain") + public R info(String domain) { + Tenant tenant = tenantService.getOne(Wrappers.query().lambda().eq(Tenant::getDomain, domain)); + Kv kv = Kv.init(); + if (tenant != null) { + kv.set("tenantId", tenant.getTenantId()).set("domain", tenant.getDomain()); + } + return R.data(kv); + } + + +} diff --git a/src/main/java/org/energy/modules/system/controller/UserController.java b/src/main/java/org/energy/modules/system/controller/UserController.java new file mode 100644 index 0000000..c1aac8c --- /dev/null +++ b/src/main/java/org/energy/modules/system/controller/UserController.java @@ -0,0 +1,320 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.controller; + + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.read.builder.ExcelReaderBuilder; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.log.annotation.ApiLog; +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.RedisUtil; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import org.apache.commons.codec.Charsets; +import org.energy.common.cache.CacheNames; +import org.energy.core.secure.utils.SecureUtil; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.excel.UserExcel; +import org.energy.modules.system.excel.UserImportListener; +import org.energy.modules.system.service.IUserService; +import org.energy.modules.system.vo.UserVO; +import org.energy.modules.system.wrapper.UserWrapper; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * 控制器 + * + * @author Chill + */ +@ApiIgnore +@RestController +@RequestMapping("daf-user") +@AllArgsConstructor +public class UserController { + + private IUserService userService; + + private RedisUtil redisUtil; + + /** + * 查询单条 + */ + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查看详情", notes = "传入id") + @GetMapping("/detail") + @ApiLog + public R detail(User user) { + User detail = userService.getOne(Condition.getQueryWrapper(user)); + return R.data(UserWrapper.build().entityVO(detail)); + } + + /** + * 查询单条 + */ + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查看详情", notes = "传入id") + @GetMapping("/info") + @ApiLog + public R info(DafUser user) { + User detail = userService.getById(user.getUserId()); + return R.data(UserWrapper.build().entityVO(detail)); + } + + /** + * 用户列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 3) + @ApiOperation(value = "列表", notes = "传入account和realName") + @ApiLog + public R> list(@ApiIgnore @RequestParam Map user, Query query, DafUser dafUser) { + query.setAscs("create_time"); + QueryWrapper queryWrapper = Condition.getQueryWrapper(user, User.class); + IPage pages = userService.page(Condition.getPage(query), (!dafUser.getTenantId().equals(DafConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, dafUser.getTenantId()) : queryWrapper); + return R.data(UserWrapper.build().pageVO(pages)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增或修改", notes = "传入User") + @ApiLog + public R submit(@Valid @RequestBody User user) { + return R.status(userService.submit(user)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入User") + @ApiLog + public R update(@Valid @RequestBody User user) { + return R.status(userService.updateById(user)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "删除", notes = "传入地基和") + @ApiLog + public R remove(@RequestParam String ids) { + List userIdList = Func.toLongList(ids); + boolean isdel = userService.deleteLogic(userIdList); + if (isdel) { + for (Long userId : userIdList) { + redisUtil.set(CacheNames.DEL_USER_ID + userId, userId, 30L, TimeUnit.MINUTES); + } + } + return R.status(isdel); + } + + + /** + * 设置菜单权限 + * + * @param userIds + * @param roleIds + * @return + */ + @PostMapping("/grant") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合") + @ApiLog + public R grant(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds, + @ApiParam(value = "roleId集合", required = true) @RequestParam String roleIds) { + boolean temp = userService.grant(userIds, roleIds); + return R.status(temp); + } + + @PostMapping("/reset-password") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "初始化密码", notes = "传入userId集合") + @ApiLog + public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds) { + boolean temp = userService.resetPassword(userIds); + return R.status(temp); + } + + /** + * 修改密码 + * + * @param oldPassword + * @param newPassword + * @param newPassword1 + * @return + */ + @PostMapping("/update-password") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "修改密码", notes = "传入密码") + @ApiLog + public R updatePassword(DafUser user, @ApiParam(value = "旧密码", required = true) @RequestParam String oldPassword, + @ApiParam(value = "新密码", required = true) @RequestParam String newPassword, + @ApiParam(value = "新密码", required = true) @RequestParam String newPassword1) { + boolean temp = userService.updatePassword(user.getUserId(), oldPassword, newPassword, newPassword1); + return R.status(temp); + } + + /** + * 用户列表 + * + * @param user + * @return + */ + @GetMapping("/user-list") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "用户列表", notes = "传入user") + @ApiLog + public R> userList(User user) { + List list = userService.list(Condition.getQueryWrapper(user)); + return R.data(list); + } + + + /** + * 导入用户 + */ + @PostMapping("import-user") + @ApiOperationSupport(order = 12) + @ApiOperation(value = "导入用户", notes = "传入excel") + @ApiLog + public R importUser(MultipartFile file, Integer isCovered) { + String filename = file.getOriginalFilename(); + if (StringUtils.isEmpty(filename)) { + throw new RuntimeException("请上传文件!"); + } + if ((!StringUtils.endsWithIgnoreCase(filename, ".xls") && !StringUtils.endsWithIgnoreCase(filename, ".xlsx"))) { + throw new RuntimeException("请上传正确的excel文件!"); + } + InputStream inputStream; + try { + UserImportListener importListener = new UserImportListener(userService); + inputStream = new BufferedInputStream(file.getInputStream()); + ExcelReaderBuilder builder = EasyExcel.read(inputStream, UserExcel.class, importListener); + builder.doReadAll(); + } catch (IOException e) { + e.printStackTrace(); + } + return R.success("操作成功"); + } + + /** + * 导出用户 + */ + @SneakyThrows + @GetMapping("export-user") + @ApiOperationSupport(order = 13) + @ApiOperation(value = "导出用户", notes = "传入user") + @ApiLog + public void exportUser(@ApiIgnore @RequestParam Map user, DafUser dafUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(user, User.class); + if (!SecureUtil.isAdministrator()){ + queryWrapper.lambda().eq(User::getTenantId, dafUser.getTenantId()); + } + queryWrapper.lambda().eq(User::getIsDeleted, DafConstant.DB_NOT_DELETED); + List list = userService.exportUser(queryWrapper); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("用户数据导出", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), UserExcel.class).sheet("用户数据表").doWrite(list); + } + + /** + * 导出模板 + */ + @SneakyThrows + @GetMapping("export-template") + @ApiOperationSupport(order = 14) + @ApiOperation(value = "导出模板") + @ApiLog + public void exportUser(HttpServletResponse response) { + List list = new ArrayList<>(); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + String fileName = URLEncoder.encode("用户数据模板", Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), UserExcel.class).sheet("用户数据表").doWrite(list); + } + + /** + * 第三方注册用户 + */ + @PostMapping("/register-guest") + @ApiOperationSupport(order = 15) + @ApiOperation(value = "第三方注册用户", notes = "传入user") + @ApiLog + public R registerGuest(User user, Long oauthId) { + return R.status(userService.registerGuest(user, oauthId)); + } + + /** + * 远程搜索 + */ + @GetMapping("/listBySearch") + @ApiOperationSupport(order = 16) + @ApiOperation(value = "远程搜索", notes = "传入") + public R> listBySearch(@RequestParam Map map) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (map != null && map.containsKey("search")) { + queryWrapper.lambda().like(User::getName, map.get("search")).or().like(User::getCode, map.get("search")); + if (map.get("search").toString().matches("\\d+")) { + queryWrapper.lambda().or().eq(User::getId, Long.parseLong(map.get("search").toString())); + } + } + queryWrapper.lambda().eq(User::getIsDeleted, DafConstant.DB_NOT_DELETED); + queryWrapper.lambda().orderByAsc(User::getCreateTime); + queryWrapper.lambda().last(" LIMIT 50"); + List list = userService.list(queryWrapper); + return R.data(list); + } + +} diff --git a/src/main/java/org/energy/modules/system/dto/DemoDTO.java b/src/main/java/org/energy/modules/system/dto/DemoDTO.java new file mode 100644 index 0000000..6a93cfe --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/DemoDTO.java @@ -0,0 +1,18 @@ +package org.energy.modules.system.dto; + +import org.energy.modules.system.entity.Demo; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 数据传输对象实体类 + * + * @author Daf + * @since 2024-10-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DemoDTO extends Demo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/dto/DeptDTO.java b/src/main/java/org/energy/modules/system/dto/DeptDTO.java new file mode 100644 index 0000000..29402ce --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/DeptDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Dept; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DeptDTO extends Dept { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/dto/DictDTO.java b/src/main/java/org/energy/modules/system/dto/DictDTO.java new file mode 100644 index 0000000..f656dda --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/DictDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Dict; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DictDTO extends Dict { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/dto/MenuDTO.java b/src/main/java/org/energy/modules/system/dto/MenuDTO.java new file mode 100644 index 0000000..baf706c --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/MenuDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +public class MenuDTO implements Serializable { + private static final long serialVersionUID = 1L; + private String alias; + private String path; +} diff --git a/src/main/java/org/energy/modules/system/dto/ParamDTO.java b/src/main/java/org/energy/modules/system/dto/ParamDTO.java new file mode 100644 index 0000000..df18b45 --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/ParamDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Param; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ParamDTO extends Param { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/dto/RoleDTO.java b/src/main/java/org/energy/modules/system/dto/RoleDTO.java new file mode 100644 index 0000000..18be58b --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/RoleDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Role; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class RoleDTO extends Role { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/dto/RoleMenuDTO.java b/src/main/java/org/energy/modules/system/dto/RoleMenuDTO.java new file mode 100644 index 0000000..d7fef4f --- /dev/null +++ b/src/main/java/org/energy/modules/system/dto/RoleMenuDTO.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.RoleMenu; + +/** + * 数据传输对象实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class RoleMenuDTO extends RoleMenu { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/entity/AuthClient.java b/src/main/java/org/energy/modules/system/entity/AuthClient.java new file mode 100644 index 0000000..baba116 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/AuthClient.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 实体类 + * + * @author DafX + * @since 2019-03-24 + */ +@Data +@TableName("sys_client") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Client对象", description = "Client对象") +public class AuthClient extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 客户端id + */ + @ApiModelProperty(value = "客户端id") + private String clientId; + /** + * 客户端密钥 + */ + @ApiModelProperty(value = "客户端密钥") + private String clientSecret; + /** + * 资源集合 + */ + @ApiModelProperty(value = "资源集合") + private String resourceIds; + /** + * 授权范围 + */ + @ApiModelProperty(value = "授权范围") + private String scope; + /** + * 授权类型 + */ + @ApiModelProperty(value = "授权类型") + private String authorizedGrantTypes; + /** + * 回调地址 + */ + @ApiModelProperty(value = "回调地址") + private String webServerRedirectUri; + /** + * 权限 + */ + @ApiModelProperty(value = "权限") + private String authorities; + /** + * 令牌过期秒数 + */ + @ApiModelProperty(value = "令牌过期秒数") + private Integer accessTokenValidity; + /** + * 刷新令牌过期秒数 + */ + @ApiModelProperty(value = "刷新令牌过期秒数") + private Integer refreshTokenValidity; + /** + * 附加说明 + */ + @ApiModelProperty(value = "附加说明") + private String additionalInformation; + /** + * 自动授权 + */ + @ApiModelProperty(value = "自动授权") + private String autoapprove; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/DataScope.java b/src/main/java/org/energy/modules/system/entity/DataScope.java new file mode 100644 index 0000000..37a6e7e --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/DataScope.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 实体类 + * + * @author DafX + */ +@Data +@TableName("sys_scope_data") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DataScope对象", description = "DataScope对象") +public class DataScope extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 菜单主键 + */ + @ApiModelProperty(value = "菜单主键") + private Long menuId; + /** + * 资源编号 + */ + @ApiModelProperty(value = "资源编号") + private String resourceCode; + /** + * 数据权限名称 + */ + @ApiModelProperty(value = "数据权限名称") + private String scopeName; + /** + * 数据权限可见字段 + */ + @ApiModelProperty(value = "数据权限可见字段") + private String scopeField; + /** + * 数据权限类名 + */ + @ApiModelProperty(value = "数据权限类名") + private String scopeClass; + /** + * 数据权限字段 + */ + @ApiModelProperty(value = "数据权限字段") + private String scopeColumn; + /** + * 数据权限类型 + */ + @ApiModelProperty(value = "数据权限类型") + private Integer scopeType; + /** + * 数据权限值域 + */ + @ApiModelProperty(value = "数据权限值域") + private String scopeValue; + /** + * 数据权限备注 + */ + @ApiModelProperty(value = "数据权限备注") + private String remark; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Demo.java b/src/main/java/org/energy/modules/system/entity/Demo.java new file mode 100644 index 0000000..7b97121 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Demo.java @@ -0,0 +1,42 @@ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 实体类 + * + * @author Daf + * @since 2024-10-25 + */ +@Data +@TableName("sys_demo") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Demo对象", description = "Demo对象") +public class Demo extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + private Integer id; + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + private String name; + /** + * 编号 + */ + @ApiModelProperty(value = "编号") + private String code; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Dept.java b/src/main/java/org/energy/modules/system/entity/Dept.java new file mode 100644 index 0000000..560028f --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Dept.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_dept") +@ApiModel(value = "Dept对象", description = "Dept对象") +public class Dept implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 租户ID + */ + @ApiModelProperty(value = "租户ID") + private String tenantId; + + /** + * 父主键 + */ + @ApiModelProperty(value = "父主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 祖级机构主键 + */ + @ApiModelProperty(value = "祖级机构主键") + private String ancestors; + + /** + * 部门名 + */ + @ApiModelProperty(value = "部门名") + private String deptName; + + /** + * 部门全称 + */ + @ApiModelProperty(value = "部门全称") + private String fullName; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sort; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 是否已删除 + */ + @TableLogic + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Dict.java b/src/main/java/org/energy/modules/system/entity/Dict.java new file mode 100644 index 0000000..cb6f17a --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Dict.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_dict") +@ApiModel(value = "Dict对象", description = "Dict对象") +public class Dict implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父主键 + */ + @ApiModelProperty(value = "父主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 字典码 + */ + @ApiModelProperty(value = "字典码") + private String code; + + /** + * 字典值 + */ + @ApiModelProperty(value = "字典值") + private Integer dictKey; + + /** + * 字典名称 + */ + @ApiModelProperty(value = "字典名称") + private String dictValue; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sort; + + /** + * 字典备注 + */ + @ApiModelProperty(value = "字典备注") + private String remark; + + /** + * 是否已删除 + */ + @TableLogic + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/File.java b/src/main/java/org/energy/modules/system/entity/File.java new file mode 100644 index 0000000..a027371 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/File.java @@ -0,0 +1,32 @@ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.dayu.daf.core.mp.base.BaseEntity; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 实体类 + * + * @author Daf + * @since 2024-07-08 + */ +@Data +@TableName("sys_file") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "File对象", description = "File对象") +public class File extends BaseEntity { + + private static final long serialVersionUID = 1L; + + private Long id; + private String fileType; + private String filePath; + private String fileName; + private String fileSuffix; + private String fileOldName; + +} diff --git a/src/main/java/org/energy/modules/system/entity/Menu.java b/src/main/java/org/energy/modules/system/entity/Menu.java new file mode 100644 index 0000000..21afae9 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Menu.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import com.dayu.daf.core.tool.utils.Func; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_menu") +@ApiModel(value = "Menu对象", description = "Menu对象") +public class Menu implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 菜单父主键 + */ + @ApiModelProperty(value = "父主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 菜单编号 + */ + @ApiModelProperty(value = "菜单编号") + private String code; + + /** + * 菜单名称 + */ + @ApiModelProperty(value = "菜单名称") + private String name; + + /** + * 菜单别名 + */ + @ApiModelProperty(value = "菜单别名") + private String alias; + + /** + * 请求地址 + */ + @ApiModelProperty(value = "请求地址") + private String path; + + /** + * 菜单资源 + */ + @ApiModelProperty(value = "菜单资源") + private String source; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sort; + + /** + * 菜单类型 + */ + @ApiModelProperty(value = "菜单类型") + private Integer category; + + /** + * 操作按钮类型 + */ + @ApiModelProperty(value = "操作按钮类型") + private Integer action; + + /** + * 是否打开新页面 + */ + @ApiModelProperty(value = "是否打开新页面") + private Integer isOpen; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 是否已删除 + */ + @TableLogic + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + Menu other = (Menu) obj; + if (Func.equals(this.getId(), other.getId())) { + return true; + } + return false; + } + +} diff --git a/src/main/java/org/energy/modules/system/entity/Param.java b/src/main/java/org/energy/modules/system/entity/Param.java new file mode 100644 index 0000000..91a0064 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Param.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.BaseEntity; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_param") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Param对象", description = "Param对象") +public class Param extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 参数名 + */ + @ApiModelProperty(value = "参数名") + private String paramName; + + /** + * 参数键 + */ + @ApiModelProperty(value = "参数键") + private String paramKey; + + /** + * 参数值 + */ + @ApiModelProperty(value = "参数值") + private String paramValue; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Post.java b/src/main/java/org/energy/modules/system/entity/Post.java new file mode 100644 index 0000000..224a8a2 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Post.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.TenantEntity; + +/** + * 岗位表实体类 + * + * @author Chill + */ +@Data +@TableName("sys_post") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Post对象", description = "岗位表") +public class Post extends TenantEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 类型 + */ + @ApiModelProperty(value = "类型") + private Integer category; + /** + * 岗位编号 + */ + @ApiModelProperty(value = "岗位编号") + private String postCode; + /** + * 岗位名称 + */ + @ApiModelProperty(value = "岗位名称") + private String postName; + /** + * 岗位排序 + */ + @ApiModelProperty(value = "岗位排序") + private Integer sort; + /** + * 岗位描述 + */ + @ApiModelProperty(value = "岗位描述") + private String remark; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Region.java b/src/main/java/org/energy/modules/system/entity/Region.java new file mode 100644 index 0000000..0ced6c7 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Region.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 行政区划表实体类 + * + * @author Chill + */ +@Data +@TableName("sys_region") +@ApiModel(value = "Region对象", description = "行政区划表") +public class Region implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 区划编号 + */ + @TableId(value = "code", type = IdType.INPUT) + @ApiModelProperty(value = "区划编号") + private String code; + /** + * 父区划编号 + */ + @ApiModelProperty(value = "父区划编号") + private String parentCode; + /** + * 祖区划编号 + */ + @ApiModelProperty(value = "祖区划编号") + private String ancestors; + /** + * 区划名称 + */ + @ApiModelProperty(value = "区划名称") + private String name; + /** + * 省级区划编号 + */ + @ApiModelProperty(value = "省级区划编号") + private String provinceCode; + /** + * 省级名称 + */ + @ApiModelProperty(value = "省级名称") + private String provinceName; + /** + * 市级区划编号 + */ + @ApiModelProperty(value = "市级区划编号") + private String cityCode; + /** + * 市级名称 + */ + @ApiModelProperty(value = "市级名称") + private String cityName; + /** + * 区级区划编号 + */ + @ApiModelProperty(value = "区级区划编号") + private String districtCode; + /** + * 区级名称 + */ + @ApiModelProperty(value = "区级名称") + private String districtName; + /** + * 镇级区划编号 + */ + @ApiModelProperty(value = "镇级区划编号") + private String townCode; + /** + * 镇级名称 + */ + @ApiModelProperty(value = "镇级名称") + private String townName; + /** + * 村级区划编号 + */ + @ApiModelProperty(value = "村级区划编号") + private String villageCode; + /** + * 村级名称 + */ + @ApiModelProperty(value = "村级名称") + private String villageName; + /** + * 层级 + */ + @ApiModelProperty(value = "层级") + private Integer level; + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sort; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Role.java b/src/main/java/org/energy/modules/system/entity/Role.java new file mode 100644 index 0000000..86035c6 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Role.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_role") +@ApiModel(value = "Role对象", description = "Role对象") +public class Role implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 租户ID + */ + @ApiModelProperty(value = "租户ID") + private String tenantId; + + /** + * 父主键 + */ + @ApiModelProperty(value = "父主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 角色名 + */ + @ApiModelProperty(value = "角色名") + private String roleName; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sort; + + /** + * 角色别名 + */ + @ApiModelProperty(value = "角色别名") + private String roleAlias; + + /** + * 是否已删除 + */ + @TableLogic + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/RoleMenu.java b/src/main/java/org/energy/modules/system/entity/RoleMenu.java new file mode 100644 index 0000000..6a69250 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/RoleMenu.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_role_menu") +@ApiModel(value = "RoleMenu对象", description = "RoleMenu对象") +public class RoleMenu implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 菜单id + */ + @ApiModelProperty(value = "菜单id") + @JsonSerialize(using = ToStringSerializer.class) + private Long menuId; + + /** + * 角色id + */ + @ApiModelProperty(value = "角色id") + @JsonSerialize(using = ToStringSerializer.class) + private Long roleId; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/RoleScope.java b/src/main/java/org/energy/modules/system/entity/RoleScope.java new file mode 100644 index 0000000..32cdc39 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/RoleScope.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_role_scope") +@ApiModel(value = "RoleScope对象", description = "RoleScope对象") +public class RoleScope implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 权限id + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "权限id") + private Long scopeId; + + /** + * 角色id + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "角色id") + private Long roleId; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/Tenant.java b/src/main/java/org/energy/modules/system/entity/Tenant.java new file mode 100644 index 0000000..85efb67 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/Tenant.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.BaseEntity; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_tenant") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Tenant对象", description = "Tenant对象") +public class Tenant extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 租户ID + */ + @ApiModelProperty(value = "租户ID") + private String tenantId; + /** + * 租户名称 + */ + @ApiModelProperty(value = "租户名称") + private String tenantName; + /** + * 域名地址 + */ + @ApiModelProperty(value = "域名地址") + private String domain; + /** + * 联系人 + */ + @ApiModelProperty(value = "联系人") + private String linkman; + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + private String contactNumber; + /** + * 联系地址 + */ + @ApiModelProperty(value = "联系地址") + private String address; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/User.java b/src/main/java/org/energy/modules/system/entity/User.java new file mode 100644 index 0000000..a4efc86 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/User.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.dayu.daf.core.mp.base.TenantEntity; + +import java.util.Date; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_user") +@EqualsAndHashCode(callSuper = true) +public class User extends TenantEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 编号 + */ + private String code; + /** + * 账号 + */ + private String account; + /** + * 密码 + */ + private String password; + /** + * 昵称 + */ + private String name; + /** + * 真名 + */ + private String realName; + /** + * 头像 + */ + private String avatar; + /** + * 邮箱 + */ + private String email; + /** + * 手机 + */ + private String phone; + /** + * 生日 + */ + private Date birthday; + /** + * 性别 + */ + private Integer sex; + /** + * 角色id + */ + private String roleId; + /** + * 部门id + */ + private String deptId; + /** + * 部门id + */ + private String postId; + + +} diff --git a/src/main/java/org/energy/modules/system/entity/UserInfo.java b/src/main/java/org/energy/modules/system/entity/UserInfo.java new file mode 100644 index 0000000..cfd79a5 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/UserInfo.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.energy.modules.system.vo.MenuVO; + +import java.io.Serializable; +import java.util.List; + +/** + * 用户信息 + * + * @author Chill + */ +@Data +@ApiModel(description = "用户信息") +public class UserInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 用户基础信息 + */ + @ApiModelProperty(value = "用户") + private User user; + + /** + * 权限标识集合 + */ + @ApiModelProperty(value = "权限集合") + private List permissions; + + /** + * 角色集合 + */ + @ApiModelProperty(value = "角色集合") + private List roles; + + /** + * 第三方授权id + */ + @ApiModelProperty(value = "第三方授权id") + private String oauthId; + + /** + * 角色菜单 + */ + @ApiModelProperty(value = "角色菜单") + private List roleMenus; + +} diff --git a/src/main/java/org/energy/modules/system/entity/UserOauth.java b/src/main/java/org/energy/modules/system/entity/UserOauth.java new file mode 100644 index 0000000..7bb4663 --- /dev/null +++ b/src/main/java/org/energy/modules/system/entity/UserOauth.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("sys_user_oauth") +public class UserOauth implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 租户ID + */ + private String tenantId; + + /** + * 第三方系统用户ID + */ + private String uuid; + + /** + * 用户ID + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "用户主键") + private Long userId; + + /** + * 用户名 + */ + private String username; + /** + * 用户昵称 + */ + private String nickname; + /** + * 用户头像 + */ + private String avatar; + /** + * 用户网址 + */ + private String blog; + /** + * 所在公司 + */ + private String company; + /** + * 位置 + */ + private String location; + /** + * 用户邮箱 + */ + private String email; + /** + * 用户备注(各平台中的用户个人介绍) + */ + private String remark; + /** + * 性别 + */ + private String gender; + /** + * 用户来源 + */ + private String source; + + +} diff --git a/src/main/java/org/energy/modules/system/excel/UserExcel.java b/src/main/java/org/energy/modules/system/excel/UserExcel.java new file mode 100644 index 0000000..ef1421c --- /dev/null +++ b/src/main/java/org/energy/modules/system/excel/UserExcel.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.excel; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * UserDTO + * + * @author Chill + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class UserExcel implements Serializable { + private static final long serialVersionUID = 1L; + + @ColumnWidth(15) + @ExcelProperty("租户编号") + private String tenantId; + + @ColumnWidth(15) + @ExcelProperty("账户") + private String account; + + @ColumnWidth(10) + @ExcelProperty("昵称") + private String name; + + @ColumnWidth(10) + @ExcelProperty("姓名") + private String realName; + + @ExcelProperty("邮箱") + private String email; + + @ColumnWidth(15) + @ExcelProperty("手机") + private String phone; + + @ExcelIgnore + @ExcelProperty("角色ID") + private String roleId; + + @ExcelIgnore + @ExcelProperty("部门ID") + private String deptId; + + @ExcelIgnore + @ExcelProperty("岗位ID") + private String postId; + + @ExcelProperty("角色名称") + private String roleName; + + @ExcelProperty("部门名称") + private String deptName; + + @ExcelProperty("岗位名称") + private String postName; + + @ColumnWidth(20) + @ExcelProperty("生日") + private Date birthday; + +} diff --git a/src/main/java/org/energy/modules/system/excel/UserImportListener.java b/src/main/java/org/energy/modules/system/excel/UserImportListener.java new file mode 100644 index 0000000..10d1255 --- /dev/null +++ b/src/main/java/org/energy/modules/system/excel/UserImportListener.java @@ -0,0 +1,56 @@ +package org.energy.modules.system.excel; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; +import org.energy.modules.system.service.IUserService; + +import java.util.ArrayList; +import java.util.List; + +/** + * UserImportListener + * + * @author Chill + */ +@Data +@RequiredArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UserImportListener extends AnalysisEventListener { + + /** + * 默认每隔3000条存储数据库 + */ + private int batchCount = 3000; + /** + * 缓存的数据列表 + */ + private List list = new ArrayList<>(); + /** + * 用户service + */ + private final IUserService userService; + + @Override + public void invoke(UserExcel data, AnalysisContext context) { + list.add(data); + // 达到BATCH_COUNT,则调用importer方法入库,防止数据几万条数据在内存,容易OOM + if (list.size() >= batchCount) { + // 调用importer方法 + userService.importUser(list); + // 存储完成清理list + list.clear(); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 调用importer方法 + userService.importUser(list); + // 存储完成清理list + list.clear(); + } + +} diff --git a/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.java b/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.java new file mode 100644 index 0000000..321bb97 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.system.entity.AuthClient; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface AuthClientMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.xml b/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.xml new file mode 100644 index 0000000..2bcdaed --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/AuthClientMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.java b/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.java new file mode 100644 index 0000000..c5db4e8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.system.entity.DataScope; + +/** + * Mapper 接口 + * + * @author DafX + */ +public interface DataScopeMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.xml b/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.xml new file mode 100644 index 0000000..f9c8d6d --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DataScopeMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/DemoMapper.java b/src/main/java/org/energy/modules/system/mapper/DemoMapper.java new file mode 100644 index 0000000..f0965dd --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DemoMapper.java @@ -0,0 +1,26 @@ +package org.energy.modules.system.mapper; + +import org.energy.modules.system.entity.Demo; +import org.energy.modules.system.vo.DemoVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * Mapper 接口 + * + * @author Daf + * @since 2024-10-25 + */ +public interface DemoMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param demo + * @return + */ + List selectDemoPage(IPage page, DemoVO demo); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/DemoMapper.xml b/src/main/java/org/energy/modules/system/mapper/DemoMapper.xml new file mode 100644 index 0000000..518d56a --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DemoMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/DeptMapper.java b/src/main/java/org/energy/modules/system/mapper/DeptMapper.java new file mode 100644 index 0000000..401fa21 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DeptMapper.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Dept; +import org.energy.modules.system.vo.DeptVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface DeptMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param dept + * @return + */ + List selectDeptPage(IPage page, DeptVO dept); + + /** + * 获取树形节点 + * + * @param tenantId + * @return + */ + List tree(String tenantId); + + /** + * 获取部门名 + * + * @param ids + * @return + */ + List getDeptNames(Long[] ids); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/DeptMapper.xml b/src/main/java/org/energy/modules/system/mapper/DeptMapper.xml new file mode 100644 index 0000000..9393f2f --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DeptMapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select + id, parent_id, ancestors, dept_name, full_name, sort, remark, is_deleted + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/DictMapper.java b/src/main/java/org/energy/modules/system/mapper/DictMapper.java new file mode 100644 index 0000000..7d5af3b --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DictMapper.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Dict; +import org.energy.modules.system.vo.DictVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface DictMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param dict + * @return + */ + List selectDictPage(IPage page, DictVO dict); + + /** + * 获取字典表对应中文 + * + * @param code 字典编号 + * @param dictKey 字典序号 + * @return + */ + String getValue(String code, Integer dictKey); + + /** + * 获取字典表 + * + * @param code 字典编号 + * @return + */ + List getList(String code); + + /** + * 获取树形节点 + * + * @return + */ + List tree(); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/DictMapper.xml b/src/main/java/org/energy/modules/system/mapper/DictMapper.xml new file mode 100644 index 0000000..3ddb6a8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/DictMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select + id, parent_id, code, dict_key, dict_value, sort, remark, is_deleted + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/FileMapper.java b/src/main/java/org/energy/modules/system/mapper/FileMapper.java new file mode 100644 index 0000000..67dd23b --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/FileMapper.java @@ -0,0 +1,26 @@ +package org.energy.modules.system.mapper; + +import org.energy.modules.system.entity.File; +import org.energy.modules.system.vo.FileVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * Mapper 接口 + * + * @author Daf + * @since 2024-07-08 + */ +public interface FileMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param file + * @return + */ + List selectFilePage(IPage page, FileVO file); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/FileMapper.xml b/src/main/java/org/energy/modules/system/mapper/FileMapper.xml new file mode 100644 index 0000000..2f7a373 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/FileMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/LogApiMapper.java b/src/main/java/org/energy/modules/system/mapper/LogApiMapper.java new file mode 100644 index 0000000..77e9069 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogApiMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dayu.daf.core.log.model.LogApi; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface LogApiMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/LogApiMapper.xml b/src/main/java/org/energy/modules/system/mapper/LogApiMapper.xml new file mode 100644 index 0000000..7a7c7ae --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogApiMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + create_time AS createTime, + service_id, + server_host, + server_ip, + env, + type, + title, + method, + request_uri, + user_agent, + remote_ip, + method_class, + method_name, + params, time, create_user + + + diff --git a/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.java b/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.java new file mode 100644 index 0000000..8603e9f --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dayu.daf.core.log.model.LogError; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface LogErrorMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.xml b/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.xml new file mode 100644 index 0000000..17828a8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogErrorMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + create_time AS createTime, + service_id, + server_host, + server_ip, + env, + method, + request_uri, + user_agent, + stack_trace, + exception_name, + message, + line_number, + method_class, + file_name, + method_name, + params, + create_user + + + diff --git a/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.java b/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.java new file mode 100644 index 0000000..96fee0a --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dayu.daf.core.log.model.LogUsual; +import org.springframework.stereotype.Component; + +/** + * Mapper 接口 + * + * @author Chill + */ +@Component +public interface LogUsualMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.xml b/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.xml new file mode 100644 index 0000000..527c118 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/LogUsualMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, + create_time AS createTime, + service_id, + server_host, + server_ip, + env, + log_level, + log_data, + method, + request_uri, + user_agent, + params, + create_user + + + diff --git a/src/main/java/org/energy/modules/system/mapper/MenuMapper.java b/src/main/java/org/energy/modules/system/mapper/MenuMapper.java new file mode 100644 index 0000000..5962080 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/MenuMapper.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.dto.MenuDTO; +import org.energy.modules.system.entity.Menu; +import org.energy.modules.system.vo.MenuVO; + +import java.util.List; +import java.util.Map; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface MenuMapper extends BaseMapper

{ + + /** + * 自定义分页 + * + * @param page + * @param menu + * @return + */ + List selectMenuPage(IPage page, MenuVO menu); + + /** + * 懒加载菜单列表 + * + * @param parentId + * @param param + * @return + */ + List lazyMenuList(Long parentId, Map param); + + /** + * 树形结构 + * + * @return + */ + List tree(); + + /** + * 授权树形结构 + * + * @return + */ + List grantTree(); + + /** + * 授权树形结构 + * + * @return + */ + List grantTreeByRole(List roleId); + + /** + * 数据权限授权树形结构 + * + * @return + */ + List grantDataScopeTree(); + + /** + * 数据权限授权树形结构 + * + * @param roleId + * @return + */ + List grantDataScopeTreeByRole(List roleId); + + /** + * 所有菜单 + * + * @return + */ + List allMenu(); + + /** + * 权限配置菜单 + * + * @param roleId + * @return + */ + List roleMenu(List roleId); + + /** + * 菜单树形结构 + * + * @param roleId + * @return + */ + List routes(List roleId); + + /** + * 按钮树形结构 + * + * @param roleId + * @return + */ + List buttons(List roleId); + + /** + * 获取配置的角色权限 + * @param roleIds + * @return + */ + List authRoutes(List roleIds); +} diff --git a/src/main/java/org/energy/modules/system/mapper/MenuMapper.xml b/src/main/java/org/energy/modules/system/mapper/MenuMapper.xml new file mode 100644 index 0000000..30e34d4 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/MenuMapper.xml @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + id, code, parent_id, name, alias, path, source, sort, category, action, is_open, remark, is_deleted + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/ParamMapper.java b/src/main/java/org/energy/modules/system/mapper/ParamMapper.java new file mode 100644 index 0000000..a5e6fe1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/ParamMapper.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Param; +import org.energy.modules.system.vo.ParamVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface ParamMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param param + * @return + */ + List selectParamPage(IPage page, ParamVO param); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/ParamMapper.xml b/src/main/java/org/energy/modules/system/mapper/ParamMapper.xml new file mode 100644 index 0000000..2d987e6 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/ParamMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + select + id, + create_user AS createUser, + create_time AS createTime, + update_user AS updateUser, + update_time AS updateTime, + status, + is_deleted AS isDeleted, + param_name, param_key, param_value, remark + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/PostMapper.java b/src/main/java/org/energy/modules/system/mapper/PostMapper.java new file mode 100644 index 0000000..ffddf56 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/PostMapper.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Post; +import org.energy.modules.system.vo.PostVO; + +import java.util.List; + +/** + * 岗位表 Mapper 接口 + * + * @author Chill + */ +public interface PostMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param post + * @return + */ + List selectPostPage(IPage page, PostVO post); + + /** + * 获取岗位名 + * + * @param ids + * @return + */ + List getPostNames(Long[] ids); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/PostMapper.xml b/src/main/java/org/energy/modules/system/mapper/PostMapper.xml new file mode 100644 index 0000000..ca103d1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/PostMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/RegionMapper.java b/src/main/java/org/energy/modules/system/mapper/RegionMapper.java new file mode 100644 index 0000000..2fdeca1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RegionMapper.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dayu.daf.core.tool.node.INode; +import org.energy.modules.system.entity.Region; + +import java.util.List; +import java.util.Map; + +/** + * 行政区划表 Mapper 接口 + * + * @author Chill + */ +public interface RegionMapper extends BaseMapper { + + /** + * 懒加载列表 + * + * @param parentCode + * @param param + * @return + */ + List lazyList(String parentCode, Map param); + + /** + * 懒加载列表 + * + * @param parentCode + * @param param + * @return + */ + List lazyTree(String parentCode, Map param); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/RegionMapper.xml b/src/main/java/org/energy/modules/system/mapper/RegionMapper.xml new file mode 100644 index 0000000..ec4e3d9 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RegionMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/RoleMapper.java b/src/main/java/org/energy/modules/system/mapper/RoleMapper.java new file mode 100644 index 0000000..b5b0466 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleMapper.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Role; +import org.energy.modules.system.vo.RoleVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface RoleMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param role + * @return + */ + List selectRolePage(IPage page, RoleVO role); + + /** + * 获取树形节点 + * + * @param tenantId + * @param excludeRole + * @return + */ + List tree(String tenantId, String excludeRole); + + /** + * 获取角色名 + * + * @param ids + * @return + */ + List getRoleNames(Long[] ids); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/RoleMapper.xml b/src/main/java/org/energy/modules/system/mapper/RoleMapper.xml new file mode 100644 index 0000000..d405845 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select + id, parent_id, role_name, sort, role_alias, is_deleted + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.java b/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.java new file mode 100644 index 0000000..6d392b2 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.RoleMenu; +import org.energy.modules.system.vo.RoleMenuVO; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface RoleMenuMapper extends BaseMapper { + + /** + * 自定义分页 + * @param page + * @param roleMenu + * @return + */ + List selectRoleMenuPage(IPage page, RoleMenuVO roleMenu); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.xml b/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.xml new file mode 100644 index 0000000..82138e3 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleMenuMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + select + id, menu_id, role_id, is_deleted + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.java b/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.java new file mode 100644 index 0000000..bd97d25 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.system.entity.RoleScope; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface RoleScopeMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.xml b/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.xml new file mode 100644 index 0000000..083fed5 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/RoleScopeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/TenantMapper.java b/src/main/java/org/energy/modules/system/mapper/TenantMapper.java new file mode 100644 index 0000000..b7cc933 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/TenantMapper.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.energy.modules.system.entity.Tenant; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface TenantMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param tenant + * @return + */ + List selectTenantPage(IPage page, Tenant tenant); + +} diff --git a/src/main/java/org/energy/modules/system/mapper/TenantMapper.xml b/src/main/java/org/energy/modules/system/mapper/TenantMapper.xml new file mode 100644 index 0000000..3f449b7 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/TenantMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/UserMapper.java b/src/main/java/org/energy/modules/system/mapper/UserMapper.java new file mode 100644 index 0000000..fa975ce --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/UserMapper.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.excel.UserExcel; + +import java.util.List; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface UserMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param user + * @return + */ + List selectUserPage(IPage page, User user); + + /** + * 获取用户 + * + * @param tenantId + * @param account + * @param password + * @return + */ + User getUser(String tenantId, String account, String password); + + /** + * 获取角色名 + * + * @param ids + * @return + */ + List getRoleName(List ids); + + /** + * 获取角色别名 + * + * @param ids + * @return + */ + List getRoleAlias(List ids); + + /** + * 获取部门名 + * + * @param ids + * @return + */ + List getDeptName(List ids); + + /** + * 获取导出用户数据 + * + * @param queryWrapper + * @return + */ + List exportUser(@Param("ew") Wrapper queryWrapper); + + User selectByIdAndDel(Long id); + + User selectByAccountAndDel(String account); +} diff --git a/src/main/java/org/energy/modules/system/mapper/UserMapper.xml b/src/main/java/org/energy/modules/system/mapper/UserMapper.xml new file mode 100644 index 0000000..5e2780e --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/UserMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + create_user AS createUser, + create_time AS createTime, + update_user AS updateUser, + update_time AS updateTime, + status, + is_deleted AS isDeleted, + account, password, name, real_name, email, phone, birthday, sex, role_id, dept_id + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.java b/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.java new file mode 100644 index 0000000..d89a0a5 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.energy.modules.system.entity.UserOauth; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface UserOauthMapper extends BaseMapper { + +} diff --git a/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.xml b/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.xml new file mode 100644 index 0000000..1baf351 --- /dev/null +++ b/src/main/java/org/energy/modules/system/mapper/UserOauthMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/energy/modules/system/service/IAuthClientService.java b/src/main/java/org/energy/modules/system/service/IAuthClientService.java new file mode 100644 index 0000000..7d95e09 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IAuthClientService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.AuthClient; + +/** + * 服务类 + * + * @author Chill + */ +public interface IAuthClientService extends BaseService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IDataScopeService.java b/src/main/java/org/energy/modules/system/service/IDataScopeService.java new file mode 100644 index 0000000..f810bee --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IDataScopeService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.DataScope; + +/** + * 服务类 + * + * @author DafX + */ +public interface IDataScopeService extends BaseService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IDemoService.java b/src/main/java/org/energy/modules/system/service/IDemoService.java new file mode 100644 index 0000000..2a6bd85 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IDemoService.java @@ -0,0 +1,25 @@ +package org.energy.modules.system.service; + +import org.energy.modules.system.entity.Demo; +import org.energy.modules.system.vo.DemoVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 服务类 + * + * @author Daf + * @since 2024-10-25 + */ +public interface IDemoService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param demo + * @return + */ + IPage selectDemoPage(IPage page, DemoVO demo); + +} diff --git a/src/main/java/org/energy/modules/system/service/IDeptService.java b/src/main/java/org/energy/modules/system/service/IDeptService.java new file mode 100644 index 0000000..b67ed1c --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IDeptService.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.Dept; +import org.energy.modules.system.vo.DeptVO; + +import java.util.List; + +/** + * 服务类 + * + * @author Chill + */ +public interface IDeptService extends IService { + + /** + * 自定义分页 + * + * @param page + * @param dept + * @return + */ + IPage selectDeptPage(IPage page, DeptVO dept); + + /** + * 树形结构 + * + * @param tenantId + * @return + */ + List tree(String tenantId); + + /** + * 获取部门ID + * + * @param tenantId + * @param deptNames + * @return + */ + String getDeptIds(String tenantId, String deptNames); + + /** + * 获取部门名 + * + * @param deptIds + * @return + */ + List getDeptNames(String deptIds); + + /** + * 提交 + * + * @param dept + * @return + */ + boolean submit(Dept dept); + +} diff --git a/src/main/java/org/energy/modules/system/service/IDictService.java b/src/main/java/org/energy/modules/system/service/IDictService.java new file mode 100644 index 0000000..6eaf61b --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IDictService.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.Dict; +import org.energy.modules.system.vo.DictVO; + +import java.util.List; + +/** + * 服务类 + * + * @author Chill + */ +public interface IDictService extends IService { + + /** + * 自定义分页 + * + * @param page + * @param dict + * @return + */ + IPage selectDictPage(IPage page, DictVO dict); + + /** + * 树形结构 + * + * @return + */ + List tree(); + + /** + * 获取字典表对应中文 + * + * @param code 字典编号 + * @param dictKey 字典序号 + * @return + */ + String getValue(String code, Integer dictKey); + + /** + * 获取字典表 + * + * @param code 字典编号 + * @return + */ + List getList(String code); + + /** + * 新增或修改 + * @param dict + * @return + */ + boolean submit(Dict dict); + +} diff --git a/src/main/java/org/energy/modules/system/service/IFileService.java b/src/main/java/org/energy/modules/system/service/IFileService.java new file mode 100644 index 0000000..2c4ed82 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IFileService.java @@ -0,0 +1,32 @@ +package org.energy.modules.system.service; + +import org.energy.modules.system.entity.File; +import org.energy.modules.system.vo.FileVO; +import com.dayu.daf.core.mp.base.BaseService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + +/** + * 服务类 + * + * @author Daf + * @since 2024-07-08 + */ +public interface IFileService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param file + * @return + */ + IPage selectFilePage(IPage page, FileVO file); + + Map saveFileInfo(String fileType, String filePath, String fileName, String fileSuffix, String oldFileName); + + void downloadFile(String fileName, HttpServletResponse response); + +} diff --git a/src/main/java/org/energy/modules/system/service/ILogApiService.java b/src/main/java/org/energy/modules/system/service/ILogApiService.java new file mode 100644 index 0000000..2c268ad --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/ILogApiService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.dayu.daf.core.log.model.LogApi; + +/** + * 服务类 + * + * @author Chill + */ +public interface ILogApiService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/ILogErrorService.java b/src/main/java/org/energy/modules/system/service/ILogErrorService.java new file mode 100644 index 0000000..691207d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/ILogErrorService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.dayu.daf.core.log.model.LogError; + +/** + * 服务类 + * + * @author Chill + */ +public interface ILogErrorService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/ILogService.java b/src/main/java/org/energy/modules/system/service/ILogService.java new file mode 100644 index 0000000..1cc26f1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/ILogService.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + + +import com.dayu.daf.core.log.model.LogApi; +import com.dayu.daf.core.log.model.LogError; +import com.dayu.daf.core.log.model.LogUsual; + +/** + * 服务类 + * + * @author Chill + */ +public interface ILogService { + + /** + * 保存通用日志 + * + * @param log + * @return + */ + Boolean saveUsualLog(LogUsual log); + + /** + * 保存操作日志 + * + * @param log + * @return + */ + Boolean saveApiLog(LogApi log); + + /** + * 保存错误日志 + * + * @param log + * @return + */ + Boolean saveErrorLog(LogError log); + +} diff --git a/src/main/java/org/energy/modules/system/service/ILogUsualService.java b/src/main/java/org/energy/modules/system/service/ILogUsualService.java new file mode 100644 index 0000000..df41873 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/ILogUsualService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.dayu.daf.core.log.model.LogUsual; + +/** + * 服务类 + * + * @author Chill + */ +public interface ILogUsualService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IMenuService.java b/src/main/java/org/energy/modules/system/service/IMenuService.java new file mode 100644 index 0000000..7b4bb0d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IMenuService.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.support.Kv; +import org.energy.modules.system.entity.Menu; +import org.energy.modules.system.vo.MenuVO; + +import java.util.List; +import java.util.Map; + +/** + * 服务类 + * + * @author Chill + */ +public interface IMenuService extends IService

{ + + /** + * 自定义分页 + * + * @param page + * @param menu + * @return + */ + IPage selectMenuPage(IPage page, MenuVO menu); + + /** + * 懒加载菜单列表 + * + * @param parentId + * @param param + * @return + */ + List lazyMenuList(Long parentId, Map param); + + /** + * 菜单树形结构 + * + * @param roleId + * @return + */ + List routes(String roleId); + + /** + * 按钮树形结构 + * + * @param roleId + * @return + */ + List buttons(String roleId); + + /** + * 树形结构 + * + * @return + */ + List tree(); + + /** + * 授权树形结构 + * + * @param user + * @return + */ + List grantTree(DafUser user); + + /** + * 数据权限授权树形结构 + * + * @param user + * @return + */ + List grantDataScopeTree(DafUser user); + + /** + * 默认选中节点 + * + * @param roleIds + * @return + */ + List roleTreeKeys(String roleIds); + + /** + * 默认选中节点 + * + * @param roleIds + * @return + */ + List dataScopeTreeKeys(String roleIds); + + /** + * 获取配置的角色权限 + * + * @param user + * @return + */ + List authRoutes(DafUser user); + +} diff --git a/src/main/java/org/energy/modules/system/service/IParamService.java b/src/main/java/org/energy/modules/system/service/IParamService.java new file mode 100644 index 0000000..ad28a79 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IParamService.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.Param; +import org.energy.modules.system.vo.ParamVO; + +/** + * 服务类 + * + * @author Chill + */ +public interface IParamService extends BaseService { + + /*** + * 自定义分页 + * @param page + * @param param + * @return + */ + IPage selectParamPage(IPage page, ParamVO param); + +} diff --git a/src/main/java/org/energy/modules/system/service/IPostService.java b/src/main/java/org/energy/modules/system/service/IPostService.java new file mode 100644 index 0000000..bf514a3 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IPostService.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.Post; +import org.energy.modules.system.vo.PostVO; + +import java.util.List; + +/** + * 岗位表 服务类 + * + * @author Chill + */ +public interface IPostService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param post + * @return + */ + IPage selectPostPage(IPage page, PostVO post); + + /** + * 获取岗位ID + * + * @param tenantId + * @param postNames + * @return + */ + String getPostIds(String tenantId, String postNames); + + /** + * 获取岗位名 + * + * @param postIds + * @return + */ + List getPostNames(String postIds); + +} diff --git a/src/main/java/org/energy/modules/system/service/IRegionService.java b/src/main/java/org/energy/modules/system/service/IRegionService.java new file mode 100644 index 0000000..dc3bc34 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IRegionService.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.dayu.daf.core.tool.node.INode; +import org.energy.modules.system.entity.Region; + +import java.util.List; +import java.util.Map; + +/** + * 行政区划表 服务类 + * + * @author Chill + */ +public interface IRegionService extends IService { + + /** + * 提交 + * + * @param region + * @return + */ + boolean submit(Region region); + + /** + * 删除 + * + * @param id + * @return + */ + boolean removeRegion(String id); + + /** + * 懒加载列表 + * + * @param parentCode + * @param param + * @return + */ + List lazyList(String parentCode, Map param); + + /** + * 懒加载列表 + * + * @param parentCode + * @param param + * @return + */ + List lazyTree(String parentCode, Map param); + +} diff --git a/src/main/java/org/energy/modules/system/service/IRoleDataService.java b/src/main/java/org/energy/modules/system/service/IRoleDataService.java new file mode 100644 index 0000000..5351ff9 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IRoleDataService.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import org.energy.modules.system.vo.HomePageVO; + +/** + * 服务类 + * + * @author DafX + */ +public interface IRoleDataService { + + HomePageVO findCurrHomePageInfo(); + +} diff --git a/src/main/java/org/energy/modules/system/service/IRoleMenuService.java b/src/main/java/org/energy/modules/system/service/IRoleMenuService.java new file mode 100644 index 0000000..affc62d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IRoleMenuService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.RoleMenu; + +/** + * 服务类 + * + * @author Chill + */ +public interface IRoleMenuService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IRoleScopeService.java b/src/main/java/org/energy/modules/system/service/IRoleScopeService.java new file mode 100644 index 0000000..4e35598 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IRoleScopeService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.RoleScope; + +/** + * 服务类 + * + * @author Chill + */ +public interface IRoleScopeService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IRoleService.java b/src/main/java/org/energy/modules/system/service/IRoleService.java new file mode 100644 index 0000000..ec7330d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IRoleService.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.Role; +import org.energy.modules.system.vo.RoleVO; + +import javax.validation.constraints.NotEmpty; +import java.util.List; + +/** + * 服务类 + * + * @author Chill + */ +public interface IRoleService extends IService { + + /** + * 自定义分页 + * + * @param page + * @param role + * @return + */ + IPage selectRolePage(IPage page, RoleVO role); + + /** + * 树形结构 + * + * @param tenantId + * @return + */ + List tree(String tenantId); + + /** + * 权限配置 + * + * @param roleIds 角色id集合 + * @param menuIds 菜单id集合 + * @return 是否成功 + */ + boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds, List dataScopeIds); + + /** + * 获取角色ID + * + * @param tenantId + * @param roleNames + * @return + */ + String getRoleIds(String tenantId, String roleNames); + + /** + * 获取角色名 + * + * @param roleIds + * @return + */ + List getRoleNames(String roleIds); + +} diff --git a/src/main/java/org/energy/modules/system/service/ITenantService.java b/src/main/java/org/energy/modules/system/service/ITenantService.java new file mode 100644 index 0000000..064bdc4 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/ITenantService.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.Tenant; + +/** + * 服务类 + * + * @author Chill + */ +public interface ITenantService extends BaseService { + + /** + * 自定义分页 + * + * @param page + * @param tenant + * @return + */ + IPage selectTenantPage(IPage page, Tenant tenant); + + /** + * 新增 + * + * @param tenant + * @return + */ + boolean saveTenant(Tenant tenant); + +} diff --git a/src/main/java/org/energy/modules/system/service/IUserOauthService.java b/src/main/java/org/energy/modules/system/service/IUserOauthService.java new file mode 100644 index 0000000..4a526cf --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IUserOauthService.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.energy.modules.system.entity.UserOauth; + +/** + * 服务类 + * + * @author Chill + */ +public interface IUserOauthService extends IService { + +} diff --git a/src/main/java/org/energy/modules/system/service/IUserService.java b/src/main/java/org/energy/modules/system/service/IUserService.java new file mode 100644 index 0000000..3c99c7c --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/IUserService.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service; + + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseService; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.entity.UserOauth; +import org.energy.modules.system.excel.UserExcel; + +import java.util.List; + +/** + * 服务类 + * + * @author Chill + */ +public interface IUserService extends BaseService { + + /** + * 新增或修改用户 + * @param user + * @return + */ + boolean submit(User user); + + /** + * 自定义分页 + * + * @param page + * @param user + * @return + */ + IPage selectUserPage(IPage page, User user); + + /** + * 用户信息 + * + * @param userId + * @return + */ + UserInfo userInfo(Long userId); + + /** + * 用户信息 + * + * @param tenantId + * @param account + * @param password + * @return + */ + UserInfo userInfo(String tenantId, String account, String password); + + /** + * 用户信息 + * + * @param userOauth + * @return + */ + UserInfo userInfo(UserOauth userOauth); + + /** + * 给用户设置角色 + * + * @param userIds + * @param roleIds + * @return + */ + boolean grant(String userIds, String roleIds); + + /** + * 初始化密码 + * + * @param userIds + * @return + */ + boolean resetPassword(String userIds); + + /** + * 修改密码 + * + * @param userId + * @param oldPassword + * @param newPassword + * @param newPassword1 + * @return + */ + boolean updatePassword(Long userId, String oldPassword, String newPassword, String newPassword1); + + /** + * 获取角色名 + * + * @param roleIds + * @return + */ + List getRoleName(String roleIds); + + /** + * 获取部门名 + * + * @param deptIds + * @return + */ + List getDeptName(String deptIds); + + /** + * 导入用户数据 + * + * @param data + * @return + */ + void importUser(List data); + + /** + * 获取导出用户数据 + * + * @param queryWrapper + * @return + */ + List exportUser(Wrapper queryWrapper); + + /** + * 注册用户 + * + * @param user + * @param oauthId + * @return + */ + boolean registerGuest(User user, Long oauthId); + + User selectByIdAndDel(Long createUser); + + User selectByAccountAndDel(String account); + + UserInfo userInfo(String tenantId, String account); +} diff --git a/src/main/java/org/energy/modules/system/service/impl/AuthClientServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/AuthClientServiceImpl.java new file mode 100644 index 0000000..3505d27 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/AuthClientServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.entity.AuthClient; +import org.energy.modules.system.mapper.AuthClientMapper; +import org.energy.modules.system.service.IAuthClientService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class AuthClientServiceImpl extends BaseServiceImpl implements IAuthClientService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/DataScopeServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/DataScopeServiceImpl.java new file mode 100644 index 0000000..4e27c9d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/DataScopeServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.entity.DataScope; +import org.energy.modules.system.mapper.DataScopeMapper; +import org.energy.modules.system.service.IDataScopeService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author DafX + */ +@Service +public class DataScopeServiceImpl extends BaseServiceImpl implements IDataScopeService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/DemoServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/DemoServiceImpl.java new file mode 100644 index 0000000..e246f7a --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/DemoServiceImpl.java @@ -0,0 +1,25 @@ +package org.energy.modules.system.service.impl; + +import org.energy.modules.system.entity.Demo; +import org.energy.modules.system.vo.DemoVO; +import org.energy.modules.system.mapper.DemoMapper; +import org.energy.modules.system.service.IDemoService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * 服务实现类 + * + * @author Daf + * @since 2024-10-25 + */ +@Service +public class DemoServiceImpl extends BaseServiceImpl implements IDemoService { + + @Override + public IPage selectDemoPage(IPage page, DemoVO demo) { + return page.setRecords(baseMapper.selectDemoPage(page, demo)); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/DeptServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/DeptServiceImpl.java new file mode 100644 index 0000000..a1d90f5 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/DeptServiceImpl.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.exception.ServiceException; +import org.energy.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.utils.CacheUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import org.energy.modules.system.entity.Dept; +import org.energy.modules.system.mapper.DeptMapper; +import org.energy.modules.system.service.IDeptService; +import org.energy.modules.system.vo.DeptVO; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class DeptServiceImpl extends ServiceImpl implements IDeptService { + + @Override + public IPage selectDeptPage(IPage page, DeptVO dept) { + return page.setRecords(baseMapper.selectDeptPage(page, dept)); + } + + @Override + public List tree(String tenantId) { + return ForestNodeMerger.merge(baseMapper.tree(tenantId)); + } + + @Override + public String getDeptIds(String tenantId, String deptNames) { + List deptList = baseMapper.selectList(Wrappers.query().lambda().eq(Dept::getTenantId, tenantId).in(Dept::getDeptName, Func.toStrList(deptNames))); + if (deptList != null && deptList.size() > 0) { + return deptList.stream().map(dept -> Func.toStr(dept.getId())).distinct().collect(Collectors.joining(",")); + } + return null; + } + + @Override + public List getDeptNames(String deptIds) { + return baseMapper.getDeptNames(Func.toLongArray(deptIds)); + } + + @Override + public boolean submit(Dept dept) { + CacheUtil.clear(CacheUtil.SYS_CACHE); + if (Func.isEmpty(dept.getParentId())) { + dept.setTenantId(SecureUtil.getTenantId()); + dept.setParentId(DafConstant.TOP_PARENT_ID); + dept.setAncestors(String.valueOf(DafConstant.TOP_PARENT_ID)); + } + if (dept.getParentId() > 0) { + Dept parent = getById(dept.getParentId()); + if (Func.toLong(dept.getParentId()) == Func.toLong(dept.getId())) { + throw new ServiceException("父节点不可选择自身!"); + } + dept.setTenantId(parent.getTenantId()); + String ancestors = parent.getAncestors() + StringPool.COMMA + dept.getParentId(); + dept.setAncestors(ancestors); + } + dept.setIsDeleted(DafConstant.DB_NOT_DELETED); + return saveOrUpdate(dept); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/DictServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/DictServiceImpl.java new file mode 100644 index 0000000..382e853 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/DictServiceImpl.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import org.energy.modules.system.entity.Dict; +import org.energy.modules.system.mapper.DictMapper; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.vo.DictVO; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import java.util.List; + +import static org.energy.common.cache.CacheNames.DICT_VALUE; +import static org.energy.common.cache.CacheNames.DICT_LIST; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class DictServiceImpl extends ServiceImpl implements IDictService { + + @Override + public IPage selectDictPage(IPage page, DictVO dict) { + return page.setRecords(baseMapper.selectDictPage(page, dict)); + } + + @Override + public List tree() { + return ForestNodeMerger.merge(baseMapper.tree()); + } + + @Override + @Cacheable(cacheNames = {DICT_LIST, DICT_VALUE}, key = "#code + ':' + #dictKey") + public String getValue(String code, Integer dictKey) { + return Func.toStr(baseMapper.getValue(code, dictKey), StringPool.EMPTY); + } + + @Override + public List getList(String code) { + return baseMapper.getList(code); + } + + @Override + public boolean submit(Dict dict) { + LambdaQueryWrapper lqw = Wrappers.query().lambda().eq(Dict::getCode, dict.getCode()).eq(Dict::getDictKey, dict.getDictKey()); + Long cnt = baseMapper.selectCount((Func.isEmpty(dict.getId())) ? lqw : lqw.notIn(Dict::getId, dict.getId())); + if (cnt > 0) { + throw new ServiceException("当前字典键值已存在!"); + } + if (dict.getParentId() == null) { + dict.setParentId(0L); + } + dict.setIsDeleted(DafConstant.DB_NOT_DELETED); + return saveOrUpdate(dict); + } +} diff --git a/src/main/java/org/energy/modules/system/service/impl/FileServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/FileServiceImpl.java new file mode 100644 index 0000000..9446bfe --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/FileServiceImpl.java @@ -0,0 +1,97 @@ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.dayu.daf.core.log.exception.ServiceException; +import org.energy.modules.system.entity.File; +import org.energy.modules.system.vo.FileVO; +import org.energy.modules.system.mapper.FileMapper; +import org.energy.modules.system.service.IFileService; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.FileInputStream; +import java.util.HashMap; +import java.util.Map; + +/** + * 服务实现类 + * + * @author Daf + * @since 2024-07-08 + */ +@Service +public class FileServiceImpl extends BaseServiceImpl implements IFileService { + + @Override + public IPage selectFilePage(IPage page, FileVO file) { + return page.setRecords(baseMapper.selectFilePage(page, file)); + } + + @Override + public Map saveFileInfo(String fileType, String filePath, String fileName, String fileSuffix, String oldFileName) { + File file = new File(); + file.setFileType(fileType); + file.setFilePath(filePath); + file.setFileName(fileName); + file.setFileSuffix(fileSuffix); + file.setFileOldName(oldFileName); + boolean saveFlag = super.save(file); + Map map = new HashMap<>(); + if (saveFlag) { + map.put("id", file.getId()); + map.put("url", "./api/system/file/download?fileName=" + fileName); + map.put("fileName", fileName); + map.put("name", oldFileName); + return map; + } + return null; + } + + @Override + public void downloadFile(String fileName, HttpServletResponse response) { + File info = super.getOne(Wrappers.lambdaQuery().eq(File::getFileName, fileName), false); + + if (info == null) { + throw new ServiceException("下载文件出错"); + } + + String path = "." + info.getFilePath() + info.getFileName() + info.getFileSuffix(); + String osName = System.getProperties().getProperty("os.name"); + + if (osName.contains("Windows")) { + path = "C:/" + path; + } + + java.io.File file = new java.io.File(path); + if (!file.exists()) { + throw new ServiceException("下载文件出错"); + } + + try { + String realName = info.getFileOldName(); + // 3. 设置想办法让浏览器能够支持(Content-Disposition)下载我们需要的东西,中文文件名URLEncoder.encode编码,否则有可能乱码 + response.setHeader("Content-Disposition", "attachment; filename=\"" + new String(realName.getBytes(), "ISO8859-1") + "\""); + response.setCharacterEncoding("UTF-8"); + // 4. 获取下载文件的输入流 + FileInputStream in = new FileInputStream(path); + // 5. 创建缓冲区 + int len = 0; + byte[] buffer = new byte[1024]; + // 6. 获取OutputStream对象 + ServletOutputStream out = response.getOutputStream(); + // 7. 将FileOutputStream流写入到buffer缓冲区,使用OutputStream将缓冲区中的数据输出到客户端! + while ((len = in.read(buffer)) > 0) { + out.write(buffer, 0, len); + } + in.close(); + out.close(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ServiceException("下载文件出错"); + } + + } +} diff --git a/src/main/java/org/energy/modules/system/service/impl/LogApiServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/LogApiServiceImpl.java new file mode 100644 index 0000000..d0b842d --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/LogApiServiceImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.model.LogApi; +import org.energy.modules.system.mapper.LogApiMapper; +import org.energy.modules.system.service.ILogApiService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class LogApiServiceImpl extends ServiceImpl implements ILogApiService { + + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/LogErrorServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/LogErrorServiceImpl.java new file mode 100644 index 0000000..e8e8a54 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/LogErrorServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.model.LogError; +import org.energy.modules.system.mapper.LogErrorMapper; +import org.energy.modules.system.service.ILogErrorService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class LogErrorServiceImpl extends ServiceImpl implements ILogErrorService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/LogServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/LogServiceImpl.java new file mode 100644 index 0000000..c2fb992 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/LogServiceImpl.java @@ -0,0 +1,41 @@ +package org.energy.modules.system.service.impl; + +import com.dayu.daf.core.log.model.LogApi; +import com.dayu.daf.core.log.model.LogError; +import com.dayu.daf.core.log.model.LogUsual; +import lombok.AllArgsConstructor; +import org.energy.modules.system.service.ILogApiService; +import org.energy.modules.system.service.ILogErrorService; +import org.energy.modules.system.service.ILogService; +import org.energy.modules.system.service.ILogUsualService; +import org.springframework.stereotype.Service; + +/** + * Created by Daf. + * + * @author zhuangqian + */ +@Service +@AllArgsConstructor +public class LogServiceImpl implements ILogService { + + ILogUsualService usualService; + ILogApiService apiService; + ILogErrorService errorService; + + @Override + public Boolean saveUsualLog(LogUsual log) { + return usualService.save(log); + } + + @Override + public Boolean saveApiLog(LogApi log) { + return apiService.save(log); + } + + @Override + public Boolean saveErrorLog(LogError log) { + return errorService.save(log); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/LogUsualServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/LogUsualServiceImpl.java new file mode 100644 index 0000000..ee5fdc2 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/LogUsualServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.model.LogUsual; +import org.energy.modules.system.mapper.LogUsualMapper; +import org.energy.modules.system.service.ILogUsualService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class LogUsualServiceImpl extends ServiceImpl implements ILogUsualService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/MenuServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/MenuServiceImpl.java new file mode 100644 index 0000000..373c8b7 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/MenuServiceImpl.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.AllArgsConstructor; +import com.dayu.daf.core.secure.DafUser; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.support.Kv; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringUtil; +import org.energy.modules.system.dto.MenuDTO; +import org.energy.modules.system.entity.Menu; +import org.energy.modules.system.entity.RoleMenu; +import org.energy.modules.system.entity.RoleScope; +import org.energy.modules.system.mapper.MenuMapper; +import org.energy.modules.system.service.IMenuService; +import org.energy.modules.system.service.IRoleMenuService; +import org.energy.modules.system.service.IRoleScopeService; +import org.energy.modules.system.vo.MenuVO; +import org.energy.modules.system.wrapper.MenuWrapper; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +@AllArgsConstructor +public class MenuServiceImpl extends ServiceImpl implements IMenuService { + + private final IRoleMenuService roleMenuService; + private final IRoleScopeService roleScopeService; + private final static String PARENT_ID = "parentId"; + + @Override + public IPage selectMenuPage(IPage page, MenuVO menu) { + return page.setRecords(baseMapper.selectMenuPage(page, menu)); + } + + @Override + public List lazyMenuList(Long parentId, Map param) { + if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) { + parentId = null; + } + return baseMapper.lazyMenuList(parentId, param); + } + + @Override + public List routes(String roleId) { + if (StringUtil.isBlank(roleId)) { + return null; + } + List

allMenus = baseMapper.allMenu(); + List roleMenus = baseMapper.roleMenu(Func.toLongList(roleId)); + List routes = new LinkedList<>(roleMenus); + roleMenus.forEach(roleMenu -> recursion(allMenus, routes, roleMenu)); + routes.sort(Comparator.comparing(Menu::getSort)); + MenuWrapper menuWrapper = new MenuWrapper(); + List collect = routes.stream().filter(x -> Func.equals(x.getCategory(), 1)).collect(Collectors.toList()); + return menuWrapper.listNodeVO(collect); + } + + public void recursion(List allMenus, List routes, Menu roleMenu) { + Optional menu = allMenus.stream().filter(x -> Func.equals(x.getId(), roleMenu.getParentId())).findFirst(); + if (menu.isPresent() && !routes.contains(menu.get())) { + routes.add(menu.get()); + recursion(allMenus, routes, menu.get()); + } + } + + @Override + public List buttons(String roleId) { + List buttons = baseMapper.buttons(Func.toLongList(roleId)); + MenuWrapper menuWrapper = new MenuWrapper(); + return menuWrapper.listNodeVO(buttons); + } + + @Override + public List tree() { + return ForestNodeMerger.merge(baseMapper.tree()); + } + + @Override + public List grantTree(DafUser user) { + return ForestNodeMerger.merge(user.getTenantId().equals(DafConstant.ADMIN_TENANT_ID) ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toLongList(user.getRoleId()))); + } + + @Override + public List grantDataScopeTree(DafUser user) { + return ForestNodeMerger.merge(user.getTenantId().equals(DafConstant.ADMIN_TENANT_ID) ? baseMapper.grantDataScopeTree() : baseMapper.grantDataScopeTreeByRole(Func.toLongList(user.getRoleId()))); + } + + @Override + public List roleTreeKeys(String roleIds) { + List roleMenus = roleMenuService.list(Wrappers.query().lambda().in(RoleMenu::getRoleId, Func.toLongList(roleIds))); + return roleMenus.stream().map(roleMenu -> Func.toStr(roleMenu.getMenuId())).collect(Collectors.toList()); + } + + @Override + public List dataScopeTreeKeys(String roleIds) { + List roleScopes = roleScopeService.list(Wrappers.query().lambda().in(RoleScope::getRoleId, Func.toLongList(roleIds))); + return roleScopes.stream().map(roleScope -> Func.toStr(roleScope.getScopeId())).collect(Collectors.toList()); + } + + @Override + public List authRoutes(DafUser user) { + List routes = baseMapper.authRoutes(Func.toLongList(user.getRoleId())); + List list = new ArrayList<>(); + routes.forEach(route -> list.add(Kv.init().set(route.getPath(), Kv.init().set("authority", Func.toStrArray(route.getAlias()))))); + return list; + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/ParamServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/ParamServiceImpl.java new file mode 100644 index 0000000..6a2e35c --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/ParamServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import org.energy.modules.system.entity.Param; +import org.energy.modules.system.mapper.ParamMapper; +import org.energy.modules.system.service.IParamService; +import org.energy.modules.system.vo.ParamVO; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class ParamServiceImpl extends BaseServiceImpl implements IParamService { + + @Override + public IPage selectParamPage(IPage page, ParamVO param) { + return page.setRecords(baseMapper.selectParamPage(page, param)); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/PostServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/PostServiceImpl.java new file mode 100644 index 0000000..7060b4a --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/PostServiceImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Post; +import org.energy.modules.system.mapper.PostMapper; +import org.energy.modules.system.service.IPostService; +import org.energy.modules.system.vo.PostVO; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 岗位表 服务实现类 + * + * @author Chill + */ +@Service +public class PostServiceImpl extends BaseServiceImpl implements IPostService { + + @Override + public IPage selectPostPage(IPage page, PostVO post) { + return page.setRecords(baseMapper.selectPostPage(page, post)); + } + + @Override + public String getPostIds(String tenantId, String postNames) { + List postList = baseMapper.selectList(Wrappers.query().lambda().eq(Post::getTenantId, tenantId).in(Post::getPostName, Func.toStrList(postNames))); + if (postList != null && postList.size() > 0) { + return postList.stream().map(post -> Func.toStr(post.getId())).distinct().collect(Collectors.joining(",")); + } + return null; + } + + @Override + public List getPostNames(String postIds) { + return baseMapper.getPostNames(Func.toLongArray(postIds)); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/RegionServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/RegionServiceImpl.java new file mode 100644 index 0000000..430cd98 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/RegionServiceImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.StringPool; +import org.energy.modules.system.entity.Region; +import org.energy.modules.system.mapper.RegionMapper; +import org.energy.modules.system.service.IRegionService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * 行政区划表 服务实现类 + * + * @author Chill + */ +@Service +public class RegionServiceImpl extends ServiceImpl implements IRegionService { + public static final int PROVINCE_LEVEL = 1; + public static final int CITY_LEVEL = 2; + public static final int DISTRICT_LEVEL = 3; + public static final int TOWN_LEVEL = 4; + public static final int VILLAGE_LEVEL = 5; + + @Override + public boolean submit(Region region) { + Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getCode, region.getCode())); + if (cnt > 0) { + return this.updateById(region); + } + // 设置祖区划编号 + Region parent = baseMapper.selectById(region.getParentCode()); + if (Func.isNotEmpty(parent) || Func.isNotEmpty(parent.getCode())) { + String ancestors = parent.getAncestors() + StringPool.COMMA + parent.getCode(); + region.setAncestors(ancestors); + } + // 设置省、市、区、镇、村 + Integer level = region.getLevel(); + String code = region.getCode(); + String name = region.getName(); + if (level == PROVINCE_LEVEL) { + region.setProvinceCode(code); + region.setProvinceName(name); + } else if (level == CITY_LEVEL) { + region.setCityCode(code); + region.setCityName(name); + } else if (level == DISTRICT_LEVEL) { + region.setDistrictCode(code); + region.setDistrictName(name); + } else if (level == TOWN_LEVEL) { + region.setTownCode(code); + region.setTownName(name); + } else if (level == VILLAGE_LEVEL) { + region.setVillageCode(code); + region.setVillageName(name); + } + return this.save(region); + } + + @Override + public boolean removeRegion(String id) { + Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getParentCode, id)); + if (cnt > 0) { + throw new ServiceException("请先删除子节点!"); + } + return removeById(id); + } + + @Override + public List lazyList(String parentCode, Map param) { + return baseMapper.lazyList(parentCode, param); + } + + @Override + public List lazyTree(String parentCode, Map param) { + return baseMapper.lazyTree(parentCode, param); + } +} diff --git a/src/main/java/org/energy/modules/system/service/impl/RoleDataServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/RoleDataServiceImpl.java new file mode 100644 index 0000000..98eb1a3 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/RoleDataServiceImpl.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dayu.daf.core.tool.constant.DafConstant; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.inspection.service.IInspectionTasksService; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.leger.service.IEquipmentLedgerService; +import org.energy.modules.leger.service.IToolInventoryRecordService; +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.release.service.IProductionInformationService; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.smart.service.IOperationTicketService; +import org.energy.modules.smart.service.IWorkOrderService; +import org.energy.modules.smart.service.IWorkPermitService; +import org.energy.modules.spares.entity.*; +import org.energy.modules.spares.service.*; +import org.energy.modules.system.service.IRoleDataService; +import org.energy.modules.system.vo.HomePageVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author DafX + */ +@Service +public class RoleDataServiceImpl implements IRoleDataService { + + @Autowired + private IEquipmentLedgerService equipmentLedgerService; + @Autowired + private IToolInventoryRecordService toolInventoryRecordService; + @Autowired + private IOperationTicketService operationTicketService; + @Autowired + private IWorkPermitService workPermitService; + @Autowired + private IWarehouseService warehouseService; + @Autowired + private IManufacturerInfoService manufacturerInfoService; + @Autowired + private ISupplierInfoService supplierInfoService; + @Autowired + private IMaterialService materialService; + @Autowired + private IWorkOrderService workOrderService; + @Autowired + private IInspectionTasksService inspectionTasksService; + @Autowired + private IProductionInformationService productionInformationService; + @Autowired + private IInboundService inboundService; + @Autowired + private IOutboundService outboundService; + + @Override + public HomePageVO findCurrHomePageInfo() { + HomePageVO hp = new HomePageVO(); + + // Equipment Ledger Service + QueryWrapper qw1 = new QueryWrapper<>(); + qw1.lambda().eq(EquipmentLedger::getCheckStatus, 1); + qw1.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setEquipmentLedgerAudit(equipmentLedgerService.list(qw1)); + + // Tool Inventory Record Service + QueryWrapper qw2 = new QueryWrapper<>(); + qw2.lambda().eq(ToolInventoryRecord::getCheckStatus, 1); + qw2.lambda().eq(ToolInventoryRecord::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setToolInventoryRecordsAudit(toolInventoryRecordService.list(qw2)); + + // Operation Ticket Service + QueryWrapper qw3 = new QueryWrapper<>(); + qw3.lambda().eq(OperationTicket::getReviewStatus, 1); + qw3.lambda().eq(OperationTicket::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setOperationTicketAudit(operationTicketService.list(qw3)); + + // Work Permit Service + QueryWrapper qw4 = new QueryWrapper<>(); + qw4.lambda().eq(WorkPermit::getCheckStatus, 1); + qw4.lambda().eq(WorkPermit::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setWorkPermitAudit(workPermitService.list(qw4)); + + // Warehouse Service + QueryWrapper qw5 = new QueryWrapper<>(); + qw5.lambda().eq(Warehouse::getApprovalStatus, 1); + qw5.lambda().eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setWarehouseAudit(warehouseService.list(qw5)); + + // Manufacturer Info Service + QueryWrapper qw6 = new QueryWrapper<>(); + qw6.lambda().eq(ManufacturerInfo::getApprovalStatus, 1); + qw6.lambda().eq(ManufacturerInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setManufacturerInfoAudit(manufacturerInfoService.list(qw6)); + + // Supplier Info Service + QueryWrapper qw7 = new QueryWrapper<>(); + qw7.lambda().eq(SupplierInfo::getApprovalStatus, 1); + qw7.lambda().eq(SupplierInfo::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setSupplierInfoAudit(supplierInfoService.list(qw7)); + + // Material Service + QueryWrapper qw8 = new QueryWrapper<>(); + qw8.lambda().eq(Material::getIstatus, 1L); + qw8.lambda().eq(Material::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setMaterialAudit(materialService.list(qw8)); + + // Work Order Service (already implemented) + QueryWrapper qw9 = new QueryWrapper<>(); + qw9.lambda().eq(WorkOrder::getApprovalStatus, 1); + qw9.lambda().eq(WorkOrder::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setWorkOrderAudit(workOrderService.list(qw9)); + + // Inspection Tasks Service + QueryWrapper qw10 = new QueryWrapper<>(); + qw10.lambda().eq(InspectionTasks::getTaskStatus, 1); + qw10.lambda().eq(InspectionTasks::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setInspectionTasksAudit(inspectionTasksService.list(qw10)); + + // ProductionInformation Service + QueryWrapper qw11 = new QueryWrapper<>(); + qw11.lambda().eq(ProductionInformation::getCheckstatus, 2); + qw11.lambda().eq(ProductionInformation::getIsDeleted, DafConstant.DB_NOT_DELETED); + qw11.lambda().eq(ProductionInformation::getIsDiscontinue, 1); + hp.setProductionInformationAudit(productionInformationService.list(qw11)); + + // Inbound Service + QueryWrapper qw12 = new QueryWrapper<>(); + qw12.lambda().eq(Inbound::getIstatus, 1); + qw12.lambda().eq(Inbound::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setInboundAudit(inboundService.list(qw12)); + + // Outbound Service + QueryWrapper qw13 = new QueryWrapper<>(); + qw13.lambda().eq(Outbound::getIstatus, 1); + qw13.lambda().eq(Outbound::getIsDeleted, DafConstant.DB_NOT_DELETED); + hp.setOutboundAudit(outboundService.list(qw13)); + + return hp; + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/RoleMenuServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/RoleMenuServiceImpl.java new file mode 100644 index 0000000..1876ff8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/RoleMenuServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.energy.modules.system.entity.RoleMenu; +import org.energy.modules.system.mapper.RoleMenuMapper; +import org.energy.modules.system.service.IRoleMenuService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class RoleMenuServiceImpl extends ServiceImpl implements IRoleMenuService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/RoleScopeServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/RoleScopeServiceImpl.java new file mode 100644 index 0000000..c9a90c1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/RoleScopeServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.energy.modules.system.entity.RoleScope; +import org.energy.modules.system.mapper.RoleScopeMapper; +import org.energy.modules.system.service.IRoleScopeService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +public class RoleScopeServiceImpl extends ServiceImpl implements IRoleScopeService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/RoleServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/RoleServiceImpl.java new file mode 100644 index 0000000..450cf14 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/RoleServiceImpl.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.AllArgsConstructor; +import org.energy.core.secure.utils.SecureUtil; +import com.dayu.daf.core.tool.constant.RoleConstant; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.utils.CollectionUtil; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.Role; +import org.energy.modules.system.entity.RoleMenu; +import org.energy.modules.system.entity.RoleScope; +import org.energy.modules.system.mapper.RoleMapper; +import org.energy.modules.system.service.IRoleMenuService; +import org.energy.modules.system.service.IRoleScopeService; +import org.energy.modules.system.service.IRoleService; +import org.energy.modules.system.vo.RoleVO; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.validation.constraints.NotEmpty; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +@Validated +@AllArgsConstructor +public class RoleServiceImpl extends ServiceImpl implements IRoleService { + + private final IRoleMenuService roleMenuService; + private final IRoleScopeService roleScopeService; + + @Override + public IPage selectRolePage(IPage page, RoleVO role) { + return page.setRecords(baseMapper.selectRolePage(page, role)); + } + + @Override + public List tree(String tenantId) { + String userRole = SecureUtil.getUserRole(); + String excludeRole = null; + if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMIN)) { + excludeRole = RoleConstant.ADMIN; + } + return ForestNodeMerger.merge(baseMapper.tree(tenantId, excludeRole)); + } + + @Override + public boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds, List dataScopeIds) { + // 删除角色配置的菜单集合 + roleMenuService.remove(Wrappers.update().lambda().in(RoleMenu::getRoleId, roleIds)); + // 组装配置 + List roleMenus = new ArrayList<>(); + roleIds.forEach(roleId -> menuIds.forEach(menuId -> { + RoleMenu roleMenu = new RoleMenu(); + roleMenu.setRoleId(roleId); + roleMenu.setMenuId(menuId); + roleMenus.add(roleMenu); + })); + // 新增配置 + roleMenuService.saveBatch(roleMenus); + + // 删除角色配置的数据权限集合 + roleScopeService.remove(Wrappers.update().lambda().in(RoleScope::getRoleId, roleIds)); + // 组装配置 + List roleDataScopes = new ArrayList<>(); + roleIds.forEach(roleId -> dataScopeIds.forEach(scopeId -> { + RoleScope roleScope = new RoleScope(); + roleScope.setRoleId(roleId); + roleScope.setScopeId(scopeId); + roleDataScopes.add(roleScope); + })); + // 新增配置 + roleScopeService.saveBatch(roleDataScopes); + + return true; + + } + + @Override + public String getRoleIds(String tenantId, String roleNames) { + List roleList = baseMapper.selectList(Wrappers.query().lambda().eq(Role::getTenantId, tenantId).in(Role::getRoleName, Func.toStrList(roleNames))); + if (roleList != null && roleList.size() > 0) { + return roleList.stream().map(role -> Func.toStr(role.getId())).distinct().collect(Collectors.joining(",")); + } + return null; + } + + @Override + public List getRoleNames(String roleIds) { + return baseMapper.getRoleNames(Func.toLongArray(roleIds)); + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/TenantServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/TenantServiceImpl.java new file mode 100644 index 0000000..48128cf --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/TenantServiceImpl.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.*; +import org.energy.modules.system.mapper.DeptMapper; +import org.energy.modules.system.mapper.RoleMapper; +import org.energy.modules.system.mapper.TenantMapper; +import org.energy.modules.system.mapper.UserMapper; +import com.dayu.daf.core.boot.tenant.TenantId; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.utils.DigestUtil; +import com.dayu.daf.core.tool.utils.Func; +import org.energy.modules.system.entity.*; +import org.energy.modules.system.mapper.*; +import org.energy.modules.system.service.IPostService; +import org.energy.modules.system.service.ITenantService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +@AllArgsConstructor +public class TenantServiceImpl extends BaseServiceImpl implements ITenantService { + + private final TenantId tenantId; + private final RoleMapper roleMapper; + private final DeptMapper deptMapper; + private final IPostService postService; + private final UserMapper userMapper; + + @Override + public IPage selectTenantPage(IPage page, Tenant tenant) { + return page.setRecords(baseMapper.selectTenantPage(page, tenant)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean saveTenant(Tenant tenant) { + if (Func.isEmpty(tenant.getId())) { + List tenants = baseMapper.selectList(Wrappers.query().lambda().eq(Tenant::getIsDeleted, DafConstant.DB_NOT_DELETED)); + List codes = tenants.stream().map(Tenant::getTenantId).collect(Collectors.toList()); + String tenantId = getTenantId(codes); + tenant.setTenantId(tenantId); + // 新建租户对应的默认角色 + Role role = new Role(); + role.setTenantId(tenantId); + role.setParentId(0L); + role.setRoleName("管理员"); + role.setRoleAlias("admin"); + role.setSort(2); + role.setIsDeleted(0); + roleMapper.insert(role); + // 新建租户对应的默认部门 + Dept dept = new Dept(); + dept.setTenantId(tenantId); + dept.setParentId(0L); + dept.setDeptName(tenant.getTenantName()); + dept.setFullName(tenant.getTenantName()); + dept.setSort(2); + dept.setIsDeleted(0); + deptMapper.insert(dept); + // 新建租户对应的默认岗位 + Post post = new Post(); + post.setTenantId(tenantId); + post.setCategory(1); + post.setPostCode("ceo"); + post.setPostName("首席执行官"); + post.setSort(1); + postService.save(post); + // 新建租户对应的默认管理用户 + User user = new User(); + user.setTenantId(tenantId); + user.setName("admin"); + user.setRealName("admin"); + user.setAccount("admin"); + user.setPassword(DigestUtil.encrypt("admin")); + user.setRoleId(String.valueOf(role.getId())); + user.setDeptId(String.valueOf(dept.getId())); + user.setPostId(String.valueOf(post.getId())); + user.setBirthday(new Date()); + user.setSex(1); + user.setIsDeleted(DafConstant.DB_NOT_DELETED); + userMapper.insert(user); + } + return super.saveOrUpdate(tenant); + } + + private String getTenantId(List codes) { + String code = tenantId.generate(); + if (codes.contains(code)) { + return getTenantId(codes); + } + return code; + } + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/UserOauthServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/UserOauthServiceImpl.java new file mode 100644 index 0000000..0540938 --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/UserOauthServiceImpl.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.AllArgsConstructor; +import org.energy.modules.system.entity.UserOauth; +import org.energy.modules.system.mapper.UserOauthMapper; +import org.energy.modules.system.service.IUserOauthService; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +@AllArgsConstructor +public class UserOauthServiceImpl extends ServiceImpl implements IUserOauthService { + +} diff --git a/src/main/java/org/energy/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/energy/modules/system/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..709a19e --- /dev/null +++ b/src/main/java/org/energy/modules/system/service/impl/UserServiceImpl.java @@ -0,0 +1,247 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.dayu.daf.core.log.exception.ServiceException; +import com.dayu.daf.core.mp.base.BaseServiceImpl; +import com.dayu.daf.core.tool.constant.DafConstant; +import com.dayu.daf.core.tool.utils.*; +import lombok.AllArgsConstructor; +import org.energy.common.constant.CommonConstant; +import org.energy.modules.system.entity.Tenant; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.entity.UserInfo; +import org.energy.modules.system.entity.UserOauth; +import org.energy.modules.system.excel.UserExcel; +import org.energy.modules.system.mapper.UserMapper; +import org.energy.modules.system.service.*; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.energy.modules.system.service.IMenuService; +import org.energy.modules.system.vo.MenuVO; +import com.dayu.daf.core.secure.DafUser; + +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +/** + * 服务实现类 + * + * @author Chill + */ +@Service +@AllArgsConstructor +public class UserServiceImpl extends BaseServiceImpl implements IUserService { + private static final String GUEST_NAME = "guest"; + private static final String MINUS_ONE = "-1"; + + private IDeptService deptService; + private IPostService postService; + private IRoleService roleService; + private IUserOauthService userOauthService; + private ITenantService tenantService; + private IMenuService menuService; + + @Override + public boolean submit(User user) { + if (Func.isNotEmpty(user.getPassword())) { + user.setPassword(DigestUtil.encrypt(user.getPassword())); + } + Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(User::getTenantId, user.getTenantId()).eq(User::getAccount, user.getAccount())); + if (cnt > 0) { + throw new ServiceException("当前用户已存在!"); + } + return saveOrUpdate(user); + } + + @Override + public IPage selectUserPage(IPage page, User user) { + return page.setRecords(baseMapper.selectUserPage(page, user)); + } + + @Override + public UserInfo userInfo(Long userId) { + UserInfo userInfo = new UserInfo(); + User user = baseMapper.selectById(userId); + userInfo.setUser(user); + if (Func.isNotEmpty(user)) { + List roleAlias = baseMapper.getRoleAlias(Func.toLongList(user.getRoleId())); + userInfo.setRoles(roleAlias); + } + return userInfo; + } + + @Override + public UserInfo userInfo(String tenantId, String account, String password) { + UserInfo userInfo = new UserInfo(); + User user = baseMapper.getUser(tenantId, account, password); + userInfo.setUser(user); + if (Func.isNotEmpty(user)) { + List roleAlias = baseMapper.getRoleAlias(Func.toLongList(user.getRoleId())); + userInfo.setRoles(roleAlias); + List list = menuService.routes(userInfo.getUser().getRoleId()); + userInfo.setRoleMenus(list); + } + + return userInfo; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public UserInfo userInfo(UserOauth userOauth) { + UserOauth uo = userOauthService.getOne(Wrappers.query().lambda().eq(UserOauth::getUuid, userOauth.getUuid()).eq(UserOauth::getSource, userOauth.getSource())); + UserInfo userInfo; + if (Func.isNotEmpty(uo) && Func.isNotEmpty(uo.getUserId())) { + userInfo = this.userInfo(uo.getUserId()); + userInfo.setOauthId(Func.toStr(uo.getId())); + } else { + userInfo = new UserInfo(); + if (Func.isEmpty(uo)) { + userOauthService.save(userOauth); + userInfo.setOauthId(Func.toStr(userOauth.getId())); + } else { + userInfo.setOauthId(Func.toStr(uo.getId())); + } + User user = new User(); + user.setAccount(userOauth.getUsername()); + userInfo.setUser(user); + userInfo.setRoles(Collections.singletonList(GUEST_NAME)); + } + return userInfo; + } + + @Override + public boolean grant(String userIds, String roleIds) { + User user = new User(); + user.setRoleId(roleIds); + return this.update(user, Wrappers.update().lambda().in(User::getId, Func.toLongList(userIds))); + } + + @Override + public boolean resetPassword(String userIds) { + User user = new User(); +// user.setPassword(DigestUtil.encrypt(CommonConstant.DEFAULT_PASSWORD)); + user.setPassword(DigestUtil.encrypt("8Nn!yjWKpR")); + user.setUpdateTime(DateUtil.now()); + return this.update(user, Wrappers.update().lambda().in(User::getId, Func.toLongList(userIds))); + } + + @Override + public boolean updatePassword(Long userId, String oldPassword, String newPassword, String newPassword1) { + User user = getById(userId); + if (!newPassword.equals(newPassword1)) { + throw new ServiceException("请输入正确的确认密码!"); + } + if (!user.getPassword().equals(DigestUtil.encrypt(oldPassword))) { + throw new ServiceException("原密码不正确!"); + } + return this.update(Wrappers.update().lambda().set(User::getPassword, DigestUtil.encrypt(newPassword)).eq(User::getId, userId)); + } + + @Override + public List getRoleName(String roleIds) { + return baseMapper.getRoleName(Func.toLongList(roleIds)); + } + + @Override + public List getDeptName(String deptIds) { + return baseMapper.getDeptName(Func.toLongList(deptIds)); + } + + @Override + public void importUser(List data) { + data.forEach(userExcel -> { + User user = Objects.requireNonNull(BeanUtil.copy(userExcel, User.class)); + // 设置部门ID + user.setDeptId(deptService.getDeptIds(userExcel.getTenantId(), userExcel.getDeptName())); + // 设置岗位ID + user.setPostId(postService.getPostIds(userExcel.getTenantId(), userExcel.getPostName())); + // 设置角色ID + user.setRoleId(roleService.getRoleIds(userExcel.getTenantId(), userExcel.getRoleName())); + // 设置默认密码 + user.setPassword(CommonConstant.DEFAULT_PASSWORD); + this.submit(user); + }); + } + + @Override + public List exportUser(Wrapper queryWrapper) { + List userList = baseMapper.exportUser(queryWrapper); + userList.forEach(user -> { + user.setRoleName(StringUtil.join(roleService.getRoleNames(user.getRoleId()))); + user.setDeptName(StringUtil.join(deptService.getDeptNames(user.getDeptId()))); + user.setPostName(StringUtil.join(postService.getPostNames(user.getPostId()))); + }); + return userList; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean registerGuest(User user, Long oauthId) { + Tenant tenant = tenantService.getOne(Wrappers.lambdaQuery().eq(Tenant::getTenantId, user.getTenantId())); + if (tenant == null || tenant.getId() == null) { + throw new ServiceException("租户信息错误!"); + } + UserOauth userOauth = userOauthService.getById(oauthId); + if (userOauth == null || userOauth.getId() == null) { + throw new ServiceException("第三方登陆信息错误!"); + } + user.setRealName(user.getName()); + user.setAvatar(userOauth.getAvatar()); + user.setRoleId(MINUS_ONE); + user.setDeptId(MINUS_ONE); + user.setPostId(MINUS_ONE); + boolean userTemp = this.submit(user); + userOauth.setUserId(user.getId()); + userOauth.setTenantId(user.getTenantId()); + boolean oauthTemp = userOauthService.updateById(userOauth); + return (userTemp && oauthTemp); + } + + @Override + public User selectByIdAndDel(Long id) { + return baseMapper.selectByIdAndDel(id); + } + + @Override + public User selectByAccountAndDel(String account) { + return baseMapper.selectByAccountAndDel(account); + } + + @Override + public UserInfo userInfo(String tenantId, String account) { + UserInfo userInfo = new UserInfo(); + QueryWrapper userQueryWrapper = new QueryWrapper<>(); + userQueryWrapper.lambda().eq(User::getTenantId, tenantId); + userQueryWrapper.lambda().eq(User::getAccount, account); + userQueryWrapper.lambda().eq(User::getIsDeleted, DafConstant.DB_NOT_DELETED); + User user = super.getOne(userQueryWrapper); + userInfo.setUser(user); + if (Func.isNotEmpty(user)) { + List roleAlias = baseMapper.getRoleAlias(Func.toLongList(user.getRoleId())); + userInfo.setRoles(roleAlias); + List list = menuService.routes(userInfo.getUser().getRoleId()); + userInfo.setRoleMenus(list); + } + return userInfo; + } +} diff --git a/src/main/java/org/energy/modules/system/util/CsvFileUtils.java b/src/main/java/org/energy/modules/system/util/CsvFileUtils.java new file mode 100644 index 0000000..68367e3 --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/CsvFileUtils.java @@ -0,0 +1,109 @@ +package org.energy.modules.system.util; + +import org.apache.commons.csv.CSVFormat; +import org.apache.commons.csv.CSVParser; +import org.apache.commons.csv.CSVRecord; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class CsvFileUtils { + + private static final Logger logger = LoggerFactory.getLogger(CsvFileUtils.class); + + public static String isCsvFormatValid(MultipartFile file, BigDecimal pvInsatll) { + StringBuilder sb = new StringBuilder(); + try (InputStream inputStream = file.getInputStream(); + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); + CSVParser parser = new CSVParser(reader, CSVFormat.DEFAULT. + withFirstRecordAsHeader().withIgnoreHeaderCase().withTrim())) { + // 获取标题 + List headers = parser.getHeaderNames(); + int numberOfColumns = headers.size(); + int index = 1; + for (CSVRecord record : parser) { + // 检查列数是否一致 + if (record.size() != numberOfColumns) { + sb.append("上传失败,文件内容为空或模板不对"); + break; + } + checkCsvField(record, sb, index, pvInsatll); + break; + } + } catch (IOException e) { + sb.append("上传失败,文件内容读取失败"); + } + return sb.toString(); + } + + public static void checkCsvField(CSVRecord record, StringBuilder sb, int index, BigDecimal pvInsatll) { + // 正则表达式 + String dataPattern = "^?[0-9]{0,4}+\\.?[0-9]{0,2}$"; + Pattern pattern = Pattern.compile(dataPattern); + for (int i = 1; i <= 24; i++) { + String fieldValue = record.get(i - 1); + if (StringUtils.isEmpty(fieldValue)) { + sb.append("第").append(index).append("行上传失败,时间段").append(i).append("不可为空").append("
"); + } else { + Matcher matcher = pattern.matcher(fieldValue); + if (!matcher.matches()) { + sb.append("第").append(index).append("行上传失败,时间段").append(i).append("请填写整数四位以内,小数两位数字").append("
"); + } else if (pvInsatll != null && new BigDecimal(fieldValue).compareTo(pvInsatll) > 0) { + sb.append("第").append(index).append("行上传失败,时间段").append(i).append("不能大于光伏装机(").append(pvInsatll).append(")").append("
"); + } + } + } + } + + public static void download(HttpServletResponse response, String templateName) throws Exception { + InputStream in = null; + OutputStream out = null; + try { + InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("csv/" + templateName); + //强制下载不打开 + response.setContentType("application/force-download"); + out = response.getOutputStream(); + //使用URLEncoder来防止文件名乱码或者读取错误 + response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(templateName, "UTF-8")); + int b = 0; + byte[] buffer = new byte[1000000]; + while (b != -1) { + b = inputStream.read(buffer); + if (b != -1) { + out.write(buffer, 0, b); + } + } + int bytes = 0; + byte[] bufferOut = new byte[1024]; + while ((bytes = in.read(bufferOut)) != -1) { + out.write(bufferOut, 0, bytes); + } + out.close(); + in.close(); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + logger.error("文件流关闭失败", e); + } + } + + if (null != out) { + out.close(); + } + + } + + } +} diff --git a/src/main/java/org/energy/modules/system/util/DataUtils.java b/src/main/java/org/energy/modules/system/util/DataUtils.java new file mode 100644 index 0000000..2e49591 --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/DataUtils.java @@ -0,0 +1,88 @@ +package org.energy.modules.system.util; + +import java.lang.reflect.Field; +import java.util.Map; +import java.util.function.Supplier; + +public class DataUtils { + + public static T mapToEntity(Map map, Supplier supplier) { + T entity = supplier.get(); + Class clazz = entity.getClass(); + + map.forEach((key, value) -> { + try { + Field field = findField(clazz, key); + if (field != null) { + field.setAccessible(true); + Object castedValue = castValue(field.getType(), value); + field.set(entity, castedValue); + } else { + System.err.println("Field not found: " + key); + } + } catch (IllegalAccessException e) { + System.err.println("IllegalAccessException for field: " + key); + e.printStackTrace(); + } catch (Exception e) { + System.err.println("Unexpected exception for field: " + key); + e.printStackTrace(); + } + }); + + return entity; + } + + private static Field findField(Class clazz, String fieldName) { + while (clazz != null) { + try { + return clazz.getDeclaredField(fieldName); + } catch (NoSuchFieldException e) { + clazz = clazz.getSuperclass(); + } + } + return null; // Field not found + } + + private static Object castValue(Class fieldType, Object value) { + if (value == null) { + return null; + } + if (fieldType.isAssignableFrom(value.getClass())) { + return value; + } + if (fieldType == int.class || fieldType == Integer.class) { + return Integer.parseInt(value.toString()); + } + if (fieldType == long.class || fieldType == Long.class) { + return Long.parseLong(value.toString()); + } + if (fieldType == float.class || fieldType == Float.class) { + return Float.parseFloat(value.toString()); + } + if (fieldType == double.class || fieldType == Double.class) { + return Double.parseDouble(value.toString()); + } + if (fieldType == boolean.class || fieldType == Boolean.class) { + return Boolean.parseBoolean(value.toString()); + } + // Add more type conversions as needed + return value; + } + + /** + * 将字符串末尾的latterIndex位数字加一并格式化成latterIndex位数 + * @param str + * @return + */ + public static String incrementLast(String str, int latterIndex) { + // 获取字符串末尾的latterIndex位字符 + String lastFour = str.substring(Math.max(0, str.length() - latterIndex)); + // 将末尾字符转换为整数 + int number = Integer.parseInt(lastFour); + // 整数加一 + number++; + // 格式化整数为latterIndex位数的字符串 + String result = String.format("%0" + latterIndex + "d", number); + return result; + } +} diff --git a/src/main/java/org/energy/modules/system/util/DateTimeUtils.java b/src/main/java/org/energy/modules/system/util/DateTimeUtils.java new file mode 100644 index 0000000..ad6cac8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/DateTimeUtils.java @@ -0,0 +1,440 @@ +package org.energy.modules.system.util; + + +import io.micrometer.core.instrument.util.StringUtils; + +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * 日期处理工具类 + */ +public class DateTimeUtils { + + public static final String FULL_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + public static final String FULL_DATE_FORMAT_CN = "yyyy年MM月dd日 HH时mm分ss秒"; + public static final String PART_DATE_FORMAT = "yyyy-MM-dd"; + public static final String PART_DATE_FORMAT_CN = "yyyy年MM月dd日"; + public static final String YEAR_DATE_FORMAT = "yyyy"; + public static final String MONTH_DATE_FORMAT = "MM"; + public static final String DAY_DATE_FORMAT = "dd"; + public static final String WEEK_DATE_FORMAT = "week"; + public static final String YEAR_MONTH_DATE_FORMAT = "yyyyMMdd"; + + + /** + * 将日期类型转换为字符串 + * + * @param date 日期 + * @param xFormat 格式 + * @return + */ + public static String getFormatDate(Date date, String xFormat) { + date = date == null ? new Date() : date; + xFormat = StringUtils.isNotEmpty(xFormat) == true ? xFormat : FULL_DATE_FORMAT; + SimpleDateFormat sdf = new SimpleDateFormat(xFormat); + return sdf.format(date); + } + + + /** + * 比较日期大小 + * + * @param dateX + * @param dateY + * @return x < y return [-1]; + * x = y return [0] ; + * x > y return [1] ; + */ + public static int compareDate(Date dateX, Date dateY) { + return dateX.compareTo(dateY); + } + + + /** + * 将日期字符串转换为日期格式类型 + * + * @param xDate + * @param xFormat 为NULL则转换如:2012-06-25 + * @return + */ + public static Date parseString2Date(String xDate, String xFormat) { + while (!isNotDate(xDate)) { + xFormat = StringUtils.isNotEmpty(xFormat) == true ? xFormat : PART_DATE_FORMAT; + SimpleDateFormat sdf = new SimpleDateFormat(xFormat); + Date date = null; + try { + date = sdf.parse(xDate); + } catch (ParseException e) { + e.printStackTrace(); + return null; + } + return date; + } + return null; + } + + + /** + * 判断需要转换类型的日期字符串是否符合格式要求 + * + * @param xDate + * @return + */ + public static boolean isNotDate(String xDate) { + SimpleDateFormat sdf = new SimpleDateFormat(PART_DATE_FORMAT); + try { + if (StringUtils.isEmpty(xDate)) { + return true; + } + sdf.parse(xDate); + return false; + } catch (ParseException e) { + e.printStackTrace(); + return true; + } + } + + public static boolean isDate(String xDate) { + return !isDate(xDate); + } + + + /** + * 获取俩个日期之间相差天数 + * + * @param dateX + * @param dateY + * @return + */ + public static int getDiffDays(Date dateX, Date dateY) { + if ((dateX == null) || (dateY == null)) { + return 0; + } + + int dayX = (int) (dateX.getTime() / (60 * 60 * 1000 * 24)); + int dayY = (int) (dateY.getTime() / (60 * 60 * 1000 * 24)); + + return dayX > dayY ? dayX - dayY : dayY - dayX; + } + + /** + * 获取俩个日期之间相差天数(日期) + * + * @param dateX + * @param dateY + * @return + */ + public static int getDiffDaysNoABS(Date dateX, Date dateY) { + if ((dateX == null) || (dateY == null)) { + return 0; + } + + int dayX = (int) (dateX.getTime() / (60 * 60 * 1000 * 24)); + int dayY = (int) (dateY.getTime() / (60 * 60 * 1000 * 24)); + + return dayX - dayY; + } + + + /** + * 获取传值日期之后几天的日期并转换为字符串类型 + * + * @param date 需要转换的日期 date 可以为NULL 此条件下则获取当前日期 + * @param after 天数 + * @param xFormat 转换字符串类型 (可以为NULL) + * @return + */ + public static String getAfterCountDate(Date date, int after, String xFormat) { + date = date == null ? new Date() : date; + xFormat = StringUtils.isNotEmpty(xFormat) == true ? xFormat : PART_DATE_FORMAT; + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DAY_OF_MONTH, after); + return getFormatDate(calendar.getTime(), xFormat); + } + + /** + * 获取传值日期之前几天的日期并转换为字符串类型 + * + * @param date 需要转换的日期 date 可以为NULL 此条件下则获取当前日期 + * @param before 天数 + * @param xFormat 转换字符串类型 (可以为NULL) + * @return + */ + public static String getBeforeCountDate(Date date, int before, String xFormat) { + date = date == null ? new Date() : date; + xFormat = StringUtils.isNotEmpty(xFormat) == true ? xFormat : PART_DATE_FORMAT; + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DAY_OF_MONTH, -before); + return getFormatDate(calendar.getTime(), xFormat); + } + + + /** + * 获取日期的参数 如:年 , 月 , 日 , 星期几 + * + * @param xDate 日期 可以为日期格式,可以是字符串格式; 为NULL或者其他格式时都判定为当前日期 + * @param xFormat 年 yyyy 月 MM 日 dd 星期 week ;其他条件下都返回0 + */ + public static int getDateTimeParam(Object xDate, String xFormat) { + xDate = xDate == null ? new Date() : xDate; + Date date = null; + if (xDate instanceof String) { + date = parseString2Date(xDate.toString(), null); + } else if (xDate instanceof Date) { + date = (Date) xDate; + } else { + date = new Date(); + } + date = date == null ? new Date() : date; + if (StringUtils.isNotEmpty(xFormat) + && (xFormat.equals(YEAR_DATE_FORMAT) + || xFormat.equals(MONTH_DATE_FORMAT) + || xFormat.equals(DAY_DATE_FORMAT))) { + return Integer.parseInt(getFormatDate(date, xFormat)); + } else if (StringUtils.isNotEmpty(xFormat) + && (WEEK_DATE_FORMAT.equals(xFormat))) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + int week = cal.get(Calendar.DAY_OF_WEEK) - 1 == 0 ? + 7 : cal.get(Calendar.DAY_OF_WEEK) - 1; + return week; + } else { + return 0; + } + } + + + /** + * 日期格式转换为时间戳 + * + * @param time + * @param format + * @return + */ + public static Long getLongTime(String time, String format) { + SimpleDateFormat sdf = new SimpleDateFormat(format); + Date date = null; + try { + date = sdf.parse(time); + return (date.getTime() / 1000); + } catch (ParseException e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 获取星期字符串 + * + * @param xDate + * @return + */ + public static String getWeekString(Object xDate) { + int week = getDateTimeParam(xDate, WEEK_DATE_FORMAT); + switch (week) { + case 1: + return "星期一"; + case 2: + return "星期二"; + case 3: + return "星期三"; + case 4: + return "星期四"; + case 5: + return "星期五"; + case 6: + return "星期六"; + case 7: + return "星期日"; + default: + return ""; + } + } + + /** + * 获得十位时间 + */ + public static Long getTenBitTimestamp() { + return System.currentTimeMillis() / 1000; + } + + /** + * 获得某天的结束时间 + */ + public static Date getDateEnd(Date date) { + return new Date(date.getTime() + (86400 - 1) * 1000); + } + + /** + * 日期格式转换为毫秒 + * + * @param time + * @param format + * @return + */ + public static Long getLongDateTime(String time, String format) { + SimpleDateFormat sdf = new SimpleDateFormat(format); + Date date = null; + try { + date = sdf.parse(time); + return date.getTime(); + } catch (ParseException e) { + e.printStackTrace(); + } + return null; + } + + /** + * 获取某天开始时间戳_10位 + */ + public static Long getStartTimestamp(Date date) { + + Calendar calendar = Calendar.getInstance(); + date = date == null ? new Date() : date; + calendar.setTime(date); + + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + + return calendar.getTime().getTime() / 1000; + } + + /** + * 获取某天结束时间戳_10位 + */ + public static Long getEndTimestamp(Date date) { + + Calendar calendar = Calendar.getInstance(); + date = date == null ? new Date() : date; + calendar.setTime(date); + + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + + return calendar.getTime().getTime() / 1000; + } + + /** + * 获取昨天日期 + * + * @param date + * @return + */ + public static Date getYesterday(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DAY_OF_MONTH, -1); + + calendar.set(Calendar.HOUR_OF_DAY, 9); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + date = calendar.getTime(); + return date; + } + + /** + * 获取明天时间(参数时间+1天) + * + * @param date + * @return + */ + public static Date getTomorrowday(Date date) { + Calendar c = Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.DAY_OF_YEAR, +1); + return c.getTime(); + } + + /* 10位int型的时间戳转换为String(yyyy-MM-dd HH:mm:ss) + * + * @param time + * @return + */ + public static String timestampToString(Integer time, String format) { + // int转long时,先进行转型再进行计算,否则会是计算结束后在转型 + long temp = (long) time * 1000; + Timestamp ts = new Timestamp(temp); + String tsStr = ""; + DateFormat dateFormat = new SimpleDateFormat(format); + try { + // 方法一 + tsStr = dateFormat.format(ts); + } catch (Exception e) { + e.printStackTrace(); + } + return tsStr; + } + + /** + * 获取某天开始时间 + */ + public static Date getStartTime(Date date) { + + Calendar calendar = Calendar.getInstance(); + date = date == null ? new Date() : date; + calendar.setTime(date); + + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + + return calendar.getTime(); + } + + /** + * 获取某天结束时间 + */ + public static Date getEndTime(Date date) { + + Calendar calendar = Calendar.getInstance(); + date = date == null ? new Date() : date; + calendar.setTime(date); + + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + + return calendar.getTime(); + } + + /** + * Date类型转换为10位时间戳 + * + * @param time + * @return + */ + public static Integer DateToTimestamp(Date time) { + Timestamp ts = new Timestamp(time.getTime()); + + return (int) ((ts.getTime()) / 1000); + } + + /** + * 获取当前时间之前或之后几分钟 + * + * @param minute + * @return + */ + public static String getTimeByMinute(int minute, Date time) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(time); + calendar.add(Calendar.MINUTE, minute); + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime()); + + } +} diff --git a/src/main/java/org/energy/modules/system/util/EnumFileInfoType.java b/src/main/java/org/energy/modules/system/util/EnumFileInfoType.java new file mode 100644 index 0000000..a84ab3a --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/EnumFileInfoType.java @@ -0,0 +1,50 @@ +package org.energy.modules.system.util; + +/** + * Created by edwong on 2024/07/08. + */ +public enum EnumFileInfoType { + + STATIC_LEDGER_DOCUMENT_INVENTORY("1", "ST_LD_DOC_INV", "静态台账文档清册"), + STATIC_TOOLS_DOCUMENT_INVENTORY("2", "ST_TO_DOC_INV", "工器具台账文档清册"),; + + private String key; + private String keyDesc; + private String desc; + + EnumFileInfoType(String key, String keyDesc, String desc) { + this.key = key; + this.keyDesc = keyDesc; + this.desc = desc; + } + + public static String getDesc(String type) { + for (EnumFileInfoType en : EnumFileInfoType.values()) { + if (en.key.equals(type)) { + return en.desc; + } + } + return null; + } + + public static String getKeyDesc(String type) { + for (EnumFileInfoType en : EnumFileInfoType.values()) { + if (en.key.equals(type)) { + return en.keyDesc; + } + } + return null; + } + + public String getKeyDesc() { + return keyDesc; + } + + public String getKey() { + return key; + } + + public String getDesc() { + return desc; + } +} diff --git a/src/main/java/org/energy/modules/system/util/ExcelUtils.java b/src/main/java/org/energy/modules/system/util/ExcelUtils.java new file mode 100644 index 0000000..0ea514f --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/ExcelUtils.java @@ -0,0 +1,43 @@ +package org.energy.modules.system.util; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +public class ExcelUtils { + + + /** + * 解析excel文件 + * + * @param fileName + * @param clazz + * @param + * @return + */ + public static List parseExcel(String fileName, Class clazz) { + List list = new ArrayList<>(); + try { + EasyExcel.read(fileName, clazz, new AnalysisEventListener() { + //解析一行运行一次此方法。 + @Override + public void invoke(T t, AnalysisContext analysisContext) { + list.add(t); + } + + //解析所有数据完成,运行此方法。 + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + } + }).sheet().doRead(); + } catch (Exception e) { + log.error("解析excel异常,文件名={}", fileName, e); + } + return list; + } +} diff --git a/src/main/java/org/energy/modules/system/util/ReflectionUtils.java b/src/main/java/org/energy/modules/system/util/ReflectionUtils.java new file mode 100644 index 0000000..e771baa --- /dev/null +++ b/src/main/java/org/energy/modules/system/util/ReflectionUtils.java @@ -0,0 +1,144 @@ +package org.energy.modules.system.util; + +import org.energy.modules.system.vo.OperatingModeDetailVO; +import org.energy.modules.system.vo.SimulationDetailVO; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; + +public class ReflectionUtils { + public static Map extractEleCostFieldMap(Map dictMap, OperatingModeDetailVO vo, String suffix) throws NoSuchFieldException, IllegalAccessException { + Map dates = new HashMap<>(24); + Class clazz = (Class) vo.getClass(); + String key; + String fieldName; + String fieldTypeName; + String fieldTypeCoef; + + for (int i = 1; i <= 24; i++) { + key = getDate(i); + fieldName = key + suffix; + fieldTypeName = key + "Type"; + Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); // 允许访问私有字段 + Field fieldType = clazz.getDeclaredField(fieldTypeName); + fieldType.setAccessible(true); // 允许访问私有字段 + fieldTypeCoef = dictMap.get(Integer.parseInt(fieldType.get(vo).toString())); + if ("purchasePrice".equals(fieldTypeCoef)) { + Field fieldCoef = clazz.getDeclaredField(fieldTypeCoef); + fieldCoef.setAccessible(true); // 允许访问私有字段 + // 获取字段的值并转换为 BigDecimal + BigDecimal userPower = (BigDecimal) field.get(vo); + BigDecimal unitPrice = (BigDecimal) fieldCoef.get(vo); + dates.put(key, userPower.multiply(unitPrice)); + } else { + Field fieldCoef = clazz.getDeclaredField(fieldTypeCoef); + fieldCoef.setAccessible(true); // 允许访问私有字段 + // 获取字段的值并转换为 BigDecimal + BigDecimal userPower = (BigDecimal) field.get(vo); + BigDecimal unitPrice = (BigDecimal) fieldCoef.get(vo); + dates.put(key, userPower.multiply(unitPrice.multiply(vo.getPurchasePrice()))); + } + } + + // 如果你想要自定义排序顺序,可以传递一个Comparator给TreeMap + Comparator dateComparator = (key1, key2) -> { + int num1 = Integer.parseInt(key1.substring(4)); // 键的格式是"dateX",其中X是数字 + int num2 = Integer.parseInt(key2.substring(4)); + return Integer.compare(num1, num2); + }; + Map sortedMap = new TreeMap<>(dateComparator); + sortedMap.putAll(dates); + + return sortedMap; + } + + public static Map extractCoeffFieldMap(Map dictMap, OperatingModeDetailVO vo) throws NoSuchFieldException, IllegalAccessException { + Map dates = new HashMap<>(24); + Class clazz = (Class) vo.getClass(); + String key; + String fieldName; + String fieldTypeName; + String fieldTypeCoef; + + for (int i = 1; i <= 24; i++) { + key = getDate(i); + fieldTypeName = key + "Type"; + Field fieldType = clazz.getDeclaredField(fieldTypeName); + fieldType.setAccessible(true); // 允许访问私有字段 + fieldTypeCoef = dictMap.get(Integer.parseInt(fieldType.get(vo).toString())); + if ("purchasePrice".equals(fieldTypeCoef)) { + Field fieldCoef = clazz.getDeclaredField(fieldTypeCoef); + fieldCoef.setAccessible(true); // 允许访问私有字段 + // 获取字段的值并转换为 BigDecimal + BigDecimal unitPrice = (BigDecimal) fieldCoef.get(vo); + dates.put(key, unitPrice); + } else { + Field fieldCoef = clazz.getDeclaredField(fieldTypeCoef); + fieldCoef.setAccessible(true); // 允许访问私有字段 + // 获取字段的值并转换为 BigDecimal + BigDecimal unitPrice = (BigDecimal) fieldCoef.get(vo); + dates.put(key, unitPrice.multiply(vo.getPurchasePrice())); + } + } + + return dates; + } + + public static Map extractUserPowerFieldMap(OperatingModeDetailVO vo, String suffix) throws NoSuchFieldException, IllegalAccessException { + Map dates = new HashMap<>(24); + Class clazz = (Class) vo.getClass(); + String fieldName; + String key; + + for (int i = 1; i <= 24; i++) { + key = "date" + i; + fieldName = "date" + i + suffix; + Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); // 允许访问私有字段 + dates.put(key, (BigDecimal) field.get(vo)); + } + + return dates; + } + + public static Map extractOpticalPowerFieldMap(OperatingModeDetailVO vo, String suffix) throws NoSuchFieldException, IllegalAccessException { + Map dates = new HashMap<>(24); + Class clazz = (Class) vo.getClass(); + String fieldName; + String key; + BigDecimal outputRatio = vo.getOutputRatio(); + for (int i = 1; i <= 24; i++) { + key = getDate(i); + fieldName = "date" + i + suffix; + Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); // 允许访问私有字段 + BigDecimal opticalPower = (BigDecimal) field.get(vo); + dates.put(key, opticalPower.multiply(outputRatio)); + } + + return dates; + } + + public static void setValue(OperatingModeDetailVO vo, String filedName, SimulationDetailVO simulationDetailVO) throws NoSuchFieldException, IllegalAccessException { + Class clazz = (Class) vo.getClass(); + Field field = clazz.getDeclaredField(filedName); + field.setAccessible(true); // 允许访问私有字段 + field.set(vo, simulationDetailVO); + } + + public static Object getValue(OperatingModeDetailVO vo, String filedName) throws NoSuchFieldException, IllegalAccessException { + Class clazz = (Class) vo.getClass(); + Field field = clazz.getDeclaredField(filedName); + field.setAccessible(true); // 允许访问私有字段 + return field.get(vo); + } + + public static String getDate(int index) { + return "date" + index; + } +} diff --git a/src/main/java/org/energy/modules/system/vo/CheckedTreeVO.java b/src/main/java/org/energy/modules/system/vo/CheckedTreeVO.java new file mode 100644 index 0000000..7e7118a --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/CheckedTreeVO.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import lombok.Data; + +import java.util.List; + +/** + * CheckedTreeVO + * + * @author Chill + */ +@Data +public class CheckedTreeVO { + + private List menu; + + private List dataScope; + +} diff --git a/src/main/java/org/energy/modules/system/vo/DataScopeVO.java b/src/main/java/org/energy/modules/system/vo/DataScopeVO.java new file mode 100644 index 0000000..fff7a28 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/DataScopeVO.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.DataScope; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DataScopeVO对象", description = "DataScopeVO对象") +public class DataScopeVO extends DataScope { + private static final long serialVersionUID = 1L; + + /** + * 规则类型名 + */ + private String scopeTypeName; +} diff --git a/src/main/java/org/energy/modules/system/vo/DemoVO.java b/src/main/java/org/energy/modules/system/vo/DemoVO.java new file mode 100644 index 0000000..245a03e --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/DemoVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.system.vo; + +import org.energy.modules.system.entity.Demo; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 视图实体类 + * + * @author Daf + * @since 2024-10-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DemoVO对象", description = "DemoVO对象") +public class DemoVO extends Demo { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/vo/DeptVO.java b/src/main/java/org/energy/modules/system/vo/DeptVO.java new file mode 100644 index 0000000..009fe82 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/DeptVO.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Dept; +import com.dayu.daf.core.tool.node.INode; + +import java.util.ArrayList; +import java.util.List; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DeptVO对象", description = "DeptVO对象") +public class DeptVO extends Dept implements INode { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父节点ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + @Override + public List getChildren() { + if (this.children == null) { + this.children = new ArrayList<>(); + } + return this.children; + } + + /** + * 上级部门 + */ + private String parentName; + +} diff --git a/src/main/java/org/energy/modules/system/vo/DictVO.java b/src/main/java/org/energy/modules/system/vo/DictVO.java new file mode 100644 index 0000000..9c57d67 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/DictVO.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Dict; +import com.dayu.daf.core.tool.node.INode; + +import java.util.ArrayList; +import java.util.List; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "DictVO对象", description = "DictVO对象") +public class DictVO extends Dict implements INode { + private static final long serialVersionUID = 1L; + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父节点ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + @Override + public List getChildren() { + if (this.children == null) { + this.children = new ArrayList<>(); + } + return this.children; + } + + /** + * 上级字典 + */ + private String parentName; +} diff --git a/src/main/java/org/energy/modules/system/vo/FileVO.java b/src/main/java/org/energy/modules/system/vo/FileVO.java new file mode 100644 index 0000000..0d08921 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/FileVO.java @@ -0,0 +1,20 @@ +package org.energy.modules.system.vo; + +import org.energy.modules.system.entity.File; +import lombok.Data; +import lombok.EqualsAndHashCode; +import io.swagger.annotations.ApiModel; + +/** + * 视图实体类 + * + * @author Daf + * @since 2024-07-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "FileVO对象", description = "FileVO对象") +public class FileVO extends File { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/vo/GrantTreeVO.java b/src/main/java/org/energy/modules/system/vo/GrantTreeVO.java new file mode 100644 index 0000000..ed9811b --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/GrantTreeVO.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * GrantTreeVO + * + * @author Chill + */ +@Data +public class GrantTreeVO implements Serializable { + private static final long serialVersionUID = 1L; + + private List menu; + + private List dataScope; + +} diff --git a/src/main/java/org/energy/modules/system/vo/GrantVO.java b/src/main/java/org/energy/modules/system/vo/GrantVO.java new file mode 100644 index 0000000..d187821 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/GrantVO.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * GrantVO + * + * @author Chill + */ +@Data +public class GrantVO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "roleIds集合") + private List roleIds; + + @ApiModelProperty(value = "menuIds集合") + private List menuIds; + + @ApiModelProperty(value = "dataScopeIds集合") + private List dataScopeIds; + +} diff --git a/src/main/java/org/energy/modules/system/vo/HomePageVO.java b/src/main/java/org/energy/modules/system/vo/HomePageVO.java new file mode 100644 index 0000000..fc1abaf --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/HomePageVO.java @@ -0,0 +1,38 @@ +package org.energy.modules.system.vo; + +import lombok.Data; +import org.energy.modules.inspection.entity.InspectionTasks; +import org.energy.modules.leger.entity.EquipmentLedger; +import org.energy.modules.leger.entity.ToolInventoryRecord; +import org.energy.modules.release.entity.ProductionInformation; +import org.energy.modules.smart.entity.OperationTicket; +import org.energy.modules.smart.entity.WorkOrder; +import org.energy.modules.smart.entity.WorkPermit; +import org.energy.modules.spares.entity.*; + +import java.util.List; + +@Data +public class HomePageVO { + + // 巡检任务 + private List inspectionTasksAudit; + + // 设备台账 + private List equipmentLedgerAudit; + private List toolInventoryRecordsAudit; + // 智能两票 + private List operationTicketAudit; + private List workPermitAudit; + // 备件管理 + private List warehouseAudit; + private List manufacturerInfoAudit; + private List supplierInfoAudit; + private List materialAudit; + private List inboundAudit; + private List outboundAudit; + // 工单 + private List workOrderAudit; + // 生产信息发布 + private List productionInformationAudit; +} diff --git a/src/main/java/org/energy/modules/system/vo/LogApiRVo.java b/src/main/java/org/energy/modules/system/vo/LogApiRVo.java new file mode 100644 index 0000000..07946f1 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/LogApiRVo.java @@ -0,0 +1,18 @@ +package org.energy.modules.system.vo; + +import com.dayu.daf.core.log.model.LogApi; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "LogApiRVo对象", description = "LogApiRVo对象") +public class LogApiRVo extends LogApi { + + private String strId; + + @ApiModelProperty("创建人") + private String createUserName; +} diff --git a/src/main/java/org/energy/modules/system/vo/MenuVO.java b/src/main/java/org/energy/modules/system/vo/MenuVO.java new file mode 100644 index 0000000..8a29e21 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/MenuVO.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Menu; +import com.dayu.daf.core.tool.node.INode; + +import java.util.ArrayList; +import java.util.List; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "MenuVO对象", description = "MenuVO对象") +public class MenuVO extends Menu implements INode { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父节点ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + /** + * 是否有子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Boolean hasChildren; + + @Override + public List getChildren() { + if (this.children == null) { + this.children = new ArrayList<>(); + } + return this.children; + } + + /** + * 上级菜单 + */ + private String parentName; + + /** + * 菜单类型 + */ + private String categoryName; + + /** + * 按钮功能 + */ + private String actionName; + + /** + * 是否新窗口打开 + */ + private String isOpenName; +} diff --git a/src/main/java/org/energy/modules/system/vo/OperatingModeDetailVO.java b/src/main/java/org/energy/modules/system/vo/OperatingModeDetailVO.java new file mode 100644 index 0000000..d99fe32 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/OperatingModeDetailVO.java @@ -0,0 +1,742 @@ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * 工况仿真方案结论实体类 + * + * @author Daf + * @since 2024-04-12 + */ +@Data +@ApiModel(value = "OperatingModeDetailVO对象", description = "仿真方案结论") +public class OperatingModeDetailVO { + private static final long serialVersionUID = 1L; + + // 工况 + /** + * 主键ID + */ + @ApiModelProperty(value = "主键ID") + private Long id; + /** + * 工况名称 + */ + @ApiModelProperty(value = "工况名称") + private String operatModeName; + /** + * 购网电价 + */ + @ApiModelProperty(value = "购网电价") + private BigDecimal purchasePrice; + /** + * 售网电价 + */ + @ApiModelProperty(value = "售网电价") + private BigDecimal sellPrice; + /** + * 仿真日期 + */ + @ApiModelProperty(value = "仿真日期") + private Date emulateDate; + /** + * 场景关联ID + */ + @ApiModelProperty(value = "场景关联ID") + private BigDecimal sceneId; + /** + * 储能容量start + */ + @ApiModelProperty(value = "储能容量start") + private BigDecimal capacityStart; + /** + * 储能容量end + */ + @ApiModelProperty(value = "储能容量end") + private BigDecimal capacityEnd; + /** + * 充电损耗 + */ + @ApiModelProperty(value = "充电损耗") + private BigDecimal chargingLoss; + /** + * 放电损耗 + */ + @ApiModelProperty(value = "放电损耗") + private BigDecimal dischargeLoss; + /** + * 容量用电负荷 + */ + @ApiModelProperty(value = "容量用电负荷") + private BigDecimal capEleLoad; + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm:ss" + ) + @ApiModelProperty("创建时间") + private Date createTime; + + // 方案 + /** + * 出力比 + */ + @ApiModelProperty(value = "出力比") + private BigDecimal outputRatio; + + /** + * 方案名称 + */ + @ApiModelProperty(value = "方案名称") + private String sceneName; + + // 系数 + /** + * 高峰时段系数 + */ + @ApiModelProperty(value = "高峰时段系数") + private BigDecimal peakCoef; + /** + * 高峰时段价格 + */ + @ApiModelProperty(value = "高峰时段价格") + private BigDecimal peakCoefPrice; + /** + * 尖峰时段系数 + */ + @ApiModelProperty(value = "尖峰时段系数") + private BigDecimal spikeCoef; + /** + * 尖峰时段价格 + */ + @ApiModelProperty(value = "尖峰时段价格") + private BigDecimal spikeCoefPrice; + /** + * 低谷时段系数 + */ + @ApiModelProperty(value = "低谷时段系数") + private BigDecimal valleyCoef; + /** + * 低谷时段价格 + */ + @ApiModelProperty(value = "低谷时段价格") + private BigDecimal valleyCoefPrice; + /** + * 深谷时段系数 + */ + @ApiModelProperty(value = "深谷时段系数") + private BigDecimal deepValleyCoef; + /** + * 深谷时段价格 + */ + @ApiModelProperty(value = "深谷时段价格") + private BigDecimal deepValleyCoefPrice; + + //时段峰平谷TYPE + /** + * 时段1 + */ + @ApiModelProperty(value = "时段1") + private String date1Type; + /** + * 时段2 + */ + @ApiModelProperty(value = "时段2") + private String date2Type; + /** + * 时段3 + */ + @ApiModelProperty(value = "时段3") + private String date3Type; + /** + * 时段4 + */ + @ApiModelProperty(value = "时段4") + private String date4Type; + /** + * 时段5 + */ + @ApiModelProperty(value = "时段5") + private String date5Type; + /** + * 时段6 + */ + @ApiModelProperty(value = "时段6") + private String date6Type; + /** + * 时段7 + */ + @ApiModelProperty(value = "时段7") + private String date7Type; + /** + * 时段8 + */ + @ApiModelProperty(value = "时段8") + private String date8Type; + /** + * 时段9 + */ + @ApiModelProperty(value = "时段9") + private String date9Type; + /** + * 时段10 + */ + @ApiModelProperty(value = "时段10") + private String date10Type; + /** + * 时段11 + */ + @ApiModelProperty(value = "时段11") + private String date11Type; + /** + * 时段12 + */ + @ApiModelProperty(value = "时段12") + private String date12Type; + /** + * 时段13 + */ + @ApiModelProperty(value = "时段13") + private String date13Type; + /** + * 时段14 + */ + @ApiModelProperty(value = "时段14") + private String date14Type; + /** + * 时段15 + */ + @ApiModelProperty(value = "时段15") + private String date15Type; + /** + * 时段16 + */ + @ApiModelProperty(value = "时段16") + private String date16Type; + /** + * 时段17 + */ + @ApiModelProperty(value = "时段17") + private String date17Type; + /** + * 时段18 + */ + @ApiModelProperty(value = "时段18") + private String date18Type; + /** + * 时段19 + */ + @ApiModelProperty(value = "时段19") + private String date19Type; + /** + * 时段20 + */ + @ApiModelProperty(value = "时段20") + private String date20Type; + /** + * 时段21 + */ + @ApiModelProperty(value = "时段21") + private String date21Type; + /** + * 时段22 + */ + @ApiModelProperty(value = "时段22") + private String date22Type; + /** + * 时段23 + */ + @ApiModelProperty(value = "时段23") + private String date23Type; + /** + * 时段24 + */ + @ApiModelProperty(value = "时段24") + private String date24Type; + + // 光功率 + /** + * 光伏装机 + */ + @ApiModelProperty(value = "光伏装机") + private BigDecimal pvInsatll; + /** + * 时段1 + */ + @ApiModelProperty(value = "时段1") + private BigDecimal date1Power; + /** + * 时段2 + */ + @ApiModelProperty(value = "时段2") + private BigDecimal date2Power; + /** + * 时段3 + */ + @ApiModelProperty(value = "时段3") + private BigDecimal date3Power; + /** + * 时段4 + */ + @ApiModelProperty(value = "时段4") + private BigDecimal date4Power; + /** + * 时段5 + */ + @ApiModelProperty(value = "时段5") + private BigDecimal date5Power; + /** + * 时段6 + */ + @ApiModelProperty(value = "时段6") + private BigDecimal date6Power; + /** + * 时段7 + */ + @ApiModelProperty(value = "时段7") + private BigDecimal date7Power; + /** + * 时段8 + */ + @ApiModelProperty(value = "时段8") + private BigDecimal date8Power; + /** + * 时段9 + */ + @ApiModelProperty(value = "时段9") + private BigDecimal date9Power; + /** + * 时段10 + */ + @ApiModelProperty(value = "时段10") + private BigDecimal date10Power; + /** + * 时段11 + */ + @ApiModelProperty(value = "时段11") + private BigDecimal date11Power; + /** + * 时段12 + */ + @ApiModelProperty(value = "时段12") + private BigDecimal date12Power; + /** + * 时段13 + */ + @ApiModelProperty(value = "时段13") + private BigDecimal date13Power; + /** + * 时段14 + */ + @ApiModelProperty(value = "时段14") + private BigDecimal date14Power; + /** + * 时段15 + */ + @ApiModelProperty(value = "时段15") + private BigDecimal date15Power; + /** + * 时段16 + */ + @ApiModelProperty(value = "时段16") + private BigDecimal date16Power; + /** + * 时段17 + */ + @ApiModelProperty(value = "时段17") + private BigDecimal date17Power; + /** + * 时段18 + */ + @ApiModelProperty(value = "时段18") + private BigDecimal date18Power; + /** + * 时段19 + */ + @ApiModelProperty(value = "时段19") + private BigDecimal date19Power; + /** + * 时段20 + */ + @ApiModelProperty(value = "时段20") + private BigDecimal date20Power; + /** + * 时段21 + */ + @ApiModelProperty(value = "时段21") + private BigDecimal date21Power; + /** + * 时段22 + */ + @ApiModelProperty(value = "时段22") + private BigDecimal date22Power; + /** + * 时段23 + */ + @ApiModelProperty(value = "时段23") + private BigDecimal date23Power; + /** + * 时段24 + */ + @ApiModelProperty(value = "时段24") + private BigDecimal date24Power; + + // 用户负荷 + /** + * 时段1 + */ + @ApiModelProperty(value = "时段1") + private BigDecimal date1Load; + /** + * 时段2 + */ + @ApiModelProperty(value = "时段2") + private BigDecimal date2Load; + /** + * 时段3 + */ + @ApiModelProperty(value = "时段3") + private BigDecimal date3Load; + /** + * 时段4 + */ + @ApiModelProperty(value = "时段4") + private BigDecimal date4Load; + /** + * 时段5 + */ + @ApiModelProperty(value = "时段5") + private BigDecimal date5Load; + /** + * 时段6 + */ + @ApiModelProperty(value = "时段6") + private BigDecimal date6Load; + /** + * 时段7 + */ + @ApiModelProperty(value = "时段7") + private BigDecimal date7Load; + /** + * 时段8 + */ + @ApiModelProperty(value = "时段8") + private BigDecimal date8Load; + /** + * 时段9 + */ + @ApiModelProperty(value = "时段9") + private BigDecimal date9Load; + /** + * 时段10 + */ + @ApiModelProperty(value = "时段10") + private BigDecimal date10Load; + /** + * 时段11 + */ + @ApiModelProperty(value = "时段11") + private BigDecimal date11Load; + /** + * 时段12 + */ + @ApiModelProperty(value = "时段12") + private BigDecimal date12Load; + /** + * 时段13 + */ + @ApiModelProperty(value = "时段13") + private BigDecimal date13Load; + /** + * 时段14 + */ + @ApiModelProperty(value = "时段14") + private BigDecimal date14Load; + /** + * 时段15 + */ + @ApiModelProperty(value = "时段15") + private BigDecimal date15Load; + /** + * 时段16 + */ + @ApiModelProperty(value = "时段16") + private BigDecimal date16Load; + /** + * 时段17 + */ + @ApiModelProperty(value = "时段17") + private BigDecimal date17Load; + /** + * 时段18 + */ + @ApiModelProperty(value = "时段18") + private BigDecimal date18Load; + /** + * 时段19 + */ + @ApiModelProperty(value = "时段19") + private BigDecimal date19Load; + /** + * 时段20 + */ + @ApiModelProperty(value = "时段20") + private BigDecimal date20Load; + /** + * 时段21 + */ + @ApiModelProperty(value = "时段21") + private BigDecimal date21Load; + /** + * 时段22 + */ + @ApiModelProperty(value = "时段22") + private BigDecimal date22Load; + /** + * 时段23 + */ + @ApiModelProperty(value = "时段23") + private BigDecimal date23Load; + /** + * 时段24 + */ + @ApiModelProperty(value = "时段24") + private BigDecimal date24Load; + + // 返回date1-date24 的光功、购电等信息 + /** + * 时段1 + */ + @ApiModelProperty(value = "时段1") + private SimulationDetailVO date1; + /** + * 时段2 + */ + @ApiModelProperty(value = "时段2") + private SimulationDetailVO date2; + /** + * 时段3 + */ + @ApiModelProperty(value = "时段3") + private SimulationDetailVO date3; + /** + * 时段4 + */ + @ApiModelProperty(value = "时段4") + private SimulationDetailVO date4; + /** + * 时段5 + */ + @ApiModelProperty(value = "时段5") + private SimulationDetailVO date5; + /** + * 时段6 + */ + @ApiModelProperty(value = "时段6") + private SimulationDetailVO date6; + /** + * 时段7 + */ + @ApiModelProperty(value = "时段7") + private SimulationDetailVO date7; + /** + * 时段8 + */ + @ApiModelProperty(value = "时段8") + private SimulationDetailVO date8; + /** + * 时段9 + */ + @ApiModelProperty(value = "时段9") + private SimulationDetailVO date9; + /** + * 时段10 + */ + @ApiModelProperty(value = "时段10") + private SimulationDetailVO date10; + /** + * 时段11 + */ + @ApiModelProperty(value = "时段11") + private SimulationDetailVO date11; + /** + * 时段12 + */ + @ApiModelProperty(value = "时段12") + private SimulationDetailVO date12; + /** + * 时段13 + */ + @ApiModelProperty(value = "时段13") + private SimulationDetailVO date13; + /** + * 时段14 + */ + @ApiModelProperty(value = "时段14") + private SimulationDetailVO date14; + /** + * 时段15 + */ + @ApiModelProperty(value = "时段15") + private SimulationDetailVO date15; + /** + * 时段16 + */ + @ApiModelProperty(value = "时段16") + private SimulationDetailVO date16; + /** + * 时段17 + */ + @ApiModelProperty(value = "时段17") + private SimulationDetailVO date17; + /** + * 时段18 + */ + @ApiModelProperty(value = "时段18") + private SimulationDetailVO date18; + /** + * 时段19 + */ + @ApiModelProperty(value = "时段19") + private SimulationDetailVO date19; + /** + * 时段20 + */ + @ApiModelProperty(value = "时段20") + private SimulationDetailVO date20; + /** + * 时段21 + */ + @ApiModelProperty(value = "时段21") + private SimulationDetailVO date21; + /** + * 时段22 + */ + @ApiModelProperty(value = "时段22") + private SimulationDetailVO date22; + /** + * 时段23 + */ + @ApiModelProperty(value = "时段23") + private SimulationDetailVO date23; + /** + * 时段24 + */ + @ApiModelProperty(value = "时段24") + private SimulationDetailVO date24; + /** + * 总发电量 + */ + @ApiModelProperty(value = "总发电量") + private BigDecimal totalElectricity; + /** + * 总发电量价格 + */ + @ApiModelProperty(value = "总发电量价格") + private BigDecimal totalPrice; + /** + * 网购电量 + */ + @ApiModelProperty(value = "网购电量") + private BigDecimal onlinePower; + /** + * 网购电量价格 + */ + @ApiModelProperty(value = "网购电量价格") + private BigDecimal onlinePowerPrice; + /** + * 充电电量总价格 + */ + @ApiModelProperty(value = "充电电量总价格") + private BigDecimal totalChargePrice; + /** + * 充电总功率 + */ + @ApiModelProperty(value = "充电总功率") + private BigDecimal totalChargePower; + /** + * 放电电量总价格 + */ + @ApiModelProperty(value = "放电电量总价格") + private BigDecimal totalDisChargePrice; + /** + * 放电总功率 + */ + @ApiModelProperty(value = "放电总功率") + private BigDecimal totalDisChargePower; + /** + * 光伏贡献 + */ + @ApiModelProperty(value = "光伏贡献") + private BigDecimal totalPGPrice; + /** + * 光伏发电总功率 + */ + @ApiModelProperty(value = "光伏发电总功率") + private BigDecimal totalPowerGeneration; + /** + * 储能贡献 + */ + @ApiModelProperty(value = "储能贡献") + private BigDecimal totalEnergyStoragePrice; + /** + * 超出容量负荷List + */ + @ApiModelProperty(value = "超出容量负荷List") + private List capacityLoadList; + /** + * 总收益 + */ + @ApiModelProperty(value = "总收益") + private BigDecimal totalRevenue; + /** + * 充电list + */ + @ApiModelProperty(value = "充电list") + private List chargeList; + /** + * 放电list + */ + @ApiModelProperty(value = "放电list") + private List disChargeList; + /** + * 储能list + */ + @ApiModelProperty(value = "储能list") + private List energyStorageList; + /** + * 储能电费list + */ + @ApiModelProperty(value = "储能电费list") + private List energyStoragePriceList; + /** + * 光伏发电电费list + */ + @ApiModelProperty(value = "光伏发电电费list") + private List powerGenerationPriceList; + /** + * 光伏发电list + */ + @ApiModelProperty(value = "光伏发电list") + private List powerGenerationList; + /** + * 网购电量list + */ + @ApiModelProperty(value = "网购电量list") + private List purchaseBatteryList; + /** + * 网购电量电费list + */ + @ApiModelProperty(value = "网购电量电费list") + private List purchaseBatteryPriceList; + /** + * 用户负荷list + */ + @ApiModelProperty(value = "用户负荷list") + private List userLoadList; +} diff --git a/src/main/java/org/energy/modules/system/vo/ParamVO.java b/src/main/java/org/energy/modules/system/vo/ParamVO.java new file mode 100644 index 0000000..03fd9ee --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/ParamVO.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Param; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "ParamVO对象", description = "ParamVO对象") +public class ParamVO extends Param { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/vo/PostVO.java b/src/main/java/org/energy/modules/system/vo/PostVO.java new file mode 100644 index 0000000..c83d60f --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/PostVO.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Post; + +/** + * 岗位表视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "PostVO对象", description = "岗位表") +public class PostVO extends Post { + private static final long serialVersionUID = 1L; + + /** + * 岗位分类名 + */ + private String categoryName; + +} diff --git a/src/main/java/org/energy/modules/system/vo/RegionVO.java b/src/main/java/org/energy/modules/system/vo/RegionVO.java new file mode 100644 index 0000000..ca7b392 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/RegionVO.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Region; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.Func; + +import java.util.ArrayList; +import java.util.List; + +/** + * 行政区划表视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "RegionVO对象", description = "行政区划表") +public class RegionVO extends Region implements INode { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父节点ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 父节点名称 + */ + private String parentName; + + /** + * 是否有子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Boolean hasChildren; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + @Override + public Long getId() { + return Func.toLong(this.getCode()); + } + + @Override + public Long getParentId() { + return Func.toLong(this.getParentCode()); + } + + @Override + public List getChildren() { + if (this.children == null) { + this.children = new ArrayList<>(); + } + return this.children; + } +} diff --git a/src/main/java/org/energy/modules/system/vo/RoleMenuVO.java b/src/main/java/org/energy/modules/system/vo/RoleMenuVO.java new file mode 100644 index 0000000..7a650c8 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/RoleMenuVO.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.RoleMenu; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "RoleMenuVO对象", description = "RoleMenuVO对象") +public class RoleMenuVO extends RoleMenu { + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/org/energy/modules/system/vo/RoleVO.java b/src/main/java/org/energy/modules/system/vo/RoleVO.java new file mode 100644 index 0000000..72d0441 --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/RoleVO.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.Role; +import com.dayu.daf.core.tool.node.INode; + +import java.util.ArrayList; +import java.util.List; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "RoleVO对象", description = "RoleVO对象") +public class RoleVO extends Role implements INode { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 父节点ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + /** + * 子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + @Override + public List getChildren() { + if (this.children == null) { + this.children = new ArrayList<>(); + } + return this.children; + } + + /** + * 上级角色 + */ + private String parentName; +} diff --git a/src/main/java/org/energy/modules/system/vo/SimulationDetailVO.java b/src/main/java/org/energy/modules/system/vo/SimulationDetailVO.java new file mode 100644 index 0000000..f55281d --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/SimulationDetailVO.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.RoundingMode; + +/** + * GrantVO + * + * @author Chill + */ +@Data +public class SimulationDetailVO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "光功发电") + private BigDecimal powerGeneration = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "光功发电价格") + private BigDecimal powerGenerationPrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "购买电量") + private BigDecimal purchaseBattery = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "购买电量价格") + private BigDecimal purchaseBatteryPrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "充电量") + private BigDecimal charge = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "充电量价格") + private BigDecimal chargePrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "放电量") + private BigDecimal discharge = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "放电量价格") + private BigDecimal dischargePrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); + + @ApiModelProperty(value = "充电与否 0 没充没放,1充电,2放电") + private String isDischarge; + +} diff --git a/src/main/java/org/energy/modules/system/vo/UserVO.java b/src/main/java/org/energy/modules/system/vo/UserVO.java new file mode 100644 index 0000000..d561fbe --- /dev/null +++ b/src/main/java/org/energy/modules/system/vo/UserVO.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.energy.modules.system.entity.User; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "UserVO对象", description = "UserVO对象") +public class UserVO extends User { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 角色名 + */ + private String roleName; + + /** + * 部门名 + */ + private String deptName; + + /** + * 岗位名 + */ + private String postName; + + /** + * 性别 + */ + private String sexName; +} diff --git a/src/main/java/org/energy/modules/system/wrapper/DataScopeWrapper.java b/src/main/java/org/energy/modules/system/wrapper/DataScopeWrapper.java new file mode 100644 index 0000000..fe404ad --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/DataScopeWrapper.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.DataScope; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.vo.DataScopeVO; + +import java.util.Objects; + + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class DataScopeWrapper extends DafEntityWrapper { + + private static IDictService dictService; + + static { + dictService = SpringUtil.getBean(IDictService.class); + } + + public static DataScopeWrapper build() { + return new DataScopeWrapper(); + } + + @Override + public DataScopeVO entityVO(DataScope dataScope) { + DataScopeVO dataScopeVO = Objects.requireNonNull(BeanUtil.copy(dataScope, DataScopeVO.class)); + String scopeTypeName = dictService.getValue("data_scope_type", dataScope.getScopeType()); + dataScopeVO.setScopeTypeName(scopeTypeName); + return dataScopeVO; + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/DeptWrapper.java b/src/main/java/org/energy/modules/system/wrapper/DeptWrapper.java new file mode 100644 index 0000000..e6d2369 --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/DeptWrapper.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import org.energy.common.constant.CommonConstant; +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.Dept; +import org.energy.modules.system.service.IDeptService; +import org.energy.modules.system.vo.DeptVO; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class DeptWrapper extends DafEntityWrapper { + + private static IDeptService deptService; + + static { + deptService = SpringUtil.getBean(IDeptService.class); + } + + public static DeptWrapper build() { + return new DeptWrapper(); + } + + @Override + public DeptVO entityVO(Dept dept) { + DeptVO deptVO = BeanUtil.copy(dept, DeptVO.class); + if (Func.equals(dept.getParentId(), CommonConstant.TOP_PARENT_ID)) { + deptVO.setParentName(CommonConstant.TOP_PARENT_NAME); + } else { + Dept parent = deptService.getById(dept.getParentId()); + deptVO.setParentName(parent.getDeptName()); + } + return deptVO; + } + + public List listNodeVO(List list) { + List collect = list.stream().map(dept -> BeanUtil.copy(dept, DeptVO.class)).collect(Collectors.toList()); + return ForestNodeMerger.merge(collect); + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/DictWrapper.java b/src/main/java/org/energy/modules/system/wrapper/DictWrapper.java new file mode 100644 index 0000000..35f918f --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/DictWrapper.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import org.energy.common.constant.CommonConstant; +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.Dict; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.vo.DictVO; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class DictWrapper extends DafEntityWrapper { + + private static IDictService dictService; + + static { + dictService = SpringUtil.getBean(IDictService.class); + } + + public static DictWrapper build() { + return new DictWrapper(); + } + + @Override + public DictVO entityVO(Dict dict) { + DictVO dictVO = BeanUtil.copy(dict, DictVO.class); + if (Func.equals(dict.getParentId(), CommonConstant.TOP_PARENT_ID)) { + dictVO.setParentName(CommonConstant.TOP_PARENT_NAME); + } else { + Dict parent = dictService.getById(dict.getParentId()); + dictVO.setParentName(parent.getDictValue()); + } + return dictVO; + } + + public List listNodeVO(List list) { + List collect = list.stream().map(dict -> BeanUtil.copy(dict, DictVO.class)).collect(Collectors.toList()); + return ForestNodeMerger.merge(collect); + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/MenuWrapper.java b/src/main/java/org/energy/modules/system/wrapper/MenuWrapper.java new file mode 100644 index 0000000..b54efa3 --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/MenuWrapper.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import org.energy.common.constant.CommonConstant; +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.Menu; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.service.IMenuService; +import org.energy.modules.system.vo.MenuVO; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class MenuWrapper extends DafEntityWrapper { + + private static IMenuService menuService; + + private static IDictService dictService; + + static { + menuService = SpringUtil.getBean(IMenuService.class); + dictService = SpringUtil.getBean(IDictService.class); + } + + public static MenuWrapper build() { + return new MenuWrapper(); + } + + @Override + public MenuVO entityVO(Menu menu) { + MenuVO menuVO = BeanUtil.copy(menu, MenuVO.class); + if (Func.equals(menu.getParentId(), CommonConstant.TOP_PARENT_ID)) { + menuVO.setParentName(CommonConstant.TOP_PARENT_NAME); + } else { + Menu parent = menuService.getById(menu.getParentId()); + menuVO.setParentName(parent.getName()); + } + menuVO.setCategoryName(dictService.getValue("menu_category", Func.toInt(menuVO.getCategory()))); + menuVO.setActionName(dictService.getValue("button_func", Func.toInt(menuVO.getAction()))); + menuVO.setIsOpenName(dictService.getValue("yes_no", Func.toInt(menuVO.getIsOpen()))); + return menuVO; + } + + + public List listNodeVO(List

list) { + List collect = list.stream().map(menu -> BeanUtil.copy(menu, MenuVO.class)).collect(Collectors.toList()); + return ForestNodeMerger.merge(collect); + } + + public List listNodeLazyVO(List list) { + return ForestNodeMerger.merge(list); + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/PostWrapper.java b/src/main/java/org/energy/modules/system/wrapper/PostWrapper.java new file mode 100644 index 0000000..250b16c --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/PostWrapper.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.Post; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.vo.PostVO; + +import java.util.Objects; + +/** + * 岗位表包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class PostWrapper extends DafEntityWrapper { + + private static IDictService dictService; + + static { + dictService = SpringUtil.getBean(IDictService.class); + } + + public static PostWrapper build() { + return new PostWrapper(); + } + + @Override + public PostVO entityVO(Post post) { + PostVO postVO = Objects.requireNonNull(BeanUtil.copy(post, PostVO.class)); + String categoryName = dictService.getValue("post_category", post.getCategory()); + postVO.setCategoryName(categoryName); + return postVO; + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/RegionWrapper.java b/src/main/java/org/energy/modules/system/wrapper/RegionWrapper.java new file mode 100644 index 0000000..565e7a7 --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/RegionWrapper.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.Region; +import org.energy.modules.system.service.IRegionService; +import org.energy.modules.system.vo.RegionVO; + +import java.util.List; +import java.util.Objects; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class RegionWrapper extends DafEntityWrapper { + + private static IRegionService regionService; + + static { + regionService = SpringUtil.getBean(IRegionService.class); + } + + public static RegionWrapper build() { + return new RegionWrapper(); + } + + @Override + public RegionVO entityVO(Region region) { + RegionVO regionVO = Objects.requireNonNull(BeanUtil.copy(region, RegionVO.class)); + Region parentRegion = regionService.getById(region.getParentCode()); + regionVO.setParentName(parentRegion.getName()); + return regionVO; + } + + public List listNodeLazyVO(List list) { + return ForestNodeMerger.merge(list); + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/RoleWrapper.java b/src/main/java/org/energy/modules/system/wrapper/RoleWrapper.java new file mode 100644 index 0000000..4faf104 --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/RoleWrapper.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.node.ForestNodeMerger; +import com.dayu.daf.core.tool.node.INode; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.common.constant.CommonConstant; +import org.energy.modules.system.entity.Role; +import org.energy.modules.system.service.IRoleService; +import org.energy.modules.system.vo.RoleVO; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class RoleWrapper extends DafEntityWrapper { + + private static IRoleService roleService; + + static { + roleService = SpringUtil.getBean(IRoleService.class); + } + + public static RoleWrapper build() { + return new RoleWrapper(); + } + + @Override + public RoleVO entityVO(Role role) { + RoleVO roleVO = BeanUtil.copy(role, RoleVO.class); + if (Func.equals(role.getParentId(), CommonConstant.TOP_PARENT_ID)) { + roleVO.setParentName(CommonConstant.TOP_PARENT_NAME); + } else { + Role parent = roleService.getById(role.getParentId()); + if (parent != null) { + roleVO.setParentName(parent.getRoleName()); + } + } + return roleVO; + } + + + public List listNodeVO(List list) { + List collect = list.stream().map(this::entityVO).collect(Collectors.toList()); + return ForestNodeMerger.merge(collect); + } + +} diff --git a/src/main/java/org/energy/modules/system/wrapper/UserWrapper.java b/src/main/java/org/energy/modules/system/wrapper/UserWrapper.java new file mode 100644 index 0000000..ae76e95 --- /dev/null +++ b/src/main/java/org/energy/modules/system/wrapper/UserWrapper.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.modules.system.wrapper; + +import com.dayu.daf.core.mp.support.DafEntityWrapper; +import com.dayu.daf.core.tool.utils.BeanUtil; +import com.dayu.daf.core.tool.utils.Func; +import com.dayu.daf.core.tool.utils.SpringUtil; +import org.energy.modules.system.entity.User; +import org.energy.modules.system.service.IDictService; +import org.energy.modules.system.service.IUserService; +import org.energy.modules.system.vo.UserVO; + +import java.util.List; + +/** + * 包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class UserWrapper extends DafEntityWrapper { + + private static IUserService userService; + + private static IDictService dictService; + + static { + userService = SpringUtil.getBean(IUserService.class); + dictService = SpringUtil.getBean(IDictService.class); + } + + public static UserWrapper build() { + return new UserWrapper(); + } + + @Override + public UserVO entityVO(User user) { + UserVO userVO = BeanUtil.copy(user, UserVO.class); + List roleName = userService.getRoleName(user.getRoleId()); + List deptName = userService.getDeptName(user.getDeptId()); + userVO.setRoleName(Func.join(roleName)); + userVO.setDeptName(Func.join(deptName)); + userVO.setSexName(dictService.getValue("sex", Func.toInt(user.getSex()))); + return userVO; + } + +} diff --git a/src/main/java/sql/operationitem.menu.sql b/src/main/java/sql/operationitem.menu.sql new file mode 100644 index 0000000..38529c4 --- /dev/null +++ b/src/main/java/sql/operationitem.menu.sql @@ -0,0 +1,24 @@ +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099714', 1123598815738675201, 'operationitem', '', 'menu', '/smart/operationitem', NULL, 1, 1, 0, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099715', '1811234865114099714', 'operationitem_add', '新增', 'add', '/smart/operationitem/add', 'plus', 1, 2, 1, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099716', '1811234865114099714', 'operationitem_edit', '修改', 'edit', '/smart/operationitem/edit', 'form', 2, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099717', '1811234865114099714', 'operationitem_delete', '删除', 'delete', '/api/smart/operationitem/remove', 'delete', 3, 2, 3, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099718', '1811234865114099714', 'operationitem_view', '查看', 'view', '/smart/operationitem/view', 'file-text', 4, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099719', '1811234865114099714', 'operationitem_col_id', '主键', 'prop', '', '', 5, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099720', '1811234865114099714', 'operationitem_col_operationTicketNo', '操作票编号', 'prop', '', '', 6, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099721', '1811234865114099714', 'operationitem_col_operationItemNo', '操作项目编号', 'prop', '', '', 7, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099722', '1811234865114099714', 'operationitem_col_itmeName', '项目名称', 'prop', '', '', 8, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099723', '1811234865114099714', 'operationitem_col_securityMeasures', '危害因素', 'prop', '', '', 9, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099724', '1811234865114099714', 'operationitem_col_riskLevel', '风险等级', 'prop', '', '', 10, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1811234865114099725', '1811234865114099714', 'operationitem_col_other', '其他', 'prop', '', '', 11, 3, 0, 0, NULL, 0); diff --git a/src/main/java/sql/operationticket.menu.sql b/src/main/java/sql/operationticket.menu.sql new file mode 100644 index 0000000..067b7ba --- /dev/null +++ b/src/main/java/sql/operationticket.menu.sql @@ -0,0 +1,68 @@ +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605377', 1123598815738675201, 'operationticket', '', 'menu', '/smart/operationticket', NULL, 1, 1, 0, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605378', '1810945288805605377', 'operationticket_add', '新增', 'add', '/smart/operationticket/add', 'plus', 1, 2, 1, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605379', '1810945288805605377', 'operationticket_edit', '修改', 'edit', '/smart/operationticket/edit', 'form', 2, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605380', '1810945288805605377', 'operationticket_delete', '删除', 'delete', '/api/smart/operationticket/remove', 'delete', 3, 2, 3, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605381', '1810945288805605377', 'operationticket_view', '查看', 'view', '/smart/operationticket/view', 'file-text', 4, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605382', '1810945288805605377', 'operationticket_col_id', '主键', 'prop', '', '', 5, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605383', '1810945288805605377', 'operationticket_col_kksEncoding', 'KKS编码', 'prop', '', '', 6, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605384', '1810945288805605377', 'operationticket_col_kksDescription', 'KSS描述', 'prop', '', '', 7, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605385', '1810945288805605377', 'operationticket_col_station', '场站', 'prop', '', '', 8, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605386', '1810945288805605377', 'operationticket_col_operationTicketNo', '操作票编号', 'prop', '', '', 9, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605387', '1810945288805605377', 'operationticket_col_operationTicketType', '操作票类型', 'prop', '', '', 10, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605388', '1810945288805605377', 'operationticket_col_workTeam', '工作班组', 'prop', '', '', 11, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605389', '1810945288805605377', 'operationticket_col_workLeader', '工作负责人', 'prop', '', '', 12, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605390', '1810945288805605377', 'operationticket_col_guardian', '监护人', 'prop', '', '', 13, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605391', '1810945288805605377', 'operationticket_col_givingOrdersUser', '发令人', 'prop', '', '', 14, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605392', '1810945288805605377', 'operationticket_col_jobRiskLevel', '作业风险等级', 'prop', '', '', 15, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605393', '1810945288805605377', 'operationticket_col_controlLevel', '控制等级', 'prop', '', '', 16, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605394', '1810945288805605377', 'operationticket_col_plannedStartTime', '计划开始时间', 'prop', '', '', 17, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605395', '1810945288805605377', 'operationticket_col_plannedEndTime', '计划结束时间', 'prop', '', '', 18, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605396', '1810945288805605377', 'operationticket_col_workIssuanceTime', '工作签发时间', 'prop', '', '', 19, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605397', '1810945288805605377', 'operationticket_col_personnelQualification', '人员资格', 'prop', '', '', 20, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605398', '1810945288805605377', 'operationticket_col_personnelState', '人员状态', 'prop', '', '', 21, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605399', '1810945288805605377', 'operationticket_col_personnelPritection', '人员防护', 'prop', '', '', 22, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605400', '1810945288805605377', 'operationticket_col_safeDistance', '安全距离', 'prop', '', '', 23, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605401', '1810945288805605377', 'operationticket_col_wrongInterval', '走错间隔', 'prop', '', '', 24, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605402', '1810945288805605377', 'operationticket_col_securityMeasuresImplement', '安全措施落实', 'prop', '', '', 25, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605403', '1810945288805605377', 'operationticket_col_conductProcessInspections', '开展过程检查', 'prop', '', '', 26, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605404', '1810945288805605377', 'operationticket_col_securityTrainingImplement', '安全培训落实', 'prop', '', '', 27, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605405', '1810945288805605377', 'operationticket_col_other', '其他', 'prop', '', '', 28, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605406', '1810945288805605377', 'operationticket_col_securityMeasuresDisclosure', '安全技术措施交底', 'prop', '', '', 29, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605407', '1810945288805605377', 'operationticket_col_riskControlEvaluation', '作业后风险管控情况评价', 'prop', '', '', 30, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605408', '1810945288805605377', 'operationticket_col_sts', '系统状态', 'prop', '', '', 31, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605409', '1810945288805605377', 'operationticket_col_isQuakified', '是否合格', 'prop', '', '', 32, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1810945288805605410', '1810945288805605377', 'operationticket_col_reviewStatus', '审核状态', 'prop', '', '', 33, 3, 0, 0, NULL, 0); diff --git a/src/main/java/sql/productioninformation.menu.sql b/src/main/java/sql/productioninformation.menu.sql new file mode 100644 index 0000000..9b85441 --- /dev/null +++ b/src/main/java/sql/productioninformation.menu.sql @@ -0,0 +1,30 @@ +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069121', 1123598815738675201, 'productioninformation', '', 'menu', '/release/productioninformation', NULL, 1, 1, 0, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069122', '1812723339080069121', 'productioninformation_add', '新增', 'add', '/release/productioninformation/add', 'plus', 1, 2, 1, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069123', '1812723339080069121', 'productioninformation_edit', '修改', 'edit', '/release/productioninformation/edit', 'form', 2, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069124', '1812723339080069121', 'productioninformation_delete', '删除', 'delete', '/api/release/productioninformation/remove', 'delete', 3, 2, 3, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069125', '1812723339080069121', 'productioninformation_view', '查看', 'view', '/release/productioninformation/view', 'file-text', 4, 2, 2, 1, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069126', '1812723339080069121', 'productioninformation_col_id', '主键', 'prop', '', '', 5, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069127', '1812723339080069121', 'productioninformation_col_messageEncoding', '消息编码', 'prop', '', '', 6, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069128', '1812723339080069121', 'productioninformation_col_messageTopic', '消息主题', 'prop', '', '', 7, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069129', '1812723339080069121', 'productioninformation_col_messageType', '消息类型', 'prop', '', '', 8, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069130', '1812723339080069121', 'productioninformation_col_messageContent', '消息内容', 'prop', '', '', 9, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069131', '1812723339080069121', 'productioninformation_col_publisher', '发布人', 'prop', '', '', 10, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069132', '1812723339080069121', 'productioninformation_col_messageLevel', '消息等级', 'prop', '', '', 11, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069133', '1812723339080069121', 'productioninformation_col_isDiscontinue', '是否停用', 'prop', '', '', 12, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069134', '1812723339080069121', 'productioninformation_col_releaseTime', '发布时间', 'prop', '', '', 13, 3, 0, 0, NULL, 0); +INSERT INTO `sys_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) +VALUES ('1812723339080069135', '1812723339080069121', 'productioninformation_col_checkstatus', '审核状态', 'prop', '', '', 14, 3, 0, 0, NULL, 0); diff --git a/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService b/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService new file mode 100644 index 0000000..c1189d9 --- /dev/null +++ b/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService @@ -0,0 +1 @@ +org.energy.common.launch.LauncherServiceImpl diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..282a0c1 --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,47 @@ +#数据源配置 +spring: + redis: + ##redis 单机环境配置 + host: localhost + port: 6379 + password: + database: 0 + ssl: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 + datasource: +# url: jdbc:postgresql://4s27589o64.vicp.fun:32355/om?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + url: jdbc:postgresql://192.168.10.102:5432/om?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + username: admin + password: 123456 + driver-class-name: org.postgresql.Driver +# url: jdbc:mysql://localhost:3306/sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +# username: root +# password: 123456 +# driver-class-name: com.mysql.cj.jdbc.Driver + +#第三方登陆 +social: + enabled: true + domain: http://127.0.0.1:1888 + +#daf配置 +daf: + prop: + upload-domain: http://localhost:8888 + remote-mode: true + remote-path: /usr/share/nginx/html + remote-path-iis: D://iis/html + log-mode: true + +#存放路径 +file: + upload_path: c:\\data\\actual\\ #文件上传目录(不配置的话为java.io.tmpdir目录) + +#sso配置 +sso: + scada: + key: )O[WH]6,YF}+efcaj{+oESb9d8>Z'e9M + iv: L+\~f4,Wh)b$=pkf diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..ba26b61 --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,32 @@ +#数据源配置 +spring: + redis: + ##redis 单机环境配置 + host: 127.0.0.1 + port: 6379 + password: + database: 0 + ssl: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 + datasource: + url: jdbc:postgresql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + username: root + password: root + driver-class-name: org.postgresql.Driver + +#第三方登陆 +social: + enabled: true + domain: http://127.0.0.1:1888 + +#daf配置 +daf: + prop: + upload-domain: http://localhost:8888 + remote-mode: true + remote-path: /usr/share/nginx/html + remote-path-iis: D://iis/html + log-mode: true diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..ba26b61 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,32 @@ +#数据源配置 +spring: + redis: + ##redis 单机环境配置 + host: 127.0.0.1 + port: 6379 + password: + database: 0 + ssl: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 + datasource: + url: jdbc:postgresql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + username: root + password: root + driver-class-name: org.postgresql.Driver + +#第三方登陆 +social: + enabled: true + domain: http://127.0.0.1:1888 + +#daf配置 +daf: + prop: + upload-domain: http://localhost:8888 + remote-mode: true + remote-path: /usr/share/nginx/html + remote-path-iis: D://iis/html + log-mode: true diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..853d191 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,142 @@ +#服务器配置 +server: + port: 7061 + undertow: + # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 + buffer-size: 1024 + # 是否分配的直接内存 + direct-buffers: true + # 线程配置 + threads: + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 + io: 16 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 + worker: 400 + servlet: + # 编码配置 + encoding: + charset: UTF-8 + force: true + +#spring配置 +spring: + cache: + ehcache: + config: classpath:config/ehcache.xml + servlet: + multipart: + max-file-size: 256MB + max-request-size: 1024MB + web: + resources: + add-mappings: false + mvc: + throw-exception-if-no-handler-found: true + datasource: + driver-class-name: org.postgresql.Driver + + +#配置日志地址 +logging: + config: classpath:log/logback_${daf.env}.xml + +# mybatis +mybatis-plus: + mapper-locations: classpath:org/energy/**/mapper/*Mapper.xml + #实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: org.energy.**.entity + #typeEnumsPackage: org.energy.dashboard.entity.enums + global-config: + # 关闭MP3.0自带的banner + banner: false + db-config: + #主键类型 0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake"; + id-type: assign_id + #字段策略 + insert-strategy: not_null + update-strategy: not_null + where-strategy: not_null + #驼峰下划线转换 + table-underline: true + # 逻辑删除配置 + # 逻辑删除全局值(1表示已删除,这也是Mybatis Plus的默认配置) + logic-delete-value: 1 + # 逻辑未删除全局值(0表示未删除,这也是Mybatis Plus的默认配置) + logic-not-delete-value: 0 + configuration: + map-underscore-to-camel-case: true + cache-enabled: false + +#报表配置 +report: + enabled: false + database: + provider: + prefix: daf- + +#knife4j配置 +knife4j: + #启用 + enable: true + #基础认证 + basic: + enable: false + username: daf + password: daf + #增强配置 + setting: + enableSwaggerModels: true + enableDocumentManage: true + enableHost: false + enableHostText: http://localhost + enableRequestCache: true + enableFilterMultipartApis: false + enableFilterMultipartApiMethodType: POST + language: zh-CN + enableFooter: false + enableFooterCustom: true + footerCustomContent: Copyright © 2022 ENERGY CONTROL All Rights Reserved + +#swagger配置信息 +swagger: + title: ENERGY 接口文档系统 + description: ENERGY 接口文档系统 + version: 3.5.0 + license: Powered By Energy + +#oss配置 +oss: + enabled: true + name: qiniu + tenant-mode: true + endpoint: http://prt1thnw3.bkt.clouddn.com + access-key: N_Loh1ngBqcJovwiAJqR91Ifj2vgOWHOf8AwBA_h + secret-key: AuzuA1KHAbkIndCU0dB3Zfii2O3crHNODDmpxHRS + bucket-name: daf + + + +#daf配置 +daf: + logapi: + enabled: false + token: + sign-key: 请配置32位签名提高安全性 + xss: + enabled: true + skip-url: + - /daf-test/** + secure: + skip-url: + - /daf-test/** + client: + - client-id: sword + path-patterns: + - /daf-sword/** + - client-id: saber + path-patterns: + - /daf-saber/** + tenant: + column: tenant_id + tables: + - sys_notice diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..4d9ac42 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +${AnsiColor.BRIGHT_CYAN} _____ _ ${AnsiColor.BLUE} ______ __ __ +${AnsiColor.BRIGHT_CYAN}/ ___| (_) ${AnsiColor.BLUE} | __ \ \ \/ / +${AnsiColor.BRIGHT_CYAN}\ `--. _ __ _ __ _ _ __ __ _ ${AnsiColor.BLUE} | | \ \ __ _ \ / __ __ +${AnsiColor.BRIGHT_CYAN} `--. \| '_ \ | '__|| || '_ \ / _` | ${AnsiColor.BLUE} | | | | / _` | \ / | | | | +${AnsiColor.BRIGHT_CYAN}/\__/ /| |_) || | | || | | || (_| | ${AnsiColor.BLUE} | |_/ / | (_| | | | | |_| | +${AnsiColor.BRIGHT_CYAN}\____/ | .__/ |_| |_||_| |_| \__, | ${AnsiColor.BLUE} \_____/ \__,_\ |__| \_______\ +${AnsiColor.BRIGHT_CYAN} | | __/ | +${AnsiColor.BRIGHT_CYAN} |_| |___/ + +${AnsiColor.BLUE}:: DAF :: ${spring.application.name}:${AnsiColor.RED}${daf.env}${AnsiColor.BLUE} :: Running SpringBoot ${spring-boot.version} :: ${AnsiColor.BRIGHT_BLACK} diff --git a/src/main/resources/config/ehcache.xml b/src/main/resources/config/ehcache.xml new file mode 100644 index 0000000..1623029 --- /dev/null +++ b/src/main/resources/config/ehcache.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/csv/光功率上传模版.csv b/src/main/resources/csv/光功率上传模版.csv new file mode 100644 index 0000000..aa32c59 --- /dev/null +++ b/src/main/resources/csv/光功率上传模版.csv @@ -0,0 +1,2 @@ +date1,date2,date3,date4,date5,date6,date7,date8,date9,date10,date11,date12,date13,date14,date15,date16,date17,date18,date19,date20,date21,date22,date23,date24 +0,0,0,0,0,0,0,0,7.5,22.5,22.5,30,30,30,30,30,30,22.5,22.5,7.5,8.5,7.5,0,0 diff --git a/src/main/resources/csv/用户负荷上传模版.csv b/src/main/resources/csv/用户负荷上传模版.csv new file mode 100644 index 0000000..63ca66d --- /dev/null +++ b/src/main/resources/csv/用户负荷上传模版.csv @@ -0,0 +1,2 @@ +date1,date2,date3,date4,date5,date6,date7,date8,date9,date10,date11,date12,date13,date14,date15,date16,date17,date18,date19,date20,date21,date22,date23,date24 +70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70 diff --git a/src/main/resources/log/logback_dev.xml b/src/main/resources/log/logback_dev.xml new file mode 100644 index 0000000..f2b25fc --- /dev/null +++ b/src/main/resources/log/logback_dev.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + utf8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/log/logback_prod.xml b/src/main/resources/log/logback_prod.xml new file mode 100644 index 0000000..0f0d4b6 --- /dev/null +++ b/src/main/resources/log/logback_prod.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + utf8 + + + + + + + + target/daf/log/info-%d{yyyy-MM-dd}.log + + 365 + + + %n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%logger{50}] %n%-5level: %msg%n + + + + 500MB + + + + INFO + ACCEPT + DENY + + + + + + + + target/daf/log/error-%d{yyyy-MM-dd}.log + + 365 + + + %n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%logger{50}] %n%-5level: %msg%n + + + + 500MB + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/log/logback_test.xml b/src/main/resources/log/logback_test.xml new file mode 100644 index 0000000..0f0d4b6 --- /dev/null +++ b/src/main/resources/log/logback_test.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + utf8 + + + + + + + + target/daf/log/info-%d{yyyy-MM-dd}.log + + 365 + + + %n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%logger{50}] %n%-5level: %msg%n + + + + 500MB + + + + INFO + ACCEPT + DENY + + + + + + + + target/daf/log/error-%d{yyyy-MM-dd}.log + + 365 + + + %n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%logger{50}] %n%-5level: %msg%n + + + + 500MB + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/code.properties b/src/main/resources/templates/code.properties new file mode 100644 index 0000000..1ed7049 --- /dev/null +++ b/src/main/resources/templates/code.properties @@ -0,0 +1,5 @@ +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url=jdbc:mysql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&serverTimezone=GMT%2B8 +spring.datasource.username=root +spring.datasource.password=root +author=Daf diff --git a/src/main/resources/templates/controller.java.vm b/src/main/resources/templates/controller.java.vm new file mode 100644 index 0000000..d191408 --- /dev/null +++ b/src/main/resources/templates/controller.java.vm @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package $!{package.Controller}; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +#if($!{superEntityClass}) +import org.springframework.web.bind.annotation.RequestParam; +#end +import com.baomidou.mybatisplus.core.metadata.IPage; +import $!{package.Entity}.$!{entity}; +#set($voPackage=$package.Entity.replace("entity","vo")) +import $!{voPackage}.$!{entity}VO; +#set($wrapperPackage=$package.Entity.replace("entity","wrapper")) +#if($!{hasWrapper}) +import $!{wrapperPackage}.$!{entity}Wrapper; +#end +import $!{package.Service}.$!{table.serviceName}; +#if($!{superControllerClassPackage}) +import $!{superControllerClassPackage}; +#end +#if(!$!{superEntityClass}) +#end + +/** + * $!{table.comment} 控制器 + * + * @author $!{author} + * @since $!{date} + */ +@RestController +@AllArgsConstructor +@RequestMapping("#if($!{hasServiceName})/$!{serviceName}#end/$!{entityKey}") +@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") +#if($!{superControllerClass}) +public class $!{table.controllerName} extends $!{superControllerClass} { +#else +public class $!{table.controllerName} { +#end + + private $!{table.serviceName} $!{table.entityPath}Service; + +#if($!{hasWrapper}) + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data($!{entity}Wrapper.build().entityVO(detail)); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data($!{entity}Wrapper.build().pageVO(pages)); + } + +#else + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data(detail); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data(pages); + } +#end + + /** + * 自定义分页 $!{table.comment} + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> page($!{entity}VO $!{table.entityPath}, Query query) { + IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); + return R.data(pages); + } + + /** + * 新增 $!{table.comment} + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") + public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.save($!{table.entityPath})); + } + + /** + * 修改 $!{table.comment} + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") + public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); + } + + /** + * 新增或修改 $!{table.comment} + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") + public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); + } + + #if($!{superEntityClass}) + + /** + * 删除 $!{table.comment} + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); + } + + #else + + /** + * 删除 $!{table.comment} + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); + } + + #end + +} diff --git a/src/test/java/org/energy/test/CodeGenerator.java b/src/test/java/org/energy/test/CodeGenerator.java new file mode 100644 index 0000000..a051648 --- /dev/null +++ b/src/test/java/org/energy/test/CodeGenerator.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.energy.test; + + +import com.dayu.daf.core.develop.support.DafCodeGenerator; + +/** + * 代码生成器 + * + * @author Chill + */ +public class CodeGenerator { + + /** + * 代码生成的模块名 + */ + public static String CODE_NAME = "自定义模块"; + /** + * 代码所在服务名 + */ + public static String SERVICE_NAME = "daf-desk"; + /** + * 代码生成的包名 + */ + public static String PACKAGE_NAME = "org.energy.desk"; + /** + * 前端代码生成所属系统 + */ + public static String SYSTEM_NAME = "sword"; + /** + * 前端代码生成地址 + */ + public static String PACKAGE_WEB_DIR = "/Users/chill/Workspaces/product/Sword"; + /** + * 需要去掉的表前缀 + */ + public static String[] TABLE_PREFIX = {"sys_"}; + /** + * 需要生成的表名(两者只能取其一) + */ + public static String[] INCLUDE_TABLES = {"sys_notice"}; + /** + * 需要排除的表名(两者只能取其一) + */ + public static String[] EXCLUDE_TABLES = {}; + /** + * 是否包含基础业务字段 + */ + public static Boolean HAS_SUPER_ENTITY = Boolean.TRUE; + /** + * 基础业务字段 + */ + public static String[] SUPER_ENTITY_COLUMNS = {"create_time", "create_user", "update_time", "update_user", "status", "is_deleted"}; + + /** + * RUN THIS + */ + public static void main(String[] args) { + DafCodeGenerator generator = new DafCodeGenerator(); + generator.setCodeName(CODE_NAME); + generator.setServiceName(SERVICE_NAME); + generator.setSystemName(SYSTEM_NAME); + generator.setPackageName(PACKAGE_NAME); + generator.setPackageWebDir(PACKAGE_WEB_DIR); + generator.setTablePrefix(TABLE_PREFIX); + generator.setIncludeTables(INCLUDE_TABLES); + generator.setExcludeTables(EXCLUDE_TABLES); + generator.setHasSuperEntity(HAS_SUPER_ENTITY); + generator.setSuperEntityColumns(SUPER_ENTITY_COLUMNS); + generator.run(); + } + +} diff --git a/src/test/java/org/energy/test/DafTest.java b/src/test/java/org/energy/test/DafTest.java new file mode 100644 index 0000000..5645289 --- /dev/null +++ b/src/test/java/org/energy/test/DafTest.java @@ -0,0 +1,28 @@ +package org.energy.test; + +import com.dayu.daf.core.test.DafBootTest; +import com.dayu.daf.core.test.DafSpringExtension; +import org.energy.modules.desk.service.INoticeService; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * Daf单元测试 + * + * @author Chill + */ +@ExtendWith(DafSpringExtension.class) +@DafBootTest(appName = "daf-runner", profile = "test") +public class DafTest { + + @Autowired + private INoticeService noticeService; + + @Test + public void contextLoads() { + Long count = noticeService.count(); + System.out.println("notice数量:[" + count + "] 个"); + } + +} diff --git a/src/test/resources/templates/code.properties b/src/test/resources/templates/code.properties new file mode 100644 index 0000000..1ed7049 --- /dev/null +++ b/src/test/resources/templates/code.properties @@ -0,0 +1,5 @@ +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url=jdbc:mysql://localhost:3306/daf?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&serverTimezone=GMT%2B8 +spring.datasource.username=root +spring.datasource.password=root +author=Daf diff --git a/src/test/resources/templates/controller.java.vm b/src/test/resources/templates/controller.java.vm new file mode 100644 index 0000000..370f613 --- /dev/null +++ b/src/test/resources/templates/controller.java.vm @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package $!{package.Controller}; + +import io.swagger.annotations.Api; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import com.dayu.daf.core.mp.support.Condition; +import com.dayu.daf.core.mp.support.Query; +import com.dayu.daf.core.tool.api.R; +import com.dayu.daf.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +#if($!{superEntityClass}) +import org.springframework.web.bind.annotation.RequestParam; +#end +import com.baomidou.mybatisplus.core.metadata.IPage; +import $!{package.Entity}.$!{entity}; +#set($voPackage=$package.Entity.replace("entity","vo")) +import $!{voPackage}.$!{entity}VO; +#set($wrapperPackage=$package.Entity.replace("entity","wrapper")) +#if($!{cfg.hasWrapper}) +import $!{wrapperPackage}.$!{entity}Wrapper; +#end +import $!{package.Service}.$!{table.serviceName}; +#if($!{superControllerClassPackage}) +import $!{superControllerClassPackage}; +#end +#if(!$!{superEntityClass}) +#end + +/** + * $!{table.comment} 控制器 + * + * @author $!{author} + * @since $!{date} + */ +@RestController +@AllArgsConstructor +@RequestMapping("$!{cfg.serviceName}/$!{cfg.entityKey}") +@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") +#if($!{superControllerClass}) +public class $!{table.controllerName} extends $!{superControllerClass} { +#else +public class $!{table.controllerName} { +#end + + private $!{table.serviceName} $!{table.entityPath}Service; + +#if($!{cfg.hasWrapper}) + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data($!{entity}Wrapper.build().entityVO(detail)); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data($!{entity}Wrapper.build().pageVO(pages)); + } + +#else + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data(detail); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data(pages); + } +#end + + /** + * 自定义分页 $!{table.comment} + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + public R> page($!{entity}VO $!{table.entityPath}, Query query) { + IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); + return R.data(pages); + } + + /** + * 新增 $!{table.comment} + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") + public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.save($!{table.entityPath})); + } + + /** + * 修改 $!{table.comment} + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") + public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); + } + + /** + * 新增或修改 $!{table.comment} + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") + public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { + return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); + } + + #if($!{superEntityClass}) + + /** + * 删除 $!{table.comment} + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); + } + + #else + + /** + * 删除 $!{table.comment} + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); + } + + #end + +}