From 0268661305f13cea4b5165a0a848ef9aafe7d7a4 Mon Sep 17 00:00:00 2001 From: 72crm <493466659@qq.com> Date: Tue, 20 Aug 2019 12:18:59 +0800 Subject: [PATCH] =?UTF-8?q?20190820=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - README.md | 47 +- docs/crm9.sql | 320 +- docs/update20190619.sql | 3574 +++++++++++++++++ docs/update20190702.sql | 129 + docs/update20190715.sql | 62 + docs/update20190719.sql | 62 + docs/update20190820.sql | 11 + pom.xml | 4 +- .../common/annotation/LoginFormCookie.java | 13 + .../crm9/common/annotation/RequestBody.java | 13 + .../crm9/common/config/JfinalConfig.java | 26 +- .../crm9/common/config/druid/DruidConfig.java | 4 +- .../config/paragetter/MapParaGetter.java | 25 + .../common/config/redis/JedisClusterImpl.java | 1286 ++++++ .../crm9/common/config/redis/JedisImpl.java | 1312 ++++++ .../config/redis/JedisSentinelImpl.java | 1307 ++++++ .../crm9/common/config/redis/Redis.java | 555 +++ .../common/config/redis/RedisManager.java | 113 + .../crm9/common/config/redis/RedisPlugin.java | 32 + .../crm9/common/constant/BaseConstant.java | 7 +- .../common/interceptor/ErpInterceptor.java | 86 +- .../AdminAchievementController.java | 3 + .../AdminBusinessTypeController.java | 6 + .../admin/controller/AdminDeptController.java | 3 + .../controller/AdminExamineController.java | 6 + .../controller/AdminFieldController.java | 9 +- .../controller/AdminLoginController.java | 50 +- .../admin/controller/AdminMenuController.java | 4 + .../admin/controller/AdminRoleController.java | 13 + .../controller/AdminSysConfigController.java | 14 +- .../admin/controller/AdminUserController.java | 13 +- .../erp/admin/entity/base/BaseAdminField.java | 8 + .../service/AdminExamineRecordService.java | 11 +- .../erp/admin/service/AdminFieldService.java | 70 +- .../erp/admin/service/AdminFileService.java | 2 +- .../erp/admin/service/AdminRoleService.java | 4 +- .../erp/admin/service/AdminSceneService.java | 63 +- .../erp/admin/service/AdminUserService.java | 156 +- .../kakarote/crm9/erp/bi/common/BiRouter.java | 1 + .../crm9/erp/bi/common/BiTimeUtil.java | 22 +- .../erp/bi/controller/BiWorkController.java | 120 + .../crm9/erp/bi/service/BiWorkService.java | 114 + .../crm9/erp/crm/common/CrmInterceptor.java | 11 +- .../crm/controller/CrmBusinessController.java | 9 - .../crm/controller/CrmContactsController.java | 270 +- .../crm/controller/CrmContractController.java | 8 - .../crm/controller/CrmCustomerController.java | 425 +- .../crm/controller/CrmLeadsController.java | 179 +- .../crm/controller/CrmProductController.java | 203 +- .../controller/CrmReceivablesController.java | 7 - .../CrmReceivablesPlanController.java | 7 - .../crm/controller/InstrumentController.java | 54 +- .../erp/crm/entity/base/BaseCrmBusiness.java | 10 + .../erp/crm/entity/base/BaseCrmContract.java | 10 + .../erp/crm/service/CrmBackLogService.java | 27 +- .../erp/crm/service/CrmBusinessService.java | 69 +- .../erp/crm/service/CrmContactsService.java | 65 +- .../erp/crm/service/CrmContractService.java | 110 +- .../erp/crm/service/CrmCustomerService.java | 81 +- .../crm9/erp/crm/service/CrmLeadsService.java | 93 +- .../erp/crm/service/CrmProductService.java | 54 +- .../crm/service/CrmReceivablesService.java | 49 +- .../erp/crm/service/CrmRecordService.java | 22 + .../erp/crm/service/InstrumentService.java | 53 +- .../erp/oa/controller/OaEventController.java | 8 + .../OaExamineCategoryController.java | 4 + .../oa/controller/OaExamineController.java | 3 +- .../erp/oa/service/OaActionRecordService.java | 2 +- .../erp/oa/service/OaAnnouncementService.java | 10 +- .../crm9/erp/oa/service/OaEventService.java | 12 +- .../crm9/erp/oa/service/OaExamineService.java | 220 +- .../erp/work/controller/TaskController.java | 17 +- .../crm9/erp/work/service/TaskService.java | 119 +- .../com/kakarote/crm9/utils/AuthUtil.java | 43 +- .../com/kakarote/crm9/utils/BaseUtil.java | 24 +- .../com/kakarote/crm9/utils/FieldUtil.java | 20 +- .../com/kakarote/crm9/utils/ParamsUtil.java | 7 +- src/main/resources/config/crm9-config.txt | 12 +- src/main/resources/config/redis.json | 10 + .../resources/template/admin/adminField.sql | 30 +- .../resources/template/admin/adminRole.sql | 32 + .../resources/template/admin/adminUser.sql | 11 +- src/main/resources/template/bi/biWork.sql | 32 + .../resources/template/crm/Instrument.sql | 8 + src/main/resources/template/crm/backLog.sql | 4 +- src/main/resources/template/crm/business.sql | 8 + src/main/resources/template/crm/contact.sql | 8 + src/main/resources/template/crm/customer.sql | 17 +- src/main/resources/template/oa/oaExamine.sql | 21 +- src/main/resources/template/work/task.sql | 66 +- ux/config/prod.env.js | 2 +- ux/package.json | 2 +- ux/src/api/businessIntelligence/oa.js | 65 + ux/src/api/customermanagement/clue.js | 8 + ux/src/api/customermanagement/contacts.js | 8 + ux/src/api/customermanagement/customer.js | 8 + ux/src/api/customermanagement/message.js | 10 +- ux/src/api/customermanagement/product.js | 10 +- ux/src/api/customermanagement/workbench.js | 11 + ux/src/assets/iconfont/iconfont.css | 16 +- ux/src/assets/iconfont/iconfont.eot | Bin 23864 -> 24148 bytes ux/src/assets/iconfont/iconfont.js | 2 +- ux/src/assets/iconfont/iconfont.svg | 3 + ux/src/assets/iconfont/iconfont.ttf | Bin 23704 -> 23988 bytes ux/src/assets/iconfont/iconfont.woff | Bin 15076 -> 15280 bytes ux/src/assets/iconfont/iconfont.woff2 | Bin 12736 -> 12904 bytes .../components/CreateCom/CrmRelativeTable.vue | 18 +- .../CreateCom/XhCustomerAddress.vue | 47 +- ux/src/components/CreateCom/XhProduct.vue | 34 +- ux/src/components/CreateCom/XhProuctCate.vue | 12 +- ux/src/router/modules/business.js | 34 + ux/src/styles/element-ui.scss | 8 + ux/src/utils/request.js | 21 +- .../examine/components/content.vue | 135 +- .../examine/components/examineCreateView.vue | 1 + .../examine/components/examineDetail.vue | 9 +- .../examine/components/examineSection.vue | 160 + ux/src/views/OAManagement/journal/index.vue | 32 +- ux/src/views/OAManagement/notice/edit.vue | 38 +- ux/src/views/OAManagement/notice/index.vue | 32 +- .../views/OAManagement/notice/newDialog.vue | 10 +- .../task/components/newDialog.vue | 9 + .../task/components/particulars.vue | 1 - ux/src/views/OAManagement/task/index.vue | 28 +- ux/src/views/OAManagement/workbench/index.vue | 25 +- .../OAManagement/workbench/tabsJournal.vue | 30 +- .../SystemManagement/RoleAuthorization.vue | 64 +- .../SystemCustomer/HandleField.vue | 59 +- .../SystemCustomer/components/FieldInfo.vue | 26 +- .../components/previewFieldView.vue | 2 +- .../components/filtrateHandleView.vue | 7 +- .../oa/components/examineList.vue | 239 ++ .../views/businessIntelligence/oa/examine.vue | 210 + ux/src/views/businessIntelligence/oa/log.vue | 120 + .../product/ProductCategoryStatistics.vue | 1 + .../businessIntelligence/styles/detail.scss | 5 + .../business/BusinessIndex.vue | 2 + .../customermanagement/clue/ClueIndex.vue | 2 + .../components/CRMCreateView.vue | 2 +- .../components/CRMImport.vue | 45 +- .../components/filterForm/filterContent.vue | 2 + .../components/filterForm/index.vue | 126 +- .../components/followLog/ExamineLog.vue | 26 +- .../components/followLog/JournalLog.vue | 26 +- .../components/followLog/RecordLog.vue | 26 +- .../components/followLog/ScheduleLog.vue | 25 +- .../components/followLog/TaskLog.vue | 26 +- .../contacts/ContactsIndex.vue | 2 + .../contract/ContractIndex.vue | 2 + .../customer/CustomerDetail.vue | 13 +- .../customer/CustomerIndex.vue | 2 + .../message/mixins/message_table.js | 2 +- .../views/customermanagement/mixins/table.js | 31 +- .../customermanagement/money/MoneyIndex.vue | 2 + .../product/ProductIndex.vue | 2 + .../customermanagement/seas/SeasIndex.vue | 2 + .../customermanagement/styles/table.scss | 7 + .../workbench/components/CustomerDash.vue | 67 +- .../workbench/components/reportList/index.vue | 588 +++ .../views/projectManagement/project/index.vue | 2 +- 161 files changed, 12869 insertions(+), 1968 deletions(-) create mode 100644 docs/update20190619.sql create mode 100644 docs/update20190702.sql create mode 100644 docs/update20190715.sql create mode 100644 docs/update20190719.sql create mode 100644 docs/update20190820.sql create mode 100644 src/main/java/com/kakarote/crm9/common/annotation/LoginFormCookie.java create mode 100644 src/main/java/com/kakarote/crm9/common/annotation/RequestBody.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/paragetter/MapParaGetter.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/JedisClusterImpl.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/JedisImpl.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/JedisSentinelImpl.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/Redis.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/RedisManager.java create mode 100644 src/main/java/com/kakarote/crm9/common/config/redis/RedisPlugin.java create mode 100644 src/main/java/com/kakarote/crm9/erp/bi/controller/BiWorkController.java create mode 100644 src/main/java/com/kakarote/crm9/erp/bi/service/BiWorkService.java create mode 100644 src/main/resources/config/redis.json create mode 100644 src/main/resources/template/bi/biWork.sql create mode 100644 ux/src/api/businessIntelligence/oa.js create mode 100644 ux/src/views/OAManagement/examine/components/examineSection.vue create mode 100644 ux/src/views/businessIntelligence/oa/components/examineList.vue create mode 100644 ux/src/views/businessIntelligence/oa/examine.vue create mode 100644 ux/src/views/businessIntelligence/oa/log.vue create mode 100644 ux/src/views/customermanagement/workbench/components/reportList/index.vue diff --git a/.gitignore b/.gitignore index 4103ba0..034c861 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ target src/test/ README.md logs -docs diff --git a/README.md b/README.md index db2596e..d14da6e 100644 --- a/README.md +++ b/README.md @@ -164,10 +164,12 @@ UI框架:Element-UI 2.6.3 ## 安装说明 -配置java运行环境,redis环境,mysql环境, -然后将目录doc下的72crm.sql导入到数据库,修改`resources/config/crm9-config.txt`下的数据库以及redis的配置文件, -undertow启动端口号在`resources/config/undertow.txt`下修改, -默认账号 admin 默认密码 123456 +1、配置java运行环境,redis环境,mysql环境。 +2、将目录doc下的crm9.sql导入到数据库( `初始化安装只需要导入crm9.sql就好了,更新代码导入对应日期的sql文件`)。 +3、修改`resources/config/crm9-config.txt`下的数据库配置文件。 +4、修改`resources/config/redis.json`下的redis连接文件 +5、undertow启动端口号在`resources/config/undertow.txt`下修改。 +默认账号 admin 默认密码 123456 @@ -177,41 +179,42 @@ undertow启动端口号在`resources/config/undertow.txt`下修改, 本项目JDK要求JDK8及以上 -### 一、Tomcat部署 + +### 一、Undertow(默认) ``` - javax.servlet - javax.servlet-api - 4.0.1 - provided + com.jfinal + jfinal-undertow + 1.6 ``` -取消以上代码的注释,将undertow的引用注释掉,打包方式改为war,运行maven package命令,将war包放在`tomcat/webapps`目录下 +取消以上代码的注释,将tomcat的pom依赖javax.servlet.javax.servlet-api注释掉,打包方式改为jar 运行maven package,打包完成后 +将上述打包命令生成的 crm9-release.zip 文件上传到服务器并解压,运行对应的72crm.sh/72crm.bat即可 -### 二、Undertow(默认) +### 二、Tomcat部署 ``` - com.jfinal - jfinal-undertow - 1.6 + javax.servlet + javax.servlet-api + 4.0.1 + provided ``` +取消以上代码的注释,将undertow的pom依赖com.jfinal.jfinal-undertow注释掉,并将com.kakarote.crm9.Application的main方法注释掉,打包方式改为war, +运行maven package命令,将war包放在`tomcat/webapps`目录下 + +项目默认是ROOT.war,若需要携带项目名,需要修改 ux/config/prod.env.js的BASE_API为'"/项目名/"',改动完成后需要重新打包替换到webapp下 -取消以上代码的注释,将tomcat的引用注释掉,打包方式改为jar 运行maven package。将上述打包命令生成的 zip 文件上传到服务器并解压,将目录下的 -` -72crm.sh/72crm.bat -` -放到解压后的目录下,运行即可 -项目webapp下自带打包后的前端代码,如果不需要对前端代码更改,直接访问即可 -如果更改了前端代码,将打包后的dist下static文件夹和index.html替换到webapp下 -ps:可以使用`nginx`代理静态文件,后台只做接口响应,项目本身设计是前后端完全分离的 +项目webapp下自带打包后的前端代码,如果不需要对前端代码更改,直接访问即可 +如果更改了前端代码,需要将打包后的dist下static文件夹和index.html替换到webapp下 +ps:可以使用`nginx`代理静态文件,后台只做接口响应,项目本身设计是前后端完全分离的 diff --git a/docs/crm9.sql b/docs/crm9.sql index b216df5..0e1c102 100644 --- a/docs/crm9.sql +++ b/docs/crm9.sql @@ -12,7 +12,7 @@ CREATE TABLE `72crm_admin_config` ( `value` varchar(255) DEFAULT NULL COMMENT '值', `description` varchar(255) DEFAULT NULL COMMENT '描述', PRIMARY KEY (`setting_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='客户规则'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='客户规则'; -- ---------------------------- -- Records of 72crm_admin_config @@ -36,7 +36,7 @@ CREATE TABLE `72crm_admin_dept` ( `num` int(4) DEFAULT NULL COMMENT '排序 越大越靠后', `remark` varchar(64) DEFAULT '' COMMENT '部门备注', PRIMARY KEY (`dept_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='部门表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='部门表'; -- ---------------------------- -- Records of 72crm_admin_dept @@ -66,8 +66,8 @@ CREATE TABLE `72crm_admin_examine` ( -- ---------------------------- -- Records of 72crm_admin_examine -- ---------------------------- -INSERT INTO `72crm_admin_examine` VALUES (null, '2', '1', '回款审批流程', null, null, '2019-05-11 16:27:35', '3', '2019-05-11 16:27:35', '3', '1', ''); -INSERT INTO `72crm_admin_examine` VALUES (null, '1', '1', '合同审批流程', null, null, '2019-05-11 16:27:11', '3', '2019-05-11 16:27:44', '3', '1', '说明'); +INSERT INTO `72crm_admin_examine` VALUES (null, '2', '2', '回款审批流程', null, null, '2019-05-11 16:27:35', '3', '2019-05-11 16:27:35', '3', '1', ''); +INSERT INTO `72crm_admin_examine` VALUES (null, '1', '2', '合同审批流程', null, null, '2019-05-11 16:27:11', '3', '2019-05-11 16:27:44', '3', '1', '说明'); -- ---------------------------- -- Table structure for 72crm_admin_examine_log @@ -152,109 +152,110 @@ CREATE TABLE `72crm_admin_field` ( `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', `examine_category_id` int(11) DEFAULT NULL COMMENT '审批ID label为10需要', `field_type` int(2) NOT NULL DEFAULT '0' COMMENT '是否是自定义字段 0.自定义 1.固定', + `relevant` int(11) DEFAULT NULL COMMENT '只有线索需要,装换客户的自定义字段ID', PRIMARY KEY (`field_id`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='自定义字段表'; -- ---------------------------- -- Records of 72crm_admin_field -- ---------------------------- -INSERT INTO `72crm_admin_field` VALUES (null, 'leads_name', '线索名称', '1', '1', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '线索来源', '线索来源', '3', '1', null, null, null, '', '0', '0', '1', '促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,电话咨询,邮件咨询', '1', '2019-07-02 09:10:19', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '1', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '1', null, null, '255', '', '0', '0', '3', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '客户行业', '客户行业', '3', '1', null, null, null, '', '0', '0', '4', 'IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒', '1', '2019-07-02 09:10:19', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '客户级别', '客户级别', '3', '1', null, null, null, '', '0', '0', '5', 'A(重点客户),B(普通客户),C(非优先客户)', '1', '2019-07-02 09:10:19', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'address', '地址', '1', '1', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '1', null, null, null, '', '0', '0', '7', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '1', null, null, '255', '', '0', '0', '8', null, '1', '2019-07-02 09:10:19', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_name', '客户名称', '1', '2', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '2', null, null, '255', '', '0', '0', '1', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '2', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'website', '网址', '1', '2', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'deal_status', '成交状态', '3', '2', null, null, null, '', '0', '1', '7', '未成交,已成交', '3', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '2', null, null, null, '', '0', '0', '8', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '2', null, null, '255', '', '0', '0', '9', null, '1', '2019-07-02 09:10:41', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '客户级别', '客户级别', '3', '2', null, null, null, '', '0', '0', '5', 'A(重点客户),B(普通客户),C(非优先客户)', '1', '2019-07-02 09:10:41', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '客户来源', '客户来源', '3', '2', null, null, null, '', '0', '0', '3', '促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,陌拜,电话咨询,邮件咨询', '1', '2019-07-02 09:10:41', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '客户行业', '客户行业', '3', '2', null, null, null, '', '0', '0', '4', 'IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒', '1', '2019-07-02 09:10:41', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'name', '姓名', '1', '3', null, null, '255', '', '0', '1', '0', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '3', null, null, null, '', '0', '0', '1', null, '3', '2019-07-01 17:13:28', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '3', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '3', null, null, '255', '', '0', '0', '3', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'email', '电子邮箱', '14', '3', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'post', '职务', '1', '3', null, null, '255', '', '0', '0', '5', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'address', '地址', '1', '3', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '3', null, null, null, '', '0', '0', '7', null, '1', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '备注', '备注', '1', '3', null, null, '255', '', '0', '0', '8', null, '1', '2019-07-01 17:10:21', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '是否关键决策人', '是否关键决策人', '3', '3', null, null, null, '', '0', '0', '9', '是,否', '3', '2019-07-01 17:10:21', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '性别', '性别', '3', '3', null, null, null, '', '0', '0', '10', '男,女', '3', '2019-07-01 17:10:21', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'name', '产品名称', '1', '4', null, null, '255', '', '0', '0', '0', null, '1', '2019-07-01 17:22:28', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'category_id', '产品类型', '19', '4', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:55:24', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'num', '产品编码', '5', '4', null, null, '255', '', '1', '1', '2', null, '1', '2019-07-01 17:22:28', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'price', '价格', '6', '4', null, null, '255', '', '0', '1', '3', null, '1', '2019-07-01 17:57:01', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'description', '产品描述', '1', '4', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:22:28', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '是否上下架', '是否上下架', '3', '4', null, null, null, '', '0', '1', '5', '上架,下架', '3', '2019-07-01 17:22:28', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '单位', '单位', '3', '4', null, null, null, '', '0', '0', '6', '个,块,只,把,枚,瓶,盒,台,吨,千克,米,箱,套', '1', '2019-07-01 17:22:28', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'business_name', '商机名称', '1', '5', null, null, '255', '', '0', '0', '0', null, '3', '2019-07-01 17:10:31', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '5', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:13:25', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '商机金额', '6', '5', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-01 17:10:31', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'deal_date', '预计成交日期', '13', '5', null, null, null, '', '0', '0', '3', null, '1', '2019-07-01 17:10:31', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '5', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:31', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'num', '合同编号', '5', '6', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'name', '合同名称', '1', '6', null, null, '255', '', '0', '1', '1', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '6', null, null, null, '', '0', '1', '2', null, '3', '2019-07-01 17:22:49', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'business_id', '商机名称', '16', '6', null, null, null, '', '0', '0', '3', null, '3', '2019-07-01 17:22:57', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'order_date', '下单时间', '4', '6', null, null, null, '', '0', '0', '4', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '合同金额', '6', '6', null, null, '255', '', '0', '0', '5', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '合同开始时间', '4', '6', null, null, null, '', '0', '0', '6', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'end_tme', '合同结束时间', '4', '6', null, null, null, '', '0', '0', '7', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'contacts_id', '客户签约人', '17', '6', null, null, null, '', '0', '0', '8', null, '3', '2019-07-01 17:23:11', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'company_user_id', '公司签约人', '10', '6', null, null, null, '', '0', '0', '9', null, '3', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '6', null, null, '255', '', '0', '0', '10', null, '1', '2019-07-01 17:10:34', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'number', '回款编号', '5', '7', null, null, '255', '', '0', '1', '0', null, '1', '2019-07-01 17:10:36', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '7', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:23:15', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'contract_id', '合同编号', '20', '7', null, null, null, '', '0', '1', '2', null, '3', '2019-07-01 17:23:24', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'return_time', '回款日期', '4', '7', null, null, null, '', '0', '0', '3', null, '1', '2019-07-01 17:10:36', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '回款金额', '6', '7', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:36', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'plan_id', '期数', '21', '7', null, null, null, '', '0', '0', '5', null, '3', '2019-07-01 17:23:35', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '7', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-01 17:10:36', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '回款方式', '回款方式', '3', '7', null, null, null, '', '0', '0', '7', '支票,现金,邮政汇款,电汇,网上转账,支付宝,微信支付,其他', '1', '2019-07-01 17:10:36', null, '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批事由', '2', '10', null, null, '0', '', '0', '1', '0', null, '1', '2019-06-27 14:00:42', '7', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, null, '0', '', '0', '1', '1', null, '1', '2019-06-27 14:01:13', '7', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, '单行文本', '单行文本', '1', '10', null, '', '255', '', '0', '0', '2', null, '0', '2019-06-29 17:52:18', '7', '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '人员', '人员', '10', '10', null, '', null, '', '0', '0', '3', null, '0', '2019-06-29 17:52:11', '7', '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '多行文本', '多行文本', '2', '10', null, '', '1000', '', '0', '0', '4', null, '0', '2019-06-29 17:52:09', '7', '0'); -INSERT INTO `72crm_admin_field` VALUES (null, '附件', '附件', '8', '10', null, '', null, '', '0', '0', '5', null, '0', '2019-06-29 17:52:01', '7', '0'); -INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '8', null, null, null, '', '0', '0', '1', null, '3', '2019-06-28 16:52:13', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'contract_id', '合同编号', '20', '8', null, null, '11', '', '0', '0', '2', null, '3', '2019-06-28 16:55:17', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '计划回款金额', '6', '8', null, null, null, '', '0', '0', '3', null, '3', '2019-06-28 16:53:04', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'return_date', '计划回款日期', '4', '8', null, null, null, '', '0', '0', '4', null, '3', '2019-06-28 16:54:01', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remind', '提前几天提醒', '5', '8', null, null, '11', '', '0', '0', '5', null, '3', '2019-06-28 16:55:13', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '8', null, null, '1000', '', '0', '0', '6', null, '3', '2019-06-28 16:55:07', null, '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批内容', '1', '10', null, '', null, '', '0', '1', '0', null, '3', null, '1', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '1', null, '3', null, '1', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'type_id', '请假类型', '3', '10', null, '', null, '年假', '0', '1', '0', '年假,事假,病假,产假,调休,婚假,丧假,其他', '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批内容', '1', '10', null, '', null, '', '0', '1', '1', null, '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '开始时间', '13', '10', null, '', null, '', '0', '1', '2', null, '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'end_time', '结束时间', '13', '10', null, '', null, '', '0', '1', '3', null, '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '时长', '6', '10', null, '', null, '', '0', '1', '4', null, '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '5', null, '3', null, '2', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '出差事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '3', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '1', null, '3', '2019-06-30 18:13:08', '3', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '出差总天数', '6', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '3', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'cause', '行程明细', '22', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '3', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '加班原因', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '4', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '开始时间', '13', '10', null, '', null, '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '4', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'end_time', '结束时间', '13', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '4', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '加班总天数', '6', '10', null, '', null, '', '0', '1', '3', null, '3', '2019-06-30 18:13:08', '4', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '4', null, '3', '2019-06-30 18:13:08', '4', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '差旅事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '5', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '报销总金额', '6', '10', null, '', '0', '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '5', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '5', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'cause', '费用明细', '23', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '5', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'content', '借款事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '6', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'money', '借款金额(元)', '6', '10', null, '', '0', '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '6', '1'); -INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '6', '1'); +INSERT INTO `72crm_admin_field` VALUES (null, 'leads_name', '线索名称', '1', '1', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '线索来源', '线索来源', '3', '1', null, null, null, '', '0', '0', '1', '促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,电话咨询,邮件咨询', '1', '2019-07-02 09:10:19', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '1', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '1', null, null, '255', '', '0', '0', '3', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '客户行业', '客户行业', '3', '1', null, null, null, '', '0', '0', '4', 'IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒', '1', '2019-07-02 09:10:19', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '客户级别', '客户级别', '3', '1', null, null, null, '', '0', '0', '5', 'A(重点客户),B(普通客户),C(非优先客户)', '1', '2019-07-02 09:10:19', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'address', '地址', '1', '1', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '1', null, null, null, '', '0', '0', '7', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '1', null, null, '255', '', '0', '0', '8', null, '1', '2019-07-02 09:10:19', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_name', '客户名称', '1', '2', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '2', null, null, '255', '', '0', '0', '1', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '2', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'website', '网址', '1', '2', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'deal_status', '成交状态', '3', '2', null, null, null, '', '0', '1', '7', '未成交,已成交', '3', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '2', null, null, null, '', '0', '0', '8', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '2', null, null, '255', '', '0', '0', '9', null, '1', '2019-07-02 09:10:41', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '客户级别', '客户级别', '3', '2', null, null, null, '', '0', '0', '5', 'A(重点客户),B(普通客户),C(非优先客户)', '1', '2019-07-02 09:10:41', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '客户来源', '客户来源', '3', '2', null, null, null, '', '0', '0', '3', '促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,陌拜,电话咨询,邮件咨询', '1', '2019-07-02 09:10:41', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '客户行业', '客户行业', '3', '2', null, null, null, '', '0', '0', '4', 'IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒', '1', '2019-07-02 09:10:41', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'name', '姓名', '1', '3', null, null, '255', '', '0', '1', '0', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '3', null, null, null, '', '0', '0', '1', null, '3', '2019-07-01 17:13:28', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'mobile', '手机', '7', '3', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'telephone', '电话', '1', '3', null, null, '255', '', '0', '0', '3', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'email', '电子邮箱', '14', '3', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'post', '职务', '1', '3', null, null, '255', '', '0', '0', '5', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'address', '地址', '1', '3', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'next_time', '下次联系时间', '13', '3', null, null, null, '', '0', '0', '7', null, '1', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '备注', '备注', '1', '3', null, null, '255', '', '0', '0', '8', null, '1', '2019-07-01 17:10:21', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '是否关键决策人', '是否关键决策人', '3', '3', null, null, null, '', '0', '0', '9', '是,否', '3', '2019-07-01 17:10:21', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '性别', '性别', '3', '3', null, null, null, '', '0', '0', '10', '男,女', '3', '2019-07-01 17:10:21', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'name', '产品名称', '1', '4', null, null, '255', '', '0', '0', '0', null, '1', '2019-07-01 17:22:28', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'category_id', '产品类型', '19', '4', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:55:24', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'num', '产品编码', '5', '4', null, null, '255', '', '1', '1', '2', null, '1', '2019-07-01 17:22:28', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'price', '价格', '6', '4', null, null, '255', '', '0', '1', '3', null, '1', '2019-07-01 17:57:01', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'description', '产品描述', '1', '4', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:22:28', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '是否上下架', '是否上下架', '3', '4', null, null, null, '', '0', '1', '5', '上架,下架', '3', '2019-07-01 17:22:28', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '单位', '单位', '3', '4', null, null, null, '', '0', '0', '6', '个,块,只,把,枚,瓶,盒,台,吨,千克,米,箱,套', '1', '2019-07-01 17:22:28', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'business_name', '商机名称', '1', '5', null, null, '255', '', '0', '0', '0', null, '3', '2019-07-01 17:10:31', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '5', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:13:25', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '商机金额', '6', '5', null, null, '255', '', '0', '0', '2', null, '1', '2019-07-01 17:10:31', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'deal_date', '预计成交日期', '13', '5', null, null, null, '', '0', '0', '3', null, '1', '2019-07-01 17:10:31', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '5', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:31', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'num', '合同编号', '5', '6', null, null, '255', '', '1', '1', '0', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'name', '合同名称', '1', '6', null, null, '255', '', '0', '1', '1', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '6', null, null, null, '', '0', '1', '2', null, '3', '2019-07-01 17:22:49', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'business_id', '商机名称', '16', '6', null, null, null, '', '0', '0', '3', null, '3', '2019-07-01 17:22:57', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'order_date', '下单时间', '4', '6', null, null, null, '', '0', '0', '4', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '合同金额', '6', '6', null, null, '255', '', '0', '0', '5', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '合同开始时间', '4', '6', null, null, null, '', '0', '0', '6', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'end_tme', '合同结束时间', '4', '6', null, null, null, '', '0', '0', '7', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'contacts_id', '客户签约人', '17', '6', null, null, null, '', '0', '0', '8', null, '3', '2019-07-01 17:23:11', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'company_user_id', '公司签约人', '10', '6', null, null, null, '', '0', '0', '9', null, '3', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '6', null, null, '255', '', '0', '0', '10', null, '1', '2019-07-01 17:10:34', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'number', '回款编号', '5', '7', null, null, '255', '', '0', '1', '0', null, '1', '2019-07-01 17:10:36', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '7', null, null, null, '', '0', '1', '1', null, '3', '2019-07-01 17:23:15', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'contract_id', '合同编号', '20', '7', null, null, null, '', '0', '1', '2', null, '3', '2019-07-01 17:23:24', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'return_time', '回款日期', '4', '7', null, null, null, '', '0', '0', '3', null, '1', '2019-07-01 17:10:36', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '回款金额', '6', '7', null, null, '255', '', '0', '0', '4', null, '1', '2019-07-01 17:10:36', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'plan_id', '期数', '21', '7', null, null, null, '', '0', '0', '5', null, '3', '2019-07-01 17:23:35', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '1', '7', null, null, '255', '', '0', '0', '6', null, '1', '2019-07-01 17:10:36', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '回款方式', '回款方式', '3', '7', null, null, null, '', '0', '0', '7', '支票,现金,邮政汇款,电汇,网上转账,支付宝,微信支付,其他', '1', '2019-07-01 17:10:36', null, '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批事由', '2', '10', null, null, '0', '', '0', '1', '0', null, '1', '2019-06-27 14:00:42', '7', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, null, '0', '', '0', '1', '1', null, '1', '2019-06-27 14:01:13', '7', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, '单行文本', '单行文本', '1', '10', null, '', '255', '', '0', '0', '2', null, '0', '2019-06-29 17:52:18', '7', '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '人员', '人员', '10', '10', null, '', null, '', '0', '0', '3', null, '0', '2019-06-29 17:52:11', '7', '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '多行文本', '多行文本', '2', '10', null, '', '1000', '', '0', '0', '4', null, '0', '2019-06-29 17:52:09', '7', '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, '附件', '附件', '8', '10', null, '', null, '', '0', '0', '5', null, '0', '2019-06-29 17:52:01', '7', '0',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'customer_id', '客户名称', '15', '8', null, null, null, '', '0', '0', '1', null, '3', '2019-06-28 16:52:13', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'contract_id', '合同编号', '20', '8', null, null, '11', '', '0', '0', '2', null, '3', '2019-06-28 16:55:17', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '计划回款金额', '6', '8', null, null, null, '', '0', '0', '3', null, '3', '2019-06-28 16:53:04', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'return_date', '计划回款日期', '4', '8', null, null, null, '', '0', '0', '4', null, '3', '2019-06-28 16:54:01', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remind', '提前几天提醒', '5', '8', null, null, '11', '', '0', '0', '5', null, '3', '2019-06-28 16:55:13', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '8', null, null, '1000', '', '0', '0', '6', null, '3', '2019-06-28 16:55:07', null, '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批内容', '1', '10', null, '', null, '', '0', '1', '0', null, '3', null, '1', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '1', null, '3', null, '1', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'type_id', '请假类型', '3', '10', null, '', null, '年假', '0', '1', '0', '年假,事假,病假,产假,调休,婚假,丧假,其他', '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '审批内容', '1', '10', null, '', null, '', '0', '1', '1', null, '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '开始时间', '13', '10', null, '', null, '', '0', '1', '2', null, '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'end_time', '结束时间', '13', '10', null, '', null, '', '0', '1', '3', null, '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '时长', '6', '10', null, '', null, '', '0', '1', '4', null, '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '5', null, '3', null, '2', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '出差事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '3', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '1', null, '3', '2019-06-30 18:13:08', '3', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '出差总天数', '6', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '3', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'cause', '行程明细', '22', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '3', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '加班原因', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '4', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'start_time', '开始时间', '13', '10', null, '', null, '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '4', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'end_time', '结束时间', '13', '10', null, '', null, '', '0', '1', '2', null, '3', '2019-06-30 18:13:08', '4', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'duration', '加班总天数', '6', '10', null, '', null, '', '0', '1', '3', null, '3', '2019-06-30 18:13:08', '4', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '4', null, '3', '2019-06-30 18:13:08', '4', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '差旅事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '5', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '报销总金额', '6', '10', null, '', '0', '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '5', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '5', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'cause', '费用明细', '23', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '5', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'content', '借款事由', '1', '10', null, '', null, '', '0', '1', '0', null, '3', '2019-06-30 18:13:08', '6', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'money', '借款金额(元)', '6', '10', null, '', '0', '', '0', '1', '1', null, '3', '2019-06-30 18:13:08', '6', '1',null); +INSERT INTO `72crm_admin_field` VALUES (null, 'remark', '备注', '2', '10', null, '', '1000', '', '0', '0', '2', null, '3', '2019-06-30 18:13:08', '6', '1',null); -- ---------------------------- -- Table structure for 72crm_admin_fieldv @@ -307,7 +308,7 @@ CREATE TABLE `72crm_admin_field_style` ( `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='字段样式表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='字段样式表'; -- ---------------------------- -- Records of 72crm_admin_field_style @@ -328,7 +329,7 @@ CREATE TABLE `72crm_admin_file` ( `file_type` varchar(10) DEFAULT 'file' COMMENT '文件类型', `batch_id` varchar(50) DEFAULT NULL COMMENT '批次id', PRIMARY KEY (`file_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='附件表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='附件表'; -- ---------------------------- -- Records of 72crm_admin_file @@ -348,7 +349,7 @@ CREATE TABLE `72crm_admin_menu` ( `status` int(4) DEFAULT '1' COMMENT '状态 1 启用 0 禁用', `remarks` varchar(255) DEFAULT NULL COMMENT '菜单说明', PRIMARY KEY (`menu_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='后台菜单表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='后台菜单表'; -- ---------------------------- -- Records of 72crm_admin_menu @@ -457,11 +458,6 @@ INSERT INTO `72crm_admin_menu` VALUES ('128', '127', '查看列表', 'index', '3 INSERT INTO `72crm_admin_menu` VALUES ('129', '127', '分配', 'distribute', '3', '1', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('130', '127', '领取', 'receive', '3', '1', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('131', '127', '导出', 'excelexport', '3', '1', '1', null); -INSERT INTO `72crm_admin_menu` VALUES ('132', '1', '公海管理', 'pool', '1', '4', '1', null); -INSERT INTO `72crm_admin_menu` VALUES ('133', '132', '查看列表', 'index', '3', '1', '1', null); -INSERT INTO `72crm_admin_menu` VALUES ('134', '132', '分配', 'distribute', '3', '1', '1', null); -INSERT INTO `72crm_admin_menu` VALUES ('135', '132', '领取', 'receive', '3', '1', '1', null); -INSERT INTO `72crm_admin_menu` VALUES ('136', '132', '导出', 'excelexport', '3', '1', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('137', '0', '项目管理', 'work', '0', '0', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('138', '137', '任务', 'task', '1', '0', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('139', '138', '创建', 'save', '3', '0', '1', null); @@ -471,6 +467,8 @@ INSERT INTO `72crm_admin_menu` VALUES ('142', '140', '编辑任务列表', 'upda INSERT INTO `72crm_admin_menu` VALUES ('143', '140', '删除任务列表', 'delete', '3', '0', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('144', '137', '项目', 'work', '1', '0', '1', null); INSERT INTO `72crm_admin_menu` VALUES ('145', '144', '项目设置', 'update', '3', '0', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('146', '2', '办公分析', 'oa', '1', '10', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('147', '146', '查看', 'read', '3', '1', '1', null); -- ---------------------------- -- Table structure for 72crm_admin_record @@ -491,7 +489,7 @@ CREATE TABLE `72crm_admin_record` ( `batch_id` varchar(32) DEFAULT NULL COMMENT '批次 比如附件批次', PRIMARY KEY (`record_id`), UNIQUE KEY `record_id` (`record_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='跟进记录'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='跟进记录'; -- ---------------------------- -- Records of 72crm_admin_record @@ -511,7 +509,7 @@ CREATE TABLE `72crm_admin_role` ( `is_hidden` int(1) NOT NULL DEFAULT '1' COMMENT '0 隐藏 1 不隐藏', `label` int(2) DEFAULT NULL COMMENT '1 系统项目管理员角色 2 项目管理角色 3 项目编辑角色 4 项目只读角色', PRIMARY KEY (`role_id`) -) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COMMENT='角色表'; +) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; -- ---------------------------- -- Records of 72crm_admin_role @@ -541,7 +539,7 @@ CREATE TABLE `72crm_admin_role_menu` ( `role_id` int(11) NOT NULL COMMENT '角色ID', `menu_id` int(11) NOT NULL COMMENT '菜单ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色菜单对应关系表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色菜单对应关系表'; INSERT INTO `72crm_admin_role_menu` VALUES (null, '14', '139'); INSERT INTO `72crm_admin_role_menu` VALUES (null, '14', '141'); @@ -569,7 +567,7 @@ CREATE TABLE `72crm_admin_scene` ( `create_time` datetime NOT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`scene_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='场景'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='场景'; -- ---------------------------- -- Records of 72crm_admin_scene @@ -586,7 +584,7 @@ CREATE TABLE `72crm_admin_scene_default` ( `scene_id` int(11) NOT NULL COMMENT '场景ID', PRIMARY KEY (`default_id`), UNIQUE KEY `default_id` (`default_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='场景默认关系表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='场景默认关系表'; -- ---------------------------- -- Records of 72crm_admin_scene_default @@ -615,7 +613,7 @@ CREATE TABLE `72crm_admin_user` ( `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间', `last_login_ip` varchar(30) DEFAULT NULL COMMENT '最后登录IP 注意兼容IPV6', PRIMARY KEY (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='用户表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; -- ---------------------------- -- Records of 72crm_admin_user @@ -631,7 +629,7 @@ CREATE TABLE `72crm_admin_user_role` ( `user_id` bigint(11) NOT NULL COMMENT '用户ID', `role_id` int(11) NOT NULL COMMENT '角色ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='用户角色对应关系表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户角色对应关系表'; -- ---------------------------- -- Records of 72crm_admin_user_role @@ -662,7 +660,7 @@ CREATE TABLE `72crm_crm_achievement` ( `status` int(2) DEFAULT NULL COMMENT '1销售(目标)2回款(目标)', `yeartarget` decimal(18,2) DEFAULT '0.00' COMMENT '年目标', PRIMARY KEY (`achievement_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业绩目标'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='业绩目标'; -- ---------------------------- -- Records of 72crm_crm_achievement @@ -680,7 +678,7 @@ CREATE TABLE `72crm_crm_action_record` ( `action_id` int(11) NOT NULL COMMENT '被操作对象ID', `content` text NOT NULL COMMENT '内容', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='字段操作记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='字段操作记录表'; -- ---------------------------- -- Records of 72crm_crm_action_record @@ -4236,6 +4234,7 @@ CREATE TABLE `72crm_crm_business` ( `business_name` varchar(50) NOT NULL COMMENT '商机名称', `money` decimal(18,2) DEFAULT NULL COMMENT '商机金额', `discount_rate` decimal(10,2) DEFAULT NULL COMMENT '整单折扣', + `total_price` decimal(10,2) DEFAULT NULL COMMENT '产品总金额', `remark` varchar(500) DEFAULT '' COMMENT '备注', `create_user_id` int(10) NOT NULL COMMENT '创建人ID', `owner_user_id` int(10) DEFAULT NULL COMMENT '负责人ID', @@ -4247,7 +4246,7 @@ CREATE TABLE `72crm_crm_business` ( `is_end` int(4) NOT NULL DEFAULT '0' COMMENT '1赢单2输单3无效', `status_remark` varchar(500) DEFAULT '', PRIMARY KEY (`business_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='商机表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='商机表'; -- ---------------------------- -- Records of 72crm_crm_business @@ -4264,7 +4263,7 @@ CREATE TABLE `72crm_crm_business_change` ( `create_time` datetime NOT NULL COMMENT '创建时间', `create_user_id` int(10) NOT NULL COMMENT '创建人', PRIMARY KEY (`change_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商机阶段变化表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商机阶段变化表'; -- ---------------------------- -- Records of 72crm_crm_business_change @@ -4285,7 +4284,7 @@ CREATE TABLE `72crm_crm_business_product` ( `subtotal` decimal(18,2) NOT NULL COMMENT '小计(折扣后价格)', `unit` varchar(50) DEFAULT '' COMMENT '单位', PRIMARY KEY (`r_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='商机产品关系表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='商机产品关系表'; -- ---------------------------- -- Records of 72crm_crm_business_product @@ -4302,7 +4301,7 @@ CREATE TABLE `72crm_crm_business_status` ( `rate` varchar(20) DEFAULT NULL COMMENT '赢单率', `order_num` int(4) DEFAULT NULL COMMENT '排序', PRIMARY KEY (`status_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='商机状态'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='商机状态'; -- ---------------------------- -- Records of 72crm_crm_business_status @@ -4324,7 +4323,7 @@ CREATE TABLE `72crm_crm_business_type` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `status` int(1) NOT NULL DEFAULT '1' COMMENT '1启用0禁用', PRIMARY KEY (`type_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='商机状态组类别'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='商机状态组类别'; -- ---------------------------- -- Records of 72crm_crm_business_type @@ -4352,7 +4351,7 @@ CREATE TABLE `72crm_crm_contacts` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `batch_id` varchar(32) NOT NULL COMMENT '批次', PRIMARY KEY (`contacts_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='联系人表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='联系人表'; -- ---------------------------- -- Records of 72crm_crm_contacts @@ -4367,7 +4366,7 @@ CREATE TABLE `72crm_crm_contacts_business` ( `business_id` int(11) NOT NULL, `contacts_id` int(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商机联系人关联表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商机联系人关联表'; -- ---------------------------- -- Records of 72crm_crm_contacts_business @@ -4394,6 +4393,7 @@ CREATE TABLE `72crm_crm_contract` ( `end_time` datetime DEFAULT NULL COMMENT '结束时间', `money` decimal(18,2) DEFAULT NULL COMMENT '合同金额', `discount_rate` decimal(10,2) DEFAULT NULL COMMENT '整单折扣', + `total_price` decimal(10,2) DEFAULT NULL COMMENT '产品总金额', `types` varchar(255) DEFAULT NULL COMMENT '合同类型', `payment_type` varchar(255) DEFAULT NULL COMMENT '付款方式', `batch_id` varchar(32) NOT NULL COMMENT '批次 比如附件批次', @@ -4403,7 +4403,7 @@ CREATE TABLE `72crm_crm_contract` ( `remark` varchar(255) DEFAULT NULL COMMENT '备注', `company_user_id` int(11) DEFAULT NULL COMMENT '公司签约人', PRIMARY KEY (`contract_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='合同表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='合同表'; -- ---------------------------- -- Records of 72crm_crm_contract @@ -4424,7 +4424,7 @@ CREATE TABLE `72crm_crm_contract_product` ( `subtotal` decimal(18,2) NOT NULL COMMENT '小计(折扣后价格)', `unit` varchar(50) DEFAULT '' COMMENT '单位', PRIMARY KEY (`r_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='合同产品关系表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='合同产品关系表'; -- ---------------------------- -- Records of 72crm_crm_contract_product @@ -4458,7 +4458,7 @@ CREATE TABLE `72crm_crm_customer` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `batch_id` varchar(32) NOT NULL COMMENT '批次 比如附件批次', PRIMARY KEY (`customer_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='客户表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='客户表'; -- ---------------------------- -- Records of 72crm_crm_customer @@ -4474,7 +4474,7 @@ CREATE TABLE `72crm_crm_customer_stats` ( `customer_num` int(10) NOT NULL DEFAULT '0' COMMENT '客户总数', `create_time` datetime NOT NULL COMMENT '统计时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='每日客户统计'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='每日客户统计'; -- ---------------------------- -- Records of 72crm_crm_customer_stats @@ -4501,7 +4501,7 @@ CREATE TABLE `72crm_crm_leads` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `batch_id` varchar(32) NOT NULL COMMENT '批次 比如附件批次', PRIMARY KEY (`leads_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='线索表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='线索表'; -- ---------------------------- -- Records of 72crm_crm_leads @@ -4519,7 +4519,7 @@ CREATE TABLE `72crm_crm_owner_record` ( `post_owner_user_id` int(20) DEFAULT NULL COMMENT '接手负责人', `create_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`record_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='负责人变更记录表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='负责人变更记录表'; -- ---------------------------- -- Records of 72crm_crm_owner_record @@ -4544,7 +4544,7 @@ CREATE TABLE `72crm_crm_product` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `batch_id` varchar(32) NOT NULL COMMENT '批次', PRIMARY KEY (`product_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='产品表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='产品表'; -- ---------------------------- -- Records of 72crm_crm_product @@ -4559,7 +4559,7 @@ CREATE TABLE `72crm_crm_product_category` ( `name` varchar(200) DEFAULT '', `pid` int(11) DEFAULT '0', PRIMARY KEY (`category_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='产品分类表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='产品分类表'; -- ---------------------------- -- Records of 72crm_crm_product_category @@ -4589,7 +4589,7 @@ CREATE TABLE `72crm_crm_receivables` ( `remarks` varchar(255) DEFAULT NULL COMMENT '备注', `batch_id` varchar(32) NOT NULL COMMENT '批次', PRIMARY KEY (`receivables_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='回款表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='回款表'; -- ---------------------------- -- Records of 72crm_crm_receivables @@ -4618,7 +4618,7 @@ CREATE TABLE `72crm_crm_receivables_plan` ( `contract_id` int(11) NOT NULL COMMENT '合同ID', `customer_id` int(11) NOT NULL COMMENT '客户ID', PRIMARY KEY (`plan_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='回款计划表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='回款计划表'; -- ---------------------------- -- Records of 72crm_crm_receivables_plan @@ -4638,7 +4638,7 @@ CREATE TABLE `72crm_oa_action_record` ( `dept_ids` varchar(100) DEFAULT NULL COMMENT '抄送部门IDs', `content` varchar(500) NOT NULL COMMENT '操作内容', PRIMARY KEY (`log_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='oa操作记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='oa操作记录表'; -- ---------------------------- -- Records of 72crm_oa_action_record @@ -4661,7 +4661,7 @@ CREATE TABLE `72crm_oa_announcement` ( `owner_user_ids` varchar(100) DEFAULT NULL COMMENT '通知人', `read_user_ids` varchar(255) DEFAULT NULL COMMENT '已读用户', PRIMARY KEY (`announcement_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公告表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公告表'; -- ---------------------------- -- Records of 72crm_oa_announcement @@ -4684,10 +4684,10 @@ CREATE TABLE `72crm_oa_event` ( `owner_user_ids` varchar(100) DEFAULT NULL COMMENT '参与人', `address` varchar(100) DEFAULT NULL COMMENT '地点', `remark` varchar(100) DEFAULT NULL COMMENT '备注', - `color` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '颜色', + `color` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '颜色', `remind_type` int(11) DEFAULT NULL COMMENT '提醒时间0准时提醒 1:5分钟前 2:15分钟前 3:30分钟前 4:一个小时前 5:两个小时前 6:一天前 7:两天前 8:一周前', PRIMARY KEY (`event_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='日程表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='日程表'; -- ---------------------------- -- Records of 72crm_oa_event @@ -4700,12 +4700,12 @@ DROP TABLE IF EXISTS `72crm_oa_event_notice`; CREATE TABLE `72crm_oa_event_notice` ( `id` int(11) NOT NULL AUTO_INCREMENT, `event_id` int(11) NOT NULL COMMENT '日程ID', - `noticetype` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '1天 2周 3月 4年 0不提醒', - `repeat` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `noticetype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '1天 2周 3月 4年 0不提醒', + `repeat` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `start_time` int(11) NOT NULL COMMENT '开始时间', `stop_time` int(11) NOT NULL COMMENT '介绍时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日程提醒设置表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日程提醒设置表'; -- ---------------------------- -- Records of 72crm_oa_event_notice @@ -4725,7 +4725,7 @@ CREATE TABLE `72crm_oa_event_relation` ( `status` int(2) DEFAULT '0' COMMENT '状态1可用', `create_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`eventrelation_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='日程关联业务表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='日程关联业务表'; -- ---------------------------- -- Records of 72crm_oa_event_relation @@ -4750,7 +4750,7 @@ CREATE TABLE `72crm_oa_examine` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', `batch_id` varchar(32) DEFAULT NULL COMMENT '附件批次id', PRIMARY KEY (`examine_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='审批表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='审批表'; -- ---------------------------- -- Records of 72crm_oa_examine @@ -4777,7 +4777,7 @@ CREATE TABLE `72crm_oa_examine_category` ( `delete_time` datetime DEFAULT NULL COMMENT '删除时间', `delete_user_id` int(11) DEFAULT NULL COMMENT '删除人ID', PRIMARY KEY (`category_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='审批类型表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='审批类型表'; -- ---------------------------- -- Records of 72crm_oa_examine_category @@ -4845,7 +4845,7 @@ CREATE TABLE `72crm_oa_examine_relation` ( `status` int(2) DEFAULT '1' COMMENT '状态1可用', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`r_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='审批关联业务表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='审批关联业务表'; -- ---------------------------- -- Records of 72crm_oa_examine_relation @@ -4891,7 +4891,7 @@ CREATE TABLE `72crm_oa_examine_travel` ( `description` varchar(500) DEFAULT NULL COMMENT '备注', `batch_id` varchar(32) DEFAULT NULL COMMENT '批次id', PRIMARY KEY (`travel_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='差旅行程表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='差旅行程表'; -- ---------------------------- -- Records of 72crm_oa_examine_travel @@ -4917,7 +4917,7 @@ CREATE TABLE `72crm_oa_log` ( `read_user_ids` varchar(255) DEFAULT NULL COMMENT '已读人', `batch_id` varchar(50) DEFAULT NULL COMMENT '文件批次ID', PRIMARY KEY (`log_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='工作日志表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='工作日志表'; -- ---------------------------- -- Records of 72crm_oa_log @@ -4937,7 +4937,7 @@ CREATE TABLE `72crm_oa_log_relation` ( `status` int(2) DEFAULT NULL COMMENT '状态1可用', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`r_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='日志关联业务表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='日志关联业务表'; -- ---------------------------- -- Records of 72crm_oa_log_relation @@ -4974,7 +4974,7 @@ CREATE TABLE `72crm_task` ( `batch_id` varchar(50) DEFAULT NULL COMMENT '批次', `is_archive` int(2) DEFAULT '0' COMMENT '1归档', PRIMARY KEY (`task_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='任务表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='任务表'; -- ---------------------------- -- Records of 72crm_task @@ -4996,7 +4996,7 @@ CREATE TABLE `72crm_task_comment` ( `favour` int(7) DEFAULT '0' COMMENT '赞', `type` int(2) DEFAULT '0' COMMENT '评论分类 1:任务评论 2:日志评论', PRIMARY KEY (`comment_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='任务评论表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='任务评论表'; -- ---------------------------- -- Records of 72crm_task_comment @@ -5016,7 +5016,7 @@ CREATE TABLE `72crm_task_relation` ( `status` int(2) DEFAULT NULL COMMENT '状态1可用', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`r_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='任务关联业务表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='任务关联业务表'; -- ---------------------------- -- Records of 72crm_task_relation @@ -5032,15 +5032,15 @@ CREATE TABLE `72crm_work` ( `status` int(2) DEFAULT '1' COMMENT '状态 1启用 3归档 2 删除', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', - `description` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '描述', - `color` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '颜色', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '描述', + `color` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '颜色', `is_open` int(2) DEFAULT '1' COMMENT '是否所有人可见 1 是 0 否', `owner_user_id` varchar(50) DEFAULT NULL COMMENT '项目成员', `archive_time` datetime DEFAULT NULL COMMENT '归档时间', `delete_time` datetime DEFAULT NULL COMMENT '删除时间', `batch_id` varchar(32) DEFAULT NULL, PRIMARY KEY (`work_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目表'; -- ---------------------------- -- Records of 72crm_work @@ -5059,7 +5059,7 @@ CREATE TABLE `72crm_work_task_class` ( `work_id` int(11) DEFAULT NULL COMMENT '项目ID', `order_num` int(4) DEFAULT NULL COMMENT '排序', PRIMARY KEY (`class_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务分类表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务分类表'; -- ---------------------------- -- Records of 72crm_work_task_class @@ -5075,9 +5075,9 @@ CREATE TABLE `72crm_work_task_label` ( `create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_user_id` int(11) DEFAULT NULL COMMENT '创建人ID', `status` int(2) DEFAULT '0' COMMENT '状态', - `color` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '颜色', + `color` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '颜色', PRIMARY KEY (`label_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务标签表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务标签表'; -- ---------------------------- -- Records of 72crm_work_task_label @@ -5096,7 +5096,7 @@ CREATE TABLE `72crm_work_task_log` ( `task_id` int(11) DEFAULT '0' COMMENT '任务ID', `work_id` int(11) DEFAULT '0' COMMENT '项目ID', PRIMARY KEY (`log_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='任务日志表'; +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='任务日志表'; -- ---------------------------- -- Records of 72crm_work_task_log @@ -5114,4 +5114,4 @@ CREATE TABLE `72crm_work_user` ( `user_id` int(11) NOT NULL COMMENT '成员ID', `role_id` int(11) NOT NULL COMMENT '角色ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='项目成员表'; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='项目成员表'; \ No newline at end of file diff --git a/docs/update20190619.sql b/docs/update20190619.sql new file mode 100644 index 0000000..7cc8c53 --- /dev/null +++ b/docs/update20190619.sql @@ -0,0 +1,3574 @@ +SET FOREIGN_KEY_CHECKS=0; + +ALTER TABLE `72crm_crm_customer` +ADD COLUMN `followup` int(11) NULL DEFAULT 0 COMMENT '跟进状态 0未跟进1已跟进' AFTER `customer_name`; +ALTER TABLE `72crm_crm_customer` +ADD COLUMN `mobile` varchar(255) NULL COMMENT '手机' AFTER `deal_status`; + + +-- ---------------------------- +-- Table structure for 72crm_admin_config +-- ---------------------------- +DROP TABLE IF EXISTS `72crm_admin_config`; +CREATE TABLE `72crm_admin_config` ( + `setting_id` int(9) NOT NULL AUTO_INCREMENT, + `status` int(1) NOT NULL DEFAULT '0' COMMENT '状态,0:不启用 1 : 启用', + `name` varchar(255) NOT NULL COMMENT '设置名称', + `value` varchar(255) DEFAULT NULL COMMENT '值', + `description` varchar(255) DEFAULT NULL COMMENT '描述', + PRIMARY KEY (`setting_id`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='客户规则'; + +-- ---------------------------- +-- Records of 72crm_admin_config +-- ---------------------------- +INSERT INTO `72crm_admin_config` VALUES ('3', '1', 'customerPoolSetting', '', '客户公海规则设置'); +INSERT INTO `72crm_admin_config` VALUES ('4', '1', 'expiringContractDays', '3', '合同到期提醒'); +INSERT INTO `72crm_admin_config` VALUES ('5', '0', 'customerPoolSettingDealDays', '3', '客户公海规则设置未成交天数'); +INSERT INTO `72crm_admin_config` VALUES ('6', '0', 'customerPoolSettingFollowupDays', '31', '客户公海规则设置未跟进天数'); + + +ALTER TABLE `72crm_crm_leads` +ADD COLUMN `followup` int(11) NULL DEFAULT 0 COMMENT '跟进状态 0未跟进1已跟进' AFTER `leads_id`; + +ALTER TABLE `72crm_oa_announcement` +ADD COLUMN `read_user_ids` varchar(255) NULL COMMENT '已读用户' AFTER `owner_user_ids`; + +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for 72crm_crm_area +-- ---------------------------- +DROP TABLE IF EXISTS `72crm_crm_area`; +CREATE TABLE `72crm_crm_area` ( + `code_id` int(11) NOT NULL AUTO_INCREMENT, + `parent_id` int(11) DEFAULT NULL, + `city_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`code_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地名表'; + +-- ---------------------------- +-- Records of 72crm_crm_area +-- ---------------------------- +INSERT INTO `72crm_crm_area` VALUES ('11', '0', '北京'); +INSERT INTO `72crm_crm_area` VALUES ('1101', '11', '北京市辖'); +INSERT INTO `72crm_crm_area` VALUES ('110101', '1101', '东城区'); +INSERT INTO `72crm_crm_area` VALUES ('110102', '1101', '西城区'); +INSERT INTO `72crm_crm_area` VALUES ('110103', '1101', '崇文区'); +INSERT INTO `72crm_crm_area` VALUES ('110104', '1101', '宣武区'); +INSERT INTO `72crm_crm_area` VALUES ('110105', '1101', '朝阳区'); +INSERT INTO `72crm_crm_area` VALUES ('110106', '1101', '丰台区'); +INSERT INTO `72crm_crm_area` VALUES ('110107', '1101', '石景山区'); +INSERT INTO `72crm_crm_area` VALUES ('110108', '1101', '海淀区'); +INSERT INTO `72crm_crm_area` VALUES ('110109', '1101', '门头沟区'); +INSERT INTO `72crm_crm_area` VALUES ('110111', '1101', '房山区'); +INSERT INTO `72crm_crm_area` VALUES ('110112', '1101', '通州区'); +INSERT INTO `72crm_crm_area` VALUES ('110113', '1101', '顺义区'); +INSERT INTO `72crm_crm_area` VALUES ('110114', '1101', '昌平区'); +INSERT INTO `72crm_crm_area` VALUES ('1102', '11', '北京县辖'); +INSERT INTO `72crm_crm_area` VALUES ('110224', '1102', '大兴县'); +INSERT INTO `72crm_crm_area` VALUES ('110226', '1102', '平谷县'); +INSERT INTO `72crm_crm_area` VALUES ('110227', '1102', '怀柔县'); +INSERT INTO `72crm_crm_area` VALUES ('110228', '1102', '密云县'); +INSERT INTO `72crm_crm_area` VALUES ('110229', '1102', '延庆县'); +INSERT INTO `72crm_crm_area` VALUES ('12', '0', '天津'); +INSERT INTO `72crm_crm_area` VALUES ('1201', '12', '天津市辖'); +INSERT INTO `72crm_crm_area` VALUES ('120101', '1201', '和平区'); +INSERT INTO `72crm_crm_area` VALUES ('120102', '1201', '河东区'); +INSERT INTO `72crm_crm_area` VALUES ('120103', '1201', '河西区'); +INSERT INTO `72crm_crm_area` VALUES ('120104', '1201', '南开区'); +INSERT INTO `72crm_crm_area` VALUES ('120105', '1201', '河北区'); +INSERT INTO `72crm_crm_area` VALUES ('120106', '1201', '红桥区'); +INSERT INTO `72crm_crm_area` VALUES ('120107', '1201', '塘沽区'); +INSERT INTO `72crm_crm_area` VALUES ('120108', '1201', '汉沽区'); +INSERT INTO `72crm_crm_area` VALUES ('120109', '1201', '大港区'); +INSERT INTO `72crm_crm_area` VALUES ('120110', '1201', '东丽区'); +INSERT INTO `72crm_crm_area` VALUES ('120111', '1201', '西青区'); +INSERT INTO `72crm_crm_area` VALUES ('120112', '1201', '津南区'); +INSERT INTO `72crm_crm_area` VALUES ('120113', '1201', '北辰区'); +INSERT INTO `72crm_crm_area` VALUES ('120114', '1201', '武清区'); +INSERT INTO `72crm_crm_area` VALUES ('1202', '12', '天津县辖'); +INSERT INTO `72crm_crm_area` VALUES ('120221', '1202', '宁河县'); +INSERT INTO `72crm_crm_area` VALUES ('120223', '1202', '静海县'); +INSERT INTO `72crm_crm_area` VALUES ('120224', '1202', '宝坻县'); +INSERT INTO `72crm_crm_area` VALUES ('120225', '1202', '蓟  县'); +INSERT INTO `72crm_crm_area` VALUES ('13', '0', '河北'); +INSERT INTO `72crm_crm_area` VALUES ('1301', '13', '石家庄'); +INSERT INTO `72crm_crm_area` VALUES ('130101', '1301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130102', '1301', '长安区'); +INSERT INTO `72crm_crm_area` VALUES ('130103', '1301', '桥东区'); +INSERT INTO `72crm_crm_area` VALUES ('130104', '1301', '桥西区'); +INSERT INTO `72crm_crm_area` VALUES ('130105', '1301', '新华区'); +INSERT INTO `72crm_crm_area` VALUES ('130106', '1301', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('130107', '1301', '井陉矿区'); +INSERT INTO `72crm_crm_area` VALUES ('130121', '1301', '井陉县'); +INSERT INTO `72crm_crm_area` VALUES ('130123', '1301', '正定县'); +INSERT INTO `72crm_crm_area` VALUES ('130124', '1301', '栾城县'); +INSERT INTO `72crm_crm_area` VALUES ('130125', '1301', '行唐县'); +INSERT INTO `72crm_crm_area` VALUES ('130126', '1301', '灵寿县'); +INSERT INTO `72crm_crm_area` VALUES ('130127', '1301', '高邑县'); +INSERT INTO `72crm_crm_area` VALUES ('130128', '1301', '深泽县'); +INSERT INTO `72crm_crm_area` VALUES ('130129', '1301', '赞皇县'); +INSERT INTO `72crm_crm_area` VALUES ('130130', '1301', '无极县'); +INSERT INTO `72crm_crm_area` VALUES ('130131', '1301', '平山县'); +INSERT INTO `72crm_crm_area` VALUES ('130132', '1301', '元氏县'); +INSERT INTO `72crm_crm_area` VALUES ('130133', '1301', '赵  县'); +INSERT INTO `72crm_crm_area` VALUES ('130181', '1301', '辛集市'); +INSERT INTO `72crm_crm_area` VALUES ('130182', '1301', '藁城市'); +INSERT INTO `72crm_crm_area` VALUES ('130183', '1301', '晋州市'); +INSERT INTO `72crm_crm_area` VALUES ('130184', '1301', '新乐市'); +INSERT INTO `72crm_crm_area` VALUES ('130185', '1301', '鹿泉市'); +INSERT INTO `72crm_crm_area` VALUES ('1302', '13', '唐山'); +INSERT INTO `72crm_crm_area` VALUES ('130201', '1302', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130202', '1302', '路南区'); +INSERT INTO `72crm_crm_area` VALUES ('130203', '1302', '路北区'); +INSERT INTO `72crm_crm_area` VALUES ('130204', '1302', '古冶区'); +INSERT INTO `72crm_crm_area` VALUES ('130205', '1302', '开平区'); +INSERT INTO `72crm_crm_area` VALUES ('130206', '1302', '新  区'); +INSERT INTO `72crm_crm_area` VALUES ('130221', '1302', '丰润县'); +INSERT INTO `72crm_crm_area` VALUES ('130223', '1302', '滦  县'); +INSERT INTO `72crm_crm_area` VALUES ('130224', '1302', '滦南县'); +INSERT INTO `72crm_crm_area` VALUES ('130225', '1302', '乐亭县'); +INSERT INTO `72crm_crm_area` VALUES ('130227', '1302', '迁西县'); +INSERT INTO `72crm_crm_area` VALUES ('130229', '1302', '玉田县'); +INSERT INTO `72crm_crm_area` VALUES ('130230', '1302', '唐海县'); +INSERT INTO `72crm_crm_area` VALUES ('130281', '1302', '遵化市'); +INSERT INTO `72crm_crm_area` VALUES ('130282', '1302', '丰南市'); +INSERT INTO `72crm_crm_area` VALUES ('130283', '1302', '迁安市'); +INSERT INTO `72crm_crm_area` VALUES ('1303', '13', '秦皇岛'); +INSERT INTO `72crm_crm_area` VALUES ('130301', '1303', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130302', '1303', '海港区'); +INSERT INTO `72crm_crm_area` VALUES ('130303', '1303', '山海关区'); +INSERT INTO `72crm_crm_area` VALUES ('130304', '1303', '北戴河区'); +INSERT INTO `72crm_crm_area` VALUES ('130321', '1303', '青龙满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('130322', '1303', '昌黎县'); +INSERT INTO `72crm_crm_area` VALUES ('130323', '1303', '抚宁县'); +INSERT INTO `72crm_crm_area` VALUES ('130324', '1303', '卢龙县'); +INSERT INTO `72crm_crm_area` VALUES ('1304', '13', '邯郸'); +INSERT INTO `72crm_crm_area` VALUES ('130401', '1304', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130402', '1304', '邯山区'); +INSERT INTO `72crm_crm_area` VALUES ('130403', '1304', '丛台区'); +INSERT INTO `72crm_crm_area` VALUES ('130404', '1304', '复兴区'); +INSERT INTO `72crm_crm_area` VALUES ('130406', '1304', '峰峰矿区'); +INSERT INTO `72crm_crm_area` VALUES ('130421', '1304', '邯郸县'); +INSERT INTO `72crm_crm_area` VALUES ('130423', '1304', '临漳县'); +INSERT INTO `72crm_crm_area` VALUES ('130424', '1304', '成安县'); +INSERT INTO `72crm_crm_area` VALUES ('130425', '1304', '大名县'); +INSERT INTO `72crm_crm_area` VALUES ('130426', '1304', '涉  县'); +INSERT INTO `72crm_crm_area` VALUES ('130427', '1304', '磁  县'); +INSERT INTO `72crm_crm_area` VALUES ('130428', '1304', '肥乡县'); +INSERT INTO `72crm_crm_area` VALUES ('130429', '1304', '永年县'); +INSERT INTO `72crm_crm_area` VALUES ('130430', '1304', '邱  县'); +INSERT INTO `72crm_crm_area` VALUES ('130431', '1304', '鸡泽县'); +INSERT INTO `72crm_crm_area` VALUES ('130432', '1304', '广平县'); +INSERT INTO `72crm_crm_area` VALUES ('130433', '1304', '馆陶县'); +INSERT INTO `72crm_crm_area` VALUES ('130434', '1304', '魏  县'); +INSERT INTO `72crm_crm_area` VALUES ('130435', '1304', '曲周县'); +INSERT INTO `72crm_crm_area` VALUES ('130481', '1304', '武安市'); +INSERT INTO `72crm_crm_area` VALUES ('1305', '13', '邢台'); +INSERT INTO `72crm_crm_area` VALUES ('130501', '1305', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130502', '1305', '桥东区'); +INSERT INTO `72crm_crm_area` VALUES ('130503', '1305', '桥西区'); +INSERT INTO `72crm_crm_area` VALUES ('130521', '1305', '邢台县'); +INSERT INTO `72crm_crm_area` VALUES ('130522', '1305', '临城县'); +INSERT INTO `72crm_crm_area` VALUES ('130523', '1305', '内丘县'); +INSERT INTO `72crm_crm_area` VALUES ('130524', '1305', '柏乡县'); +INSERT INTO `72crm_crm_area` VALUES ('130525', '1305', '隆尧县'); +INSERT INTO `72crm_crm_area` VALUES ('130526', '1305', '任  县'); +INSERT INTO `72crm_crm_area` VALUES ('130527', '1305', '南和县'); +INSERT INTO `72crm_crm_area` VALUES ('130528', '1305', '宁晋县'); +INSERT INTO `72crm_crm_area` VALUES ('130529', '1305', '巨鹿县'); +INSERT INTO `72crm_crm_area` VALUES ('130530', '1305', '新河县'); +INSERT INTO `72crm_crm_area` VALUES ('130531', '1305', '广宗县'); +INSERT INTO `72crm_crm_area` VALUES ('130532', '1305', '平乡县'); +INSERT INTO `72crm_crm_area` VALUES ('130533', '1305', '威  县'); +INSERT INTO `72crm_crm_area` VALUES ('130534', '1305', '清河县'); +INSERT INTO `72crm_crm_area` VALUES ('130535', '1305', '临西县'); +INSERT INTO `72crm_crm_area` VALUES ('130581', '1305', '南宫市'); +INSERT INTO `72crm_crm_area` VALUES ('130582', '1305', '沙河市'); +INSERT INTO `72crm_crm_area` VALUES ('1306', '13', '保定'); +INSERT INTO `72crm_crm_area` VALUES ('130601', '1306', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130602', '1306', '新市区'); +INSERT INTO `72crm_crm_area` VALUES ('130603', '1306', '北市区'); +INSERT INTO `72crm_crm_area` VALUES ('130604', '1306', '南市区'); +INSERT INTO `72crm_crm_area` VALUES ('130621', '1306', '满城县'); +INSERT INTO `72crm_crm_area` VALUES ('130622', '1306', '清苑县'); +INSERT INTO `72crm_crm_area` VALUES ('130623', '1306', '涞水县'); +INSERT INTO `72crm_crm_area` VALUES ('130624', '1306', '阜平县'); +INSERT INTO `72crm_crm_area` VALUES ('130625', '1306', '徐水县'); +INSERT INTO `72crm_crm_area` VALUES ('130626', '1306', '定兴县'); +INSERT INTO `72crm_crm_area` VALUES ('130627', '1306', '唐  县'); +INSERT INTO `72crm_crm_area` VALUES ('130628', '1306', '高阳县'); +INSERT INTO `72crm_crm_area` VALUES ('130629', '1306', '容城县'); +INSERT INTO `72crm_crm_area` VALUES ('130630', '1306', '涞源县'); +INSERT INTO `72crm_crm_area` VALUES ('130631', '1306', '望都县'); +INSERT INTO `72crm_crm_area` VALUES ('130632', '1306', '安新县'); +INSERT INTO `72crm_crm_area` VALUES ('130633', '1306', '易  县'); +INSERT INTO `72crm_crm_area` VALUES ('130634', '1306', '曲阳县'); +INSERT INTO `72crm_crm_area` VALUES ('130635', '1306', '蠡  县'); +INSERT INTO `72crm_crm_area` VALUES ('130636', '1306', '顺平县'); +INSERT INTO `72crm_crm_area` VALUES ('130637', '1306', '博野县'); +INSERT INTO `72crm_crm_area` VALUES ('130638', '1306', '雄  县'); +INSERT INTO `72crm_crm_area` VALUES ('130681', '1306', '涿州市'); +INSERT INTO `72crm_crm_area` VALUES ('130682', '1306', '定州市'); +INSERT INTO `72crm_crm_area` VALUES ('130683', '1306', '安国市'); +INSERT INTO `72crm_crm_area` VALUES ('130684', '1306', '高碑店市'); +INSERT INTO `72crm_crm_area` VALUES ('1307', '13', '张家口'); +INSERT INTO `72crm_crm_area` VALUES ('130701', '1307', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130702', '1307', '桥东区'); +INSERT INTO `72crm_crm_area` VALUES ('130703', '1307', '桥西区'); +INSERT INTO `72crm_crm_area` VALUES ('130705', '1307', '宣化区'); +INSERT INTO `72crm_crm_area` VALUES ('130706', '1307', '下花园区'); +INSERT INTO `72crm_crm_area` VALUES ('130721', '1307', '宣化县'); +INSERT INTO `72crm_crm_area` VALUES ('130722', '1307', '张北县'); +INSERT INTO `72crm_crm_area` VALUES ('130723', '1307', '康保县'); +INSERT INTO `72crm_crm_area` VALUES ('130724', '1307', '沽源县'); +INSERT INTO `72crm_crm_area` VALUES ('130725', '1307', '尚义县'); +INSERT INTO `72crm_crm_area` VALUES ('130726', '1307', '蔚  县'); +INSERT INTO `72crm_crm_area` VALUES ('130727', '1307', '阳原县'); +INSERT INTO `72crm_crm_area` VALUES ('130728', '1307', '怀安县'); +INSERT INTO `72crm_crm_area` VALUES ('130729', '1307', '万全县'); +INSERT INTO `72crm_crm_area` VALUES ('130730', '1307', '怀来县'); +INSERT INTO `72crm_crm_area` VALUES ('130731', '1307', '涿鹿县'); +INSERT INTO `72crm_crm_area` VALUES ('130732', '1307', '赤城县'); +INSERT INTO `72crm_crm_area` VALUES ('130733', '1307', '崇礼县'); +INSERT INTO `72crm_crm_area` VALUES ('1308', '13', '承德'); +INSERT INTO `72crm_crm_area` VALUES ('130801', '1308', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130802', '1308', '双桥区'); +INSERT INTO `72crm_crm_area` VALUES ('130803', '1308', '双滦区'); +INSERT INTO `72crm_crm_area` VALUES ('130804', '1308', '鹰手营子矿区'); +INSERT INTO `72crm_crm_area` VALUES ('130821', '1308', '承德县'); +INSERT INTO `72crm_crm_area` VALUES ('130822', '1308', '兴隆县'); +INSERT INTO `72crm_crm_area` VALUES ('130823', '1308', '平泉县'); +INSERT INTO `72crm_crm_area` VALUES ('130824', '1308', '滦平县'); +INSERT INTO `72crm_crm_area` VALUES ('130825', '1308', '隆化县'); +INSERT INTO `72crm_crm_area` VALUES ('130826', '1308', '丰宁满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('130827', '1308', '宽城满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('130828', '1308', '围场满族蒙古族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('1309', '13', '沧州'); +INSERT INTO `72crm_crm_area` VALUES ('130901', '1309', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('130902', '1309', '新华区'); +INSERT INTO `72crm_crm_area` VALUES ('130903', '1309', '运河区'); +INSERT INTO `72crm_crm_area` VALUES ('130921', '1309', '沧  县'); +INSERT INTO `72crm_crm_area` VALUES ('130922', '1309', '青  县'); +INSERT INTO `72crm_crm_area` VALUES ('130923', '1309', '东光县'); +INSERT INTO `72crm_crm_area` VALUES ('130924', '1309', '海兴县'); +INSERT INTO `72crm_crm_area` VALUES ('130925', '1309', '盐山县'); +INSERT INTO `72crm_crm_area` VALUES ('130926', '1309', '肃宁县'); +INSERT INTO `72crm_crm_area` VALUES ('130927', '1309', '南皮县'); +INSERT INTO `72crm_crm_area` VALUES ('130928', '1309', '吴桥县'); +INSERT INTO `72crm_crm_area` VALUES ('130929', '1309', '献  县'); +INSERT INTO `72crm_crm_area` VALUES ('130930', '1309', '孟村回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('130981', '1309', '泊头市'); +INSERT INTO `72crm_crm_area` VALUES ('130982', '1309', '任丘市'); +INSERT INTO `72crm_crm_area` VALUES ('130983', '1309', '黄骅市'); +INSERT INTO `72crm_crm_area` VALUES ('130984', '1309', '河间市'); +INSERT INTO `72crm_crm_area` VALUES ('1310', '13', '廊坊'); +INSERT INTO `72crm_crm_area` VALUES ('131001', '1310', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('131002', '1310', '安次区'); +INSERT INTO `72crm_crm_area` VALUES ('131003', '1310', '廊坊市广阳区'); +INSERT INTO `72crm_crm_area` VALUES ('131022', '1310', '固安县'); +INSERT INTO `72crm_crm_area` VALUES ('131023', '1310', '永清县'); +INSERT INTO `72crm_crm_area` VALUES ('131024', '1310', '香河县'); +INSERT INTO `72crm_crm_area` VALUES ('131025', '1310', '大城县'); +INSERT INTO `72crm_crm_area` VALUES ('131026', '1310', '文安县'); +INSERT INTO `72crm_crm_area` VALUES ('131028', '1310', '大厂回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('131081', '1310', '霸州市'); +INSERT INTO `72crm_crm_area` VALUES ('131082', '1310', '三河市'); +INSERT INTO `72crm_crm_area` VALUES ('1311', '13', '衡水'); +INSERT INTO `72crm_crm_area` VALUES ('131101', '1311', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('131102', '1311', '桃城区'); +INSERT INTO `72crm_crm_area` VALUES ('131121', '1311', '枣强县'); +INSERT INTO `72crm_crm_area` VALUES ('131122', '1311', '武邑县'); +INSERT INTO `72crm_crm_area` VALUES ('131123', '1311', '武强县'); +INSERT INTO `72crm_crm_area` VALUES ('131124', '1311', '饶阳县'); +INSERT INTO `72crm_crm_area` VALUES ('131125', '1311', '安平县'); +INSERT INTO `72crm_crm_area` VALUES ('131126', '1311', '故城县'); +INSERT INTO `72crm_crm_area` VALUES ('131127', '1311', '景  县'); +INSERT INTO `72crm_crm_area` VALUES ('131128', '1311', '阜城县'); +INSERT INTO `72crm_crm_area` VALUES ('131181', '1311', '冀州市'); +INSERT INTO `72crm_crm_area` VALUES ('131182', '1311', '深州市'); +INSERT INTO `72crm_crm_area` VALUES ('14', '0', '山西'); +INSERT INTO `72crm_crm_area` VALUES ('1401', '14', '太原'); +INSERT INTO `72crm_crm_area` VALUES ('140101', '1401', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140105', '1401', '小店区'); +INSERT INTO `72crm_crm_area` VALUES ('140106', '1401', '迎泽区'); +INSERT INTO `72crm_crm_area` VALUES ('140107', '1401', '杏花岭区'); +INSERT INTO `72crm_crm_area` VALUES ('140108', '1401', '尖草坪区'); +INSERT INTO `72crm_crm_area` VALUES ('140109', '1401', '万柏林区'); +INSERT INTO `72crm_crm_area` VALUES ('140110', '1401', '晋源区'); +INSERT INTO `72crm_crm_area` VALUES ('140121', '1401', '清徐县'); +INSERT INTO `72crm_crm_area` VALUES ('140122', '1401', '阳曲县'); +INSERT INTO `72crm_crm_area` VALUES ('140123', '1401', '娄烦县'); +INSERT INTO `72crm_crm_area` VALUES ('140181', '1401', '古交市'); +INSERT INTO `72crm_crm_area` VALUES ('1402', '14', '大同'); +INSERT INTO `72crm_crm_area` VALUES ('140201', '1402', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140202', '1402', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('140203', '1402', '矿  区'); +INSERT INTO `72crm_crm_area` VALUES ('140211', '1402', '南郊区'); +INSERT INTO `72crm_crm_area` VALUES ('140212', '1402', '新荣区'); +INSERT INTO `72crm_crm_area` VALUES ('140221', '1402', '阳高县'); +INSERT INTO `72crm_crm_area` VALUES ('140222', '1402', '天镇县'); +INSERT INTO `72crm_crm_area` VALUES ('140223', '1402', '广灵县'); +INSERT INTO `72crm_crm_area` VALUES ('140224', '1402', '灵丘县'); +INSERT INTO `72crm_crm_area` VALUES ('140225', '1402', '浑源县'); +INSERT INTO `72crm_crm_area` VALUES ('140226', '1402', '左云县'); +INSERT INTO `72crm_crm_area` VALUES ('140227', '1402', '大同县'); +INSERT INTO `72crm_crm_area` VALUES ('1403', '14', '阳泉'); +INSERT INTO `72crm_crm_area` VALUES ('140301', '1403', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140302', '1403', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('140303', '1403', '矿  区'); +INSERT INTO `72crm_crm_area` VALUES ('140311', '1403', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('140321', '1403', '平定县'); +INSERT INTO `72crm_crm_area` VALUES ('140322', '1403', '盂  县'); +INSERT INTO `72crm_crm_area` VALUES ('1404', '14', '长治'); +INSERT INTO `72crm_crm_area` VALUES ('140401', '1404', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140402', '1404', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('140411', '1404', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('140421', '1404', '长治县'); +INSERT INTO `72crm_crm_area` VALUES ('140423', '1404', '襄垣县'); +INSERT INTO `72crm_crm_area` VALUES ('140424', '1404', '屯留县'); +INSERT INTO `72crm_crm_area` VALUES ('140425', '1404', '平顺县'); +INSERT INTO `72crm_crm_area` VALUES ('140426', '1404', '黎城县'); +INSERT INTO `72crm_crm_area` VALUES ('140427', '1404', '壶关县'); +INSERT INTO `72crm_crm_area` VALUES ('140428', '1404', '长子县'); +INSERT INTO `72crm_crm_area` VALUES ('140429', '1404', '武乡县'); +INSERT INTO `72crm_crm_area` VALUES ('140430', '1404', '沁  县'); +INSERT INTO `72crm_crm_area` VALUES ('140431', '1404', '沁源县'); +INSERT INTO `72crm_crm_area` VALUES ('140481', '1404', '潞城市'); +INSERT INTO `72crm_crm_area` VALUES ('1405', '14', '晋城'); +INSERT INTO `72crm_crm_area` VALUES ('140501', '1405', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140502', '1405', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('140521', '1405', '沁水县'); +INSERT INTO `72crm_crm_area` VALUES ('140522', '1405', '阳城县'); +INSERT INTO `72crm_crm_area` VALUES ('140524', '1405', '陵川县'); +INSERT INTO `72crm_crm_area` VALUES ('140525', '1405', '泽州县'); +INSERT INTO `72crm_crm_area` VALUES ('140581', '1405', '高平市'); +INSERT INTO `72crm_crm_area` VALUES ('1406', '14', '朔州'); +INSERT INTO `72crm_crm_area` VALUES ('140601', '1406', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140602', '1406', '朔城区'); +INSERT INTO `72crm_crm_area` VALUES ('140603', '1406', '平鲁区'); +INSERT INTO `72crm_crm_area` VALUES ('140621', '1406', '山阴县'); +INSERT INTO `72crm_crm_area` VALUES ('140622', '1406', '应  县'); +INSERT INTO `72crm_crm_area` VALUES ('140623', '1406', '右玉县'); +INSERT INTO `72crm_crm_area` VALUES ('140624', '1406', '怀仁县'); +INSERT INTO `72crm_crm_area` VALUES ('1407', '14', '晋中'); +INSERT INTO `72crm_crm_area` VALUES ('140701', '1407', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140702', '1407', '榆次区'); +INSERT INTO `72crm_crm_area` VALUES ('140721', '1407', '榆社县'); +INSERT INTO `72crm_crm_area` VALUES ('140722', '1407', '左权县'); +INSERT INTO `72crm_crm_area` VALUES ('140723', '1407', '和顺县'); +INSERT INTO `72crm_crm_area` VALUES ('140724', '1407', '昔阳县'); +INSERT INTO `72crm_crm_area` VALUES ('140725', '1407', '寿阳县'); +INSERT INTO `72crm_crm_area` VALUES ('140726', '1407', '太谷县'); +INSERT INTO `72crm_crm_area` VALUES ('140727', '1407', '祁  县'); +INSERT INTO `72crm_crm_area` VALUES ('140728', '1407', '平遥县'); +INSERT INTO `72crm_crm_area` VALUES ('140729', '1407', '灵石县'); +INSERT INTO `72crm_crm_area` VALUES ('140781', '1407', '介休市'); +INSERT INTO `72crm_crm_area` VALUES ('1408', '14', '运城'); +INSERT INTO `72crm_crm_area` VALUES ('140801', '1408', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140802', '1408', '盐湖区'); +INSERT INTO `72crm_crm_area` VALUES ('140821', '1408', '临猗县'); +INSERT INTO `72crm_crm_area` VALUES ('140822', '1408', '万荣县'); +INSERT INTO `72crm_crm_area` VALUES ('140823', '1408', '闻喜县'); +INSERT INTO `72crm_crm_area` VALUES ('140824', '1408', '稷山县'); +INSERT INTO `72crm_crm_area` VALUES ('140825', '1408', '新绛县'); +INSERT INTO `72crm_crm_area` VALUES ('140826', '1408', '绛  县'); +INSERT INTO `72crm_crm_area` VALUES ('140827', '1408', '垣曲县'); +INSERT INTO `72crm_crm_area` VALUES ('140828', '1408', '夏  县'); +INSERT INTO `72crm_crm_area` VALUES ('140829', '1408', '平陆县'); +INSERT INTO `72crm_crm_area` VALUES ('140830', '1408', '芮城县'); +INSERT INTO `72crm_crm_area` VALUES ('140881', '1408', '永济市'); +INSERT INTO `72crm_crm_area` VALUES ('140882', '1408', '河津市'); +INSERT INTO `72crm_crm_area` VALUES ('1409', '14', '忻州'); +INSERT INTO `72crm_crm_area` VALUES ('140901', '1409', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('140902', '1409', '忻府区'); +INSERT INTO `72crm_crm_area` VALUES ('140921', '1409', '定襄县'); +INSERT INTO `72crm_crm_area` VALUES ('140922', '1409', '五台县'); +INSERT INTO `72crm_crm_area` VALUES ('140923', '1409', '代  县'); +INSERT INTO `72crm_crm_area` VALUES ('140924', '1409', '繁峙县'); +INSERT INTO `72crm_crm_area` VALUES ('140925', '1409', '宁武县'); +INSERT INTO `72crm_crm_area` VALUES ('140926', '1409', '静乐县'); +INSERT INTO `72crm_crm_area` VALUES ('140927', '1409', '神池县'); +INSERT INTO `72crm_crm_area` VALUES ('140928', '1409', '五寨县'); +INSERT INTO `72crm_crm_area` VALUES ('140929', '1409', '岢岚县'); +INSERT INTO `72crm_crm_area` VALUES ('140930', '1409', '河曲县'); +INSERT INTO `72crm_crm_area` VALUES ('140931', '1409', '保德县'); +INSERT INTO `72crm_crm_area` VALUES ('140932', '1409', '偏关县'); +INSERT INTO `72crm_crm_area` VALUES ('140981', '1409', '原平市'); +INSERT INTO `72crm_crm_area` VALUES ('1410', '14', '临汾'); +INSERT INTO `72crm_crm_area` VALUES ('141001', '1410', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('141002', '1410', '尧都区'); +INSERT INTO `72crm_crm_area` VALUES ('141021', '1410', '曲沃县'); +INSERT INTO `72crm_crm_area` VALUES ('141022', '1410', '翼城县'); +INSERT INTO `72crm_crm_area` VALUES ('141023', '1410', '襄汾县'); +INSERT INTO `72crm_crm_area` VALUES ('141024', '1410', '洪洞县'); +INSERT INTO `72crm_crm_area` VALUES ('141025', '1410', '古  县'); +INSERT INTO `72crm_crm_area` VALUES ('141026', '1410', '安泽县'); +INSERT INTO `72crm_crm_area` VALUES ('141027', '1410', '浮山县'); +INSERT INTO `72crm_crm_area` VALUES ('141028', '1410', '吉  县'); +INSERT INTO `72crm_crm_area` VALUES ('141029', '1410', '乡宁县'); +INSERT INTO `72crm_crm_area` VALUES ('141030', '1410', '大宁县'); +INSERT INTO `72crm_crm_area` VALUES ('141031', '1410', '隰  县'); +INSERT INTO `72crm_crm_area` VALUES ('141032', '1410', '永和县'); +INSERT INTO `72crm_crm_area` VALUES ('141033', '1410', '蒲  县'); +INSERT INTO `72crm_crm_area` VALUES ('141034', '1410', '汾西县'); +INSERT INTO `72crm_crm_area` VALUES ('141081', '1410', '侯马市'); +INSERT INTO `72crm_crm_area` VALUES ('141082', '1410', '霍州市'); +INSERT INTO `72crm_crm_area` VALUES ('1423', '14', '吕梁地区'); +INSERT INTO `72crm_crm_area` VALUES ('142301', '1423', '孝义市'); +INSERT INTO `72crm_crm_area` VALUES ('142302', '1423', '离石市'); +INSERT INTO `72crm_crm_area` VALUES ('142303', '1423', '汾阳市'); +INSERT INTO `72crm_crm_area` VALUES ('142322', '1423', '文水县'); +INSERT INTO `72crm_crm_area` VALUES ('142323', '1423', '交城县'); +INSERT INTO `72crm_crm_area` VALUES ('142325', '1423', '兴  县'); +INSERT INTO `72crm_crm_area` VALUES ('142326', '1423', '临  县'); +INSERT INTO `72crm_crm_area` VALUES ('142327', '1423', '柳林县'); +INSERT INTO `72crm_crm_area` VALUES ('142328', '1423', '石楼县'); +INSERT INTO `72crm_crm_area` VALUES ('142329', '1423', '岚  县'); +INSERT INTO `72crm_crm_area` VALUES ('142330', '1423', '方山县'); +INSERT INTO `72crm_crm_area` VALUES ('142332', '1423', '中阳县'); +INSERT INTO `72crm_crm_area` VALUES ('142333', '1423', '交口县'); +INSERT INTO `72crm_crm_area` VALUES ('15', '0', '内蒙古'); +INSERT INTO `72crm_crm_area` VALUES ('1501', '15', '呼和浩特'); +INSERT INTO `72crm_crm_area` VALUES ('150101', '1501', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('150102', '1501', '新城区'); +INSERT INTO `72crm_crm_area` VALUES ('150103', '1501', '回民区'); +INSERT INTO `72crm_crm_area` VALUES ('150104', '1501', '玉泉区'); +INSERT INTO `72crm_crm_area` VALUES ('150105', '1501', '赛罕区'); +INSERT INTO `72crm_crm_area` VALUES ('150121', '1501', '土默特左旗'); +INSERT INTO `72crm_crm_area` VALUES ('150122', '1501', '托克托县'); +INSERT INTO `72crm_crm_area` VALUES ('150123', '1501', '和林格尔县'); +INSERT INTO `72crm_crm_area` VALUES ('150124', '1501', '清水河县'); +INSERT INTO `72crm_crm_area` VALUES ('150125', '1501', '武川县'); +INSERT INTO `72crm_crm_area` VALUES ('1502', '15', '包头'); +INSERT INTO `72crm_crm_area` VALUES ('150201', '1502', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('150202', '1502', '东河区'); +INSERT INTO `72crm_crm_area` VALUES ('150203', '1502', '昆都伦区'); +INSERT INTO `72crm_crm_area` VALUES ('150204', '1502', '青山区'); +INSERT INTO `72crm_crm_area` VALUES ('150205', '1502', '石拐区'); +INSERT INTO `72crm_crm_area` VALUES ('150206', '1502', '白云矿区'); +INSERT INTO `72crm_crm_area` VALUES ('150207', '1502', '九原区'); +INSERT INTO `72crm_crm_area` VALUES ('150221', '1502', '土默特右旗'); +INSERT INTO `72crm_crm_area` VALUES ('150222', '1502', '固阳县'); +INSERT INTO `72crm_crm_area` VALUES ('150223', '1502', '达尔罕茂明安联合旗'); +INSERT INTO `72crm_crm_area` VALUES ('1503', '15', '乌海'); +INSERT INTO `72crm_crm_area` VALUES ('150301', '1503', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('150302', '1503', '海勃湾区'); +INSERT INTO `72crm_crm_area` VALUES ('150303', '1503', '海南区'); +INSERT INTO `72crm_crm_area` VALUES ('150304', '1503', '乌达区'); +INSERT INTO `72crm_crm_area` VALUES ('1504', '15', '赤峰'); +INSERT INTO `72crm_crm_area` VALUES ('150401', '1504', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('150402', '1504', '红山区'); +INSERT INTO `72crm_crm_area` VALUES ('150403', '1504', '元宝山区'); +INSERT INTO `72crm_crm_area` VALUES ('150404', '1504', '松山区'); +INSERT INTO `72crm_crm_area` VALUES ('150421', '1504', '阿鲁科尔沁旗'); +INSERT INTO `72crm_crm_area` VALUES ('150422', '1504', '巴林左旗'); +INSERT INTO `72crm_crm_area` VALUES ('150423', '1504', '巴林右旗'); +INSERT INTO `72crm_crm_area` VALUES ('150424', '1504', '林西县'); +INSERT INTO `72crm_crm_area` VALUES ('150425', '1504', '克什克腾旗'); +INSERT INTO `72crm_crm_area` VALUES ('150426', '1504', '翁牛特旗'); +INSERT INTO `72crm_crm_area` VALUES ('150428', '1504', '喀喇沁旗'); +INSERT INTO `72crm_crm_area` VALUES ('150429', '1504', '宁城县'); +INSERT INTO `72crm_crm_area` VALUES ('150430', '1504', '敖汉旗'); +INSERT INTO `72crm_crm_area` VALUES ('1505', '15', '通辽'); +INSERT INTO `72crm_crm_area` VALUES ('150501', '1505', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('150502', '1505', '科尔沁区'); +INSERT INTO `72crm_crm_area` VALUES ('150521', '1505', '科尔沁左翼中旗'); +INSERT INTO `72crm_crm_area` VALUES ('150522', '1505', '科尔沁左翼后旗'); +INSERT INTO `72crm_crm_area` VALUES ('150523', '1505', '开鲁县'); +INSERT INTO `72crm_crm_area` VALUES ('150524', '1505', '库伦旗'); +INSERT INTO `72crm_crm_area` VALUES ('150525', '1505', '奈曼旗'); +INSERT INTO `72crm_crm_area` VALUES ('150526', '1505', '扎鲁特旗'); +INSERT INTO `72crm_crm_area` VALUES ('150581', '1505', '霍林郭勒市'); +INSERT INTO `72crm_crm_area` VALUES ('1521', '15', '呼伦贝尔盟'); +INSERT INTO `72crm_crm_area` VALUES ('152101', '1521', '海拉尔市'); +INSERT INTO `72crm_crm_area` VALUES ('152102', '1521', '满洲里市'); +INSERT INTO `72crm_crm_area` VALUES ('152103', '1521', '扎兰屯市'); +INSERT INTO `72crm_crm_area` VALUES ('152104', '1521', '牙克石市'); +INSERT INTO `72crm_crm_area` VALUES ('152105', '1521', '根河市'); +INSERT INTO `72crm_crm_area` VALUES ('152106', '1521', '额尔古纳市'); +INSERT INTO `72crm_crm_area` VALUES ('152122', '1521', '阿荣旗'); +INSERT INTO `72crm_crm_area` VALUES ('152123', '1521', '莫力达瓦达斡尔族自治'); +INSERT INTO `72crm_crm_area` VALUES ('152127', '1521', '鄂伦春自治旗'); +INSERT INTO `72crm_crm_area` VALUES ('152128', '1521', '鄂温克族自治旗'); +INSERT INTO `72crm_crm_area` VALUES ('152129', '1521', '新巴尔虎右旗'); +INSERT INTO `72crm_crm_area` VALUES ('152130', '1521', '新巴尔虎左旗'); +INSERT INTO `72crm_crm_area` VALUES ('152131', '1521', '陈巴尔虎旗'); +INSERT INTO `72crm_crm_area` VALUES ('1522', '15', '兴安盟'); +INSERT INTO `72crm_crm_area` VALUES ('152201', '1522', '乌兰浩特市'); +INSERT INTO `72crm_crm_area` VALUES ('152202', '1522', '阿尔山市'); +INSERT INTO `72crm_crm_area` VALUES ('152221', '1522', '科尔沁右翼前旗'); +INSERT INTO `72crm_crm_area` VALUES ('152222', '1522', '科尔沁右翼中旗'); +INSERT INTO `72crm_crm_area` VALUES ('152223', '1522', '扎赉特旗'); +INSERT INTO `72crm_crm_area` VALUES ('152224', '1522', '突泉县'); +INSERT INTO `72crm_crm_area` VALUES ('1525', '15', '锡林郭勒盟'); +INSERT INTO `72crm_crm_area` VALUES ('152501', '1525', '二连浩特市'); +INSERT INTO `72crm_crm_area` VALUES ('152502', '1525', '锡林浩特市'); +INSERT INTO `72crm_crm_area` VALUES ('152522', '1525', '阿巴嘎旗'); +INSERT INTO `72crm_crm_area` VALUES ('152523', '1525', '苏尼特左旗'); +INSERT INTO `72crm_crm_area` VALUES ('152524', '1525', '苏尼特右旗'); +INSERT INTO `72crm_crm_area` VALUES ('152525', '1525', '东乌珠穆沁旗'); +INSERT INTO `72crm_crm_area` VALUES ('152526', '1525', '西乌珠穆沁旗'); +INSERT INTO `72crm_crm_area` VALUES ('152527', '1525', '太仆寺旗'); +INSERT INTO `72crm_crm_area` VALUES ('152528', '1525', '镶黄旗'); +INSERT INTO `72crm_crm_area` VALUES ('152529', '1525', '正镶白旗'); +INSERT INTO `72crm_crm_area` VALUES ('152530', '1525', '正蓝旗'); +INSERT INTO `72crm_crm_area` VALUES ('152531', '1525', '多伦县'); +INSERT INTO `72crm_crm_area` VALUES ('1526', '15', '乌兰察布盟'); +INSERT INTO `72crm_crm_area` VALUES ('152601', '1526', '集宁市'); +INSERT INTO `72crm_crm_area` VALUES ('152602', '1526', '丰镇市'); +INSERT INTO `72crm_crm_area` VALUES ('152624', '1526', '卓资县'); +INSERT INTO `72crm_crm_area` VALUES ('152625', '1526', '化德县'); +INSERT INTO `72crm_crm_area` VALUES ('152626', '1526', '商都县'); +INSERT INTO `72crm_crm_area` VALUES ('152627', '1526', '兴和县'); +INSERT INTO `72crm_crm_area` VALUES ('152629', '1526', '凉城县'); +INSERT INTO `72crm_crm_area` VALUES ('152630', '1526', '察哈尔右翼前旗'); +INSERT INTO `72crm_crm_area` VALUES ('152631', '1526', '察哈尔右翼中旗'); +INSERT INTO `72crm_crm_area` VALUES ('152632', '1526', '察哈尔右翼后旗'); +INSERT INTO `72crm_crm_area` VALUES ('152634', '1526', '四子王旗'); +INSERT INTO `72crm_crm_area` VALUES ('1527', '15', '伊克昭盟'); +INSERT INTO `72crm_crm_area` VALUES ('152701', '1527', '东胜市'); +INSERT INTO `72crm_crm_area` VALUES ('152722', '1527', '达拉特旗'); +INSERT INTO `72crm_crm_area` VALUES ('152723', '1527', '准格尔旗'); +INSERT INTO `72crm_crm_area` VALUES ('152724', '1527', '鄂托克前旗'); +INSERT INTO `72crm_crm_area` VALUES ('152725', '1527', '鄂托克旗'); +INSERT INTO `72crm_crm_area` VALUES ('152726', '1527', '杭锦旗'); +INSERT INTO `72crm_crm_area` VALUES ('152727', '1527', '乌审旗'); +INSERT INTO `72crm_crm_area` VALUES ('152728', '1527', '伊金霍洛旗'); +INSERT INTO `72crm_crm_area` VALUES ('1528', '15', '巴彦淖尔盟'); +INSERT INTO `72crm_crm_area` VALUES ('152801', '1528', '临河市'); +INSERT INTO `72crm_crm_area` VALUES ('152822', '1528', '五原县'); +INSERT INTO `72crm_crm_area` VALUES ('152823', '1528', '磴口县'); +INSERT INTO `72crm_crm_area` VALUES ('152824', '1528', '乌拉特前旗'); +INSERT INTO `72crm_crm_area` VALUES ('152825', '1528', '乌拉特中旗'); +INSERT INTO `72crm_crm_area` VALUES ('152826', '1528', '乌拉特后旗'); +INSERT INTO `72crm_crm_area` VALUES ('152827', '1528', '杭锦后旗'); +INSERT INTO `72crm_crm_area` VALUES ('1529', '15', '阿拉善盟'); +INSERT INTO `72crm_crm_area` VALUES ('152921', '1529', '阿拉善左旗'); +INSERT INTO `72crm_crm_area` VALUES ('152922', '1529', '阿拉善右旗'); +INSERT INTO `72crm_crm_area` VALUES ('152923', '1529', '额济纳旗'); +INSERT INTO `72crm_crm_area` VALUES ('21', '0', '辽宁'); +INSERT INTO `72crm_crm_area` VALUES ('2101', '21', '沈阳'); +INSERT INTO `72crm_crm_area` VALUES ('210101', '2101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210102', '2101', '和平区'); +INSERT INTO `72crm_crm_area` VALUES ('210103', '2101', '沈河区'); +INSERT INTO `72crm_crm_area` VALUES ('210104', '2101', '大东区'); +INSERT INTO `72crm_crm_area` VALUES ('210105', '2101', '皇姑区'); +INSERT INTO `72crm_crm_area` VALUES ('210106', '2101', '铁西区'); +INSERT INTO `72crm_crm_area` VALUES ('210111', '2101', '苏家屯区'); +INSERT INTO `72crm_crm_area` VALUES ('210112', '2101', '东陵区'); +INSERT INTO `72crm_crm_area` VALUES ('210113', '2101', '新城子区'); +INSERT INTO `72crm_crm_area` VALUES ('210114', '2101', '于洪区'); +INSERT INTO `72crm_crm_area` VALUES ('210122', '2101', '辽中县'); +INSERT INTO `72crm_crm_area` VALUES ('210123', '2101', '康平县'); +INSERT INTO `72crm_crm_area` VALUES ('210124', '2101', '法库县'); +INSERT INTO `72crm_crm_area` VALUES ('210181', '2101', '新民市'); +INSERT INTO `72crm_crm_area` VALUES ('2102', '21', '大连'); +INSERT INTO `72crm_crm_area` VALUES ('210201', '2102', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210202', '2102', '中山区'); +INSERT INTO `72crm_crm_area` VALUES ('210203', '2102', '西岗区'); +INSERT INTO `72crm_crm_area` VALUES ('210204', '2102', '沙河口区'); +INSERT INTO `72crm_crm_area` VALUES ('210211', '2102', '甘井子区'); +INSERT INTO `72crm_crm_area` VALUES ('210212', '2102', '旅顺口区'); +INSERT INTO `72crm_crm_area` VALUES ('210213', '2102', '金州区'); +INSERT INTO `72crm_crm_area` VALUES ('210224', '2102', '长海县'); +INSERT INTO `72crm_crm_area` VALUES ('210281', '2102', '瓦房店市'); +INSERT INTO `72crm_crm_area` VALUES ('210282', '2102', '普兰店市'); +INSERT INTO `72crm_crm_area` VALUES ('210283', '2102', '庄河市'); +INSERT INTO `72crm_crm_area` VALUES ('2103', '21', '鞍山'); +INSERT INTO `72crm_crm_area` VALUES ('210301', '2103', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210302', '2103', '铁东区'); +INSERT INTO `72crm_crm_area` VALUES ('210303', '2103', '铁西区'); +INSERT INTO `72crm_crm_area` VALUES ('210304', '2103', '立山区'); +INSERT INTO `72crm_crm_area` VALUES ('210311', '2103', '千山区'); +INSERT INTO `72crm_crm_area` VALUES ('210321', '2103', '台安县'); +INSERT INTO `72crm_crm_area` VALUES ('210323', '2103', '岫岩满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('210381', '2103', '海城市'); +INSERT INTO `72crm_crm_area` VALUES ('2104', '21', '抚顺'); +INSERT INTO `72crm_crm_area` VALUES ('210401', '2104', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210402', '2104', '新抚区'); +INSERT INTO `72crm_crm_area` VALUES ('210403', '2104', '东洲区'); +INSERT INTO `72crm_crm_area` VALUES ('210404', '2104', '望花区'); +INSERT INTO `72crm_crm_area` VALUES ('210411', '2104', '顺城区'); +INSERT INTO `72crm_crm_area` VALUES ('210421', '2104', '抚顺县'); +INSERT INTO `72crm_crm_area` VALUES ('210422', '2104', '新宾满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('210423', '2104', '清原满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('2105', '21', '本溪'); +INSERT INTO `72crm_crm_area` VALUES ('210501', '2105', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210502', '2105', '平山区'); +INSERT INTO `72crm_crm_area` VALUES ('210503', '2105', '溪湖区'); +INSERT INTO `72crm_crm_area` VALUES ('210504', '2105', '明山区'); +INSERT INTO `72crm_crm_area` VALUES ('210505', '2105', '南芬区'); +INSERT INTO `72crm_crm_area` VALUES ('210521', '2105', '本溪满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('210522', '2105', '桓仁满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('2106', '21', '丹东'); +INSERT INTO `72crm_crm_area` VALUES ('210601', '2106', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210602', '2106', '元宝区'); +INSERT INTO `72crm_crm_area` VALUES ('210603', '2106', '振兴区'); +INSERT INTO `72crm_crm_area` VALUES ('210604', '2106', '振安区'); +INSERT INTO `72crm_crm_area` VALUES ('210624', '2106', '宽甸满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('210681', '2106', '东港市'); +INSERT INTO `72crm_crm_area` VALUES ('210682', '2106', '凤城市'); +INSERT INTO `72crm_crm_area` VALUES ('2107', '21', '锦州'); +INSERT INTO `72crm_crm_area` VALUES ('210701', '2107', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210702', '2107', '古塔区'); +INSERT INTO `72crm_crm_area` VALUES ('210703', '2107', '凌河区'); +INSERT INTO `72crm_crm_area` VALUES ('210711', '2107', '太和区'); +INSERT INTO `72crm_crm_area` VALUES ('210726', '2107', '黑山县'); +INSERT INTO `72crm_crm_area` VALUES ('210727', '2107', '义  县'); +INSERT INTO `72crm_crm_area` VALUES ('210781', '2107', '凌海市'); +INSERT INTO `72crm_crm_area` VALUES ('210782', '2107', '北宁市'); +INSERT INTO `72crm_crm_area` VALUES ('2108', '21', '营口'); +INSERT INTO `72crm_crm_area` VALUES ('210801', '2108', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210802', '2108', '站前区'); +INSERT INTO `72crm_crm_area` VALUES ('210803', '2108', '西市区'); +INSERT INTO `72crm_crm_area` VALUES ('210804', '2108', '鲅鱼圈区'); +INSERT INTO `72crm_crm_area` VALUES ('210811', '2108', '老边区'); +INSERT INTO `72crm_crm_area` VALUES ('210881', '2108', '盖州市'); +INSERT INTO `72crm_crm_area` VALUES ('210882', '2108', '大石桥市'); +INSERT INTO `72crm_crm_area` VALUES ('2109', '21', '阜新'); +INSERT INTO `72crm_crm_area` VALUES ('210901', '2109', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('210902', '2109', '海州区'); +INSERT INTO `72crm_crm_area` VALUES ('210903', '2109', '新邱区'); +INSERT INTO `72crm_crm_area` VALUES ('210904', '2109', '太平区'); +INSERT INTO `72crm_crm_area` VALUES ('210905', '2109', '清河门区'); +INSERT INTO `72crm_crm_area` VALUES ('210911', '2109', '细河区'); +INSERT INTO `72crm_crm_area` VALUES ('210921', '2109', '阜新蒙古族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('210922', '2109', '彰武县'); +INSERT INTO `72crm_crm_area` VALUES ('2110', '21', '辽阳'); +INSERT INTO `72crm_crm_area` VALUES ('211001', '2110', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('211002', '2110', '白塔区'); +INSERT INTO `72crm_crm_area` VALUES ('211003', '2110', '文圣区'); +INSERT INTO `72crm_crm_area` VALUES ('211004', '2110', '宏伟区'); +INSERT INTO `72crm_crm_area` VALUES ('211005', '2110', '弓长岭区'); +INSERT INTO `72crm_crm_area` VALUES ('211011', '2110', '太子河区'); +INSERT INTO `72crm_crm_area` VALUES ('211021', '2110', '辽阳县'); +INSERT INTO `72crm_crm_area` VALUES ('211081', '2110', '灯塔市'); +INSERT INTO `72crm_crm_area` VALUES ('2111', '21', '盘锦'); +INSERT INTO `72crm_crm_area` VALUES ('211101', '2111', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('211102', '2111', '双台子区'); +INSERT INTO `72crm_crm_area` VALUES ('211103', '2111', '兴隆台区'); +INSERT INTO `72crm_crm_area` VALUES ('211121', '2111', '大洼县'); +INSERT INTO `72crm_crm_area` VALUES ('211122', '2111', '盘山县'); +INSERT INTO `72crm_crm_area` VALUES ('2112', '21', '铁岭'); +INSERT INTO `72crm_crm_area` VALUES ('211201', '2112', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('211202', '2112', '银州区'); +INSERT INTO `72crm_crm_area` VALUES ('211204', '2112', '清河区'); +INSERT INTO `72crm_crm_area` VALUES ('211221', '2112', '铁岭县'); +INSERT INTO `72crm_crm_area` VALUES ('211223', '2112', '西丰县'); +INSERT INTO `72crm_crm_area` VALUES ('211224', '2112', '昌图县'); +INSERT INTO `72crm_crm_area` VALUES ('211281', '2112', '铁法市'); +INSERT INTO `72crm_crm_area` VALUES ('211282', '2112', '开原市'); +INSERT INTO `72crm_crm_area` VALUES ('2113', '21', '朝阳'); +INSERT INTO `72crm_crm_area` VALUES ('211301', '2113', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('211302', '2113', '双塔区'); +INSERT INTO `72crm_crm_area` VALUES ('211303', '2113', '龙城区'); +INSERT INTO `72crm_crm_area` VALUES ('211321', '2113', '朝阳县'); +INSERT INTO `72crm_crm_area` VALUES ('211322', '2113', '建平县'); +INSERT INTO `72crm_crm_area` VALUES ('211324', '2113', '喀喇沁左翼蒙古族自治'); +INSERT INTO `72crm_crm_area` VALUES ('211381', '2113', '北票市'); +INSERT INTO `72crm_crm_area` VALUES ('211382', '2113', '凌源市'); +INSERT INTO `72crm_crm_area` VALUES ('2114', '21', '葫芦岛'); +INSERT INTO `72crm_crm_area` VALUES ('211401', '2114', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('211402', '2114', '连山区'); +INSERT INTO `72crm_crm_area` VALUES ('211403', '2114', '龙港区'); +INSERT INTO `72crm_crm_area` VALUES ('211404', '2114', '南票区'); +INSERT INTO `72crm_crm_area` VALUES ('211421', '2114', '绥中县'); +INSERT INTO `72crm_crm_area` VALUES ('211422', '2114', '建昌县'); +INSERT INTO `72crm_crm_area` VALUES ('211481', '2114', '兴城市'); +INSERT INTO `72crm_crm_area` VALUES ('22', '0', '吉林'); +INSERT INTO `72crm_crm_area` VALUES ('2201', '22', '长春'); +INSERT INTO `72crm_crm_area` VALUES ('220101', '2201', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220102', '2201', '南关区'); +INSERT INTO `72crm_crm_area` VALUES ('220103', '2201', '宽城区'); +INSERT INTO `72crm_crm_area` VALUES ('220104', '2201', '朝阳区'); +INSERT INTO `72crm_crm_area` VALUES ('220105', '2201', '二道区'); +INSERT INTO `72crm_crm_area` VALUES ('220106', '2201', '绿园区'); +INSERT INTO `72crm_crm_area` VALUES ('220112', '2201', '双阳区'); +INSERT INTO `72crm_crm_area` VALUES ('220122', '2201', '农安县'); +INSERT INTO `72crm_crm_area` VALUES ('220181', '2201', '九台市'); +INSERT INTO `72crm_crm_area` VALUES ('220182', '2201', '榆树市'); +INSERT INTO `72crm_crm_area` VALUES ('220183', '2201', '德惠市'); +INSERT INTO `72crm_crm_area` VALUES ('2202', '22', '吉林'); +INSERT INTO `72crm_crm_area` VALUES ('220201', '2202', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220202', '2202', '昌邑区'); +INSERT INTO `72crm_crm_area` VALUES ('220203', '2202', '龙潭区'); +INSERT INTO `72crm_crm_area` VALUES ('220204', '2202', '船营区'); +INSERT INTO `72crm_crm_area` VALUES ('220211', '2202', '丰满区'); +INSERT INTO `72crm_crm_area` VALUES ('220221', '2202', '永吉县'); +INSERT INTO `72crm_crm_area` VALUES ('220281', '2202', '蛟河市'); +INSERT INTO `72crm_crm_area` VALUES ('220282', '2202', '桦甸市'); +INSERT INTO `72crm_crm_area` VALUES ('220283', '2202', '舒兰市'); +INSERT INTO `72crm_crm_area` VALUES ('220284', '2202', '磐石市'); +INSERT INTO `72crm_crm_area` VALUES ('2203', '22', '四平'); +INSERT INTO `72crm_crm_area` VALUES ('220301', '2203', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220302', '2203', '铁西区'); +INSERT INTO `72crm_crm_area` VALUES ('220303', '2203', '铁东区'); +INSERT INTO `72crm_crm_area` VALUES ('220322', '2203', '梨树县'); +INSERT INTO `72crm_crm_area` VALUES ('220323', '2203', '伊通满族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('220381', '2203', '公主岭市'); +INSERT INTO `72crm_crm_area` VALUES ('220382', '2203', '双辽市'); +INSERT INTO `72crm_crm_area` VALUES ('2204', '22', '辽源'); +INSERT INTO `72crm_crm_area` VALUES ('220401', '2204', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220402', '2204', '龙山区'); +INSERT INTO `72crm_crm_area` VALUES ('220403', '2204', '西安区'); +INSERT INTO `72crm_crm_area` VALUES ('220421', '2204', '东丰县'); +INSERT INTO `72crm_crm_area` VALUES ('220422', '2204', '东辽县'); +INSERT INTO `72crm_crm_area` VALUES ('2205', '22', '通化'); +INSERT INTO `72crm_crm_area` VALUES ('220501', '2205', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220502', '2205', '东昌区'); +INSERT INTO `72crm_crm_area` VALUES ('220503', '2205', '二道江区'); +INSERT INTO `72crm_crm_area` VALUES ('220521', '2205', '通化县'); +INSERT INTO `72crm_crm_area` VALUES ('220523', '2205', '辉南县'); +INSERT INTO `72crm_crm_area` VALUES ('220524', '2205', '柳河县'); +INSERT INTO `72crm_crm_area` VALUES ('220581', '2205', '梅河口市'); +INSERT INTO `72crm_crm_area` VALUES ('220582', '2205', '集安市'); +INSERT INTO `72crm_crm_area` VALUES ('2206', '22', '白山'); +INSERT INTO `72crm_crm_area` VALUES ('220601', '2206', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220602', '2206', '八道江区'); +INSERT INTO `72crm_crm_area` VALUES ('220621', '2206', '抚松县'); +INSERT INTO `72crm_crm_area` VALUES ('220622', '2206', '靖宇县'); +INSERT INTO `72crm_crm_area` VALUES ('220623', '2206', '长白朝鲜族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('220625', '2206', '江源县'); +INSERT INTO `72crm_crm_area` VALUES ('220681', '2206', '临江市'); +INSERT INTO `72crm_crm_area` VALUES ('2207', '22', '松原'); +INSERT INTO `72crm_crm_area` VALUES ('220701', '2207', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220702', '2207', '宁江区'); +INSERT INTO `72crm_crm_area` VALUES ('220721', '2207', '前郭尔罗斯蒙古族自治'); +INSERT INTO `72crm_crm_area` VALUES ('220722', '2207', '长岭县'); +INSERT INTO `72crm_crm_area` VALUES ('220723', '2207', '乾安县'); +INSERT INTO `72crm_crm_area` VALUES ('220724', '2207', '扶余县'); +INSERT INTO `72crm_crm_area` VALUES ('2208', '22', '白城'); +INSERT INTO `72crm_crm_area` VALUES ('220801', '2208', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('220802', '2208', '洮北区'); +INSERT INTO `72crm_crm_area` VALUES ('220821', '2208', '镇赉县'); +INSERT INTO `72crm_crm_area` VALUES ('220822', '2208', '通榆县'); +INSERT INTO `72crm_crm_area` VALUES ('220881', '2208', '洮南市'); +INSERT INTO `72crm_crm_area` VALUES ('220882', '2208', '大安市'); +INSERT INTO `72crm_crm_area` VALUES ('2224', '22', '延边朝鲜族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('222401', '2224', '延吉市'); +INSERT INTO `72crm_crm_area` VALUES ('222402', '2224', '图们市'); +INSERT INTO `72crm_crm_area` VALUES ('222403', '2224', '敦化市'); +INSERT INTO `72crm_crm_area` VALUES ('222404', '2224', '珲春市'); +INSERT INTO `72crm_crm_area` VALUES ('222405', '2224', '龙井市'); +INSERT INTO `72crm_crm_area` VALUES ('222406', '2224', '和龙市'); +INSERT INTO `72crm_crm_area` VALUES ('222424', '2224', '汪清县'); +INSERT INTO `72crm_crm_area` VALUES ('222426', '2224', '安图县'); +INSERT INTO `72crm_crm_area` VALUES ('23', '0', '黑龙江'); +INSERT INTO `72crm_crm_area` VALUES ('2301', '23', '哈尔滨'); +INSERT INTO `72crm_crm_area` VALUES ('230101', '2301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230102', '2301', '道里区'); +INSERT INTO `72crm_crm_area` VALUES ('230103', '2301', '南岗区'); +INSERT INTO `72crm_crm_area` VALUES ('230104', '2301', '道外区'); +INSERT INTO `72crm_crm_area` VALUES ('230105', '2301', '太平区'); +INSERT INTO `72crm_crm_area` VALUES ('230106', '2301', '香坊区'); +INSERT INTO `72crm_crm_area` VALUES ('230107', '2301', '动力区'); +INSERT INTO `72crm_crm_area` VALUES ('230108', '2301', '平房区'); +INSERT INTO `72crm_crm_area` VALUES ('230121', '2301', '呼兰县'); +INSERT INTO `72crm_crm_area` VALUES ('230123', '2301', '依兰县'); +INSERT INTO `72crm_crm_area` VALUES ('230124', '2301', '方正县'); +INSERT INTO `72crm_crm_area` VALUES ('230125', '2301', '宾  县'); +INSERT INTO `72crm_crm_area` VALUES ('230126', '2301', '巴彦县'); +INSERT INTO `72crm_crm_area` VALUES ('230127', '2301', '木兰县'); +INSERT INTO `72crm_crm_area` VALUES ('230128', '2301', '通河县'); +INSERT INTO `72crm_crm_area` VALUES ('230129', '2301', '延寿县'); +INSERT INTO `72crm_crm_area` VALUES ('230181', '2301', '阿城市'); +INSERT INTO `72crm_crm_area` VALUES ('230182', '2301', '双城市'); +INSERT INTO `72crm_crm_area` VALUES ('230183', '2301', '尚志市'); +INSERT INTO `72crm_crm_area` VALUES ('230184', '2301', '五常市'); +INSERT INTO `72crm_crm_area` VALUES ('2302', '23', '齐齐哈尔'); +INSERT INTO `72crm_crm_area` VALUES ('230201', '2302', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230202', '2302', '龙沙区'); +INSERT INTO `72crm_crm_area` VALUES ('230203', '2302', '建华区'); +INSERT INTO `72crm_crm_area` VALUES ('230204', '2302', '铁锋区'); +INSERT INTO `72crm_crm_area` VALUES ('230205', '2302', '昂昂溪区'); +INSERT INTO `72crm_crm_area` VALUES ('230206', '2302', '富拉尔基区'); +INSERT INTO `72crm_crm_area` VALUES ('230207', '2302', '碾子山区'); +INSERT INTO `72crm_crm_area` VALUES ('230208', '2302', '梅里斯达斡尔族区'); +INSERT INTO `72crm_crm_area` VALUES ('230221', '2302', '龙江县'); +INSERT INTO `72crm_crm_area` VALUES ('230223', '2302', '依安县'); +INSERT INTO `72crm_crm_area` VALUES ('230224', '2302', '泰来县'); +INSERT INTO `72crm_crm_area` VALUES ('230225', '2302', '甘南县'); +INSERT INTO `72crm_crm_area` VALUES ('230227', '2302', '富裕县'); +INSERT INTO `72crm_crm_area` VALUES ('230229', '2302', '克山县'); +INSERT INTO `72crm_crm_area` VALUES ('230230', '2302', '克东县'); +INSERT INTO `72crm_crm_area` VALUES ('230231', '2302', '拜泉县'); +INSERT INTO `72crm_crm_area` VALUES ('230281', '2302', '讷河市'); +INSERT INTO `72crm_crm_area` VALUES ('2303', '23', '鸡西'); +INSERT INTO `72crm_crm_area` VALUES ('230301', '2303', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230302', '2303', '鸡冠区'); +INSERT INTO `72crm_crm_area` VALUES ('230303', '2303', '恒山区'); +INSERT INTO `72crm_crm_area` VALUES ('230304', '2303', '滴道区'); +INSERT INTO `72crm_crm_area` VALUES ('230305', '2303', '梨树区'); +INSERT INTO `72crm_crm_area` VALUES ('230306', '2303', '城子河区'); +INSERT INTO `72crm_crm_area` VALUES ('230307', '2303', '麻山区'); +INSERT INTO `72crm_crm_area` VALUES ('230321', '2303', '鸡东县'); +INSERT INTO `72crm_crm_area` VALUES ('230381', '2303', '虎林市'); +INSERT INTO `72crm_crm_area` VALUES ('230382', '2303', '密山市'); +INSERT INTO `72crm_crm_area` VALUES ('2304', '23', '鹤岗'); +INSERT INTO `72crm_crm_area` VALUES ('230401', '2304', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230402', '2304', '向阳区'); +INSERT INTO `72crm_crm_area` VALUES ('230403', '2304', '工农区'); +INSERT INTO `72crm_crm_area` VALUES ('230404', '2304', '南山区'); +INSERT INTO `72crm_crm_area` VALUES ('230405', '2304', '兴安区'); +INSERT INTO `72crm_crm_area` VALUES ('230406', '2304', '东山区'); +INSERT INTO `72crm_crm_area` VALUES ('230407', '2304', '兴山区'); +INSERT INTO `72crm_crm_area` VALUES ('230421', '2304', '萝北县'); +INSERT INTO `72crm_crm_area` VALUES ('230422', '2304', '绥滨县'); +INSERT INTO `72crm_crm_area` VALUES ('2305', '23', '双鸭山'); +INSERT INTO `72crm_crm_area` VALUES ('230501', '2305', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230502', '2305', '尖山区'); +INSERT INTO `72crm_crm_area` VALUES ('230503', '2305', '岭东区'); +INSERT INTO `72crm_crm_area` VALUES ('230505', '2305', '四方台区'); +INSERT INTO `72crm_crm_area` VALUES ('230506', '2305', '宝山区'); +INSERT INTO `72crm_crm_area` VALUES ('230521', '2305', '集贤县'); +INSERT INTO `72crm_crm_area` VALUES ('230522', '2305', '友谊县'); +INSERT INTO `72crm_crm_area` VALUES ('230523', '2305', '宝清县'); +INSERT INTO `72crm_crm_area` VALUES ('230524', '2305', '饶河县'); +INSERT INTO `72crm_crm_area` VALUES ('2306', '23', '大庆'); +INSERT INTO `72crm_crm_area` VALUES ('230601', '2306', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230602', '2306', '萨尔图区'); +INSERT INTO `72crm_crm_area` VALUES ('230603', '2306', '龙凤区'); +INSERT INTO `72crm_crm_area` VALUES ('230604', '2306', '让胡路区'); +INSERT INTO `72crm_crm_area` VALUES ('230605', '2306', '红岗区'); +INSERT INTO `72crm_crm_area` VALUES ('230606', '2306', '大同区'); +INSERT INTO `72crm_crm_area` VALUES ('230621', '2306', '肇州县'); +INSERT INTO `72crm_crm_area` VALUES ('230622', '2306', '肇源县'); +INSERT INTO `72crm_crm_area` VALUES ('230623', '2306', '林甸县'); +INSERT INTO `72crm_crm_area` VALUES ('230624', '2306', '杜尔伯特蒙古族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('2307', '23', '伊春'); +INSERT INTO `72crm_crm_area` VALUES ('230701', '2307', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230702', '2307', '伊春区'); +INSERT INTO `72crm_crm_area` VALUES ('230703', '2307', '南岔区'); +INSERT INTO `72crm_crm_area` VALUES ('230704', '2307', '友好区'); +INSERT INTO `72crm_crm_area` VALUES ('230705', '2307', '西林区'); +INSERT INTO `72crm_crm_area` VALUES ('230706', '2307', '翠峦区'); +INSERT INTO `72crm_crm_area` VALUES ('230707', '2307', '新青区'); +INSERT INTO `72crm_crm_area` VALUES ('230708', '2307', '美溪区'); +INSERT INTO `72crm_crm_area` VALUES ('230709', '2307', '金山屯区'); +INSERT INTO `72crm_crm_area` VALUES ('230710', '2307', '五营区'); +INSERT INTO `72crm_crm_area` VALUES ('230711', '2307', '乌马河区'); +INSERT INTO `72crm_crm_area` VALUES ('230712', '2307', '汤旺河区'); +INSERT INTO `72crm_crm_area` VALUES ('230713', '2307', '带岭区'); +INSERT INTO `72crm_crm_area` VALUES ('230714', '2307', '乌伊岭区'); +INSERT INTO `72crm_crm_area` VALUES ('230715', '2307', '红星区'); +INSERT INTO `72crm_crm_area` VALUES ('230716', '2307', '上甘岭区'); +INSERT INTO `72crm_crm_area` VALUES ('230722', '2307', '嘉荫县'); +INSERT INTO `72crm_crm_area` VALUES ('230781', '2307', '铁力市'); +INSERT INTO `72crm_crm_area` VALUES ('2308', '23', '佳木斯'); +INSERT INTO `72crm_crm_area` VALUES ('230801', '2308', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230802', '2308', '永红区'); +INSERT INTO `72crm_crm_area` VALUES ('230803', '2308', '向阳区'); +INSERT INTO `72crm_crm_area` VALUES ('230804', '2308', '前进区'); +INSERT INTO `72crm_crm_area` VALUES ('230805', '2308', '东风区'); +INSERT INTO `72crm_crm_area` VALUES ('230811', '2308', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('230822', '2308', '桦南县'); +INSERT INTO `72crm_crm_area` VALUES ('230826', '2308', '桦川县'); +INSERT INTO `72crm_crm_area` VALUES ('230828', '2308', '汤原县'); +INSERT INTO `72crm_crm_area` VALUES ('230833', '2308', '抚远县'); +INSERT INTO `72crm_crm_area` VALUES ('230881', '2308', '同江市'); +INSERT INTO `72crm_crm_area` VALUES ('230882', '2308', '富锦市'); +INSERT INTO `72crm_crm_area` VALUES ('2309', '23', '七台河'); +INSERT INTO `72crm_crm_area` VALUES ('230901', '2309', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('230902', '2309', '新兴区'); +INSERT INTO `72crm_crm_area` VALUES ('230903', '2309', '桃山区'); +INSERT INTO `72crm_crm_area` VALUES ('230904', '2309', '茄子河区'); +INSERT INTO `72crm_crm_area` VALUES ('230921', '2309', '勃利县'); +INSERT INTO `72crm_crm_area` VALUES ('2310', '23', '牡丹江'); +INSERT INTO `72crm_crm_area` VALUES ('231001', '2310', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('231002', '2310', '东安区'); +INSERT INTO `72crm_crm_area` VALUES ('231003', '2310', '阳明区'); +INSERT INTO `72crm_crm_area` VALUES ('231004', '2310', '爱民区'); +INSERT INTO `72crm_crm_area` VALUES ('231005', '2310', '西安区'); +INSERT INTO `72crm_crm_area` VALUES ('231024', '2310', '东宁县'); +INSERT INTO `72crm_crm_area` VALUES ('231025', '2310', '林口县'); +INSERT INTO `72crm_crm_area` VALUES ('231081', '2310', '绥芬河市'); +INSERT INTO `72crm_crm_area` VALUES ('231083', '2310', '海林市'); +INSERT INTO `72crm_crm_area` VALUES ('231084', '2310', '宁安市'); +INSERT INTO `72crm_crm_area` VALUES ('231085', '2310', '穆棱市'); +INSERT INTO `72crm_crm_area` VALUES ('2311', '23', '黑河'); +INSERT INTO `72crm_crm_area` VALUES ('231101', '2311', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('231102', '2311', '爱辉区'); +INSERT INTO `72crm_crm_area` VALUES ('231121', '2311', '嫩江县'); +INSERT INTO `72crm_crm_area` VALUES ('231123', '2311', '逊克县'); +INSERT INTO `72crm_crm_area` VALUES ('231124', '2311', '孙吴县'); +INSERT INTO `72crm_crm_area` VALUES ('231181', '2311', '北安市'); +INSERT INTO `72crm_crm_area` VALUES ('231182', '2311', '五大连池市'); +INSERT INTO `72crm_crm_area` VALUES ('2312', '23', '绥化'); +INSERT INTO `72crm_crm_area` VALUES ('231201', '2312', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('231202', '2312', '北林区'); +INSERT INTO `72crm_crm_area` VALUES ('231221', '2312', '望奎县'); +INSERT INTO `72crm_crm_area` VALUES ('231222', '2312', '兰西县'); +INSERT INTO `72crm_crm_area` VALUES ('231223', '2312', '青冈县'); +INSERT INTO `72crm_crm_area` VALUES ('231224', '2312', '庆安县'); +INSERT INTO `72crm_crm_area` VALUES ('231225', '2312', '明水县'); +INSERT INTO `72crm_crm_area` VALUES ('231226', '2312', '绥棱县'); +INSERT INTO `72crm_crm_area` VALUES ('231281', '2312', '安达市'); +INSERT INTO `72crm_crm_area` VALUES ('231282', '2312', '肇东市'); +INSERT INTO `72crm_crm_area` VALUES ('231283', '2312', '海伦市'); +INSERT INTO `72crm_crm_area` VALUES ('2327', '23', '大兴安岭地区'); +INSERT INTO `72crm_crm_area` VALUES ('232721', '2327', '呼玛县'); +INSERT INTO `72crm_crm_area` VALUES ('232722', '2327', '塔河县'); +INSERT INTO `72crm_crm_area` VALUES ('232723', '2327', '漠河县'); +INSERT INTO `72crm_crm_area` VALUES ('31', '0', '上海'); +INSERT INTO `72crm_crm_area` VALUES ('3101', '31', '上海市辖'); +INSERT INTO `72crm_crm_area` VALUES ('310101', '3101', '黄浦区'); +INSERT INTO `72crm_crm_area` VALUES ('310103', '3101', '卢湾区'); +INSERT INTO `72crm_crm_area` VALUES ('310104', '3101', '徐汇区'); +INSERT INTO `72crm_crm_area` VALUES ('310105', '3101', '长宁区'); +INSERT INTO `72crm_crm_area` VALUES ('310106', '3101', '静安区'); +INSERT INTO `72crm_crm_area` VALUES ('310107', '3101', '普陀区'); +INSERT INTO `72crm_crm_area` VALUES ('310108', '3101', '闸北区'); +INSERT INTO `72crm_crm_area` VALUES ('310109', '3101', '虹口区'); +INSERT INTO `72crm_crm_area` VALUES ('310110', '3101', '杨浦区'); +INSERT INTO `72crm_crm_area` VALUES ('310112', '3101', '闵行区'); +INSERT INTO `72crm_crm_area` VALUES ('310113', '3101', '宝山区'); +INSERT INTO `72crm_crm_area` VALUES ('310114', '3101', '嘉定区'); +INSERT INTO `72crm_crm_area` VALUES ('310115', '3101', '浦东新区'); +INSERT INTO `72crm_crm_area` VALUES ('310116', '3101', '金山区'); +INSERT INTO `72crm_crm_area` VALUES ('310117', '3101', '松江区'); +INSERT INTO `72crm_crm_area` VALUES ('310118', '3101', '青浦区'); +INSERT INTO `72crm_crm_area` VALUES ('3102', '31', '上海县辖'); +INSERT INTO `72crm_crm_area` VALUES ('310225', '3102', '南汇县'); +INSERT INTO `72crm_crm_area` VALUES ('310226', '3102', '奉贤县'); +INSERT INTO `72crm_crm_area` VALUES ('310230', '3102', '崇明县'); +INSERT INTO `72crm_crm_area` VALUES ('32', '0', '江苏'); +INSERT INTO `72crm_crm_area` VALUES ('3201', '32', '南京'); +INSERT INTO `72crm_crm_area` VALUES ('320101', '3201', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320102', '3201', '玄武区'); +INSERT INTO `72crm_crm_area` VALUES ('320103', '3201', '白下区'); +INSERT INTO `72crm_crm_area` VALUES ('320104', '3201', '秦淮区'); +INSERT INTO `72crm_crm_area` VALUES ('320105', '3201', '建邺区'); +INSERT INTO `72crm_crm_area` VALUES ('320106', '3201', '鼓楼区'); +INSERT INTO `72crm_crm_area` VALUES ('320107', '3201', '下关区'); +INSERT INTO `72crm_crm_area` VALUES ('320111', '3201', '浦口区'); +INSERT INTO `72crm_crm_area` VALUES ('320112', '3201', '大厂区'); +INSERT INTO `72crm_crm_area` VALUES ('320113', '3201', '栖霞区'); +INSERT INTO `72crm_crm_area` VALUES ('320114', '3201', '雨花台区'); +INSERT INTO `72crm_crm_area` VALUES ('320115', '3201', '江宁区'); +INSERT INTO `72crm_crm_area` VALUES ('320122', '3201', '江浦县'); +INSERT INTO `72crm_crm_area` VALUES ('320123', '3201', '六合县'); +INSERT INTO `72crm_crm_area` VALUES ('320124', '3201', '溧水县'); +INSERT INTO `72crm_crm_area` VALUES ('320125', '3201', '高淳县'); +INSERT INTO `72crm_crm_area` VALUES ('3202', '32', '无锡'); +INSERT INTO `72crm_crm_area` VALUES ('320201', '3202', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320202', '3202', '崇安区'); +INSERT INTO `72crm_crm_area` VALUES ('320203', '3202', '南长区'); +INSERT INTO `72crm_crm_area` VALUES ('320204', '3202', '北塘区'); +INSERT INTO `72crm_crm_area` VALUES ('320205', '3202', '锡山区'); +INSERT INTO `72crm_crm_area` VALUES ('320206', '3202', '惠山区'); +INSERT INTO `72crm_crm_area` VALUES ('320211', '3202', '滨湖区'); +INSERT INTO `72crm_crm_area` VALUES ('320281', '3202', '江阴市'); +INSERT INTO `72crm_crm_area` VALUES ('320282', '3202', '宜兴市'); +INSERT INTO `72crm_crm_area` VALUES ('3203', '32', '徐州'); +INSERT INTO `72crm_crm_area` VALUES ('320301', '3203', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320302', '3203', '鼓楼区'); +INSERT INTO `72crm_crm_area` VALUES ('320303', '3203', '云龙区'); +INSERT INTO `72crm_crm_area` VALUES ('320304', '3203', '九里区'); +INSERT INTO `72crm_crm_area` VALUES ('320305', '3203', '贾汪区'); +INSERT INTO `72crm_crm_area` VALUES ('320311', '3203', '泉山区'); +INSERT INTO `72crm_crm_area` VALUES ('320321', '3203', '丰  县'); +INSERT INTO `72crm_crm_area` VALUES ('320322', '3203', '沛  县'); +INSERT INTO `72crm_crm_area` VALUES ('320323', '3203', '铜山县'); +INSERT INTO `72crm_crm_area` VALUES ('320324', '3203', '睢宁县'); +INSERT INTO `72crm_crm_area` VALUES ('320381', '3203', '新沂市'); +INSERT INTO `72crm_crm_area` VALUES ('320382', '3203', '邳州市'); +INSERT INTO `72crm_crm_area` VALUES ('3204', '32', '常州'); +INSERT INTO `72crm_crm_area` VALUES ('320401', '3204', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320402', '3204', '天宁区'); +INSERT INTO `72crm_crm_area` VALUES ('320404', '3204', '钟楼区'); +INSERT INTO `72crm_crm_area` VALUES ('320405', '3204', '戚墅堰区'); +INSERT INTO `72crm_crm_area` VALUES ('320411', '3204', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('320481', '3204', '溧阳市'); +INSERT INTO `72crm_crm_area` VALUES ('320482', '3204', '金坛市'); +INSERT INTO `72crm_crm_area` VALUES ('320483', '3204', '武进市'); +INSERT INTO `72crm_crm_area` VALUES ('3205', '32', '苏州'); +INSERT INTO `72crm_crm_area` VALUES ('320501', '3205', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320502', '3205', '沧浪区'); +INSERT INTO `72crm_crm_area` VALUES ('320503', '3205', '平江区'); +INSERT INTO `72crm_crm_area` VALUES ('320504', '3205', '金阊区'); +INSERT INTO `72crm_crm_area` VALUES ('320505', '3205', '虎丘区'); +INSERT INTO `72crm_crm_area` VALUES ('320506', '3205', '吴中区'); +INSERT INTO `72crm_crm_area` VALUES ('320507', '3205', '相城区'); +INSERT INTO `72crm_crm_area` VALUES ('320581', '3205', '常熟市'); +INSERT INTO `72crm_crm_area` VALUES ('320582', '3205', '张家港市'); +INSERT INTO `72crm_crm_area` VALUES ('320583', '3205', '昆山市'); +INSERT INTO `72crm_crm_area` VALUES ('320584', '3205', '吴江市'); +INSERT INTO `72crm_crm_area` VALUES ('320585', '3205', '太仓市'); +INSERT INTO `72crm_crm_area` VALUES ('3206', '32', '南通'); +INSERT INTO `72crm_crm_area` VALUES ('320601', '3206', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320602', '3206', '崇川区'); +INSERT INTO `72crm_crm_area` VALUES ('320611', '3206', '港闸区'); +INSERT INTO `72crm_crm_area` VALUES ('320621', '3206', '海安县'); +INSERT INTO `72crm_crm_area` VALUES ('320623', '3206', '如东县'); +INSERT INTO `72crm_crm_area` VALUES ('320681', '3206', '启东市'); +INSERT INTO `72crm_crm_area` VALUES ('320682', '3206', '如皋市'); +INSERT INTO `72crm_crm_area` VALUES ('320683', '3206', '通州市'); +INSERT INTO `72crm_crm_area` VALUES ('320684', '3206', '海门市'); +INSERT INTO `72crm_crm_area` VALUES ('3207', '32', '连云港'); +INSERT INTO `72crm_crm_area` VALUES ('320701', '3207', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320703', '3207', '连云区'); +INSERT INTO `72crm_crm_area` VALUES ('320704', '3207', '云台区'); +INSERT INTO `72crm_crm_area` VALUES ('320705', '3207', '新浦区'); +INSERT INTO `72crm_crm_area` VALUES ('320706', '3207', '海州区'); +INSERT INTO `72crm_crm_area` VALUES ('320721', '3207', '赣榆县'); +INSERT INTO `72crm_crm_area` VALUES ('320722', '3207', '东海县'); +INSERT INTO `72crm_crm_area` VALUES ('320723', '3207', '灌云县'); +INSERT INTO `72crm_crm_area` VALUES ('320724', '3207', '灌南县'); +INSERT INTO `72crm_crm_area` VALUES ('3208', '32', '淮安'); +INSERT INTO `72crm_crm_area` VALUES ('320801', '3208', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320802', '3208', '清河区'); +INSERT INTO `72crm_crm_area` VALUES ('320803', '3208', '楚州区'); +INSERT INTO `72crm_crm_area` VALUES ('320804', '3208', '淮阴区'); +INSERT INTO `72crm_crm_area` VALUES ('320811', '3208', '清浦区'); +INSERT INTO `72crm_crm_area` VALUES ('320826', '3208', '涟水县'); +INSERT INTO `72crm_crm_area` VALUES ('320829', '3208', '洪泽县'); +INSERT INTO `72crm_crm_area` VALUES ('320830', '3208', '盱眙县'); +INSERT INTO `72crm_crm_area` VALUES ('320831', '3208', '金湖县'); +INSERT INTO `72crm_crm_area` VALUES ('3209', '32', '盐城'); +INSERT INTO `72crm_crm_area` VALUES ('320901', '3209', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('320902', '3209', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('320921', '3209', '响水县'); +INSERT INTO `72crm_crm_area` VALUES ('320922', '3209', '滨海县'); +INSERT INTO `72crm_crm_area` VALUES ('320923', '3209', '阜宁县'); +INSERT INTO `72crm_crm_area` VALUES ('320924', '3209', '射阳县'); +INSERT INTO `72crm_crm_area` VALUES ('320925', '3209', '建湖县'); +INSERT INTO `72crm_crm_area` VALUES ('320928', '3209', '盐都县'); +INSERT INTO `72crm_crm_area` VALUES ('320981', '3209', '东台市'); +INSERT INTO `72crm_crm_area` VALUES ('320982', '3209', '大丰市'); +INSERT INTO `72crm_crm_area` VALUES ('3210', '32', '扬州'); +INSERT INTO `72crm_crm_area` VALUES ('321001', '3210', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('321002', '3210', '广陵区'); +INSERT INTO `72crm_crm_area` VALUES ('321003', '3210', '邗江区'); +INSERT INTO `72crm_crm_area` VALUES ('321011', '3210', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('321023', '3210', '宝应县'); +INSERT INTO `72crm_crm_area` VALUES ('321081', '3210', '仪征市'); +INSERT INTO `72crm_crm_area` VALUES ('321084', '3210', '高邮市'); +INSERT INTO `72crm_crm_area` VALUES ('321088', '3210', '江都市'); +INSERT INTO `72crm_crm_area` VALUES ('3211', '32', '镇江'); +INSERT INTO `72crm_crm_area` VALUES ('321101', '3211', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('321102', '3211', '京口区'); +INSERT INTO `72crm_crm_area` VALUES ('321111', '3211', '润州区'); +INSERT INTO `72crm_crm_area` VALUES ('321121', '3211', '丹徒县'); +INSERT INTO `72crm_crm_area` VALUES ('321181', '3211', '丹阳市'); +INSERT INTO `72crm_crm_area` VALUES ('321182', '3211', '扬中市'); +INSERT INTO `72crm_crm_area` VALUES ('321183', '3211', '句容市'); +INSERT INTO `72crm_crm_area` VALUES ('3212', '32', '泰州'); +INSERT INTO `72crm_crm_area` VALUES ('321201', '3212', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('321202', '3212', '海陵区'); +INSERT INTO `72crm_crm_area` VALUES ('321203', '3212', '高港区'); +INSERT INTO `72crm_crm_area` VALUES ('321281', '3212', '兴化市'); +INSERT INTO `72crm_crm_area` VALUES ('321282', '3212', '靖江市'); +INSERT INTO `72crm_crm_area` VALUES ('321283', '3212', '泰兴市'); +INSERT INTO `72crm_crm_area` VALUES ('321284', '3212', '姜堰市'); +INSERT INTO `72crm_crm_area` VALUES ('3213', '32', '宿迁'); +INSERT INTO `72crm_crm_area` VALUES ('321301', '3213', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('321302', '3213', '宿城区'); +INSERT INTO `72crm_crm_area` VALUES ('321321', '3213', '宿豫县'); +INSERT INTO `72crm_crm_area` VALUES ('321322', '3213', '沭阳县'); +INSERT INTO `72crm_crm_area` VALUES ('321323', '3213', '泗阳县'); +INSERT INTO `72crm_crm_area` VALUES ('321324', '3213', '泗洪县'); +INSERT INTO `72crm_crm_area` VALUES ('33', '0', '浙江'); +INSERT INTO `72crm_crm_area` VALUES ('3301', '33', '杭州'); +INSERT INTO `72crm_crm_area` VALUES ('330101', '3301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330102', '3301', '上城区'); +INSERT INTO `72crm_crm_area` VALUES ('330103', '3301', '下城区'); +INSERT INTO `72crm_crm_area` VALUES ('330104', '3301', '江干区'); +INSERT INTO `72crm_crm_area` VALUES ('330105', '3301', '拱墅区'); +INSERT INTO `72crm_crm_area` VALUES ('330106', '3301', '西湖区'); +INSERT INTO `72crm_crm_area` VALUES ('330108', '3301', '滨江区'); +INSERT INTO `72crm_crm_area` VALUES ('330122', '3301', '桐庐县'); +INSERT INTO `72crm_crm_area` VALUES ('330127', '3301', '淳安县'); +INSERT INTO `72crm_crm_area` VALUES ('330181', '3301', '萧山市'); +INSERT INTO `72crm_crm_area` VALUES ('330182', '3301', '建德市'); +INSERT INTO `72crm_crm_area` VALUES ('330183', '3301', '富阳市'); +INSERT INTO `72crm_crm_area` VALUES ('330184', '3301', '余杭市'); +INSERT INTO `72crm_crm_area` VALUES ('330185', '3301', '临安市'); +INSERT INTO `72crm_crm_area` VALUES ('3302', '33', '宁波'); +INSERT INTO `72crm_crm_area` VALUES ('330201', '3302', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330203', '3302', '海曙区'); +INSERT INTO `72crm_crm_area` VALUES ('330204', '3302', '江东区'); +INSERT INTO `72crm_crm_area` VALUES ('330205', '3302', '江北区'); +INSERT INTO `72crm_crm_area` VALUES ('330206', '3302', '北仑区'); +INSERT INTO `72crm_crm_area` VALUES ('330211', '3302', '镇海区'); +INSERT INTO `72crm_crm_area` VALUES ('330225', '3302', '象山县'); +INSERT INTO `72crm_crm_area` VALUES ('330226', '3302', '宁海县'); +INSERT INTO `72crm_crm_area` VALUES ('330227', '3302', '鄞  县'); +INSERT INTO `72crm_crm_area` VALUES ('330281', '3302', '余姚市'); +INSERT INTO `72crm_crm_area` VALUES ('330282', '3302', '慈溪市'); +INSERT INTO `72crm_crm_area` VALUES ('330283', '3302', '奉化市'); +INSERT INTO `72crm_crm_area` VALUES ('3303', '33', '温州'); +INSERT INTO `72crm_crm_area` VALUES ('330301', '3303', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330302', '3303', '鹿城区'); +INSERT INTO `72crm_crm_area` VALUES ('330303', '3303', '龙湾区'); +INSERT INTO `72crm_crm_area` VALUES ('330304', '3303', '瓯海区'); +INSERT INTO `72crm_crm_area` VALUES ('330322', '3303', '洞头县'); +INSERT INTO `72crm_crm_area` VALUES ('330324', '3303', '永嘉县'); +INSERT INTO `72crm_crm_area` VALUES ('330326', '3303', '平阳县'); +INSERT INTO `72crm_crm_area` VALUES ('330327', '3303', '苍南县'); +INSERT INTO `72crm_crm_area` VALUES ('330328', '3303', '文成县'); +INSERT INTO `72crm_crm_area` VALUES ('330329', '3303', '泰顺县'); +INSERT INTO `72crm_crm_area` VALUES ('330381', '3303', '瑞安市'); +INSERT INTO `72crm_crm_area` VALUES ('330382', '3303', '乐清市'); +INSERT INTO `72crm_crm_area` VALUES ('3304', '33', '嘉兴'); +INSERT INTO `72crm_crm_area` VALUES ('330401', '3304', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330402', '3304', '秀城区'); +INSERT INTO `72crm_crm_area` VALUES ('330411', '3304', '秀洲区'); +INSERT INTO `72crm_crm_area` VALUES ('330421', '3304', '嘉善县'); +INSERT INTO `72crm_crm_area` VALUES ('330424', '3304', '海盐县'); +INSERT INTO `72crm_crm_area` VALUES ('330481', '3304', '海宁市'); +INSERT INTO `72crm_crm_area` VALUES ('330482', '3304', '平湖市'); +INSERT INTO `72crm_crm_area` VALUES ('330483', '3304', '桐乡市'); +INSERT INTO `72crm_crm_area` VALUES ('3305', '33', '湖州'); +INSERT INTO `72crm_crm_area` VALUES ('330501', '3305', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330521', '3305', '德清县'); +INSERT INTO `72crm_crm_area` VALUES ('330522', '3305', '长兴县'); +INSERT INTO `72crm_crm_area` VALUES ('330523', '3305', '安吉县'); +INSERT INTO `72crm_crm_area` VALUES ('3306', '33', '绍兴'); +INSERT INTO `72crm_crm_area` VALUES ('330601', '3306', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330602', '3306', '越城区'); +INSERT INTO `72crm_crm_area` VALUES ('330621', '3306', '绍兴县'); +INSERT INTO `72crm_crm_area` VALUES ('330624', '3306', '新昌县'); +INSERT INTO `72crm_crm_area` VALUES ('330681', '3306', '诸暨市'); +INSERT INTO `72crm_crm_area` VALUES ('330682', '3306', '上虞市'); +INSERT INTO `72crm_crm_area` VALUES ('330683', '3306', '嵊州市'); +INSERT INTO `72crm_crm_area` VALUES ('3307', '33', '金华'); +INSERT INTO `72crm_crm_area` VALUES ('330701', '3307', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330702', '3307', '婺城区'); +INSERT INTO `72crm_crm_area` VALUES ('330703', '3307', '金东区'); +INSERT INTO `72crm_crm_area` VALUES ('330723', '3307', '武义县'); +INSERT INTO `72crm_crm_area` VALUES ('330726', '3307', '浦江县'); +INSERT INTO `72crm_crm_area` VALUES ('330727', '3307', '磐安县'); +INSERT INTO `72crm_crm_area` VALUES ('330781', '3307', '兰溪市'); +INSERT INTO `72crm_crm_area` VALUES ('330782', '3307', '义乌市'); +INSERT INTO `72crm_crm_area` VALUES ('330783', '3307', '东阳市'); +INSERT INTO `72crm_crm_area` VALUES ('330784', '3307', '永康市'); +INSERT INTO `72crm_crm_area` VALUES ('3308', '33', '衢州'); +INSERT INTO `72crm_crm_area` VALUES ('330801', '3308', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330802', '3308', '柯城区'); +INSERT INTO `72crm_crm_area` VALUES ('330821', '3308', '衢  县'); +INSERT INTO `72crm_crm_area` VALUES ('330822', '3308', '常山县'); +INSERT INTO `72crm_crm_area` VALUES ('330824', '3308', '开化县'); +INSERT INTO `72crm_crm_area` VALUES ('330825', '3308', '龙游县'); +INSERT INTO `72crm_crm_area` VALUES ('330881', '3308', '江山市'); +INSERT INTO `72crm_crm_area` VALUES ('3309', '33', '舟山'); +INSERT INTO `72crm_crm_area` VALUES ('330901', '3309', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('330902', '3309', '定海区'); +INSERT INTO `72crm_crm_area` VALUES ('330903', '3309', '普陀区'); +INSERT INTO `72crm_crm_area` VALUES ('330921', '3309', '岱山县'); +INSERT INTO `72crm_crm_area` VALUES ('330922', '3309', '嵊泗县'); +INSERT INTO `72crm_crm_area` VALUES ('3310', '33', '台州'); +INSERT INTO `72crm_crm_area` VALUES ('331001', '3310', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('331002', '3310', '椒江区'); +INSERT INTO `72crm_crm_area` VALUES ('331003', '3310', '黄岩区'); +INSERT INTO `72crm_crm_area` VALUES ('331004', '3310', '路桥区'); +INSERT INTO `72crm_crm_area` VALUES ('331021', '3310', '玉环县'); +INSERT INTO `72crm_crm_area` VALUES ('331022', '3310', '三门县'); +INSERT INTO `72crm_crm_area` VALUES ('331023', '3310', '天台县'); +INSERT INTO `72crm_crm_area` VALUES ('331024', '3310', '仙居县'); +INSERT INTO `72crm_crm_area` VALUES ('331081', '3310', '温岭市'); +INSERT INTO `72crm_crm_area` VALUES ('331082', '3310', '临海市'); +INSERT INTO `72crm_crm_area` VALUES ('3311', '33', '丽水'); +INSERT INTO `72crm_crm_area` VALUES ('331101', '3311', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('331102', '3311', '莲都区'); +INSERT INTO `72crm_crm_area` VALUES ('331121', '3311', '青田县'); +INSERT INTO `72crm_crm_area` VALUES ('331122', '3311', '缙云县'); +INSERT INTO `72crm_crm_area` VALUES ('331123', '3311', '遂昌县'); +INSERT INTO `72crm_crm_area` VALUES ('331124', '3311', '松阳县'); +INSERT INTO `72crm_crm_area` VALUES ('331125', '3311', '云和县'); +INSERT INTO `72crm_crm_area` VALUES ('331126', '3311', '庆元县'); +INSERT INTO `72crm_crm_area` VALUES ('331127', '3311', '景宁畲族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('331181', '3311', '龙泉市'); +INSERT INTO `72crm_crm_area` VALUES ('34', '0', '安徽'); +INSERT INTO `72crm_crm_area` VALUES ('3401', '34', '合肥'); +INSERT INTO `72crm_crm_area` VALUES ('340101', '3401', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340102', '3401', '东市区'); +INSERT INTO `72crm_crm_area` VALUES ('340103', '3401', '中市区'); +INSERT INTO `72crm_crm_area` VALUES ('340104', '3401', '西市区'); +INSERT INTO `72crm_crm_area` VALUES ('340111', '3401', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('340121', '3401', '长丰县'); +INSERT INTO `72crm_crm_area` VALUES ('340122', '3401', '肥东县'); +INSERT INTO `72crm_crm_area` VALUES ('340123', '3401', '肥西县'); +INSERT INTO `72crm_crm_area` VALUES ('3402', '34', '芜湖'); +INSERT INTO `72crm_crm_area` VALUES ('340201', '3402', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340202', '3402', '镜湖区'); +INSERT INTO `72crm_crm_area` VALUES ('340203', '3402', '马塘区'); +INSERT INTO `72crm_crm_area` VALUES ('340204', '3402', '新芜区'); +INSERT INTO `72crm_crm_area` VALUES ('340207', '3402', '鸠江区'); +INSERT INTO `72crm_crm_area` VALUES ('340221', '3402', '芜湖县'); +INSERT INTO `72crm_crm_area` VALUES ('340222', '3402', '繁昌县'); +INSERT INTO `72crm_crm_area` VALUES ('340223', '3402', '南陵县'); +INSERT INTO `72crm_crm_area` VALUES ('3403', '34', '蚌埠'); +INSERT INTO `72crm_crm_area` VALUES ('340301', '3403', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340302', '3403', '东市区'); +INSERT INTO `72crm_crm_area` VALUES ('340303', '3403', '中市区'); +INSERT INTO `72crm_crm_area` VALUES ('340304', '3403', '西市区'); +INSERT INTO `72crm_crm_area` VALUES ('340311', '3403', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('340321', '3403', '怀远县'); +INSERT INTO `72crm_crm_area` VALUES ('340322', '3403', '五河县'); +INSERT INTO `72crm_crm_area` VALUES ('340323', '3403', '固镇县'); +INSERT INTO `72crm_crm_area` VALUES ('3404', '34', '淮南'); +INSERT INTO `72crm_crm_area` VALUES ('340401', '3404', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340402', '3404', '大通区'); +INSERT INTO `72crm_crm_area` VALUES ('340403', '3404', '田家庵区'); +INSERT INTO `72crm_crm_area` VALUES ('340404', '3404', '谢家集区'); +INSERT INTO `72crm_crm_area` VALUES ('340405', '3404', '八公山区'); +INSERT INTO `72crm_crm_area` VALUES ('340406', '3404', '潘集区'); +INSERT INTO `72crm_crm_area` VALUES ('340421', '3404', '凤台县'); +INSERT INTO `72crm_crm_area` VALUES ('3405', '34', '马鞍山'); +INSERT INTO `72crm_crm_area` VALUES ('340501', '3405', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340502', '3405', '金家庄区'); +INSERT INTO `72crm_crm_area` VALUES ('340503', '3405', '花山区'); +INSERT INTO `72crm_crm_area` VALUES ('340504', '3405', '雨山区'); +INSERT INTO `72crm_crm_area` VALUES ('340505', '3405', '向山区'); +INSERT INTO `72crm_crm_area` VALUES ('340521', '3405', '当涂县'); +INSERT INTO `72crm_crm_area` VALUES ('3406', '34', '淮北'); +INSERT INTO `72crm_crm_area` VALUES ('340601', '3406', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340602', '3406', '杜集区'); +INSERT INTO `72crm_crm_area` VALUES ('340603', '3406', '相山区'); +INSERT INTO `72crm_crm_area` VALUES ('340604', '3406', '烈山区'); +INSERT INTO `72crm_crm_area` VALUES ('340621', '3406', '濉溪县'); +INSERT INTO `72crm_crm_area` VALUES ('3407', '34', '铜陵'); +INSERT INTO `72crm_crm_area` VALUES ('340701', '3407', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340702', '3407', '铜官山区'); +INSERT INTO `72crm_crm_area` VALUES ('340703', '3407', '狮子山区'); +INSERT INTO `72crm_crm_area` VALUES ('340711', '3407', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('340721', '3407', '铜陵县'); +INSERT INTO `72crm_crm_area` VALUES ('3408', '34', '安庆'); +INSERT INTO `72crm_crm_area` VALUES ('340801', '3408', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('340802', '3408', '迎江区'); +INSERT INTO `72crm_crm_area` VALUES ('340803', '3408', '大观区'); +INSERT INTO `72crm_crm_area` VALUES ('340811', '3408', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('340822', '3408', '怀宁县'); +INSERT INTO `72crm_crm_area` VALUES ('340823', '3408', '枞阳县'); +INSERT INTO `72crm_crm_area` VALUES ('340824', '3408', '潜山县'); +INSERT INTO `72crm_crm_area` VALUES ('340825', '3408', '太湖县'); +INSERT INTO `72crm_crm_area` VALUES ('340826', '3408', '宿松县'); +INSERT INTO `72crm_crm_area` VALUES ('340827', '3408', '望江县'); +INSERT INTO `72crm_crm_area` VALUES ('340828', '3408', '岳西县'); +INSERT INTO `72crm_crm_area` VALUES ('340881', '3408', '桐城市'); +INSERT INTO `72crm_crm_area` VALUES ('3410', '34', '黄山'); +INSERT INTO `72crm_crm_area` VALUES ('341001', '3410', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341002', '3410', '屯溪区'); +INSERT INTO `72crm_crm_area` VALUES ('341003', '3410', '黄山区'); +INSERT INTO `72crm_crm_area` VALUES ('341004', '3410', '徽州区'); +INSERT INTO `72crm_crm_area` VALUES ('341021', '3410', '歙  县'); +INSERT INTO `72crm_crm_area` VALUES ('341022', '3410', '休宁县'); +INSERT INTO `72crm_crm_area` VALUES ('341023', '3410', '黟  县'); +INSERT INTO `72crm_crm_area` VALUES ('341024', '3410', '祁门县'); +INSERT INTO `72crm_crm_area` VALUES ('3411', '34', '滁州'); +INSERT INTO `72crm_crm_area` VALUES ('341101', '3411', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341102', '3411', '琅琊区'); +INSERT INTO `72crm_crm_area` VALUES ('341103', '3411', '南谯区'); +INSERT INTO `72crm_crm_area` VALUES ('341122', '3411', '来安县'); +INSERT INTO `72crm_crm_area` VALUES ('341124', '3411', '全椒县'); +INSERT INTO `72crm_crm_area` VALUES ('341125', '3411', '定远县'); +INSERT INTO `72crm_crm_area` VALUES ('341126', '3411', '凤阳县'); +INSERT INTO `72crm_crm_area` VALUES ('341181', '3411', '天长市'); +INSERT INTO `72crm_crm_area` VALUES ('341182', '3411', '明光市'); +INSERT INTO `72crm_crm_area` VALUES ('3412', '34', '阜阳'); +INSERT INTO `72crm_crm_area` VALUES ('341201', '3412', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341202', '3412', '颍州区'); +INSERT INTO `72crm_crm_area` VALUES ('341203', '3412', '颍东区'); +INSERT INTO `72crm_crm_area` VALUES ('341204', '3412', '颍泉区'); +INSERT INTO `72crm_crm_area` VALUES ('341221', '3412', '临泉县'); +INSERT INTO `72crm_crm_area` VALUES ('341222', '3412', '太和县'); +INSERT INTO `72crm_crm_area` VALUES ('341225', '3412', '阜南县'); +INSERT INTO `72crm_crm_area` VALUES ('341226', '3412', '颍上县'); +INSERT INTO `72crm_crm_area` VALUES ('341282', '3412', '界首市'); +INSERT INTO `72crm_crm_area` VALUES ('3413', '34', '宿州'); +INSERT INTO `72crm_crm_area` VALUES ('341301', '3413', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341302', '3413', '墉桥区'); +INSERT INTO `72crm_crm_area` VALUES ('341321', '3413', '砀山县'); +INSERT INTO `72crm_crm_area` VALUES ('341322', '3413', '萧  县'); +INSERT INTO `72crm_crm_area` VALUES ('341323', '3413', '灵璧县'); +INSERT INTO `72crm_crm_area` VALUES ('341324', '3413', '泗  县'); +INSERT INTO `72crm_crm_area` VALUES ('3414', '34', '巢湖'); +INSERT INTO `72crm_crm_area` VALUES ('341401', '3414', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341402', '3414', '居巢区'); +INSERT INTO `72crm_crm_area` VALUES ('341421', '3414', '庐江县'); +INSERT INTO `72crm_crm_area` VALUES ('341422', '3414', '无为县'); +INSERT INTO `72crm_crm_area` VALUES ('341423', '3414', '含山县'); +INSERT INTO `72crm_crm_area` VALUES ('341424', '3414', '和  县'); +INSERT INTO `72crm_crm_area` VALUES ('3415', '34', '六安'); +INSERT INTO `72crm_crm_area` VALUES ('341501', '3415', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341502', '3415', '金安区'); +INSERT INTO `72crm_crm_area` VALUES ('341503', '3415', '裕安区'); +INSERT INTO `72crm_crm_area` VALUES ('341521', '3415', '寿  县'); +INSERT INTO `72crm_crm_area` VALUES ('341522', '3415', '霍邱县'); +INSERT INTO `72crm_crm_area` VALUES ('341523', '3415', '舒城县'); +INSERT INTO `72crm_crm_area` VALUES ('341524', '3415', '金寨县'); +INSERT INTO `72crm_crm_area` VALUES ('341525', '3415', '霍山县'); +INSERT INTO `72crm_crm_area` VALUES ('3416', '34', '亳州'); +INSERT INTO `72crm_crm_area` VALUES ('341601', '3416', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341602', '3416', '谯城区'); +INSERT INTO `72crm_crm_area` VALUES ('341621', '3416', '涡阳县'); +INSERT INTO `72crm_crm_area` VALUES ('341622', '3416', '蒙城县'); +INSERT INTO `72crm_crm_area` VALUES ('341623', '3416', '利辛县'); +INSERT INTO `72crm_crm_area` VALUES ('3417', '34', '池州'); +INSERT INTO `72crm_crm_area` VALUES ('341701', '3417', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341702', '3417', '贵池区'); +INSERT INTO `72crm_crm_area` VALUES ('341721', '3417', '东至县'); +INSERT INTO `72crm_crm_area` VALUES ('341722', '3417', '石台县'); +INSERT INTO `72crm_crm_area` VALUES ('341723', '3417', '青阳县'); +INSERT INTO `72crm_crm_area` VALUES ('3418', '34', '宣城'); +INSERT INTO `72crm_crm_area` VALUES ('341801', '3418', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('341802', '3418', '宣州区'); +INSERT INTO `72crm_crm_area` VALUES ('341821', '3418', '郎溪县'); +INSERT INTO `72crm_crm_area` VALUES ('341822', '3418', '广德县'); +INSERT INTO `72crm_crm_area` VALUES ('341823', '3418', '泾  县'); +INSERT INTO `72crm_crm_area` VALUES ('341824', '3418', '绩溪县'); +INSERT INTO `72crm_crm_area` VALUES ('341825', '3418', '旌德县'); +INSERT INTO `72crm_crm_area` VALUES ('341881', '3418', '宁国市'); +INSERT INTO `72crm_crm_area` VALUES ('35', '0', '福建'); +INSERT INTO `72crm_crm_area` VALUES ('3501', '35', '福州'); +INSERT INTO `72crm_crm_area` VALUES ('350101', '3501', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350102', '3501', '鼓楼区'); +INSERT INTO `72crm_crm_area` VALUES ('350103', '3501', '台江区'); +INSERT INTO `72crm_crm_area` VALUES ('350104', '3501', '仓山区'); +INSERT INTO `72crm_crm_area` VALUES ('350105', '3501', '马尾区'); +INSERT INTO `72crm_crm_area` VALUES ('350111', '3501', '晋安区'); +INSERT INTO `72crm_crm_area` VALUES ('350121', '3501', '闽侯县'); +INSERT INTO `72crm_crm_area` VALUES ('350122', '3501', '连江县'); +INSERT INTO `72crm_crm_area` VALUES ('350123', '3501', '罗源县'); +INSERT INTO `72crm_crm_area` VALUES ('350124', '3501', '闽清县'); +INSERT INTO `72crm_crm_area` VALUES ('350125', '3501', '永泰县'); +INSERT INTO `72crm_crm_area` VALUES ('350128', '3501', '平潭县'); +INSERT INTO `72crm_crm_area` VALUES ('350181', '3501', '福清市'); +INSERT INTO `72crm_crm_area` VALUES ('350182', '3501', '长乐市'); +INSERT INTO `72crm_crm_area` VALUES ('3502', '35', '厦门'); +INSERT INTO `72crm_crm_area` VALUES ('350201', '3502', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350202', '3502', '鼓浪屿区'); +INSERT INTO `72crm_crm_area` VALUES ('350203', '3502', '思明区'); +INSERT INTO `72crm_crm_area` VALUES ('350204', '3502', '开元区'); +INSERT INTO `72crm_crm_area` VALUES ('350205', '3502', '杏林区'); +INSERT INTO `72crm_crm_area` VALUES ('350206', '3502', '湖里区'); +INSERT INTO `72crm_crm_area` VALUES ('350211', '3502', '集美区'); +INSERT INTO `72crm_crm_area` VALUES ('350212', '3502', '同安区'); +INSERT INTO `72crm_crm_area` VALUES ('3503', '35', '莆田'); +INSERT INTO `72crm_crm_area` VALUES ('350301', '3503', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350302', '3503', '城厢区'); +INSERT INTO `72crm_crm_area` VALUES ('350303', '3503', '涵江区'); +INSERT INTO `72crm_crm_area` VALUES ('350321', '3503', '莆田县'); +INSERT INTO `72crm_crm_area` VALUES ('350322', '3503', '仙游县'); +INSERT INTO `72crm_crm_area` VALUES ('3504', '35', '三明'); +INSERT INTO `72crm_crm_area` VALUES ('350401', '3504', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350402', '3504', '梅列区'); +INSERT INTO `72crm_crm_area` VALUES ('350403', '3504', '三元区'); +INSERT INTO `72crm_crm_area` VALUES ('350421', '3504', '明溪县'); +INSERT INTO `72crm_crm_area` VALUES ('350423', '3504', '清流县'); +INSERT INTO `72crm_crm_area` VALUES ('350424', '3504', '宁化县'); +INSERT INTO `72crm_crm_area` VALUES ('350425', '3504', '大田县'); +INSERT INTO `72crm_crm_area` VALUES ('350426', '3504', '尤溪县'); +INSERT INTO `72crm_crm_area` VALUES ('350427', '3504', '沙  县'); +INSERT INTO `72crm_crm_area` VALUES ('350428', '3504', '将乐县'); +INSERT INTO `72crm_crm_area` VALUES ('350429', '3504', '泰宁县'); +INSERT INTO `72crm_crm_area` VALUES ('350430', '3504', '建宁县'); +INSERT INTO `72crm_crm_area` VALUES ('350481', '3504', '永安市'); +INSERT INTO `72crm_crm_area` VALUES ('3505', '35', '泉州'); +INSERT INTO `72crm_crm_area` VALUES ('350501', '3505', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350502', '3505', '鲤城区'); +INSERT INTO `72crm_crm_area` VALUES ('350503', '3505', '丰泽区'); +INSERT INTO `72crm_crm_area` VALUES ('350504', '3505', '洛江区'); +INSERT INTO `72crm_crm_area` VALUES ('350505', '3505', '泉港区'); +INSERT INTO `72crm_crm_area` VALUES ('350521', '3505', '惠安县'); +INSERT INTO `72crm_crm_area` VALUES ('350524', '3505', '安溪县'); +INSERT INTO `72crm_crm_area` VALUES ('350525', '3505', '永春县'); +INSERT INTO `72crm_crm_area` VALUES ('350526', '3505', '德化县'); +INSERT INTO `72crm_crm_area` VALUES ('350527', '3505', '金门县'); +INSERT INTO `72crm_crm_area` VALUES ('350581', '3505', '石狮市'); +INSERT INTO `72crm_crm_area` VALUES ('350582', '3505', '晋江市'); +INSERT INTO `72crm_crm_area` VALUES ('350583', '3505', '南安市'); +INSERT INTO `72crm_crm_area` VALUES ('3506', '35', '漳州'); +INSERT INTO `72crm_crm_area` VALUES ('350601', '3506', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350602', '3506', '芗城区'); +INSERT INTO `72crm_crm_area` VALUES ('350603', '3506', '龙文区'); +INSERT INTO `72crm_crm_area` VALUES ('350622', '3506', '云霄县'); +INSERT INTO `72crm_crm_area` VALUES ('350623', '3506', '漳浦县'); +INSERT INTO `72crm_crm_area` VALUES ('350624', '3506', '诏安县'); +INSERT INTO `72crm_crm_area` VALUES ('350625', '3506', '长泰县'); +INSERT INTO `72crm_crm_area` VALUES ('350626', '3506', '东山县'); +INSERT INTO `72crm_crm_area` VALUES ('350627', '3506', '南靖县'); +INSERT INTO `72crm_crm_area` VALUES ('350628', '3506', '平和县'); +INSERT INTO `72crm_crm_area` VALUES ('350629', '3506', '华安县'); +INSERT INTO `72crm_crm_area` VALUES ('350681', '3506', '龙海市'); +INSERT INTO `72crm_crm_area` VALUES ('3507', '35', '南平'); +INSERT INTO `72crm_crm_area` VALUES ('350701', '3507', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350702', '3507', '延平区'); +INSERT INTO `72crm_crm_area` VALUES ('350721', '3507', '顺昌县'); +INSERT INTO `72crm_crm_area` VALUES ('350722', '3507', '浦城县'); +INSERT INTO `72crm_crm_area` VALUES ('350723', '3507', '光泽县'); +INSERT INTO `72crm_crm_area` VALUES ('350724', '3507', '松溪县'); +INSERT INTO `72crm_crm_area` VALUES ('350725', '3507', '政和县'); +INSERT INTO `72crm_crm_area` VALUES ('350781', '3507', '邵武市'); +INSERT INTO `72crm_crm_area` VALUES ('350782', '3507', '武夷山市'); +INSERT INTO `72crm_crm_area` VALUES ('350783', '3507', '建瓯市'); +INSERT INTO `72crm_crm_area` VALUES ('350784', '3507', '建阳市'); +INSERT INTO `72crm_crm_area` VALUES ('3508', '35', '龙岩'); +INSERT INTO `72crm_crm_area` VALUES ('350801', '3508', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350802', '3508', '新罗区'); +INSERT INTO `72crm_crm_area` VALUES ('350821', '3508', '长汀县'); +INSERT INTO `72crm_crm_area` VALUES ('350822', '3508', '永定县'); +INSERT INTO `72crm_crm_area` VALUES ('350823', '3508', '上杭县'); +INSERT INTO `72crm_crm_area` VALUES ('350824', '3508', '武平县'); +INSERT INTO `72crm_crm_area` VALUES ('350825', '3508', '连城县'); +INSERT INTO `72crm_crm_area` VALUES ('350881', '3508', '漳平市'); +INSERT INTO `72crm_crm_area` VALUES ('3509', '35', '宁德'); +INSERT INTO `72crm_crm_area` VALUES ('350901', '3509', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('350902', '3509', '蕉城区'); +INSERT INTO `72crm_crm_area` VALUES ('350921', '3509', '霞浦县'); +INSERT INTO `72crm_crm_area` VALUES ('350922', '3509', '古田县'); +INSERT INTO `72crm_crm_area` VALUES ('350923', '3509', '屏南县'); +INSERT INTO `72crm_crm_area` VALUES ('350924', '3509', '寿宁县'); +INSERT INTO `72crm_crm_area` VALUES ('350925', '3509', '周宁县'); +INSERT INTO `72crm_crm_area` VALUES ('350926', '3509', '柘荣县'); +INSERT INTO `72crm_crm_area` VALUES ('350981', '3509', '福安市'); +INSERT INTO `72crm_crm_area` VALUES ('350982', '3509', '福鼎市'); +INSERT INTO `72crm_crm_area` VALUES ('36', '0', '江西'); +INSERT INTO `72crm_crm_area` VALUES ('3601', '36', '南昌'); +INSERT INTO `72crm_crm_area` VALUES ('360101', '3601', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360102', '3601', '东湖区'); +INSERT INTO `72crm_crm_area` VALUES ('360103', '3601', '西湖区'); +INSERT INTO `72crm_crm_area` VALUES ('360104', '3601', '青云谱区'); +INSERT INTO `72crm_crm_area` VALUES ('360105', '3601', '湾里区'); +INSERT INTO `72crm_crm_area` VALUES ('360111', '3601', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('360121', '3601', '南昌县'); +INSERT INTO `72crm_crm_area` VALUES ('360122', '3601', '新建县'); +INSERT INTO `72crm_crm_area` VALUES ('360123', '3601', '安义县'); +INSERT INTO `72crm_crm_area` VALUES ('360124', '3601', '进贤县'); +INSERT INTO `72crm_crm_area` VALUES ('3602', '36', '景德镇'); +INSERT INTO `72crm_crm_area` VALUES ('360201', '3602', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360202', '3602', '昌江区'); +INSERT INTO `72crm_crm_area` VALUES ('360203', '3602', '珠山区'); +INSERT INTO `72crm_crm_area` VALUES ('360222', '3602', '浮梁县'); +INSERT INTO `72crm_crm_area` VALUES ('360281', '3602', '乐平市'); +INSERT INTO `72crm_crm_area` VALUES ('3603', '36', '萍乡'); +INSERT INTO `72crm_crm_area` VALUES ('360301', '3603', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360302', '3603', '安源区'); +INSERT INTO `72crm_crm_area` VALUES ('360313', '3603', '湘东区'); +INSERT INTO `72crm_crm_area` VALUES ('360321', '3603', '莲花县'); +INSERT INTO `72crm_crm_area` VALUES ('360322', '3603', '上栗县'); +INSERT INTO `72crm_crm_area` VALUES ('360323', '3603', '芦溪县'); +INSERT INTO `72crm_crm_area` VALUES ('3604', '36', '九江'); +INSERT INTO `72crm_crm_area` VALUES ('360401', '3604', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360402', '3604', '庐山区'); +INSERT INTO `72crm_crm_area` VALUES ('360403', '3604', '浔阳区'); +INSERT INTO `72crm_crm_area` VALUES ('360421', '3604', '九江县'); +INSERT INTO `72crm_crm_area` VALUES ('360423', '3604', '武宁县'); +INSERT INTO `72crm_crm_area` VALUES ('360424', '3604', '修水县'); +INSERT INTO `72crm_crm_area` VALUES ('360425', '3604', '永修县'); +INSERT INTO `72crm_crm_area` VALUES ('360426', '3604', '德安县'); +INSERT INTO `72crm_crm_area` VALUES ('360427', '3604', '星子县'); +INSERT INTO `72crm_crm_area` VALUES ('360428', '3604', '都昌县'); +INSERT INTO `72crm_crm_area` VALUES ('360429', '3604', '湖口县'); +INSERT INTO `72crm_crm_area` VALUES ('360430', '3604', '彭泽县'); +INSERT INTO `72crm_crm_area` VALUES ('360481', '3604', '瑞昌市'); +INSERT INTO `72crm_crm_area` VALUES ('3605', '36', '新余'); +INSERT INTO `72crm_crm_area` VALUES ('360501', '3605', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360502', '3605', '渝水区'); +INSERT INTO `72crm_crm_area` VALUES ('360521', '3605', '分宜县'); +INSERT INTO `72crm_crm_area` VALUES ('3606', '36', '鹰潭'); +INSERT INTO `72crm_crm_area` VALUES ('360601', '3606', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360602', '3606', '月湖区'); +INSERT INTO `72crm_crm_area` VALUES ('360622', '3606', '余江县'); +INSERT INTO `72crm_crm_area` VALUES ('360681', '3606', '贵溪市'); +INSERT INTO `72crm_crm_area` VALUES ('3607', '36', '赣州'); +INSERT INTO `72crm_crm_area` VALUES ('360701', '3607', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360702', '3607', '章贡区'); +INSERT INTO `72crm_crm_area` VALUES ('360721', '3607', '赣  县'); +INSERT INTO `72crm_crm_area` VALUES ('360722', '3607', '信丰县'); +INSERT INTO `72crm_crm_area` VALUES ('360723', '3607', '大余县'); +INSERT INTO `72crm_crm_area` VALUES ('360724', '3607', '上犹县'); +INSERT INTO `72crm_crm_area` VALUES ('360725', '3607', '崇义县'); +INSERT INTO `72crm_crm_area` VALUES ('360726', '3607', '安远县'); +INSERT INTO `72crm_crm_area` VALUES ('360727', '3607', '龙南县'); +INSERT INTO `72crm_crm_area` VALUES ('360728', '3607', '定南县'); +INSERT INTO `72crm_crm_area` VALUES ('360729', '3607', '全南县'); +INSERT INTO `72crm_crm_area` VALUES ('360730', '3607', '宁都县'); +INSERT INTO `72crm_crm_area` VALUES ('360731', '3607', '于都县'); +INSERT INTO `72crm_crm_area` VALUES ('360732', '3607', '兴国县'); +INSERT INTO `72crm_crm_area` VALUES ('360733', '3607', '会昌县'); +INSERT INTO `72crm_crm_area` VALUES ('360734', '3607', '寻乌县'); +INSERT INTO `72crm_crm_area` VALUES ('360735', '3607', '石城县'); +INSERT INTO `72crm_crm_area` VALUES ('360781', '3607', '瑞金市'); +INSERT INTO `72crm_crm_area` VALUES ('360782', '3607', '南康市'); +INSERT INTO `72crm_crm_area` VALUES ('3608', '36', '吉安'); +INSERT INTO `72crm_crm_area` VALUES ('360801', '3608', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360802', '3608', '吉州区'); +INSERT INTO `72crm_crm_area` VALUES ('360803', '3608', '青原区'); +INSERT INTO `72crm_crm_area` VALUES ('360821', '3608', '吉安县'); +INSERT INTO `72crm_crm_area` VALUES ('360822', '3608', '吉水县'); +INSERT INTO `72crm_crm_area` VALUES ('360823', '3608', '峡江县'); +INSERT INTO `72crm_crm_area` VALUES ('360824', '3608', '新干县'); +INSERT INTO `72crm_crm_area` VALUES ('360825', '3608', '永丰县'); +INSERT INTO `72crm_crm_area` VALUES ('360826', '3608', '泰和县'); +INSERT INTO `72crm_crm_area` VALUES ('360827', '3608', '遂川县'); +INSERT INTO `72crm_crm_area` VALUES ('360828', '3608', '万安县'); +INSERT INTO `72crm_crm_area` VALUES ('360829', '3608', '安福县'); +INSERT INTO `72crm_crm_area` VALUES ('360830', '3608', '永新县'); +INSERT INTO `72crm_crm_area` VALUES ('360881', '3608', '井冈山市'); +INSERT INTO `72crm_crm_area` VALUES ('3609', '36', '宜春'); +INSERT INTO `72crm_crm_area` VALUES ('360901', '3609', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('360902', '3609', '袁州区'); +INSERT INTO `72crm_crm_area` VALUES ('360921', '3609', '奉新县'); +INSERT INTO `72crm_crm_area` VALUES ('360922', '3609', '万载县'); +INSERT INTO `72crm_crm_area` VALUES ('360923', '3609', '上高县'); +INSERT INTO `72crm_crm_area` VALUES ('360924', '3609', '宜丰县'); +INSERT INTO `72crm_crm_area` VALUES ('360925', '3609', '靖安县'); +INSERT INTO `72crm_crm_area` VALUES ('360926', '3609', '铜鼓县'); +INSERT INTO `72crm_crm_area` VALUES ('360981', '3609', '丰城市'); +INSERT INTO `72crm_crm_area` VALUES ('360982', '3609', '樟树市'); +INSERT INTO `72crm_crm_area` VALUES ('360983', '3609', '高安市'); +INSERT INTO `72crm_crm_area` VALUES ('3610', '36', '抚州'); +INSERT INTO `72crm_crm_area` VALUES ('361001', '3610', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('361002', '3610', '临川区'); +INSERT INTO `72crm_crm_area` VALUES ('361021', '3610', '南城县'); +INSERT INTO `72crm_crm_area` VALUES ('361022', '3610', '黎川县'); +INSERT INTO `72crm_crm_area` VALUES ('361023', '3610', '南丰县'); +INSERT INTO `72crm_crm_area` VALUES ('361024', '3610', '崇仁县'); +INSERT INTO `72crm_crm_area` VALUES ('361025', '3610', '乐安县'); +INSERT INTO `72crm_crm_area` VALUES ('361026', '3610', '宜黄县'); +INSERT INTO `72crm_crm_area` VALUES ('361027', '3610', '金溪县'); +INSERT INTO `72crm_crm_area` VALUES ('361028', '3610', '资溪县'); +INSERT INTO `72crm_crm_area` VALUES ('361029', '3610', '东乡县'); +INSERT INTO `72crm_crm_area` VALUES ('361030', '3610', '广昌县'); +INSERT INTO `72crm_crm_area` VALUES ('3611', '36', '上饶'); +INSERT INTO `72crm_crm_area` VALUES ('361101', '3611', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('361102', '3611', '信州区'); +INSERT INTO `72crm_crm_area` VALUES ('361121', '3611', '上饶县'); +INSERT INTO `72crm_crm_area` VALUES ('361122', '3611', '广丰县'); +INSERT INTO `72crm_crm_area` VALUES ('361123', '3611', '玉山县'); +INSERT INTO `72crm_crm_area` VALUES ('361124', '3611', '铅山县'); +INSERT INTO `72crm_crm_area` VALUES ('361125', '3611', '横峰县'); +INSERT INTO `72crm_crm_area` VALUES ('361126', '3611', '弋阳县'); +INSERT INTO `72crm_crm_area` VALUES ('361127', '3611', '余干县'); +INSERT INTO `72crm_crm_area` VALUES ('361128', '3611', '波阳县'); +INSERT INTO `72crm_crm_area` VALUES ('361129', '3611', '万年县'); +INSERT INTO `72crm_crm_area` VALUES ('361130', '3611', '婺源县'); +INSERT INTO `72crm_crm_area` VALUES ('361181', '3611', '德兴市'); +INSERT INTO `72crm_crm_area` VALUES ('37', '0', '山东'); +INSERT INTO `72crm_crm_area` VALUES ('3701', '37', '济南'); +INSERT INTO `72crm_crm_area` VALUES ('370101', '3701', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370102', '3701', '历下区'); +INSERT INTO `72crm_crm_area` VALUES ('370103', '3701', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('370104', '3701', '槐荫区'); +INSERT INTO `72crm_crm_area` VALUES ('370105', '3701', '天桥区'); +INSERT INTO `72crm_crm_area` VALUES ('370112', '3701', '历城区'); +INSERT INTO `72crm_crm_area` VALUES ('370123', '3701', '长清县'); +INSERT INTO `72crm_crm_area` VALUES ('370124', '3701', '平阴县'); +INSERT INTO `72crm_crm_area` VALUES ('370125', '3701', '济阳县'); +INSERT INTO `72crm_crm_area` VALUES ('370126', '3701', '商河县'); +INSERT INTO `72crm_crm_area` VALUES ('370181', '3701', '章丘市'); +INSERT INTO `72crm_crm_area` VALUES ('3702', '37', '青岛'); +INSERT INTO `72crm_crm_area` VALUES ('370201', '3702', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370202', '3702', '市南区'); +INSERT INTO `72crm_crm_area` VALUES ('370203', '3702', '市北区'); +INSERT INTO `72crm_crm_area` VALUES ('370205', '3702', '四方区'); +INSERT INTO `72crm_crm_area` VALUES ('370211', '3702', '黄岛区'); +INSERT INTO `72crm_crm_area` VALUES ('370212', '3702', '崂山区'); +INSERT INTO `72crm_crm_area` VALUES ('370213', '3702', '李沧区'); +INSERT INTO `72crm_crm_area` VALUES ('370214', '3702', '城阳区'); +INSERT INTO `72crm_crm_area` VALUES ('370281', '3702', '胶州市'); +INSERT INTO `72crm_crm_area` VALUES ('370282', '3702', '即墨市'); +INSERT INTO `72crm_crm_area` VALUES ('370283', '3702', '平度市'); +INSERT INTO `72crm_crm_area` VALUES ('370284', '3702', '胶南市'); +INSERT INTO `72crm_crm_area` VALUES ('370285', '3702', '莱西市'); +INSERT INTO `72crm_crm_area` VALUES ('3703', '37', '淄博'); +INSERT INTO `72crm_crm_area` VALUES ('370301', '3703', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370302', '3703', '淄川区'); +INSERT INTO `72crm_crm_area` VALUES ('370303', '3703', '张店区'); +INSERT INTO `72crm_crm_area` VALUES ('370304', '3703', '博山区'); +INSERT INTO `72crm_crm_area` VALUES ('370305', '3703', '临淄区'); +INSERT INTO `72crm_crm_area` VALUES ('370306', '3703', '周村区'); +INSERT INTO `72crm_crm_area` VALUES ('370321', '3703', '桓台县'); +INSERT INTO `72crm_crm_area` VALUES ('370322', '3703', '高青县'); +INSERT INTO `72crm_crm_area` VALUES ('370323', '3703', '沂源县'); +INSERT INTO `72crm_crm_area` VALUES ('3704', '37', '枣庄'); +INSERT INTO `72crm_crm_area` VALUES ('370401', '3704', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370402', '3704', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('370403', '3704', '薛城区'); +INSERT INTO `72crm_crm_area` VALUES ('370404', '3704', '峄城区'); +INSERT INTO `72crm_crm_area` VALUES ('370405', '3704', '台儿庄区'); +INSERT INTO `72crm_crm_area` VALUES ('370406', '3704', '山亭区'); +INSERT INTO `72crm_crm_area` VALUES ('370481', '3704', '滕州市'); +INSERT INTO `72crm_crm_area` VALUES ('3705', '37', '东营'); +INSERT INTO `72crm_crm_area` VALUES ('370501', '3705', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370502', '3705', '东营区'); +INSERT INTO `72crm_crm_area` VALUES ('370503', '3705', '河口区'); +INSERT INTO `72crm_crm_area` VALUES ('370521', '3705', '垦利县'); +INSERT INTO `72crm_crm_area` VALUES ('370522', '3705', '利津县'); +INSERT INTO `72crm_crm_area` VALUES ('370523', '3705', '广饶县'); +INSERT INTO `72crm_crm_area` VALUES ('3706', '37', '烟台'); +INSERT INTO `72crm_crm_area` VALUES ('370601', '3706', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370602', '3706', '芝罘区'); +INSERT INTO `72crm_crm_area` VALUES ('370611', '3706', '福山区'); +INSERT INTO `72crm_crm_area` VALUES ('370612', '3706', '牟平区'); +INSERT INTO `72crm_crm_area` VALUES ('370613', '3706', '莱山区'); +INSERT INTO `72crm_crm_area` VALUES ('370634', '3706', '长岛县'); +INSERT INTO `72crm_crm_area` VALUES ('370681', '3706', '龙口市'); +INSERT INTO `72crm_crm_area` VALUES ('370682', '3706', '莱阳市'); +INSERT INTO `72crm_crm_area` VALUES ('370683', '3706', '莱州市'); +INSERT INTO `72crm_crm_area` VALUES ('370684', '3706', '蓬莱市'); +INSERT INTO `72crm_crm_area` VALUES ('370685', '3706', '招远市'); +INSERT INTO `72crm_crm_area` VALUES ('370686', '3706', '栖霞市'); +INSERT INTO `72crm_crm_area` VALUES ('370687', '3706', '海阳市'); +INSERT INTO `72crm_crm_area` VALUES ('3707', '37', '潍坊'); +INSERT INTO `72crm_crm_area` VALUES ('370701', '3707', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370702', '3707', '潍城区'); +INSERT INTO `72crm_crm_area` VALUES ('370703', '3707', '寒亭区'); +INSERT INTO `72crm_crm_area` VALUES ('370704', '3707', '坊子区'); +INSERT INTO `72crm_crm_area` VALUES ('370705', '3707', '奎文区'); +INSERT INTO `72crm_crm_area` VALUES ('370724', '3707', '临朐县'); +INSERT INTO `72crm_crm_area` VALUES ('370725', '3707', '昌乐县'); +INSERT INTO `72crm_crm_area` VALUES ('370781', '3707', '青州市'); +INSERT INTO `72crm_crm_area` VALUES ('370782', '3707', '诸城市'); +INSERT INTO `72crm_crm_area` VALUES ('370783', '3707', '寿光市'); +INSERT INTO `72crm_crm_area` VALUES ('370784', '3707', '安丘市'); +INSERT INTO `72crm_crm_area` VALUES ('370785', '3707', '高密市'); +INSERT INTO `72crm_crm_area` VALUES ('370786', '3707', '昌邑市'); +INSERT INTO `72crm_crm_area` VALUES ('3708', '37', '济宁'); +INSERT INTO `72crm_crm_area` VALUES ('370801', '3708', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370802', '3708', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('370811', '3708', '任城区'); +INSERT INTO `72crm_crm_area` VALUES ('370826', '3708', '微山县'); +INSERT INTO `72crm_crm_area` VALUES ('370827', '3708', '鱼台县'); +INSERT INTO `72crm_crm_area` VALUES ('370828', '3708', '金乡县'); +INSERT INTO `72crm_crm_area` VALUES ('370829', '3708', '嘉祥县'); +INSERT INTO `72crm_crm_area` VALUES ('370830', '3708', '汶上县'); +INSERT INTO `72crm_crm_area` VALUES ('370831', '3708', '泗水县'); +INSERT INTO `72crm_crm_area` VALUES ('370832', '3708', '梁山县'); +INSERT INTO `72crm_crm_area` VALUES ('370881', '3708', '曲阜市'); +INSERT INTO `72crm_crm_area` VALUES ('370882', '3708', '兖州市'); +INSERT INTO `72crm_crm_area` VALUES ('370883', '3708', '邹城市'); +INSERT INTO `72crm_crm_area` VALUES ('3709', '37', '泰安'); +INSERT INTO `72crm_crm_area` VALUES ('370901', '3709', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('370902', '3709', '泰山区'); +INSERT INTO `72crm_crm_area` VALUES ('370903', '3709', '岱岳区'); +INSERT INTO `72crm_crm_area` VALUES ('370921', '3709', '宁阳县'); +INSERT INTO `72crm_crm_area` VALUES ('370923', '3709', '东平县'); +INSERT INTO `72crm_crm_area` VALUES ('370982', '3709', '新泰市'); +INSERT INTO `72crm_crm_area` VALUES ('370983', '3709', '肥城市'); +INSERT INTO `72crm_crm_area` VALUES ('3710', '37', '威海'); +INSERT INTO `72crm_crm_area` VALUES ('371001', '3710', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371002', '3710', '环翠区'); +INSERT INTO `72crm_crm_area` VALUES ('371081', '3710', '文登市'); +INSERT INTO `72crm_crm_area` VALUES ('371082', '3710', '荣成市'); +INSERT INTO `72crm_crm_area` VALUES ('371083', '3710', '乳山市'); +INSERT INTO `72crm_crm_area` VALUES ('3711', '37', '日照'); +INSERT INTO `72crm_crm_area` VALUES ('371101', '3711', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371102', '3711', '东港区'); +INSERT INTO `72crm_crm_area` VALUES ('371121', '3711', '五莲县'); +INSERT INTO `72crm_crm_area` VALUES ('371122', '3711', '莒  县'); +INSERT INTO `72crm_crm_area` VALUES ('3712', '37', '莱芜'); +INSERT INTO `72crm_crm_area` VALUES ('371201', '3712', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371202', '3712', '莱城区'); +INSERT INTO `72crm_crm_area` VALUES ('371203', '3712', '钢城区'); +INSERT INTO `72crm_crm_area` VALUES ('3713', '37', '临沂'); +INSERT INTO `72crm_crm_area` VALUES ('371301', '3713', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371302', '3713', '兰山区'); +INSERT INTO `72crm_crm_area` VALUES ('371311', '3713', '罗庄区'); +INSERT INTO `72crm_crm_area` VALUES ('371312', '3713', '河东区'); +INSERT INTO `72crm_crm_area` VALUES ('371321', '3713', '沂南县'); +INSERT INTO `72crm_crm_area` VALUES ('371322', '3713', '郯城县'); +INSERT INTO `72crm_crm_area` VALUES ('371323', '3713', '沂水县'); +INSERT INTO `72crm_crm_area` VALUES ('371324', '3713', '苍山县'); +INSERT INTO `72crm_crm_area` VALUES ('371325', '3713', '费  县'); +INSERT INTO `72crm_crm_area` VALUES ('371326', '3713', '平邑县'); +INSERT INTO `72crm_crm_area` VALUES ('371327', '3713', '莒南县'); +INSERT INTO `72crm_crm_area` VALUES ('371328', '3713', '蒙阴县'); +INSERT INTO `72crm_crm_area` VALUES ('371329', '3713', '临沭县'); +INSERT INTO `72crm_crm_area` VALUES ('3714', '37', '德州'); +INSERT INTO `72crm_crm_area` VALUES ('371401', '3714', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371402', '3714', '德城区'); +INSERT INTO `72crm_crm_area` VALUES ('371421', '3714', '陵  县'); +INSERT INTO `72crm_crm_area` VALUES ('371422', '3714', '宁津县'); +INSERT INTO `72crm_crm_area` VALUES ('371423', '3714', '庆云县'); +INSERT INTO `72crm_crm_area` VALUES ('371424', '3714', '临邑县'); +INSERT INTO `72crm_crm_area` VALUES ('371425', '3714', '齐河县'); +INSERT INTO `72crm_crm_area` VALUES ('371426', '3714', '平原县'); +INSERT INTO `72crm_crm_area` VALUES ('371427', '3714', '夏津县'); +INSERT INTO `72crm_crm_area` VALUES ('371428', '3714', '武城县'); +INSERT INTO `72crm_crm_area` VALUES ('371481', '3714', '乐陵市'); +INSERT INTO `72crm_crm_area` VALUES ('371482', '3714', '禹城市'); +INSERT INTO `72crm_crm_area` VALUES ('3715', '37', '聊城'); +INSERT INTO `72crm_crm_area` VALUES ('371501', '3715', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371502', '3715', '东昌府区'); +INSERT INTO `72crm_crm_area` VALUES ('371521', '3715', '阳谷县'); +INSERT INTO `72crm_crm_area` VALUES ('371522', '3715', '莘  县'); +INSERT INTO `72crm_crm_area` VALUES ('371523', '3715', '茌平县'); +INSERT INTO `72crm_crm_area` VALUES ('371524', '3715', '东阿县'); +INSERT INTO `72crm_crm_area` VALUES ('371525', '3715', '冠  县'); +INSERT INTO `72crm_crm_area` VALUES ('371526', '3715', '高唐县'); +INSERT INTO `72crm_crm_area` VALUES ('371581', '3715', '临清市'); +INSERT INTO `72crm_crm_area` VALUES ('3716', '37', '滨州'); +INSERT INTO `72crm_crm_area` VALUES ('371601', '3716', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371603', '3716', '滨城区'); +INSERT INTO `72crm_crm_area` VALUES ('371621', '3716', '惠民县'); +INSERT INTO `72crm_crm_area` VALUES ('371622', '3716', '阳信县'); +INSERT INTO `72crm_crm_area` VALUES ('371623', '3716', '无棣县'); +INSERT INTO `72crm_crm_area` VALUES ('371624', '3716', '沾化县'); +INSERT INTO `72crm_crm_area` VALUES ('371625', '3716', '博兴县'); +INSERT INTO `72crm_crm_area` VALUES ('371626', '3716', '邹平县'); +INSERT INTO `72crm_crm_area` VALUES ('3717', '37', '菏泽'); +INSERT INTO `72crm_crm_area` VALUES ('371701', '3717', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('371702', '3717', '牡丹区'); +INSERT INTO `72crm_crm_area` VALUES ('371721', '3717', '曹  县'); +INSERT INTO `72crm_crm_area` VALUES ('371722', '3717', '单  县'); +INSERT INTO `72crm_crm_area` VALUES ('371723', '3717', '成武县'); +INSERT INTO `72crm_crm_area` VALUES ('371724', '3717', '巨野县'); +INSERT INTO `72crm_crm_area` VALUES ('371725', '3717', '郓城县'); +INSERT INTO `72crm_crm_area` VALUES ('371726', '3717', '鄄城县'); +INSERT INTO `72crm_crm_area` VALUES ('371727', '3717', '定陶县'); +INSERT INTO `72crm_crm_area` VALUES ('371728', '3717', '东明县'); +INSERT INTO `72crm_crm_area` VALUES ('41', '0', '河南'); +INSERT INTO `72crm_crm_area` VALUES ('4101', '41', '郑州'); +INSERT INTO `72crm_crm_area` VALUES ('410101', '4101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410102', '4101', '中原区'); +INSERT INTO `72crm_crm_area` VALUES ('410103', '4101', '二七区'); +INSERT INTO `72crm_crm_area` VALUES ('410104', '4101', '管城回族区'); +INSERT INTO `72crm_crm_area` VALUES ('410105', '4101', '金水区'); +INSERT INTO `72crm_crm_area` VALUES ('410106', '4101', '上街区'); +INSERT INTO `72crm_crm_area` VALUES ('410108', '4101', '邙山区'); +INSERT INTO `72crm_crm_area` VALUES ('410122', '4101', '中牟县'); +INSERT INTO `72crm_crm_area` VALUES ('410181', '4101', '巩义市'); +INSERT INTO `72crm_crm_area` VALUES ('410182', '4101', '荥阳市'); +INSERT INTO `72crm_crm_area` VALUES ('410183', '4101', '新密市'); +INSERT INTO `72crm_crm_area` VALUES ('410184', '4101', '新郑市'); +INSERT INTO `72crm_crm_area` VALUES ('410185', '4101', '登封市'); +INSERT INTO `72crm_crm_area` VALUES ('4102', '41', '开封'); +INSERT INTO `72crm_crm_area` VALUES ('410201', '4102', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410202', '4102', '龙亭区'); +INSERT INTO `72crm_crm_area` VALUES ('410203', '4102', '顺河回族区'); +INSERT INTO `72crm_crm_area` VALUES ('410204', '4102', '鼓楼区'); +INSERT INTO `72crm_crm_area` VALUES ('410205', '4102', '南关区'); +INSERT INTO `72crm_crm_area` VALUES ('410211', '4102', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('410221', '4102', '杞  县'); +INSERT INTO `72crm_crm_area` VALUES ('410222', '4102', '通许县'); +INSERT INTO `72crm_crm_area` VALUES ('410223', '4102', '尉氏县'); +INSERT INTO `72crm_crm_area` VALUES ('410224', '4102', '开封县'); +INSERT INTO `72crm_crm_area` VALUES ('410225', '4102', '兰考县'); +INSERT INTO `72crm_crm_area` VALUES ('4103', '41', '洛阳'); +INSERT INTO `72crm_crm_area` VALUES ('410301', '4103', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410302', '4103', '老城区'); +INSERT INTO `72crm_crm_area` VALUES ('410303', '4103', '西工区'); +INSERT INTO `72crm_crm_area` VALUES ('410304', '4103', '廛河回族区'); +INSERT INTO `72crm_crm_area` VALUES ('410305', '4103', '涧西区'); +INSERT INTO `72crm_crm_area` VALUES ('410306', '4103', '吉利区'); +INSERT INTO `72crm_crm_area` VALUES ('410307', '4103', '洛龙区'); +INSERT INTO `72crm_crm_area` VALUES ('410322', '4103', '孟津县'); +INSERT INTO `72crm_crm_area` VALUES ('410323', '4103', '新安县'); +INSERT INTO `72crm_crm_area` VALUES ('410324', '4103', '栾川县'); +INSERT INTO `72crm_crm_area` VALUES ('410325', '4103', '嵩  县'); +INSERT INTO `72crm_crm_area` VALUES ('410326', '4103', '汝阳县'); +INSERT INTO `72crm_crm_area` VALUES ('410327', '4103', '宜阳县'); +INSERT INTO `72crm_crm_area` VALUES ('410328', '4103', '洛宁县'); +INSERT INTO `72crm_crm_area` VALUES ('410329', '4103', '伊川县'); +INSERT INTO `72crm_crm_area` VALUES ('410381', '4103', '偃师市'); +INSERT INTO `72crm_crm_area` VALUES ('4104', '41', '平顶山'); +INSERT INTO `72crm_crm_area` VALUES ('410401', '4104', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410402', '4104', '新华区'); +INSERT INTO `72crm_crm_area` VALUES ('410403', '4104', '卫东区'); +INSERT INTO `72crm_crm_area` VALUES ('410404', '4104', '石龙区'); +INSERT INTO `72crm_crm_area` VALUES ('410411', '4104', '湛河区'); +INSERT INTO `72crm_crm_area` VALUES ('410421', '4104', '宝丰县'); +INSERT INTO `72crm_crm_area` VALUES ('410422', '4104', '叶  县'); +INSERT INTO `72crm_crm_area` VALUES ('410423', '4104', '鲁山县'); +INSERT INTO `72crm_crm_area` VALUES ('410425', '4104', '郏  县'); +INSERT INTO `72crm_crm_area` VALUES ('410481', '4104', '舞钢市'); +INSERT INTO `72crm_crm_area` VALUES ('410482', '4104', '汝州市'); +INSERT INTO `72crm_crm_area` VALUES ('4105', '41', '安阳'); +INSERT INTO `72crm_crm_area` VALUES ('410501', '4105', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410502', '4105', '文峰区'); +INSERT INTO `72crm_crm_area` VALUES ('410503', '4105', '北关区'); +INSERT INTO `72crm_crm_area` VALUES ('410504', '4105', '铁西区'); +INSERT INTO `72crm_crm_area` VALUES ('410511', '4105', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('410522', '4105', '安阳县'); +INSERT INTO `72crm_crm_area` VALUES ('410523', '4105', '汤阴县'); +INSERT INTO `72crm_crm_area` VALUES ('410526', '4105', '滑  县'); +INSERT INTO `72crm_crm_area` VALUES ('410527', '4105', '内黄县'); +INSERT INTO `72crm_crm_area` VALUES ('410581', '4105', '林州市'); +INSERT INTO `72crm_crm_area` VALUES ('4106', '41', '鹤壁'); +INSERT INTO `72crm_crm_area` VALUES ('410601', '4106', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410602', '4106', '鹤山区'); +INSERT INTO `72crm_crm_area` VALUES ('410603', '4106', '山城区'); +INSERT INTO `72crm_crm_area` VALUES ('410611', '4106', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('410621', '4106', '浚  县'); +INSERT INTO `72crm_crm_area` VALUES ('410622', '4106', '淇  县'); +INSERT INTO `72crm_crm_area` VALUES ('4107', '41', '新乡'); +INSERT INTO `72crm_crm_area` VALUES ('410701', '4107', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410702', '4107', '红旗区'); +INSERT INTO `72crm_crm_area` VALUES ('410703', '4107', '新华区'); +INSERT INTO `72crm_crm_area` VALUES ('410704', '4107', '北站区'); +INSERT INTO `72crm_crm_area` VALUES ('410711', '4107', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('410721', '4107', '新乡县'); +INSERT INTO `72crm_crm_area` VALUES ('410724', '4107', '获嘉县'); +INSERT INTO `72crm_crm_area` VALUES ('410725', '4107', '原阳县'); +INSERT INTO `72crm_crm_area` VALUES ('410726', '4107', '延津县'); +INSERT INTO `72crm_crm_area` VALUES ('410727', '4107', '封丘县'); +INSERT INTO `72crm_crm_area` VALUES ('410728', '4107', '长垣县'); +INSERT INTO `72crm_crm_area` VALUES ('410781', '4107', '卫辉市'); +INSERT INTO `72crm_crm_area` VALUES ('410782', '4107', '辉县市'); +INSERT INTO `72crm_crm_area` VALUES ('4108', '41', '焦作'); +INSERT INTO `72crm_crm_area` VALUES ('410801', '4108', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410802', '4108', '解放区'); +INSERT INTO `72crm_crm_area` VALUES ('410803', '4108', '中站区'); +INSERT INTO `72crm_crm_area` VALUES ('410804', '4108', '马村区'); +INSERT INTO `72crm_crm_area` VALUES ('410811', '4108', '山阳区'); +INSERT INTO `72crm_crm_area` VALUES ('410821', '4108', '修武县'); +INSERT INTO `72crm_crm_area` VALUES ('410822', '4108', '博爱县'); +INSERT INTO `72crm_crm_area` VALUES ('410823', '4108', '武陟县'); +INSERT INTO `72crm_crm_area` VALUES ('410825', '4108', '温  县'); +INSERT INTO `72crm_crm_area` VALUES ('410881', '4108', '济源市'); +INSERT INTO `72crm_crm_area` VALUES ('410882', '4108', '沁阳市'); +INSERT INTO `72crm_crm_area` VALUES ('410883', '4108', '孟州市'); +INSERT INTO `72crm_crm_area` VALUES ('4109', '41', '濮阳'); +INSERT INTO `72crm_crm_area` VALUES ('410901', '4109', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('410902', '4109', '市  区'); +INSERT INTO `72crm_crm_area` VALUES ('410922', '4109', '清丰县'); +INSERT INTO `72crm_crm_area` VALUES ('410923', '4109', '南乐县'); +INSERT INTO `72crm_crm_area` VALUES ('410926', '4109', '范  县'); +INSERT INTO `72crm_crm_area` VALUES ('410927', '4109', '台前县'); +INSERT INTO `72crm_crm_area` VALUES ('410928', '4109', '濮阳县'); +INSERT INTO `72crm_crm_area` VALUES ('4110', '41', '许昌'); +INSERT INTO `72crm_crm_area` VALUES ('411001', '4110', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411002', '4110', '魏都区'); +INSERT INTO `72crm_crm_area` VALUES ('411023', '4110', '许昌县'); +INSERT INTO `72crm_crm_area` VALUES ('411024', '4110', '鄢陵县'); +INSERT INTO `72crm_crm_area` VALUES ('411025', '4110', '襄城县'); +INSERT INTO `72crm_crm_area` VALUES ('411081', '4110', '禹州市'); +INSERT INTO `72crm_crm_area` VALUES ('411082', '4110', '长葛市'); +INSERT INTO `72crm_crm_area` VALUES ('4111', '41', '漯河'); +INSERT INTO `72crm_crm_area` VALUES ('411101', '4111', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411102', '4111', '源汇区'); +INSERT INTO `72crm_crm_area` VALUES ('411121', '4111', '舞阳县'); +INSERT INTO `72crm_crm_area` VALUES ('411122', '4111', '临颍县'); +INSERT INTO `72crm_crm_area` VALUES ('411123', '4111', '郾城县'); +INSERT INTO `72crm_crm_area` VALUES ('4112', '41', '三门峡'); +INSERT INTO `72crm_crm_area` VALUES ('411201', '4112', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411202', '4112', '湖滨区'); +INSERT INTO `72crm_crm_area` VALUES ('411221', '4112', '渑池县'); +INSERT INTO `72crm_crm_area` VALUES ('411222', '4112', '陕  县'); +INSERT INTO `72crm_crm_area` VALUES ('411224', '4112', '卢氏县'); +INSERT INTO `72crm_crm_area` VALUES ('411281', '4112', '义马市'); +INSERT INTO `72crm_crm_area` VALUES ('411282', '4112', '灵宝市'); +INSERT INTO `72crm_crm_area` VALUES ('4113', '41', '南阳'); +INSERT INTO `72crm_crm_area` VALUES ('411301', '4113', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411302', '4113', '宛城区'); +INSERT INTO `72crm_crm_area` VALUES ('411303', '4113', '卧龙区'); +INSERT INTO `72crm_crm_area` VALUES ('411321', '4113', '南召县'); +INSERT INTO `72crm_crm_area` VALUES ('411322', '4113', '方城县'); +INSERT INTO `72crm_crm_area` VALUES ('411323', '4113', '西峡县'); +INSERT INTO `72crm_crm_area` VALUES ('411324', '4113', '镇平县'); +INSERT INTO `72crm_crm_area` VALUES ('411325', '4113', '内乡县'); +INSERT INTO `72crm_crm_area` VALUES ('411326', '4113', '淅川县'); +INSERT INTO `72crm_crm_area` VALUES ('411327', '4113', '社旗县'); +INSERT INTO `72crm_crm_area` VALUES ('411328', '4113', '唐河县'); +INSERT INTO `72crm_crm_area` VALUES ('411329', '4113', '新野县'); +INSERT INTO `72crm_crm_area` VALUES ('411330', '4113', '桐柏县'); +INSERT INTO `72crm_crm_area` VALUES ('411381', '4113', '邓州市'); +INSERT INTO `72crm_crm_area` VALUES ('4114', '41', '商丘'); +INSERT INTO `72crm_crm_area` VALUES ('411401', '4114', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411402', '4114', '梁园区'); +INSERT INTO `72crm_crm_area` VALUES ('411403', '4114', '睢阳区'); +INSERT INTO `72crm_crm_area` VALUES ('411421', '4114', '民权县'); +INSERT INTO `72crm_crm_area` VALUES ('411422', '4114', '睢  县'); +INSERT INTO `72crm_crm_area` VALUES ('411423', '4114', '宁陵县'); +INSERT INTO `72crm_crm_area` VALUES ('411424', '4114', '柘城县'); +INSERT INTO `72crm_crm_area` VALUES ('411425', '4114', '虞城县'); +INSERT INTO `72crm_crm_area` VALUES ('411426', '4114', '夏邑县'); +INSERT INTO `72crm_crm_area` VALUES ('411481', '4114', '永城市'); +INSERT INTO `72crm_crm_area` VALUES ('4115', '41', '信阳'); +INSERT INTO `72crm_crm_area` VALUES ('411501', '4115', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411502', '4115', '师河区'); +INSERT INTO `72crm_crm_area` VALUES ('411503', '4115', '平桥区'); +INSERT INTO `72crm_crm_area` VALUES ('411521', '4115', '罗山县'); +INSERT INTO `72crm_crm_area` VALUES ('411522', '4115', '光山县'); +INSERT INTO `72crm_crm_area` VALUES ('411523', '4115', '新  县'); +INSERT INTO `72crm_crm_area` VALUES ('411524', '4115', '商城县'); +INSERT INTO `72crm_crm_area` VALUES ('411525', '4115', '固始县'); +INSERT INTO `72crm_crm_area` VALUES ('411526', '4115', '潢川县'); +INSERT INTO `72crm_crm_area` VALUES ('411527', '4115', '淮滨县'); +INSERT INTO `72crm_crm_area` VALUES ('411528', '4115', '息  县'); +INSERT INTO `72crm_crm_area` VALUES ('4116', '41', '周口'); +INSERT INTO `72crm_crm_area` VALUES ('411601', '4116', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411602', '4116', '川汇区'); +INSERT INTO `72crm_crm_area` VALUES ('411621', '4116', '扶沟县'); +INSERT INTO `72crm_crm_area` VALUES ('411622', '4116', '西华县'); +INSERT INTO `72crm_crm_area` VALUES ('411623', '4116', '商水县'); +INSERT INTO `72crm_crm_area` VALUES ('411624', '4116', '沈丘县'); +INSERT INTO `72crm_crm_area` VALUES ('411625', '4116', '郸城县'); +INSERT INTO `72crm_crm_area` VALUES ('411626', '4116', '淮阳县'); +INSERT INTO `72crm_crm_area` VALUES ('411627', '4116', '太康县'); +INSERT INTO `72crm_crm_area` VALUES ('411628', '4116', '鹿邑县'); +INSERT INTO `72crm_crm_area` VALUES ('411681', '4116', '项城市'); +INSERT INTO `72crm_crm_area` VALUES ('4117', '41', '驻马店'); +INSERT INTO `72crm_crm_area` VALUES ('411701', '4117', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('411702', '4117', '驿城区'); +INSERT INTO `72crm_crm_area` VALUES ('411721', '4117', '西平县'); +INSERT INTO `72crm_crm_area` VALUES ('411722', '4117', '上蔡县'); +INSERT INTO `72crm_crm_area` VALUES ('411723', '4117', '平舆县'); +INSERT INTO `72crm_crm_area` VALUES ('411724', '4117', '正阳县'); +INSERT INTO `72crm_crm_area` VALUES ('411725', '4117', '确山县'); +INSERT INTO `72crm_crm_area` VALUES ('411726', '4117', '泌阳县'); +INSERT INTO `72crm_crm_area` VALUES ('411727', '4117', '汝南县'); +INSERT INTO `72crm_crm_area` VALUES ('411728', '4117', '遂平县'); +INSERT INTO `72crm_crm_area` VALUES ('411729', '4117', '新蔡县'); +INSERT INTO `72crm_crm_area` VALUES ('42', '0', '湖北'); +INSERT INTO `72crm_crm_area` VALUES ('4201', '42', '武汉'); +INSERT INTO `72crm_crm_area` VALUES ('420101', '4201', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420102', '4201', '江岸区'); +INSERT INTO `72crm_crm_area` VALUES ('420103', '4201', '江汉区'); +INSERT INTO `72crm_crm_area` VALUES ('420104', '4201', '乔口区'); +INSERT INTO `72crm_crm_area` VALUES ('420105', '4201', '汉阳区'); +INSERT INTO `72crm_crm_area` VALUES ('420106', '4201', '武昌区'); +INSERT INTO `72crm_crm_area` VALUES ('420107', '4201', '青山区'); +INSERT INTO `72crm_crm_area` VALUES ('420111', '4201', '洪山区'); +INSERT INTO `72crm_crm_area` VALUES ('420112', '4201', '东西湖区'); +INSERT INTO `72crm_crm_area` VALUES ('420113', '4201', '汉南区'); +INSERT INTO `72crm_crm_area` VALUES ('420114', '4201', '蔡甸区'); +INSERT INTO `72crm_crm_area` VALUES ('420115', '4201', '江夏区'); +INSERT INTO `72crm_crm_area` VALUES ('420116', '4201', '黄陂区'); +INSERT INTO `72crm_crm_area` VALUES ('420117', '4201', '新洲区'); +INSERT INTO `72crm_crm_area` VALUES ('4202', '42', '黄石'); +INSERT INTO `72crm_crm_area` VALUES ('420201', '4202', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420202', '4202', '黄石港区'); +INSERT INTO `72crm_crm_area` VALUES ('420203', '4202', '石灰窑区'); +INSERT INTO `72crm_crm_area` VALUES ('420204', '4202', '下陆区'); +INSERT INTO `72crm_crm_area` VALUES ('420205', '4202', '铁山区'); +INSERT INTO `72crm_crm_area` VALUES ('420222', '4202', '阳新县'); +INSERT INTO `72crm_crm_area` VALUES ('420281', '4202', '大冶市'); +INSERT INTO `72crm_crm_area` VALUES ('4203', '42', '十堰'); +INSERT INTO `72crm_crm_area` VALUES ('420301', '4203', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420302', '4203', '茅箭区'); +INSERT INTO `72crm_crm_area` VALUES ('420303', '4203', '张湾区'); +INSERT INTO `72crm_crm_area` VALUES ('420321', '4203', '郧  县'); +INSERT INTO `72crm_crm_area` VALUES ('420322', '4203', '郧西县'); +INSERT INTO `72crm_crm_area` VALUES ('420323', '4203', '竹山县'); +INSERT INTO `72crm_crm_area` VALUES ('420324', '4203', '竹溪县'); +INSERT INTO `72crm_crm_area` VALUES ('420325', '4203', '房  县'); +INSERT INTO `72crm_crm_area` VALUES ('420381', '4203', '丹江口市'); +INSERT INTO `72crm_crm_area` VALUES ('4205', '42', '宜昌'); +INSERT INTO `72crm_crm_area` VALUES ('420501', '4205', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420502', '4205', '西陵区'); +INSERT INTO `72crm_crm_area` VALUES ('420503', '4205', '伍家岗区'); +INSERT INTO `72crm_crm_area` VALUES ('420504', '4205', '点军区'); +INSERT INTO `72crm_crm_area` VALUES ('420505', '4205', '虎亭区'); +INSERT INTO `72crm_crm_area` VALUES ('420521', '4205', '宜昌县'); +INSERT INTO `72crm_crm_area` VALUES ('420525', '4205', '远安县'); +INSERT INTO `72crm_crm_area` VALUES ('420526', '4205', '兴山县'); +INSERT INTO `72crm_crm_area` VALUES ('420527', '4205', '秭归县'); +INSERT INTO `72crm_crm_area` VALUES ('420528', '4205', '长阳土家族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('420529', '4205', '五峰土家族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('420581', '4205', '宜都市'); +INSERT INTO `72crm_crm_area` VALUES ('420582', '4205', '当阳市'); +INSERT INTO `72crm_crm_area` VALUES ('420583', '4205', '枝江市'); +INSERT INTO `72crm_crm_area` VALUES ('4206', '42', '襄樊'); +INSERT INTO `72crm_crm_area` VALUES ('420601', '4206', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420602', '4206', '襄城区'); +INSERT INTO `72crm_crm_area` VALUES ('420606', '4206', '樊城区'); +INSERT INTO `72crm_crm_area` VALUES ('420621', '4206', '襄阳县'); +INSERT INTO `72crm_crm_area` VALUES ('420624', '4206', '南漳县'); +INSERT INTO `72crm_crm_area` VALUES ('420625', '4206', '谷城县'); +INSERT INTO `72crm_crm_area` VALUES ('420626', '4206', '保康县'); +INSERT INTO `72crm_crm_area` VALUES ('420682', '4206', '老河口市'); +INSERT INTO `72crm_crm_area` VALUES ('420683', '4206', '枣阳市'); +INSERT INTO `72crm_crm_area` VALUES ('420684', '4206', '宜城市'); +INSERT INTO `72crm_crm_area` VALUES ('4207', '42', '鄂州'); +INSERT INTO `72crm_crm_area` VALUES ('420701', '4207', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420702', '4207', '梁子湖区'); +INSERT INTO `72crm_crm_area` VALUES ('420703', '4207', '华容区'); +INSERT INTO `72crm_crm_area` VALUES ('420704', '4207', '鄂城区'); +INSERT INTO `72crm_crm_area` VALUES ('4208', '42', '荆门'); +INSERT INTO `72crm_crm_area` VALUES ('420801', '4208', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420802', '4208', '东宝区'); +INSERT INTO `72crm_crm_area` VALUES ('420821', '4208', '京山县'); +INSERT INTO `72crm_crm_area` VALUES ('420822', '4208', '沙洋县'); +INSERT INTO `72crm_crm_area` VALUES ('420881', '4208', '钟祥市'); +INSERT INTO `72crm_crm_area` VALUES ('4209', '42', '孝感'); +INSERT INTO `72crm_crm_area` VALUES ('420901', '4209', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('420902', '4209', '孝南区'); +INSERT INTO `72crm_crm_area` VALUES ('420921', '4209', '孝昌县'); +INSERT INTO `72crm_crm_area` VALUES ('420922', '4209', '大悟县'); +INSERT INTO `72crm_crm_area` VALUES ('420923', '4209', '云梦县'); +INSERT INTO `72crm_crm_area` VALUES ('420981', '4209', '应城市'); +INSERT INTO `72crm_crm_area` VALUES ('420982', '4209', '安陆市'); +INSERT INTO `72crm_crm_area` VALUES ('420984', '4209', '汉川市'); +INSERT INTO `72crm_crm_area` VALUES ('4210', '42', '荆州'); +INSERT INTO `72crm_crm_area` VALUES ('421001', '4210', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('421002', '4210', '沙市区'); +INSERT INTO `72crm_crm_area` VALUES ('421003', '4210', '荆州区'); +INSERT INTO `72crm_crm_area` VALUES ('421022', '4210', '公安县'); +INSERT INTO `72crm_crm_area` VALUES ('421023', '4210', '监利县'); +INSERT INTO `72crm_crm_area` VALUES ('421024', '4210', '江陵县'); +INSERT INTO `72crm_crm_area` VALUES ('421081', '4210', '石首市'); +INSERT INTO `72crm_crm_area` VALUES ('421083', '4210', '洪湖市'); +INSERT INTO `72crm_crm_area` VALUES ('421087', '4210', '松滋市'); +INSERT INTO `72crm_crm_area` VALUES ('4211', '42', '黄冈'); +INSERT INTO `72crm_crm_area` VALUES ('421101', '4211', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('421102', '4211', '黄州区'); +INSERT INTO `72crm_crm_area` VALUES ('421121', '4211', '团风县'); +INSERT INTO `72crm_crm_area` VALUES ('421122', '4211', '红安县'); +INSERT INTO `72crm_crm_area` VALUES ('421123', '4211', '罗田县'); +INSERT INTO `72crm_crm_area` VALUES ('421124', '4211', '英山县'); +INSERT INTO `72crm_crm_area` VALUES ('421125', '4211', '浠水县'); +INSERT INTO `72crm_crm_area` VALUES ('421126', '4211', '蕲春县'); +INSERT INTO `72crm_crm_area` VALUES ('421127', '4211', '黄梅县'); +INSERT INTO `72crm_crm_area` VALUES ('421181', '4211', '麻城市'); +INSERT INTO `72crm_crm_area` VALUES ('421182', '4211', '武穴市'); +INSERT INTO `72crm_crm_area` VALUES ('4212', '42', '咸宁'); +INSERT INTO `72crm_crm_area` VALUES ('421201', '4212', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('421202', '4212', '咸安区'); +INSERT INTO `72crm_crm_area` VALUES ('421221', '4212', '嘉鱼县'); +INSERT INTO `72crm_crm_area` VALUES ('421222', '4212', '通城县'); +INSERT INTO `72crm_crm_area` VALUES ('421223', '4212', '崇阳县'); +INSERT INTO `72crm_crm_area` VALUES ('421224', '4212', '通山县'); +INSERT INTO `72crm_crm_area` VALUES ('421281', '4212', '赤壁市'); +INSERT INTO `72crm_crm_area` VALUES ('4213', '42', '随州'); +INSERT INTO `72crm_crm_area` VALUES ('421301', '4213', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('421302', '4213', '曾都区'); +INSERT INTO `72crm_crm_area` VALUES ('421381', '4213', '广水市'); +INSERT INTO `72crm_crm_area` VALUES ('4228', '42', '恩施土家族苗族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('422801', '4228', '恩施市'); +INSERT INTO `72crm_crm_area` VALUES ('422802', '4228', '利川市'); +INSERT INTO `72crm_crm_area` VALUES ('422822', '4228', '建始县'); +INSERT INTO `72crm_crm_area` VALUES ('422823', '4228', '巴东县'); +INSERT INTO `72crm_crm_area` VALUES ('422825', '4228', '宣恩县'); +INSERT INTO `72crm_crm_area` VALUES ('422826', '4228', '咸丰县'); +INSERT INTO `72crm_crm_area` VALUES ('422827', '4228', '来凤县'); +INSERT INTO `72crm_crm_area` VALUES ('422828', '4228', '鹤峰县'); +INSERT INTO `72crm_crm_area` VALUES ('4290', '42', '省直辖行政单位'); +INSERT INTO `72crm_crm_area` VALUES ('429004', '4290', '仙桃市'); +INSERT INTO `72crm_crm_area` VALUES ('429005', '4290', '潜江市'); +INSERT INTO `72crm_crm_area` VALUES ('429006', '4290', '天门市'); +INSERT INTO `72crm_crm_area` VALUES ('429021', '4290', '神农架林区'); +INSERT INTO `72crm_crm_area` VALUES ('43', '0', '湖南'); +INSERT INTO `72crm_crm_area` VALUES ('4301', '43', '长沙'); +INSERT INTO `72crm_crm_area` VALUES ('430101', '4301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430102', '4301', '芙蓉区'); +INSERT INTO `72crm_crm_area` VALUES ('430103', '4301', '天心区'); +INSERT INTO `72crm_crm_area` VALUES ('430104', '4301', '岳麓区'); +INSERT INTO `72crm_crm_area` VALUES ('430105', '4301', '开福区'); +INSERT INTO `72crm_crm_area` VALUES ('430111', '4301', '雨花区'); +INSERT INTO `72crm_crm_area` VALUES ('430121', '4301', '长沙县'); +INSERT INTO `72crm_crm_area` VALUES ('430122', '4301', '望城县'); +INSERT INTO `72crm_crm_area` VALUES ('430124', '4301', '宁乡县'); +INSERT INTO `72crm_crm_area` VALUES ('430181', '4301', '浏阳市'); +INSERT INTO `72crm_crm_area` VALUES ('4302', '43', '株洲'); +INSERT INTO `72crm_crm_area` VALUES ('430201', '4302', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430202', '4302', '荷塘区'); +INSERT INTO `72crm_crm_area` VALUES ('430203', '4302', '芦淞区'); +INSERT INTO `72crm_crm_area` VALUES ('430204', '4302', '石峰区'); +INSERT INTO `72crm_crm_area` VALUES ('430211', '4302', '天元区'); +INSERT INTO `72crm_crm_area` VALUES ('430221', '4302', '株洲县'); +INSERT INTO `72crm_crm_area` VALUES ('430223', '4302', '攸  县'); +INSERT INTO `72crm_crm_area` VALUES ('430224', '4302', '茶陵县'); +INSERT INTO `72crm_crm_area` VALUES ('430225', '4302', '炎陵县'); +INSERT INTO `72crm_crm_area` VALUES ('430281', '4302', '醴陵市'); +INSERT INTO `72crm_crm_area` VALUES ('4303', '43', '湘潭'); +INSERT INTO `72crm_crm_area` VALUES ('430301', '4303', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430302', '4303', '雨湖区'); +INSERT INTO `72crm_crm_area` VALUES ('430304', '4303', '岳塘区'); +INSERT INTO `72crm_crm_area` VALUES ('430321', '4303', '湘潭县'); +INSERT INTO `72crm_crm_area` VALUES ('430381', '4303', '湘乡市'); +INSERT INTO `72crm_crm_area` VALUES ('430382', '4303', '韶山市'); +INSERT INTO `72crm_crm_area` VALUES ('4304', '43', '衡阳'); +INSERT INTO `72crm_crm_area` VALUES ('430401', '4304', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430402', '4304', '江东区'); +INSERT INTO `72crm_crm_area` VALUES ('430403', '4304', '城南区'); +INSERT INTO `72crm_crm_area` VALUES ('430404', '4304', '城北区'); +INSERT INTO `72crm_crm_area` VALUES ('430411', '4304', '郊   区'); +INSERT INTO `72crm_crm_area` VALUES ('430412', '4304', '南岳区'); +INSERT INTO `72crm_crm_area` VALUES ('430421', '4304', '衡阳县'); +INSERT INTO `72crm_crm_area` VALUES ('430422', '4304', '衡南县'); +INSERT INTO `72crm_crm_area` VALUES ('430423', '4304', '衡山县'); +INSERT INTO `72crm_crm_area` VALUES ('430424', '4304', '衡东县'); +INSERT INTO `72crm_crm_area` VALUES ('430426', '4304', '祁东县'); +INSERT INTO `72crm_crm_area` VALUES ('430481', '4304', '耒阳市'); +INSERT INTO `72crm_crm_area` VALUES ('430482', '4304', '常宁市'); +INSERT INTO `72crm_crm_area` VALUES ('4305', '43', '邵阳'); +INSERT INTO `72crm_crm_area` VALUES ('430501', '4305', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430502', '4305', '双清区'); +INSERT INTO `72crm_crm_area` VALUES ('430503', '4305', '大祥区'); +INSERT INTO `72crm_crm_area` VALUES ('430511', '4305', '北塔区'); +INSERT INTO `72crm_crm_area` VALUES ('430521', '4305', '邵东县'); +INSERT INTO `72crm_crm_area` VALUES ('430522', '4305', '新邵县'); +INSERT INTO `72crm_crm_area` VALUES ('430523', '4305', '邵阳县'); +INSERT INTO `72crm_crm_area` VALUES ('430524', '4305', '隆回县'); +INSERT INTO `72crm_crm_area` VALUES ('430525', '4305', '洞口县'); +INSERT INTO `72crm_crm_area` VALUES ('430527', '4305', '绥宁县'); +INSERT INTO `72crm_crm_area` VALUES ('430528', '4305', '新宁县'); +INSERT INTO `72crm_crm_area` VALUES ('430529', '4305', '城步苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('430581', '4305', '武冈市'); +INSERT INTO `72crm_crm_area` VALUES ('4306', '43', '岳阳'); +INSERT INTO `72crm_crm_area` VALUES ('430601', '4306', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430602', '4306', '岳阳楼区'); +INSERT INTO `72crm_crm_area` VALUES ('430603', '4306', '云溪区'); +INSERT INTO `72crm_crm_area` VALUES ('430611', '4306', '君山区'); +INSERT INTO `72crm_crm_area` VALUES ('430621', '4306', '岳阳县'); +INSERT INTO `72crm_crm_area` VALUES ('430623', '4306', '华容县'); +INSERT INTO `72crm_crm_area` VALUES ('430624', '4306', '湘阴县'); +INSERT INTO `72crm_crm_area` VALUES ('430626', '4306', '平江县'); +INSERT INTO `72crm_crm_area` VALUES ('430681', '4306', '汨罗市'); +INSERT INTO `72crm_crm_area` VALUES ('430682', '4306', '临湘市'); +INSERT INTO `72crm_crm_area` VALUES ('4307', '43', '常德'); +INSERT INTO `72crm_crm_area` VALUES ('430701', '4307', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430702', '4307', '武陵区'); +INSERT INTO `72crm_crm_area` VALUES ('430703', '4307', '鼎城区'); +INSERT INTO `72crm_crm_area` VALUES ('430721', '4307', '安乡县'); +INSERT INTO `72crm_crm_area` VALUES ('430722', '4307', '汉寿县'); +INSERT INTO `72crm_crm_area` VALUES ('430723', '4307', '澧  县'); +INSERT INTO `72crm_crm_area` VALUES ('430724', '4307', '临澧县'); +INSERT INTO `72crm_crm_area` VALUES ('430725', '4307', '桃源县'); +INSERT INTO `72crm_crm_area` VALUES ('430726', '4307', '石门县'); +INSERT INTO `72crm_crm_area` VALUES ('430781', '4307', '津市市'); +INSERT INTO `72crm_crm_area` VALUES ('4308', '43', '张家界'); +INSERT INTO `72crm_crm_area` VALUES ('430801', '4308', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430802', '4308', '永定区'); +INSERT INTO `72crm_crm_area` VALUES ('430811', '4308', '武陵源区'); +INSERT INTO `72crm_crm_area` VALUES ('430821', '4308', '慈利县'); +INSERT INTO `72crm_crm_area` VALUES ('430822', '4308', '桑植县'); +INSERT INTO `72crm_crm_area` VALUES ('4309', '43', '益阳'); +INSERT INTO `72crm_crm_area` VALUES ('430901', '4309', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('430902', '4309', '资阳区'); +INSERT INTO `72crm_crm_area` VALUES ('430903', '4309', '赫山区'); +INSERT INTO `72crm_crm_area` VALUES ('430921', '4309', '南  县'); +INSERT INTO `72crm_crm_area` VALUES ('430922', '4309', '桃江县'); +INSERT INTO `72crm_crm_area` VALUES ('430923', '4309', '安化县'); +INSERT INTO `72crm_crm_area` VALUES ('430981', '4309', '沅江市'); +INSERT INTO `72crm_crm_area` VALUES ('4310', '43', '郴州'); +INSERT INTO `72crm_crm_area` VALUES ('431001', '4310', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('431002', '4310', '北湖区'); +INSERT INTO `72crm_crm_area` VALUES ('431003', '4310', '苏仙区'); +INSERT INTO `72crm_crm_area` VALUES ('431021', '4310', '桂阳县'); +INSERT INTO `72crm_crm_area` VALUES ('431022', '4310', '宜章县'); +INSERT INTO `72crm_crm_area` VALUES ('431023', '4310', '永兴县'); +INSERT INTO `72crm_crm_area` VALUES ('431024', '4310', '嘉禾县'); +INSERT INTO `72crm_crm_area` VALUES ('431025', '4310', '临武县'); +INSERT INTO `72crm_crm_area` VALUES ('431026', '4310', '汝城县'); +INSERT INTO `72crm_crm_area` VALUES ('431027', '4310', '桂东县'); +INSERT INTO `72crm_crm_area` VALUES ('431028', '4310', '安仁县'); +INSERT INTO `72crm_crm_area` VALUES ('431081', '4310', '资兴市'); +INSERT INTO `72crm_crm_area` VALUES ('4311', '43', '永州'); +INSERT INTO `72crm_crm_area` VALUES ('431101', '4311', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('431102', '4311', '芝山区'); +INSERT INTO `72crm_crm_area` VALUES ('431103', '4311', '冷水滩区'); +INSERT INTO `72crm_crm_area` VALUES ('431121', '4311', '祁阳县'); +INSERT INTO `72crm_crm_area` VALUES ('431122', '4311', '东安县'); +INSERT INTO `72crm_crm_area` VALUES ('431123', '4311', '双牌县'); +INSERT INTO `72crm_crm_area` VALUES ('431124', '4311', '道  县'); +INSERT INTO `72crm_crm_area` VALUES ('431125', '4311', '江永县'); +INSERT INTO `72crm_crm_area` VALUES ('431126', '4311', '宁远县'); +INSERT INTO `72crm_crm_area` VALUES ('431127', '4311', '蓝山县'); +INSERT INTO `72crm_crm_area` VALUES ('431128', '4311', '新田县'); +INSERT INTO `72crm_crm_area` VALUES ('431129', '4311', '江华瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('4312', '43', '怀化'); +INSERT INTO `72crm_crm_area` VALUES ('431201', '4312', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('431202', '4312', '鹤城区'); +INSERT INTO `72crm_crm_area` VALUES ('431221', '4312', '中方县'); +INSERT INTO `72crm_crm_area` VALUES ('431222', '4312', '沅陵县'); +INSERT INTO `72crm_crm_area` VALUES ('431223', '4312', '辰溪县'); +INSERT INTO `72crm_crm_area` VALUES ('431224', '4312', '溆浦县'); +INSERT INTO `72crm_crm_area` VALUES ('431225', '4312', '会同县'); +INSERT INTO `72crm_crm_area` VALUES ('431226', '4312', '麻阳苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('431227', '4312', '新晃侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('431228', '4312', '芷江侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('431229', '4312', '靖州苗族侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('431230', '4312', '通道侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('431281', '4312', '洪江市'); +INSERT INTO `72crm_crm_area` VALUES ('4313', '43', '娄底'); +INSERT INTO `72crm_crm_area` VALUES ('431301', '4313', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('431302', '4313', '娄星区'); +INSERT INTO `72crm_crm_area` VALUES ('431321', '4313', '双峰县'); +INSERT INTO `72crm_crm_area` VALUES ('431322', '4313', '新化县'); +INSERT INTO `72crm_crm_area` VALUES ('431381', '4313', '冷水江市'); +INSERT INTO `72crm_crm_area` VALUES ('431382', '4313', '涟源市'); +INSERT INTO `72crm_crm_area` VALUES ('4331', '43', '湘西土家族苗族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('433101', '4331', '吉首市'); +INSERT INTO `72crm_crm_area` VALUES ('433122', '4331', '泸溪县'); +INSERT INTO `72crm_crm_area` VALUES ('433123', '4331', '凤凰县'); +INSERT INTO `72crm_crm_area` VALUES ('433124', '4331', '花垣县'); +INSERT INTO `72crm_crm_area` VALUES ('433125', '4331', '保靖县'); +INSERT INTO `72crm_crm_area` VALUES ('433126', '4331', '古丈县'); +INSERT INTO `72crm_crm_area` VALUES ('433127', '4331', '永顺县'); +INSERT INTO `72crm_crm_area` VALUES ('433130', '4331', '龙山县'); +INSERT INTO `72crm_crm_area` VALUES ('44', '0', '广东'); +INSERT INTO `72crm_crm_area` VALUES ('4401', '44', '广州'); +INSERT INTO `72crm_crm_area` VALUES ('440101', '4401', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440102', '4401', '东山区'); +INSERT INTO `72crm_crm_area` VALUES ('440103', '4401', '荔湾区'); +INSERT INTO `72crm_crm_area` VALUES ('440104', '4401', '越秀区'); +INSERT INTO `72crm_crm_area` VALUES ('440105', '4401', '海珠区'); +INSERT INTO `72crm_crm_area` VALUES ('440106', '4401', '天河区'); +INSERT INTO `72crm_crm_area` VALUES ('440107', '4401', '芳村区'); +INSERT INTO `72crm_crm_area` VALUES ('440111', '4401', '白云区'); +INSERT INTO `72crm_crm_area` VALUES ('440112', '4401', '黄埔区'); +INSERT INTO `72crm_crm_area` VALUES ('440113', '4401', '番禺区'); +INSERT INTO `72crm_crm_area` VALUES ('440114', '4401', '花都区'); +INSERT INTO `72crm_crm_area` VALUES ('440183', '4401', '增城市'); +INSERT INTO `72crm_crm_area` VALUES ('440184', '4401', '从化市'); +INSERT INTO `72crm_crm_area` VALUES ('4402', '44', '韶关'); +INSERT INTO `72crm_crm_area` VALUES ('440201', '4402', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440202', '4402', '北江区'); +INSERT INTO `72crm_crm_area` VALUES ('440203', '4402', '武江区'); +INSERT INTO `72crm_crm_area` VALUES ('440204', '4402', '浈江区'); +INSERT INTO `72crm_crm_area` VALUES ('440221', '4402', '曲江县'); +INSERT INTO `72crm_crm_area` VALUES ('440222', '4402', '始兴县'); +INSERT INTO `72crm_crm_area` VALUES ('440224', '4402', '仁化县'); +INSERT INTO `72crm_crm_area` VALUES ('440229', '4402', '翁源县'); +INSERT INTO `72crm_crm_area` VALUES ('440232', '4402', '乳源瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('440233', '4402', '新丰县'); +INSERT INTO `72crm_crm_area` VALUES ('440281', '4402', '乐昌市'); +INSERT INTO `72crm_crm_area` VALUES ('440282', '4402', '南雄市'); +INSERT INTO `72crm_crm_area` VALUES ('4403', '44', '深圳'); +INSERT INTO `72crm_crm_area` VALUES ('440301', '4403', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440303', '4403', '罗湖区'); +INSERT INTO `72crm_crm_area` VALUES ('440304', '4403', '福田区'); +INSERT INTO `72crm_crm_area` VALUES ('440305', '4403', '南山区'); +INSERT INTO `72crm_crm_area` VALUES ('440306', '4403', '宝安区'); +INSERT INTO `72crm_crm_area` VALUES ('440307', '4403', '龙岗区'); +INSERT INTO `72crm_crm_area` VALUES ('440308', '4403', '盐田区'); +INSERT INTO `72crm_crm_area` VALUES ('4404', '44', '珠海'); +INSERT INTO `72crm_crm_area` VALUES ('440401', '4404', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440402', '4404', '香洲区'); +INSERT INTO `72crm_crm_area` VALUES ('440421', '4404', '斗门县'); +INSERT INTO `72crm_crm_area` VALUES ('4405', '44', '汕头'); +INSERT INTO `72crm_crm_area` VALUES ('440501', '4405', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440506', '4405', '达濠区'); +INSERT INTO `72crm_crm_area` VALUES ('440507', '4405', '龙湖区'); +INSERT INTO `72crm_crm_area` VALUES ('440508', '4405', '金园区'); +INSERT INTO `72crm_crm_area` VALUES ('440509', '4405', '升平区'); +INSERT INTO `72crm_crm_area` VALUES ('440510', '4405', '河浦区'); +INSERT INTO `72crm_crm_area` VALUES ('440523', '4405', '南澳县'); +INSERT INTO `72crm_crm_area` VALUES ('440582', '4405', '潮阳市'); +INSERT INTO `72crm_crm_area` VALUES ('440583', '4405', '澄海市'); +INSERT INTO `72crm_crm_area` VALUES ('4406', '44', '佛山'); +INSERT INTO `72crm_crm_area` VALUES ('440601', '4406', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440602', '4406', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('440603', '4406', '石湾区'); +INSERT INTO `72crm_crm_area` VALUES ('440681', '4406', '顺德市'); +INSERT INTO `72crm_crm_area` VALUES ('440682', '4406', '南海市'); +INSERT INTO `72crm_crm_area` VALUES ('440683', '4406', '三水市'); +INSERT INTO `72crm_crm_area` VALUES ('440684', '4406', '高明市'); +INSERT INTO `72crm_crm_area` VALUES ('4407', '44', '江门'); +INSERT INTO `72crm_crm_area` VALUES ('440701', '4407', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440703', '4407', '蓬江区'); +INSERT INTO `72crm_crm_area` VALUES ('440704', '4407', '江海区'); +INSERT INTO `72crm_crm_area` VALUES ('440781', '4407', '台山市'); +INSERT INTO `72crm_crm_area` VALUES ('440782', '4407', '新会市'); +INSERT INTO `72crm_crm_area` VALUES ('440783', '4407', '开平市'); +INSERT INTO `72crm_crm_area` VALUES ('440784', '4407', '鹤山市'); +INSERT INTO `72crm_crm_area` VALUES ('440785', '4407', '恩平市'); +INSERT INTO `72crm_crm_area` VALUES ('4408', '44', '湛江'); +INSERT INTO `72crm_crm_area` VALUES ('440801', '4408', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440802', '4408', '赤坎区'); +INSERT INTO `72crm_crm_area` VALUES ('440803', '4408', '霞山区'); +INSERT INTO `72crm_crm_area` VALUES ('440804', '4408', '坡头区'); +INSERT INTO `72crm_crm_area` VALUES ('440811', '4408', '麻章区'); +INSERT INTO `72crm_crm_area` VALUES ('440823', '4408', '遂溪县'); +INSERT INTO `72crm_crm_area` VALUES ('440825', '4408', '徐闻县'); +INSERT INTO `72crm_crm_area` VALUES ('440881', '4408', '廉江市'); +INSERT INTO `72crm_crm_area` VALUES ('440882', '4408', '雷州市'); +INSERT INTO `72crm_crm_area` VALUES ('440883', '4408', '吴川市'); +INSERT INTO `72crm_crm_area` VALUES ('4409', '44', '茂名'); +INSERT INTO `72crm_crm_area` VALUES ('440901', '4409', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('440902', '4409', '茂南区'); +INSERT INTO `72crm_crm_area` VALUES ('440923', '4409', '电白县'); +INSERT INTO `72crm_crm_area` VALUES ('440981', '4409', '高州市'); +INSERT INTO `72crm_crm_area` VALUES ('440982', '4409', '化州市'); +INSERT INTO `72crm_crm_area` VALUES ('440983', '4409', '信宜市'); +INSERT INTO `72crm_crm_area` VALUES ('4412', '44', '肇庆'); +INSERT INTO `72crm_crm_area` VALUES ('441201', '4412', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441202', '4412', '端州区'); +INSERT INTO `72crm_crm_area` VALUES ('441203', '4412', '鼎湖区'); +INSERT INTO `72crm_crm_area` VALUES ('441223', '4412', '广宁县'); +INSERT INTO `72crm_crm_area` VALUES ('441224', '4412', '怀集县'); +INSERT INTO `72crm_crm_area` VALUES ('441225', '4412', '封开县'); +INSERT INTO `72crm_crm_area` VALUES ('441226', '4412', '德庆县'); +INSERT INTO `72crm_crm_area` VALUES ('441283', '4412', '高要市'); +INSERT INTO `72crm_crm_area` VALUES ('441284', '4412', '四会市'); +INSERT INTO `72crm_crm_area` VALUES ('4413', '44', '惠州'); +INSERT INTO `72crm_crm_area` VALUES ('441301', '4413', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441302', '4413', '惠城区'); +INSERT INTO `72crm_crm_area` VALUES ('441322', '4413', '博罗县'); +INSERT INTO `72crm_crm_area` VALUES ('441323', '4413', '惠东县'); +INSERT INTO `72crm_crm_area` VALUES ('441324', '4413', '龙门县'); +INSERT INTO `72crm_crm_area` VALUES ('441381', '4413', '惠阳市'); +INSERT INTO `72crm_crm_area` VALUES ('4414', '44', '梅州'); +INSERT INTO `72crm_crm_area` VALUES ('441401', '4414', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441402', '4414', '梅江区'); +INSERT INTO `72crm_crm_area` VALUES ('441421', '4414', '梅  县'); +INSERT INTO `72crm_crm_area` VALUES ('441422', '4414', '大埔县'); +INSERT INTO `72crm_crm_area` VALUES ('441423', '4414', '丰顺县'); +INSERT INTO `72crm_crm_area` VALUES ('441424', '4414', '五华县'); +INSERT INTO `72crm_crm_area` VALUES ('441426', '4414', '平远县'); +INSERT INTO `72crm_crm_area` VALUES ('441427', '4414', '蕉岭县'); +INSERT INTO `72crm_crm_area` VALUES ('441481', '4414', '兴宁市'); +INSERT INTO `72crm_crm_area` VALUES ('4415', '44', '汕尾'); +INSERT INTO `72crm_crm_area` VALUES ('441501', '4415', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441502', '4415', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('441521', '4415', '海丰县'); +INSERT INTO `72crm_crm_area` VALUES ('441523', '4415', '陆河县'); +INSERT INTO `72crm_crm_area` VALUES ('441581', '4415', '陆丰市'); +INSERT INTO `72crm_crm_area` VALUES ('4416', '44', '河源'); +INSERT INTO `72crm_crm_area` VALUES ('441601', '4416', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441602', '4416', '源城区'); +INSERT INTO `72crm_crm_area` VALUES ('441621', '4416', '紫金县'); +INSERT INTO `72crm_crm_area` VALUES ('441622', '4416', '龙川县'); +INSERT INTO `72crm_crm_area` VALUES ('441623', '4416', '连平县'); +INSERT INTO `72crm_crm_area` VALUES ('441624', '4416', '和平县'); +INSERT INTO `72crm_crm_area` VALUES ('441625', '4416', '东源县'); +INSERT INTO `72crm_crm_area` VALUES ('4417', '44', '阳江'); +INSERT INTO `72crm_crm_area` VALUES ('441701', '4417', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441702', '4417', '江城区'); +INSERT INTO `72crm_crm_area` VALUES ('441721', '4417', '阳西县'); +INSERT INTO `72crm_crm_area` VALUES ('441723', '4417', '阳东县'); +INSERT INTO `72crm_crm_area` VALUES ('441781', '4417', '阳春市'); +INSERT INTO `72crm_crm_area` VALUES ('4418', '44', '清远'); +INSERT INTO `72crm_crm_area` VALUES ('441801', '4418', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('441802', '4418', '清城区'); +INSERT INTO `72crm_crm_area` VALUES ('441821', '4418', '佛冈县'); +INSERT INTO `72crm_crm_area` VALUES ('441823', '4418', '阳山县'); +INSERT INTO `72crm_crm_area` VALUES ('441825', '4418', '连山壮族瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('441826', '4418', '连南瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('441827', '4418', '清新县'); +INSERT INTO `72crm_crm_area` VALUES ('441881', '4418', '英德市'); +INSERT INTO `72crm_crm_area` VALUES ('441882', '4418', '连州市'); +INSERT INTO `72crm_crm_area` VALUES ('4419', '44', '东莞'); +INSERT INTO `72crm_crm_area` VALUES ('441901', '4419', '莞城区'); +INSERT INTO `72crm_crm_area` VALUES ('441902', '4419', '东城区'); +INSERT INTO `72crm_crm_area` VALUES ('441903', '4419', '南城区'); +INSERT INTO `72crm_crm_area` VALUES ('441904', '4419', '万江区'); +INSERT INTO `72crm_crm_area` VALUES ('4420', '44', '中山'); +INSERT INTO `72crm_crm_area` VALUES ('442001', '4420', '石岐区'); +INSERT INTO `72crm_crm_area` VALUES ('442002', '4420', '东区'); +INSERT INTO `72crm_crm_area` VALUES ('442003', '4420', '西区'); +INSERT INTO `72crm_crm_area` VALUES ('442004', '4420', '南区'); +INSERT INTO `72crm_crm_area` VALUES ('442005', '4420', '五桂山'); +INSERT INTO `72crm_crm_area` VALUES ('4451', '44', '潮州'); +INSERT INTO `72crm_crm_area` VALUES ('445101', '4451', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('445102', '4451', '湘桥区'); +INSERT INTO `72crm_crm_area` VALUES ('445121', '4451', '潮安县'); +INSERT INTO `72crm_crm_area` VALUES ('445122', '4451', '饶平县'); +INSERT INTO `72crm_crm_area` VALUES ('4452', '44', '揭阳'); +INSERT INTO `72crm_crm_area` VALUES ('445201', '4452', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('445202', '4452', '榕城区'); +INSERT INTO `72crm_crm_area` VALUES ('445221', '4452', '揭东县'); +INSERT INTO `72crm_crm_area` VALUES ('445222', '4452', '揭西县'); +INSERT INTO `72crm_crm_area` VALUES ('445224', '4452', '惠来县'); +INSERT INTO `72crm_crm_area` VALUES ('445281', '4452', '普宁市'); +INSERT INTO `72crm_crm_area` VALUES ('4453', '44', '云浮'); +INSERT INTO `72crm_crm_area` VALUES ('445301', '4453', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('445302', '4453', '云城区'); +INSERT INTO `72crm_crm_area` VALUES ('445321', '4453', '新兴县'); +INSERT INTO `72crm_crm_area` VALUES ('445322', '4453', '郁南县'); +INSERT INTO `72crm_crm_area` VALUES ('445323', '4453', '云安县'); +INSERT INTO `72crm_crm_area` VALUES ('445381', '4453', '罗定市'); +INSERT INTO `72crm_crm_area` VALUES ('45', '0', '广西'); +INSERT INTO `72crm_crm_area` VALUES ('4501', '45', '南宁'); +INSERT INTO `72crm_crm_area` VALUES ('450101', '4501', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450102', '4501', '兴宁区'); +INSERT INTO `72crm_crm_area` VALUES ('450103', '4501', '新城区'); +INSERT INTO `72crm_crm_area` VALUES ('450104', '4501', '城北区'); +INSERT INTO `72crm_crm_area` VALUES ('450105', '4501', '江南区'); +INSERT INTO `72crm_crm_area` VALUES ('450106', '4501', '永新区'); +INSERT INTO `72crm_crm_area` VALUES ('450111', '4501', '市郊区'); +INSERT INTO `72crm_crm_area` VALUES ('450121', '4501', '邕宁县'); +INSERT INTO `72crm_crm_area` VALUES ('450122', '4501', '武鸣县'); +INSERT INTO `72crm_crm_area` VALUES ('4502', '45', '柳州'); +INSERT INTO `72crm_crm_area` VALUES ('450201', '4502', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450202', '4502', '城中区'); +INSERT INTO `72crm_crm_area` VALUES ('450203', '4502', '鱼峰区'); +INSERT INTO `72crm_crm_area` VALUES ('450204', '4502', '柳南区'); +INSERT INTO `72crm_crm_area` VALUES ('450205', '4502', '柳北区'); +INSERT INTO `72crm_crm_area` VALUES ('450211', '4502', '市郊区'); +INSERT INTO `72crm_crm_area` VALUES ('450221', '4502', '柳江县'); +INSERT INTO `72crm_crm_area` VALUES ('450222', '4502', '柳城县'); +INSERT INTO `72crm_crm_area` VALUES ('4503', '45', '桂林'); +INSERT INTO `72crm_crm_area` VALUES ('450301', '4503', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450302', '4503', '秀峰区'); +INSERT INTO `72crm_crm_area` VALUES ('450303', '4503', '叠彩区'); +INSERT INTO `72crm_crm_area` VALUES ('450304', '4503', '象山区'); +INSERT INTO `72crm_crm_area` VALUES ('450305', '4503', '七星区'); +INSERT INTO `72crm_crm_area` VALUES ('450311', '4503', '雁山区'); +INSERT INTO `72crm_crm_area` VALUES ('450321', '4503', '阳朔县'); +INSERT INTO `72crm_crm_area` VALUES ('450322', '4503', '临桂县'); +INSERT INTO `72crm_crm_area` VALUES ('450323', '4503', '灵川县'); +INSERT INTO `72crm_crm_area` VALUES ('450324', '4503', '全州县'); +INSERT INTO `72crm_crm_area` VALUES ('450325', '4503', '兴安县'); +INSERT INTO `72crm_crm_area` VALUES ('450326', '4503', '永福县'); +INSERT INTO `72crm_crm_area` VALUES ('450327', '4503', '灌阳县'); +INSERT INTO `72crm_crm_area` VALUES ('450328', '4503', '龙胜各县自治区'); +INSERT INTO `72crm_crm_area` VALUES ('450329', '4503', '资源县'); +INSERT INTO `72crm_crm_area` VALUES ('450330', '4503', '平乐县'); +INSERT INTO `72crm_crm_area` VALUES ('450331', '4503', '荔蒲县'); +INSERT INTO `72crm_crm_area` VALUES ('450332', '4503', '恭城瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('4504', '45', '梧州'); +INSERT INTO `72crm_crm_area` VALUES ('450401', '4504', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450403', '4504', '万秀区'); +INSERT INTO `72crm_crm_area` VALUES ('450404', '4504', '蝶山区'); +INSERT INTO `72crm_crm_area` VALUES ('450411', '4504', '市郊区'); +INSERT INTO `72crm_crm_area` VALUES ('450421', '4504', '苍梧县'); +INSERT INTO `72crm_crm_area` VALUES ('450422', '4504', '藤  县'); +INSERT INTO `72crm_crm_area` VALUES ('450423', '4504', '蒙山县'); +INSERT INTO `72crm_crm_area` VALUES ('450481', '4504', '岑溪市'); +INSERT INTO `72crm_crm_area` VALUES ('4505', '45', '北海'); +INSERT INTO `72crm_crm_area` VALUES ('450501', '4505', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450502', '4505', '海城区'); +INSERT INTO `72crm_crm_area` VALUES ('450503', '4505', '银海区'); +INSERT INTO `72crm_crm_area` VALUES ('450512', '4505', '铁山港区'); +INSERT INTO `72crm_crm_area` VALUES ('450521', '4505', '合浦县'); +INSERT INTO `72crm_crm_area` VALUES ('4506', '45', '防城港'); +INSERT INTO `72crm_crm_area` VALUES ('450601', '4506', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450602', '4506', '港口区'); +INSERT INTO `72crm_crm_area` VALUES ('450603', '4506', '防城区'); +INSERT INTO `72crm_crm_area` VALUES ('450621', '4506', '上思县'); +INSERT INTO `72crm_crm_area` VALUES ('450681', '4506', '东兴市'); +INSERT INTO `72crm_crm_area` VALUES ('4507', '45', '钦州'); +INSERT INTO `72crm_crm_area` VALUES ('450701', '4507', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450702', '4507', '钦南区'); +INSERT INTO `72crm_crm_area` VALUES ('450703', '4507', '钦北区'); +INSERT INTO `72crm_crm_area` VALUES ('450721', '4507', '浦北县'); +INSERT INTO `72crm_crm_area` VALUES ('450722', '4507', '灵山县'); +INSERT INTO `72crm_crm_area` VALUES ('4508', '45', '贵港'); +INSERT INTO `72crm_crm_area` VALUES ('450801', '4508', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450802', '4508', '港北区'); +INSERT INTO `72crm_crm_area` VALUES ('450803', '4508', '港南区'); +INSERT INTO `72crm_crm_area` VALUES ('450821', '4508', '平南县'); +INSERT INTO `72crm_crm_area` VALUES ('450881', '4508', '桂平市'); +INSERT INTO `72crm_crm_area` VALUES ('4509', '45', '玉林'); +INSERT INTO `72crm_crm_area` VALUES ('450901', '4509', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('450902', '4509', '玉州区'); +INSERT INTO `72crm_crm_area` VALUES ('450921', '4509', '容  县'); +INSERT INTO `72crm_crm_area` VALUES ('450922', '4509', '陆川县'); +INSERT INTO `72crm_crm_area` VALUES ('450923', '4509', '博白县'); +INSERT INTO `72crm_crm_area` VALUES ('450924', '4509', '兴业县'); +INSERT INTO `72crm_crm_area` VALUES ('450981', '4509', '北流市'); +INSERT INTO `72crm_crm_area` VALUES ('4521', '45', '南宁地区'); +INSERT INTO `72crm_crm_area` VALUES ('452101', '4521', '凭祥市'); +INSERT INTO `72crm_crm_area` VALUES ('452122', '4521', '横  县'); +INSERT INTO `72crm_crm_area` VALUES ('452123', '4521', '宾阳县'); +INSERT INTO `72crm_crm_area` VALUES ('452124', '4521', '上林县'); +INSERT INTO `72crm_crm_area` VALUES ('452126', '4521', '隆安县'); +INSERT INTO `72crm_crm_area` VALUES ('452127', '4521', '马山县'); +INSERT INTO `72crm_crm_area` VALUES ('452128', '4521', '扶绥县'); +INSERT INTO `72crm_crm_area` VALUES ('452129', '4521', '崇左县'); +INSERT INTO `72crm_crm_area` VALUES ('452130', '4521', '大新县'); +INSERT INTO `72crm_crm_area` VALUES ('452131', '4521', '天等县'); +INSERT INTO `72crm_crm_area` VALUES ('452132', '4521', '宁明县'); +INSERT INTO `72crm_crm_area` VALUES ('452133', '4521', '龙州县'); +INSERT INTO `72crm_crm_area` VALUES ('4522', '45', '柳州地区'); +INSERT INTO `72crm_crm_area` VALUES ('452201', '4522', '合山市'); +INSERT INTO `72crm_crm_area` VALUES ('452223', '4522', '鹿寨县'); +INSERT INTO `72crm_crm_area` VALUES ('452224', '4522', '象州县'); +INSERT INTO `72crm_crm_area` VALUES ('452225', '4522', '武宣县'); +INSERT INTO `72crm_crm_area` VALUES ('452226', '4522', '来宾县'); +INSERT INTO `72crm_crm_area` VALUES ('452227', '4522', '融安县'); +INSERT INTO `72crm_crm_area` VALUES ('452228', '4522', '三江侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452229', '4522', '融水苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452230', '4522', '金秀瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452231', '4522', '忻城县'); +INSERT INTO `72crm_crm_area` VALUES ('4524', '45', '贺州地区'); +INSERT INTO `72crm_crm_area` VALUES ('452402', '4524', '贺州市'); +INSERT INTO `72crm_crm_area` VALUES ('452424', '4524', '昭平县'); +INSERT INTO `72crm_crm_area` VALUES ('452427', '4524', '钟山县'); +INSERT INTO `72crm_crm_area` VALUES ('452428', '4524', '富川瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('4526', '45', '百色地区'); +INSERT INTO `72crm_crm_area` VALUES ('452601', '4526', '百色市'); +INSERT INTO `72crm_crm_area` VALUES ('452622', '4526', '田阳县'); +INSERT INTO `72crm_crm_area` VALUES ('452623', '4526', '田东县'); +INSERT INTO `72crm_crm_area` VALUES ('452624', '4526', '平果县'); +INSERT INTO `72crm_crm_area` VALUES ('452625', '4526', '德保县'); +INSERT INTO `72crm_crm_area` VALUES ('452626', '4526', '靖西县'); +INSERT INTO `72crm_crm_area` VALUES ('452627', '4526', '那坡县'); +INSERT INTO `72crm_crm_area` VALUES ('452628', '4526', '凌云县'); +INSERT INTO `72crm_crm_area` VALUES ('452629', '4526', '乐业县'); +INSERT INTO `72crm_crm_area` VALUES ('452630', '4526', '田林县'); +INSERT INTO `72crm_crm_area` VALUES ('452631', '4526', '隆林各族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452632', '4526', '西林县'); +INSERT INTO `72crm_crm_area` VALUES ('4527', '45', '河池地区'); +INSERT INTO `72crm_crm_area` VALUES ('452701', '4527', '河池市'); +INSERT INTO `72crm_crm_area` VALUES ('452702', '4527', '宜州市'); +INSERT INTO `72crm_crm_area` VALUES ('452723', '4527', '罗城仫佬族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452724', '4527', '环江毛南族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452725', '4527', '南丹县'); +INSERT INTO `72crm_crm_area` VALUES ('452726', '4527', '天峨县'); +INSERT INTO `72crm_crm_area` VALUES ('452727', '4527', '凤山县'); +INSERT INTO `72crm_crm_area` VALUES ('452728', '4527', '东兰县'); +INSERT INTO `72crm_crm_area` VALUES ('452729', '4527', '巴马瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452730', '4527', '都安瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('452731', '4527', '大化瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('46', '0', '海南'); +INSERT INTO `72crm_crm_area` VALUES ('4601', '46', '海南'); +INSERT INTO `72crm_crm_area` VALUES ('460101', '4601', '通什市'); +INSERT INTO `72crm_crm_area` VALUES ('460102', '4601', '琼海市'); +INSERT INTO `72crm_crm_area` VALUES ('460103', '4601', '儋州市'); +INSERT INTO `72crm_crm_area` VALUES ('460104', '4601', '琼山市'); +INSERT INTO `72crm_crm_area` VALUES ('460105', '4601', '文昌市'); +INSERT INTO `72crm_crm_area` VALUES ('460106', '4601', '万宁市'); +INSERT INTO `72crm_crm_area` VALUES ('460107', '4601', '东方市'); +INSERT INTO `72crm_crm_area` VALUES ('460125', '4601', '定安县'); +INSERT INTO `72crm_crm_area` VALUES ('460126', '4601', '屯昌县'); +INSERT INTO `72crm_crm_area` VALUES ('460127', '4601', '澄迈县'); +INSERT INTO `72crm_crm_area` VALUES ('460128', '4601', '临高县'); +INSERT INTO `72crm_crm_area` VALUES ('460130', '4601', '白沙黎族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460131', '4601', '昌江黎族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460133', '4601', '乐东黎族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460134', '4601', '陵水黎族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460135', '4601', '保亭黎族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460136', '4601', '琼中黎族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('460137', '4601', '西沙群岛'); +INSERT INTO `72crm_crm_area` VALUES ('460138', '4601', '南沙群岛'); +INSERT INTO `72crm_crm_area` VALUES ('460139', '4601', '中沙群岛的岛礁及其海'); +INSERT INTO `72crm_crm_area` VALUES ('4602', '46', '海口'); +INSERT INTO `72crm_crm_area` VALUES ('460201', '4602', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('460202', '4602', '振东区'); +INSERT INTO `72crm_crm_area` VALUES ('460203', '4602', '新华区'); +INSERT INTO `72crm_crm_area` VALUES ('460204', '4602', '秀英区'); +INSERT INTO `72crm_crm_area` VALUES ('4603', '46', '三亚'); +INSERT INTO `72crm_crm_area` VALUES ('460301', '4603', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('50', '0', '重庆'); +INSERT INTO `72crm_crm_area` VALUES ('5001', '50', '重庆市辖'); +INSERT INTO `72crm_crm_area` VALUES ('500101', '5001', '万州区'); +INSERT INTO `72crm_crm_area` VALUES ('500102', '5001', '涪陵区'); +INSERT INTO `72crm_crm_area` VALUES ('500103', '5001', '渝中区'); +INSERT INTO `72crm_crm_area` VALUES ('500104', '5001', '大渡口区'); +INSERT INTO `72crm_crm_area` VALUES ('500105', '5001', '江北区'); +INSERT INTO `72crm_crm_area` VALUES ('500106', '5001', '沙坪坝区'); +INSERT INTO `72crm_crm_area` VALUES ('500107', '5001', '九龙坡区'); +INSERT INTO `72crm_crm_area` VALUES ('500108', '5001', '南岸区'); +INSERT INTO `72crm_crm_area` VALUES ('500109', '5001', '北碚区'); +INSERT INTO `72crm_crm_area` VALUES ('500110', '5001', '万盛区'); +INSERT INTO `72crm_crm_area` VALUES ('500111', '5001', '双桥区'); +INSERT INTO `72crm_crm_area` VALUES ('500112', '5001', '渝北区'); +INSERT INTO `72crm_crm_area` VALUES ('500113', '5001', '巴南区'); +INSERT INTO `72crm_crm_area` VALUES ('500114', '5001', '黔江区'); +INSERT INTO `72crm_crm_area` VALUES ('5002', '50', '重庆县辖'); +INSERT INTO `72crm_crm_area` VALUES ('500221', '5002', '长寿县'); +INSERT INTO `72crm_crm_area` VALUES ('500222', '5002', '綦江县'); +INSERT INTO `72crm_crm_area` VALUES ('500223', '5002', '潼南县'); +INSERT INTO `72crm_crm_area` VALUES ('500224', '5002', '铜梁县'); +INSERT INTO `72crm_crm_area` VALUES ('500225', '5002', '大足县'); +INSERT INTO `72crm_crm_area` VALUES ('500226', '5002', '荣昌县'); +INSERT INTO `72crm_crm_area` VALUES ('500227', '5002', '璧山县'); +INSERT INTO `72crm_crm_area` VALUES ('500228', '5002', '梁平县'); +INSERT INTO `72crm_crm_area` VALUES ('500229', '5002', '城口县'); +INSERT INTO `72crm_crm_area` VALUES ('500230', '5002', '丰都县'); +INSERT INTO `72crm_crm_area` VALUES ('500231', '5002', '垫江县'); +INSERT INTO `72crm_crm_area` VALUES ('500232', '5002', '武隆县'); +INSERT INTO `72crm_crm_area` VALUES ('500233', '5002', '忠  县'); +INSERT INTO `72crm_crm_area` VALUES ('500234', '5002', '开  县'); +INSERT INTO `72crm_crm_area` VALUES ('500235', '5002', '云阳县'); +INSERT INTO `72crm_crm_area` VALUES ('500236', '5002', '奉节县'); +INSERT INTO `72crm_crm_area` VALUES ('500237', '5002', '巫山县'); +INSERT INTO `72crm_crm_area` VALUES ('500238', '5002', '巫溪县'); +INSERT INTO `72crm_crm_area` VALUES ('500240', '5002', '石柱土家族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('500241', '5002', '秀山土家族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('500242', '5002', '酉阳土家族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('500243', '5002', '彭水苗族土家族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5003', '50', '重庆县级'); +INSERT INTO `72crm_crm_area` VALUES ('500381', '5003', '江津市'); +INSERT INTO `72crm_crm_area` VALUES ('500382', '5003', '合川市'); +INSERT INTO `72crm_crm_area` VALUES ('500383', '5003', '永川市'); +INSERT INTO `72crm_crm_area` VALUES ('500384', '5003', '南川市'); +INSERT INTO `72crm_crm_area` VALUES ('51', '0', '四川'); +INSERT INTO `72crm_crm_area` VALUES ('5101', '51', '成都'); +INSERT INTO `72crm_crm_area` VALUES ('510101', '5101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510103', '5101', '高新区'); +INSERT INTO `72crm_crm_area` VALUES ('510104', '5101', '锦江区'); +INSERT INTO `72crm_crm_area` VALUES ('510105', '5101', '青羊区'); +INSERT INTO `72crm_crm_area` VALUES ('510106', '5101', '金牛区'); +INSERT INTO `72crm_crm_area` VALUES ('510107', '5101', '武侯区'); +INSERT INTO `72crm_crm_area` VALUES ('510108', '5101', '成华区'); +INSERT INTO `72crm_crm_area` VALUES ('510112', '5101', '龙泉驿区'); +INSERT INTO `72crm_crm_area` VALUES ('510113', '5101', '青白江区'); +INSERT INTO `72crm_crm_area` VALUES ('510121', '5101', '金堂县'); +INSERT INTO `72crm_crm_area` VALUES ('510122', '5101', '双流县'); +INSERT INTO `72crm_crm_area` VALUES ('510123', '5101', '温江县'); +INSERT INTO `72crm_crm_area` VALUES ('510124', '5101', '郫  县'); +INSERT INTO `72crm_crm_area` VALUES ('510125', '5101', '新都县'); +INSERT INTO `72crm_crm_area` VALUES ('510129', '5101', '大邑县'); +INSERT INTO `72crm_crm_area` VALUES ('510131', '5101', '蒲江县'); +INSERT INTO `72crm_crm_area` VALUES ('510132', '5101', '新津县'); +INSERT INTO `72crm_crm_area` VALUES ('510181', '5101', '都江堰市'); +INSERT INTO `72crm_crm_area` VALUES ('510182', '5101', '彭州市'); +INSERT INTO `72crm_crm_area` VALUES ('510183', '5101', '邛崃市'); +INSERT INTO `72crm_crm_area` VALUES ('510184', '5101', '崇州市'); +INSERT INTO `72crm_crm_area` VALUES ('5103', '51', '自贡'); +INSERT INTO `72crm_crm_area` VALUES ('510301', '5103', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510302', '5103', '自流井区'); +INSERT INTO `72crm_crm_area` VALUES ('510303', '5103', '贡井区'); +INSERT INTO `72crm_crm_area` VALUES ('510304', '5103', '大安区'); +INSERT INTO `72crm_crm_area` VALUES ('510311', '5103', '沿滩区'); +INSERT INTO `72crm_crm_area` VALUES ('510321', '5103', '荣  县'); +INSERT INTO `72crm_crm_area` VALUES ('510322', '5103', '富顺县'); +INSERT INTO `72crm_crm_area` VALUES ('5104', '51', '攀枝花'); +INSERT INTO `72crm_crm_area` VALUES ('510401', '5104', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510402', '5104', '东  区'); +INSERT INTO `72crm_crm_area` VALUES ('510403', '5104', '西  区'); +INSERT INTO `72crm_crm_area` VALUES ('510411', '5104', '仁和区'); +INSERT INTO `72crm_crm_area` VALUES ('510421', '5104', '米易县'); +INSERT INTO `72crm_crm_area` VALUES ('510422', '5104', '盐边县'); +INSERT INTO `72crm_crm_area` VALUES ('5105', '51', '泸州'); +INSERT INTO `72crm_crm_area` VALUES ('510501', '5105', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510502', '5105', '江阳区'); +INSERT INTO `72crm_crm_area` VALUES ('510503', '5105', '纳溪区'); +INSERT INTO `72crm_crm_area` VALUES ('510504', '5105', '龙马潭区'); +INSERT INTO `72crm_crm_area` VALUES ('510521', '5105', '泸  县'); +INSERT INTO `72crm_crm_area` VALUES ('510522', '5105', '合江县'); +INSERT INTO `72crm_crm_area` VALUES ('510524', '5105', '叙永县'); +INSERT INTO `72crm_crm_area` VALUES ('510525', '5105', '古蔺县'); +INSERT INTO `72crm_crm_area` VALUES ('5106', '51', '德阳'); +INSERT INTO `72crm_crm_area` VALUES ('510601', '5106', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510603', '5106', '旌阳区'); +INSERT INTO `72crm_crm_area` VALUES ('510623', '5106', '中江县'); +INSERT INTO `72crm_crm_area` VALUES ('510626', '5106', '罗江县'); +INSERT INTO `72crm_crm_area` VALUES ('510681', '5106', '广汉市'); +INSERT INTO `72crm_crm_area` VALUES ('510682', '5106', '什邡市'); +INSERT INTO `72crm_crm_area` VALUES ('510683', '5106', '绵竹市'); +INSERT INTO `72crm_crm_area` VALUES ('5107', '51', '绵阳'); +INSERT INTO `72crm_crm_area` VALUES ('510701', '5107', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510703', '5107', '涪城区'); +INSERT INTO `72crm_crm_area` VALUES ('510704', '5107', '游仙区'); +INSERT INTO `72crm_crm_area` VALUES ('510710', '5107', '科学城区'); +INSERT INTO `72crm_crm_area` VALUES ('510722', '5107', '三台县'); +INSERT INTO `72crm_crm_area` VALUES ('510723', '5107', '盐亭县'); +INSERT INTO `72crm_crm_area` VALUES ('510724', '5107', '安  县'); +INSERT INTO `72crm_crm_area` VALUES ('510725', '5107', '梓潼县'); +INSERT INTO `72crm_crm_area` VALUES ('510726', '5107', '北川县'); +INSERT INTO `72crm_crm_area` VALUES ('510727', '5107', '平武县'); +INSERT INTO `72crm_crm_area` VALUES ('510781', '5107', '江油市'); +INSERT INTO `72crm_crm_area` VALUES ('5108', '51', '广元'); +INSERT INTO `72crm_crm_area` VALUES ('510801', '5108', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510802', '5108', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('510811', '5108', '元坝区'); +INSERT INTO `72crm_crm_area` VALUES ('510812', '5108', '朝天区'); +INSERT INTO `72crm_crm_area` VALUES ('510821', '5108', '旺苍县'); +INSERT INTO `72crm_crm_area` VALUES ('510822', '5108', '青川县'); +INSERT INTO `72crm_crm_area` VALUES ('510823', '5108', '剑阁县'); +INSERT INTO `72crm_crm_area` VALUES ('510824', '5108', '苍溪县'); +INSERT INTO `72crm_crm_area` VALUES ('5109', '51', '遂宁'); +INSERT INTO `72crm_crm_area` VALUES ('510901', '5109', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('510902', '5109', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('510921', '5109', '蓬溪县'); +INSERT INTO `72crm_crm_area` VALUES ('510922', '5109', '射洪县'); +INSERT INTO `72crm_crm_area` VALUES ('510923', '5109', '大英县'); +INSERT INTO `72crm_crm_area` VALUES ('5110', '51', '内江'); +INSERT INTO `72crm_crm_area` VALUES ('511001', '5110', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511002', '5110', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('511011', '5110', '东兴区'); +INSERT INTO `72crm_crm_area` VALUES ('511024', '5110', '威远县'); +INSERT INTO `72crm_crm_area` VALUES ('511025', '5110', '资中县'); +INSERT INTO `72crm_crm_area` VALUES ('511028', '5110', '隆昌县'); +INSERT INTO `72crm_crm_area` VALUES ('5111', '51', '乐山'); +INSERT INTO `72crm_crm_area` VALUES ('511101', '5111', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511102', '5111', '市中区'); +INSERT INTO `72crm_crm_area` VALUES ('511111', '5111', '沙湾区'); +INSERT INTO `72crm_crm_area` VALUES ('511112', '5111', '五通桥区'); +INSERT INTO `72crm_crm_area` VALUES ('511113', '5111', '金口河区'); +INSERT INTO `72crm_crm_area` VALUES ('511123', '5111', '犍为县'); +INSERT INTO `72crm_crm_area` VALUES ('511124', '5111', '井研县'); +INSERT INTO `72crm_crm_area` VALUES ('511126', '5111', '夹江县'); +INSERT INTO `72crm_crm_area` VALUES ('511129', '5111', '沐川县'); +INSERT INTO `72crm_crm_area` VALUES ('511132', '5111', '峨边彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('511133', '5111', '马边彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('511181', '5111', '峨眉山市'); +INSERT INTO `72crm_crm_area` VALUES ('5113', '51', '南充'); +INSERT INTO `72crm_crm_area` VALUES ('511301', '5113', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511302', '5113', '顺庆区'); +INSERT INTO `72crm_crm_area` VALUES ('511303', '5113', '高坪区'); +INSERT INTO `72crm_crm_area` VALUES ('511304', '5113', '嘉陵区'); +INSERT INTO `72crm_crm_area` VALUES ('511321', '5113', '南部县'); +INSERT INTO `72crm_crm_area` VALUES ('511322', '5113', '营山县'); +INSERT INTO `72crm_crm_area` VALUES ('511323', '5113', '蓬安县'); +INSERT INTO `72crm_crm_area` VALUES ('511324', '5113', '仪陇县'); +INSERT INTO `72crm_crm_area` VALUES ('511325', '5113', '西充县'); +INSERT INTO `72crm_crm_area` VALUES ('511381', '5113', '阆中市'); +INSERT INTO `72crm_crm_area` VALUES ('5114', '51', '眉山'); +INSERT INTO `72crm_crm_area` VALUES ('511401', '5114', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511402', '5114', '东坡区'); +INSERT INTO `72crm_crm_area` VALUES ('511421', '5114', '仁寿县'); +INSERT INTO `72crm_crm_area` VALUES ('511422', '5114', '彭山县'); +INSERT INTO `72crm_crm_area` VALUES ('511423', '5114', '洪雅县'); +INSERT INTO `72crm_crm_area` VALUES ('511424', '5114', '丹棱县'); +INSERT INTO `72crm_crm_area` VALUES ('511425', '5114', '青神县'); +INSERT INTO `72crm_crm_area` VALUES ('5115', '51', '宜宾'); +INSERT INTO `72crm_crm_area` VALUES ('511501', '5115', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511502', '5115', '翠屏区'); +INSERT INTO `72crm_crm_area` VALUES ('511521', '5115', '宜宾县'); +INSERT INTO `72crm_crm_area` VALUES ('511522', '5115', '南溪县'); +INSERT INTO `72crm_crm_area` VALUES ('511523', '5115', '江安县'); +INSERT INTO `72crm_crm_area` VALUES ('511524', '5115', '长宁县'); +INSERT INTO `72crm_crm_area` VALUES ('511525', '5115', '高  县'); +INSERT INTO `72crm_crm_area` VALUES ('511526', '5115', '珙  县'); +INSERT INTO `72crm_crm_area` VALUES ('511527', '5115', '筠连县'); +INSERT INTO `72crm_crm_area` VALUES ('511528', '5115', '兴文县'); +INSERT INTO `72crm_crm_area` VALUES ('511529', '5115', '屏山县'); +INSERT INTO `72crm_crm_area` VALUES ('5116', '51', '广安'); +INSERT INTO `72crm_crm_area` VALUES ('511601', '5116', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511602', '5116', '广安区'); +INSERT INTO `72crm_crm_area` VALUES ('511621', '5116', '岳池县'); +INSERT INTO `72crm_crm_area` VALUES ('511622', '5116', '武胜县'); +INSERT INTO `72crm_crm_area` VALUES ('511623', '5116', '邻水县'); +INSERT INTO `72crm_crm_area` VALUES ('511681', '5116', '华蓥市'); +INSERT INTO `72crm_crm_area` VALUES ('5117', '51', '达州'); +INSERT INTO `72crm_crm_area` VALUES ('511701', '5117', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511702', '5117', '通川区'); +INSERT INTO `72crm_crm_area` VALUES ('511721', '5117', '达  县'); +INSERT INTO `72crm_crm_area` VALUES ('511722', '5117', '宣汉县'); +INSERT INTO `72crm_crm_area` VALUES ('511723', '5117', '开江县'); +INSERT INTO `72crm_crm_area` VALUES ('511724', '5117', '大竹县'); +INSERT INTO `72crm_crm_area` VALUES ('511725', '5117', '渠  县'); +INSERT INTO `72crm_crm_area` VALUES ('511781', '5117', '万源市'); +INSERT INTO `72crm_crm_area` VALUES ('5118', '51', '雅安'); +INSERT INTO `72crm_crm_area` VALUES ('511801', '5118', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511802', '5118', '雨城区'); +INSERT INTO `72crm_crm_area` VALUES ('511821', '5118', '名山县'); +INSERT INTO `72crm_crm_area` VALUES ('511822', '5118', '荥经县'); +INSERT INTO `72crm_crm_area` VALUES ('511823', '5118', '汉源县'); +INSERT INTO `72crm_crm_area` VALUES ('511824', '5118', '石棉县'); +INSERT INTO `72crm_crm_area` VALUES ('511825', '5118', '天全县'); +INSERT INTO `72crm_crm_area` VALUES ('511826', '5118', '芦山县'); +INSERT INTO `72crm_crm_area` VALUES ('511827', '5118', '宝兴县'); +INSERT INTO `72crm_crm_area` VALUES ('5119', '51', '巴中'); +INSERT INTO `72crm_crm_area` VALUES ('511901', '5119', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('511902', '5119', '巴州区'); +INSERT INTO `72crm_crm_area` VALUES ('511921', '5119', '通江县'); +INSERT INTO `72crm_crm_area` VALUES ('511922', '5119', '南江县'); +INSERT INTO `72crm_crm_area` VALUES ('511923', '5119', '平昌县'); +INSERT INTO `72crm_crm_area` VALUES ('5120', '51', '资阳'); +INSERT INTO `72crm_crm_area` VALUES ('512001', '5120', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('512002', '5120', '雁江区'); +INSERT INTO `72crm_crm_area` VALUES ('512021', '5120', '安岳县'); +INSERT INTO `72crm_crm_area` VALUES ('512022', '5120', '乐至县'); +INSERT INTO `72crm_crm_area` VALUES ('512081', '5120', '简阳市'); +INSERT INTO `72crm_crm_area` VALUES ('5132', '51', '阿坝藏族羌族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('513221', '5132', '汶川县'); +INSERT INTO `72crm_crm_area` VALUES ('513222', '5132', '理  县'); +INSERT INTO `72crm_crm_area` VALUES ('513223', '5132', '茂  县'); +INSERT INTO `72crm_crm_area` VALUES ('513224', '5132', '松潘县'); +INSERT INTO `72crm_crm_area` VALUES ('513225', '5132', '九寨沟县'); +INSERT INTO `72crm_crm_area` VALUES ('513226', '5132', '金川县'); +INSERT INTO `72crm_crm_area` VALUES ('513227', '5132', '小金县'); +INSERT INTO `72crm_crm_area` VALUES ('513228', '5132', '黑水县'); +INSERT INTO `72crm_crm_area` VALUES ('513229', '5132', '马尔康县'); +INSERT INTO `72crm_crm_area` VALUES ('513230', '5132', '壤塘县'); +INSERT INTO `72crm_crm_area` VALUES ('513231', '5132', '阿坝县'); +INSERT INTO `72crm_crm_area` VALUES ('513232', '5132', '若尔盖县'); +INSERT INTO `72crm_crm_area` VALUES ('513233', '5132', '红原县'); +INSERT INTO `72crm_crm_area` VALUES ('5133', '51', '甘孜藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('513321', '5133', '康定县'); +INSERT INTO `72crm_crm_area` VALUES ('513322', '5133', '泸定县'); +INSERT INTO `72crm_crm_area` VALUES ('513323', '5133', '丹巴县'); +INSERT INTO `72crm_crm_area` VALUES ('513324', '5133', '九龙县'); +INSERT INTO `72crm_crm_area` VALUES ('513325', '5133', '雅江县'); +INSERT INTO `72crm_crm_area` VALUES ('513326', '5133', '道孚县'); +INSERT INTO `72crm_crm_area` VALUES ('513327', '5133', '炉霍县'); +INSERT INTO `72crm_crm_area` VALUES ('513328', '5133', '甘孜县'); +INSERT INTO `72crm_crm_area` VALUES ('513329', '5133', '新龙县'); +INSERT INTO `72crm_crm_area` VALUES ('513330', '5133', '德格县'); +INSERT INTO `72crm_crm_area` VALUES ('513331', '5133', '白玉县'); +INSERT INTO `72crm_crm_area` VALUES ('513332', '5133', '石渠县'); +INSERT INTO `72crm_crm_area` VALUES ('513333', '5133', '色达县'); +INSERT INTO `72crm_crm_area` VALUES ('513334', '5133', '理塘县'); +INSERT INTO `72crm_crm_area` VALUES ('513335', '5133', '巴塘县'); +INSERT INTO `72crm_crm_area` VALUES ('513336', '5133', '乡城县'); +INSERT INTO `72crm_crm_area` VALUES ('513337', '5133', '稻城县'); +INSERT INTO `72crm_crm_area` VALUES ('513338', '5133', '得荣县'); +INSERT INTO `72crm_crm_area` VALUES ('5134', '51', '凉山彝族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('513401', '5134', '西昌市'); +INSERT INTO `72crm_crm_area` VALUES ('513422', '5134', '木里藏族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('513423', '5134', '盐源县'); +INSERT INTO `72crm_crm_area` VALUES ('513424', '5134', '德昌县'); +INSERT INTO `72crm_crm_area` VALUES ('513425', '5134', '会理县'); +INSERT INTO `72crm_crm_area` VALUES ('513426', '5134', '会东县'); +INSERT INTO `72crm_crm_area` VALUES ('513427', '5134', '宁南县'); +INSERT INTO `72crm_crm_area` VALUES ('513428', '5134', '普格县'); +INSERT INTO `72crm_crm_area` VALUES ('513429', '5134', '布拖县'); +INSERT INTO `72crm_crm_area` VALUES ('513430', '5134', '金阳县'); +INSERT INTO `72crm_crm_area` VALUES ('513431', '5134', '昭觉县'); +INSERT INTO `72crm_crm_area` VALUES ('513432', '5134', '喜德县'); +INSERT INTO `72crm_crm_area` VALUES ('513433', '5134', '冕宁县'); +INSERT INTO `72crm_crm_area` VALUES ('513434', '5134', '越西县'); +INSERT INTO `72crm_crm_area` VALUES ('513435', '5134', '甘洛县'); +INSERT INTO `72crm_crm_area` VALUES ('513436', '5134', '美姑县'); +INSERT INTO `72crm_crm_area` VALUES ('513437', '5134', '雷波县'); +INSERT INTO `72crm_crm_area` VALUES ('52', '0', '贵州'); +INSERT INTO `72crm_crm_area` VALUES ('5201', '52', '贵阳'); +INSERT INTO `72crm_crm_area` VALUES ('520101', '5201', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('520102', '5201', '南明区'); +INSERT INTO `72crm_crm_area` VALUES ('520103', '5201', '云岩区'); +INSERT INTO `72crm_crm_area` VALUES ('520111', '5201', '花溪区'); +INSERT INTO `72crm_crm_area` VALUES ('520112', '5201', '乌当区'); +INSERT INTO `72crm_crm_area` VALUES ('520113', '5201', '白云区'); +INSERT INTO `72crm_crm_area` VALUES ('520114', '5201', '小河区'); +INSERT INTO `72crm_crm_area` VALUES ('520121', '5201', '开阳县'); +INSERT INTO `72crm_crm_area` VALUES ('520122', '5201', '息烽县'); +INSERT INTO `72crm_crm_area` VALUES ('520123', '5201', '修文县'); +INSERT INTO `72crm_crm_area` VALUES ('520181', '5201', '清镇市'); +INSERT INTO `72crm_crm_area` VALUES ('5202', '52', '六盘水'); +INSERT INTO `72crm_crm_area` VALUES ('520201', '5202', '钟山区'); +INSERT INTO `72crm_crm_area` VALUES ('520203', '5202', '六枝特区'); +INSERT INTO `72crm_crm_area` VALUES ('520221', '5202', '水城县'); +INSERT INTO `72crm_crm_area` VALUES ('520222', '5202', '盘  县'); +INSERT INTO `72crm_crm_area` VALUES ('5203', '52', '遵义'); +INSERT INTO `72crm_crm_area` VALUES ('520301', '5203', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('520302', '5203', '红花岗区'); +INSERT INTO `72crm_crm_area` VALUES ('520321', '5203', '遵义县'); +INSERT INTO `72crm_crm_area` VALUES ('520322', '5203', '桐梓县'); +INSERT INTO `72crm_crm_area` VALUES ('520323', '5203', '绥阳县'); +INSERT INTO `72crm_crm_area` VALUES ('520324', '5203', '正安县'); +INSERT INTO `72crm_crm_area` VALUES ('520325', '5203', '道真仡佬族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('520326', '5203', '务川仡佬族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('520327', '5203', '凤冈县'); +INSERT INTO `72crm_crm_area` VALUES ('520328', '5203', '湄潭县'); +INSERT INTO `72crm_crm_area` VALUES ('520329', '5203', '余庆县'); +INSERT INTO `72crm_crm_area` VALUES ('520330', '5203', '习水县'); +INSERT INTO `72crm_crm_area` VALUES ('520381', '5203', '赤水市'); +INSERT INTO `72crm_crm_area` VALUES ('520382', '5203', '仁怀市'); +INSERT INTO `72crm_crm_area` VALUES ('5204', '52', '安顺'); +INSERT INTO `72crm_crm_area` VALUES ('520401', '5204', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('520402', '5204', '西秀区'); +INSERT INTO `72crm_crm_area` VALUES ('520421', '5204', '平坝县'); +INSERT INTO `72crm_crm_area` VALUES ('520422', '5204', '普定县'); +INSERT INTO `72crm_crm_area` VALUES ('520423', '5204', '镇宁布依族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('520424', '5204', '关岭布依族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('520425', '5204', '紫云苗族布依族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5222', '52', '铜仁地区'); +INSERT INTO `72crm_crm_area` VALUES ('522201', '5222', '铜仁市'); +INSERT INTO `72crm_crm_area` VALUES ('522222', '5222', '江口县'); +INSERT INTO `72crm_crm_area` VALUES ('522223', '5222', '玉屏侗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('522224', '5222', '石阡县'); +INSERT INTO `72crm_crm_area` VALUES ('522225', '5222', '思南县'); +INSERT INTO `72crm_crm_area` VALUES ('522226', '5222', '印江土家族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('522227', '5222', '德江县'); +INSERT INTO `72crm_crm_area` VALUES ('522228', '5222', '沿河土家族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('522229', '5222', '松桃苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('522230', '5222', '万山特区'); +INSERT INTO `72crm_crm_area` VALUES ('5223', '52', '黔西南布依族苗族自治'); +INSERT INTO `72crm_crm_area` VALUES ('522301', '5223', '兴义市'); +INSERT INTO `72crm_crm_area` VALUES ('522322', '5223', '兴仁县'); +INSERT INTO `72crm_crm_area` VALUES ('522323', '5223', '普安县'); +INSERT INTO `72crm_crm_area` VALUES ('522324', '5223', '晴隆县'); +INSERT INTO `72crm_crm_area` VALUES ('522325', '5223', '贞丰县'); +INSERT INTO `72crm_crm_area` VALUES ('522326', '5223', '望谟县'); +INSERT INTO `72crm_crm_area` VALUES ('522327', '5223', '册亨县'); +INSERT INTO `72crm_crm_area` VALUES ('522328', '5223', '安龙县'); +INSERT INTO `72crm_crm_area` VALUES ('5224', '52', '毕节地区'); +INSERT INTO `72crm_crm_area` VALUES ('522401', '5224', '毕节市'); +INSERT INTO `72crm_crm_area` VALUES ('522422', '5224', '大方县'); +INSERT INTO `72crm_crm_area` VALUES ('522423', '5224', '黔西县'); +INSERT INTO `72crm_crm_area` VALUES ('522424', '5224', '金沙县'); +INSERT INTO `72crm_crm_area` VALUES ('522425', '5224', '织金县'); +INSERT INTO `72crm_crm_area` VALUES ('522426', '5224', '纳雍县'); +INSERT INTO `72crm_crm_area` VALUES ('522427', '5224', '威宁彝族回族苗族自治'); +INSERT INTO `72crm_crm_area` VALUES ('522428', '5224', '赫章县'); +INSERT INTO `72crm_crm_area` VALUES ('5226', '52', '黔东南苗族侗族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('522601', '5226', '凯里市'); +INSERT INTO `72crm_crm_area` VALUES ('522622', '5226', '黄平县'); +INSERT INTO `72crm_crm_area` VALUES ('522623', '5226', '施秉县'); +INSERT INTO `72crm_crm_area` VALUES ('522624', '5226', '三穗县'); +INSERT INTO `72crm_crm_area` VALUES ('522625', '5226', '镇远县'); +INSERT INTO `72crm_crm_area` VALUES ('522626', '5226', '岑巩县'); +INSERT INTO `72crm_crm_area` VALUES ('522627', '5226', '天柱县'); +INSERT INTO `72crm_crm_area` VALUES ('522628', '5226', '锦屏县'); +INSERT INTO `72crm_crm_area` VALUES ('522629', '5226', '剑河县'); +INSERT INTO `72crm_crm_area` VALUES ('522630', '5226', '台江县'); +INSERT INTO `72crm_crm_area` VALUES ('522631', '5226', '黎平县'); +INSERT INTO `72crm_crm_area` VALUES ('522632', '5226', '榕江县'); +INSERT INTO `72crm_crm_area` VALUES ('522633', '5226', '从江县'); +INSERT INTO `72crm_crm_area` VALUES ('522634', '5226', '雷山县'); +INSERT INTO `72crm_crm_area` VALUES ('522635', '5226', '麻江县'); +INSERT INTO `72crm_crm_area` VALUES ('522636', '5226', '丹寨县'); +INSERT INTO `72crm_crm_area` VALUES ('5227', '52', '黔南布依族苗族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('522701', '5227', '都匀市'); +INSERT INTO `72crm_crm_area` VALUES ('522702', '5227', '福泉市'); +INSERT INTO `72crm_crm_area` VALUES ('522722', '5227', '荔波县'); +INSERT INTO `72crm_crm_area` VALUES ('522723', '5227', '贵定县'); +INSERT INTO `72crm_crm_area` VALUES ('522725', '5227', '瓮安县'); +INSERT INTO `72crm_crm_area` VALUES ('522726', '5227', '独山县'); +INSERT INTO `72crm_crm_area` VALUES ('522727', '5227', '平塘县'); +INSERT INTO `72crm_crm_area` VALUES ('522728', '5227', '罗甸县'); +INSERT INTO `72crm_crm_area` VALUES ('522729', '5227', '长顺县'); +INSERT INTO `72crm_crm_area` VALUES ('522730', '5227', '龙里县'); +INSERT INTO `72crm_crm_area` VALUES ('522731', '5227', '惠水县'); +INSERT INTO `72crm_crm_area` VALUES ('522732', '5227', '三都水族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('53', '0', '云南'); +INSERT INTO `72crm_crm_area` VALUES ('5301', '53', '昆明'); +INSERT INTO `72crm_crm_area` VALUES ('530101', '5301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('530102', '5301', '五华区'); +INSERT INTO `72crm_crm_area` VALUES ('530103', '5301', '盘龙区'); +INSERT INTO `72crm_crm_area` VALUES ('530111', '5301', '官渡区'); +INSERT INTO `72crm_crm_area` VALUES ('530112', '5301', '西山区'); +INSERT INTO `72crm_crm_area` VALUES ('530113', '5301', '东川区'); +INSERT INTO `72crm_crm_area` VALUES ('530121', '5301', '呈贡县'); +INSERT INTO `72crm_crm_area` VALUES ('530122', '5301', '晋宁县'); +INSERT INTO `72crm_crm_area` VALUES ('530124', '5301', '富民县'); +INSERT INTO `72crm_crm_area` VALUES ('530125', '5301', '宜良县'); +INSERT INTO `72crm_crm_area` VALUES ('530126', '5301', '石林彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('530127', '5301', '嵩明县'); +INSERT INTO `72crm_crm_area` VALUES ('530128', '5301', '禄劝彝族苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('530129', '5301', '寻甸回族彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('530181', '5301', '安宁市'); +INSERT INTO `72crm_crm_area` VALUES ('5303', '53', '曲靖'); +INSERT INTO `72crm_crm_area` VALUES ('530301', '5303', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('530302', '5303', '麒麟区'); +INSERT INTO `72crm_crm_area` VALUES ('530321', '5303', '马龙县'); +INSERT INTO `72crm_crm_area` VALUES ('530322', '5303', '陆良县'); +INSERT INTO `72crm_crm_area` VALUES ('530323', '5303', '师宗县'); +INSERT INTO `72crm_crm_area` VALUES ('530324', '5303', '罗平县'); +INSERT INTO `72crm_crm_area` VALUES ('530325', '5303', '富源县'); +INSERT INTO `72crm_crm_area` VALUES ('530326', '5303', '会泽县'); +INSERT INTO `72crm_crm_area` VALUES ('530328', '5303', '沾益县'); +INSERT INTO `72crm_crm_area` VALUES ('530381', '5303', '宣威市'); +INSERT INTO `72crm_crm_area` VALUES ('5304', '53', '玉溪'); +INSERT INTO `72crm_crm_area` VALUES ('530401', '5304', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('530402', '5304', '红塔区'); +INSERT INTO `72crm_crm_area` VALUES ('530421', '5304', '江川县'); +INSERT INTO `72crm_crm_area` VALUES ('530422', '5304', '澄江县'); +INSERT INTO `72crm_crm_area` VALUES ('530423', '5304', '通海县'); +INSERT INTO `72crm_crm_area` VALUES ('530424', '5304', '华宁县'); +INSERT INTO `72crm_crm_area` VALUES ('530425', '5304', '易门县'); +INSERT INTO `72crm_crm_area` VALUES ('530426', '5304', '峨山彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('530427', '5304', '新平彝族傣族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('530428', '5304', '元江哈尼族彝族傣族自'); +INSERT INTO `72crm_crm_area` VALUES ('5305', '53', '保山'); +INSERT INTO `72crm_crm_area` VALUES ('530501', '5305', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('530502', '5305', '隆阳区'); +INSERT INTO `72crm_crm_area` VALUES ('530521', '5305', '施甸县'); +INSERT INTO `72crm_crm_area` VALUES ('530522', '5305', '腾冲县'); +INSERT INTO `72crm_crm_area` VALUES ('530523', '5305', '龙陵县'); +INSERT INTO `72crm_crm_area` VALUES ('530524', '5305', '昌宁县'); +INSERT INTO `72crm_crm_area` VALUES ('5321', '53', '昭通地区'); +INSERT INTO `72crm_crm_area` VALUES ('532101', '5321', '昭通市'); +INSERT INTO `72crm_crm_area` VALUES ('532122', '5321', '鲁甸县'); +INSERT INTO `72crm_crm_area` VALUES ('532123', '5321', '巧家县'); +INSERT INTO `72crm_crm_area` VALUES ('532124', '5321', '盐津县'); +INSERT INTO `72crm_crm_area` VALUES ('532125', '5321', '大关县'); +INSERT INTO `72crm_crm_area` VALUES ('532126', '5321', '永善县'); +INSERT INTO `72crm_crm_area` VALUES ('532127', '5321', '绥江县'); +INSERT INTO `72crm_crm_area` VALUES ('532128', '5321', '镇雄县'); +INSERT INTO `72crm_crm_area` VALUES ('532129', '5321', '彝良县'); +INSERT INTO `72crm_crm_area` VALUES ('532130', '5321', '威信县'); +INSERT INTO `72crm_crm_area` VALUES ('532131', '5321', '水富县'); +INSERT INTO `72crm_crm_area` VALUES ('5323', '53', '楚雄彝族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('532301', '5323', '楚雄市'); +INSERT INTO `72crm_crm_area` VALUES ('532322', '5323', '双柏县'); +INSERT INTO `72crm_crm_area` VALUES ('532323', '5323', '牟定县'); +INSERT INTO `72crm_crm_area` VALUES ('532324', '5323', '南华县'); +INSERT INTO `72crm_crm_area` VALUES ('532325', '5323', '姚安县'); +INSERT INTO `72crm_crm_area` VALUES ('532326', '5323', '大姚县'); +INSERT INTO `72crm_crm_area` VALUES ('532327', '5323', '永仁县'); +INSERT INTO `72crm_crm_area` VALUES ('532328', '5323', '元谋县'); +INSERT INTO `72crm_crm_area` VALUES ('532329', '5323', '武定县'); +INSERT INTO `72crm_crm_area` VALUES ('532331', '5323', '禄丰县'); +INSERT INTO `72crm_crm_area` VALUES ('5325', '53', '红河哈尼族彝族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('532501', '5325', '个旧市'); +INSERT INTO `72crm_crm_area` VALUES ('532502', '5325', '开远市'); +INSERT INTO `72crm_crm_area` VALUES ('532522', '5325', '蒙自县'); +INSERT INTO `72crm_crm_area` VALUES ('532523', '5325', '屏边苗族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532524', '5325', '建水县'); +INSERT INTO `72crm_crm_area` VALUES ('532525', '5325', '石屏县'); +INSERT INTO `72crm_crm_area` VALUES ('532526', '5325', '弥勒县'); +INSERT INTO `72crm_crm_area` VALUES ('532527', '5325', '泸西县'); +INSERT INTO `72crm_crm_area` VALUES ('532528', '5325', '元阳县'); +INSERT INTO `72crm_crm_area` VALUES ('532529', '5325', '红河县'); +INSERT INTO `72crm_crm_area` VALUES ('532530', '5325', '金平苗族瑶族傣族自治'); +INSERT INTO `72crm_crm_area` VALUES ('532531', '5325', '绿春县'); +INSERT INTO `72crm_crm_area` VALUES ('532532', '5325', '河口瑶族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5326', '53', '文山壮族苗族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('532621', '5326', '文山县'); +INSERT INTO `72crm_crm_area` VALUES ('532622', '5326', '砚山县'); +INSERT INTO `72crm_crm_area` VALUES ('532623', '5326', '西畴县'); +INSERT INTO `72crm_crm_area` VALUES ('532624', '5326', '麻栗坡县'); +INSERT INTO `72crm_crm_area` VALUES ('532625', '5326', '马关县'); +INSERT INTO `72crm_crm_area` VALUES ('532626', '5326', '丘北县'); +INSERT INTO `72crm_crm_area` VALUES ('532627', '5326', '广南县'); +INSERT INTO `72crm_crm_area` VALUES ('532628', '5326', '富宁县'); +INSERT INTO `72crm_crm_area` VALUES ('5327', '53', '思茅地区'); +INSERT INTO `72crm_crm_area` VALUES ('532701', '5327', '思茅市'); +INSERT INTO `72crm_crm_area` VALUES ('532722', '5327', '普洱哈尼族彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532723', '5327', '墨江哈尼族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532724', '5327', '景东彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532725', '5327', '景谷傣族彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532726', '5327', '镇沅彝族哈尼族拉祜族'); +INSERT INTO `72crm_crm_area` VALUES ('532727', '5327', '江城哈尼族彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532728', '5327', '孟连傣族拉祜族佤族自'); +INSERT INTO `72crm_crm_area` VALUES ('532729', '5327', '澜沧拉祜族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532730', '5327', '西盟佤族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5328', '53', '西双版纳傣族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('532801', '5328', '景洪市'); +INSERT INTO `72crm_crm_area` VALUES ('532822', '5328', '勐海县'); +INSERT INTO `72crm_crm_area` VALUES ('532823', '5328', '勐腊县'); +INSERT INTO `72crm_crm_area` VALUES ('5329', '53', '大理白族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('532901', '5329', '大理市'); +INSERT INTO `72crm_crm_area` VALUES ('532922', '5329', '漾濞彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532923', '5329', '祥云县'); +INSERT INTO `72crm_crm_area` VALUES ('532924', '5329', '宾川县'); +INSERT INTO `72crm_crm_area` VALUES ('532925', '5329', '弥渡县'); +INSERT INTO `72crm_crm_area` VALUES ('532926', '5329', '南涧彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532927', '5329', '巍山彝族回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('532928', '5329', '永平县'); +INSERT INTO `72crm_crm_area` VALUES ('532929', '5329', '云龙县'); +INSERT INTO `72crm_crm_area` VALUES ('532930', '5329', '洱源县'); +INSERT INTO `72crm_crm_area` VALUES ('532931', '5329', '剑川县'); +INSERT INTO `72crm_crm_area` VALUES ('532932', '5329', '鹤庆县'); +INSERT INTO `72crm_crm_area` VALUES ('5331', '53', '德宏傣族景颇族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('533102', '5331', '瑞丽市'); +INSERT INTO `72crm_crm_area` VALUES ('533103', '5331', '潞西市'); +INSERT INTO `72crm_crm_area` VALUES ('533122', '5331', '梁河县'); +INSERT INTO `72crm_crm_area` VALUES ('533123', '5331', '盈江县'); +INSERT INTO `72crm_crm_area` VALUES ('533124', '5331', '陇川县'); +INSERT INTO `72crm_crm_area` VALUES ('5332', '53', '丽江地区'); +INSERT INTO `72crm_crm_area` VALUES ('533221', '5332', '丽江纳西族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('533222', '5332', '永胜县'); +INSERT INTO `72crm_crm_area` VALUES ('533223', '5332', '华坪县'); +INSERT INTO `72crm_crm_area` VALUES ('533224', '5332', '宁蒗彝族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5333', '53', '怒江傈僳族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('533321', '5333', '泸水县'); +INSERT INTO `72crm_crm_area` VALUES ('533323', '5333', '福贡县'); +INSERT INTO `72crm_crm_area` VALUES ('533324', '5333', '贡山独龙族怒族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('533325', '5333', '兰坪白族普米族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5334', '53', '迪庆藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('533421', '5334', '中甸县'); +INSERT INTO `72crm_crm_area` VALUES ('533422', '5334', '德钦县'); +INSERT INTO `72crm_crm_area` VALUES ('533423', '5334', '维西傈僳族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('5335', '53', '临沧地区'); +INSERT INTO `72crm_crm_area` VALUES ('533521', '5335', '临沧县'); +INSERT INTO `72crm_crm_area` VALUES ('533522', '5335', '凤庆县'); +INSERT INTO `72crm_crm_area` VALUES ('533523', '5335', '云  县'); +INSERT INTO `72crm_crm_area` VALUES ('533524', '5335', '永德县'); +INSERT INTO `72crm_crm_area` VALUES ('533525', '5335', '镇康县'); +INSERT INTO `72crm_crm_area` VALUES ('533526', '5335', '双江拉祜族佤族布朗族'); +INSERT INTO `72crm_crm_area` VALUES ('533527', '5335', '耿马傣族佤族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('533528', '5335', '沧源佤族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('54', '0', '西藏'); +INSERT INTO `72crm_crm_area` VALUES ('5401', '54', '拉萨'); +INSERT INTO `72crm_crm_area` VALUES ('540101', '5401', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('540102', '5401', '城关区'); +INSERT INTO `72crm_crm_area` VALUES ('540121', '5401', '林周县'); +INSERT INTO `72crm_crm_area` VALUES ('540122', '5401', '当雄县'); +INSERT INTO `72crm_crm_area` VALUES ('540123', '5401', '尼木县'); +INSERT INTO `72crm_crm_area` VALUES ('540124', '5401', '曲水县'); +INSERT INTO `72crm_crm_area` VALUES ('540125', '5401', '堆龙德庆县'); +INSERT INTO `72crm_crm_area` VALUES ('540126', '5401', '达孜县'); +INSERT INTO `72crm_crm_area` VALUES ('540127', '5401', '墨竹工卡县'); +INSERT INTO `72crm_crm_area` VALUES ('5421', '54', '昌都地区'); +INSERT INTO `72crm_crm_area` VALUES ('542121', '5421', '昌都县'); +INSERT INTO `72crm_crm_area` VALUES ('542122', '5421', '江达县'); +INSERT INTO `72crm_crm_area` VALUES ('542123', '5421', '贡觉县'); +INSERT INTO `72crm_crm_area` VALUES ('542124', '5421', '类乌齐县'); +INSERT INTO `72crm_crm_area` VALUES ('542125', '5421', '丁青县'); +INSERT INTO `72crm_crm_area` VALUES ('542126', '5421', '察雅县'); +INSERT INTO `72crm_crm_area` VALUES ('542127', '5421', '八宿县'); +INSERT INTO `72crm_crm_area` VALUES ('542128', '5421', '左贡县'); +INSERT INTO `72crm_crm_area` VALUES ('542129', '5421', '芒康县'); +INSERT INTO `72crm_crm_area` VALUES ('542132', '5421', '洛隆县'); +INSERT INTO `72crm_crm_area` VALUES ('542133', '5421', '边坝县'); +INSERT INTO `72crm_crm_area` VALUES ('5422', '54', '山南地区'); +INSERT INTO `72crm_crm_area` VALUES ('542221', '5422', '乃东县'); +INSERT INTO `72crm_crm_area` VALUES ('542222', '5422', '扎囊县'); +INSERT INTO `72crm_crm_area` VALUES ('542223', '5422', '贡嘎县'); +INSERT INTO `72crm_crm_area` VALUES ('542224', '5422', '桑日县'); +INSERT INTO `72crm_crm_area` VALUES ('542225', '5422', '琼结县'); +INSERT INTO `72crm_crm_area` VALUES ('542226', '5422', '曲松县'); +INSERT INTO `72crm_crm_area` VALUES ('542227', '5422', '措美县'); +INSERT INTO `72crm_crm_area` VALUES ('542228', '5422', '洛扎县'); +INSERT INTO `72crm_crm_area` VALUES ('542229', '5422', '加查县'); +INSERT INTO `72crm_crm_area` VALUES ('542231', '5422', '隆子县'); +INSERT INTO `72crm_crm_area` VALUES ('542232', '5422', '错那县'); +INSERT INTO `72crm_crm_area` VALUES ('542233', '5422', '浪卡子县'); +INSERT INTO `72crm_crm_area` VALUES ('5423', '54', '日喀则地区'); +INSERT INTO `72crm_crm_area` VALUES ('542301', '5423', '日喀则市'); +INSERT INTO `72crm_crm_area` VALUES ('542322', '5423', '南木林县'); +INSERT INTO `72crm_crm_area` VALUES ('542323', '5423', '江孜县'); +INSERT INTO `72crm_crm_area` VALUES ('542324', '5423', '定日县'); +INSERT INTO `72crm_crm_area` VALUES ('542325', '5423', '萨迦县'); +INSERT INTO `72crm_crm_area` VALUES ('542326', '5423', '拉孜县'); +INSERT INTO `72crm_crm_area` VALUES ('542327', '5423', '昂仁县'); +INSERT INTO `72crm_crm_area` VALUES ('542328', '5423', '谢通门县'); +INSERT INTO `72crm_crm_area` VALUES ('542329', '5423', '白朗县'); +INSERT INTO `72crm_crm_area` VALUES ('542330', '5423', '仁布县'); +INSERT INTO `72crm_crm_area` VALUES ('542331', '5423', '康马县'); +INSERT INTO `72crm_crm_area` VALUES ('542332', '5423', '定结县'); +INSERT INTO `72crm_crm_area` VALUES ('542333', '5423', '仲巴县'); +INSERT INTO `72crm_crm_area` VALUES ('542334', '5423', '亚东县'); +INSERT INTO `72crm_crm_area` VALUES ('542335', '5423', '吉隆县'); +INSERT INTO `72crm_crm_area` VALUES ('542336', '5423', '聂拉木县'); +INSERT INTO `72crm_crm_area` VALUES ('542337', '5423', '萨嘎县'); +INSERT INTO `72crm_crm_area` VALUES ('542338', '5423', '岗巴县'); +INSERT INTO `72crm_crm_area` VALUES ('5424', '54', '那曲地区'); +INSERT INTO `72crm_crm_area` VALUES ('542421', '5424', '那曲县'); +INSERT INTO `72crm_crm_area` VALUES ('542422', '5424', '嘉黎县'); +INSERT INTO `72crm_crm_area` VALUES ('542423', '5424', '比如县'); +INSERT INTO `72crm_crm_area` VALUES ('542424', '5424', '聂荣县'); +INSERT INTO `72crm_crm_area` VALUES ('542425', '5424', '安多县'); +INSERT INTO `72crm_crm_area` VALUES ('542426', '5424', '申扎县'); +INSERT INTO `72crm_crm_area` VALUES ('542427', '5424', '索  县'); +INSERT INTO `72crm_crm_area` VALUES ('542428', '5424', '班戈县'); +INSERT INTO `72crm_crm_area` VALUES ('542429', '5424', '巴青县'); +INSERT INTO `72crm_crm_area` VALUES ('542430', '5424', '尼玛县'); +INSERT INTO `72crm_crm_area` VALUES ('5425', '54', '阿里地区'); +INSERT INTO `72crm_crm_area` VALUES ('542521', '5425', '普兰县'); +INSERT INTO `72crm_crm_area` VALUES ('542522', '5425', '札达县'); +INSERT INTO `72crm_crm_area` VALUES ('542523', '5425', '噶尔县'); +INSERT INTO `72crm_crm_area` VALUES ('542524', '5425', '日土县'); +INSERT INTO `72crm_crm_area` VALUES ('542525', '5425', '革吉县'); +INSERT INTO `72crm_crm_area` VALUES ('542526', '5425', '改则县'); +INSERT INTO `72crm_crm_area` VALUES ('542527', '5425', '措勤县'); +INSERT INTO `72crm_crm_area` VALUES ('5426', '54', '林芝地区'); +INSERT INTO `72crm_crm_area` VALUES ('542621', '5426', '林芝县'); +INSERT INTO `72crm_crm_area` VALUES ('542622', '5426', '工布江达县'); +INSERT INTO `72crm_crm_area` VALUES ('542623', '5426', '米林县'); +INSERT INTO `72crm_crm_area` VALUES ('542624', '5426', '墨脱县'); +INSERT INTO `72crm_crm_area` VALUES ('542625', '5426', '波密县'); +INSERT INTO `72crm_crm_area` VALUES ('542626', '5426', '察隅县'); +INSERT INTO `72crm_crm_area` VALUES ('542627', '5426', '朗  县'); +INSERT INTO `72crm_crm_area` VALUES ('61', '0', '陕西'); +INSERT INTO `72crm_crm_area` VALUES ('6101', '61', '西安'); +INSERT INTO `72crm_crm_area` VALUES ('610101', '6101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610102', '6101', '新城区'); +INSERT INTO `72crm_crm_area` VALUES ('610103', '6101', '碑林区'); +INSERT INTO `72crm_crm_area` VALUES ('610104', '6101', '莲湖区'); +INSERT INTO `72crm_crm_area` VALUES ('610111', '6101', '灞桥区'); +INSERT INTO `72crm_crm_area` VALUES ('610112', '6101', '未央区'); +INSERT INTO `72crm_crm_area` VALUES ('610113', '6101', '雁塔区'); +INSERT INTO `72crm_crm_area` VALUES ('610114', '6101', '阎良区'); +INSERT INTO `72crm_crm_area` VALUES ('610115', '6101', '临潼区'); +INSERT INTO `72crm_crm_area` VALUES ('610121', '6101', '长安县'); +INSERT INTO `72crm_crm_area` VALUES ('610122', '6101', '蓝田县'); +INSERT INTO `72crm_crm_area` VALUES ('610124', '6101', '周至县'); +INSERT INTO `72crm_crm_area` VALUES ('610125', '6101', '户  县'); +INSERT INTO `72crm_crm_area` VALUES ('610126', '6101', '高陵县'); +INSERT INTO `72crm_crm_area` VALUES ('6102', '61', '铜川'); +INSERT INTO `72crm_crm_area` VALUES ('610201', '6102', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610202', '6102', '王益区'); +INSERT INTO `72crm_crm_area` VALUES ('610203', '6102', '印台区'); +INSERT INTO `72crm_crm_area` VALUES ('610221', '6102', '耀  县'); +INSERT INTO `72crm_crm_area` VALUES ('610222', '6102', '宜君县'); +INSERT INTO `72crm_crm_area` VALUES ('6103', '61', '宝鸡'); +INSERT INTO `72crm_crm_area` VALUES ('610301', '6103', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610302', '6103', '渭滨区'); +INSERT INTO `72crm_crm_area` VALUES ('610303', '6103', '金台区'); +INSERT INTO `72crm_crm_area` VALUES ('610321', '6103', '宝鸡县'); +INSERT INTO `72crm_crm_area` VALUES ('610322', '6103', '凤翔县'); +INSERT INTO `72crm_crm_area` VALUES ('610323', '6103', '岐山县'); +INSERT INTO `72crm_crm_area` VALUES ('610324', '6103', '扶风县'); +INSERT INTO `72crm_crm_area` VALUES ('610326', '6103', '眉  县'); +INSERT INTO `72crm_crm_area` VALUES ('610327', '6103', '陇  县'); +INSERT INTO `72crm_crm_area` VALUES ('610328', '6103', '千阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610329', '6103', '麟游县'); +INSERT INTO `72crm_crm_area` VALUES ('610330', '6103', '凤  县'); +INSERT INTO `72crm_crm_area` VALUES ('610331', '6103', '太白县'); +INSERT INTO `72crm_crm_area` VALUES ('6104', '61', '咸阳'); +INSERT INTO `72crm_crm_area` VALUES ('610401', '6104', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610402', '6104', '秦都区'); +INSERT INTO `72crm_crm_area` VALUES ('610403', '6104', '杨陵区'); +INSERT INTO `72crm_crm_area` VALUES ('610404', '6104', '渭城区'); +INSERT INTO `72crm_crm_area` VALUES ('610422', '6104', '三原县'); +INSERT INTO `72crm_crm_area` VALUES ('610423', '6104', '泾阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610424', '6104', '乾  县'); +INSERT INTO `72crm_crm_area` VALUES ('610425', '6104', '礼泉县'); +INSERT INTO `72crm_crm_area` VALUES ('610426', '6104', '永寿县'); +INSERT INTO `72crm_crm_area` VALUES ('610427', '6104', '彬  县'); +INSERT INTO `72crm_crm_area` VALUES ('610428', '6104', '长武县'); +INSERT INTO `72crm_crm_area` VALUES ('610429', '6104', '旬邑县'); +INSERT INTO `72crm_crm_area` VALUES ('610430', '6104', '淳化县'); +INSERT INTO `72crm_crm_area` VALUES ('610431', '6104', '武功县'); +INSERT INTO `72crm_crm_area` VALUES ('610481', '6104', '兴平市'); +INSERT INTO `72crm_crm_area` VALUES ('6105', '61', '渭南'); +INSERT INTO `72crm_crm_area` VALUES ('610501', '6105', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610502', '6105', '临渭区'); +INSERT INTO `72crm_crm_area` VALUES ('610521', '6105', '华  县'); +INSERT INTO `72crm_crm_area` VALUES ('610522', '6105', '潼关县'); +INSERT INTO `72crm_crm_area` VALUES ('610523', '6105', '大荔县'); +INSERT INTO `72crm_crm_area` VALUES ('610524', '6105', '合阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610525', '6105', '澄城县'); +INSERT INTO `72crm_crm_area` VALUES ('610526', '6105', '蒲城县'); +INSERT INTO `72crm_crm_area` VALUES ('610527', '6105', '白水县'); +INSERT INTO `72crm_crm_area` VALUES ('610528', '6105', '富平县'); +INSERT INTO `72crm_crm_area` VALUES ('610581', '6105', '韩城市'); +INSERT INTO `72crm_crm_area` VALUES ('610582', '6105', '华阴市'); +INSERT INTO `72crm_crm_area` VALUES ('6106', '61', '延安'); +INSERT INTO `72crm_crm_area` VALUES ('610601', '6106', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610602', '6106', '宝塔区'); +INSERT INTO `72crm_crm_area` VALUES ('610621', '6106', '延长县'); +INSERT INTO `72crm_crm_area` VALUES ('610622', '6106', '延川县'); +INSERT INTO `72crm_crm_area` VALUES ('610623', '6106', '子长县'); +INSERT INTO `72crm_crm_area` VALUES ('610624', '6106', '安塞县'); +INSERT INTO `72crm_crm_area` VALUES ('610625', '6106', '志丹县'); +INSERT INTO `72crm_crm_area` VALUES ('610626', '6106', '吴旗县'); +INSERT INTO `72crm_crm_area` VALUES ('610627', '6106', '甘泉县'); +INSERT INTO `72crm_crm_area` VALUES ('610628', '6106', '富  县'); +INSERT INTO `72crm_crm_area` VALUES ('610629', '6106', '洛川县'); +INSERT INTO `72crm_crm_area` VALUES ('610630', '6106', '宜川县'); +INSERT INTO `72crm_crm_area` VALUES ('610631', '6106', '黄龙县'); +INSERT INTO `72crm_crm_area` VALUES ('610632', '6106', '黄陵县'); +INSERT INTO `72crm_crm_area` VALUES ('6107', '61', '汉中'); +INSERT INTO `72crm_crm_area` VALUES ('610701', '6107', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610702', '6107', '汉台区'); +INSERT INTO `72crm_crm_area` VALUES ('610721', '6107', '南郑县'); +INSERT INTO `72crm_crm_area` VALUES ('610722', '6107', '城固县'); +INSERT INTO `72crm_crm_area` VALUES ('610723', '6107', '洋  县'); +INSERT INTO `72crm_crm_area` VALUES ('610724', '6107', '西乡县'); +INSERT INTO `72crm_crm_area` VALUES ('610725', '6107', '勉  县'); +INSERT INTO `72crm_crm_area` VALUES ('610726', '6107', '宁强县'); +INSERT INTO `72crm_crm_area` VALUES ('610727', '6107', '略阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610728', '6107', '镇巴县'); +INSERT INTO `72crm_crm_area` VALUES ('610729', '6107', '留坝县'); +INSERT INTO `72crm_crm_area` VALUES ('610730', '6107', '佛坪县'); +INSERT INTO `72crm_crm_area` VALUES ('6108', '61', '榆林'); +INSERT INTO `72crm_crm_area` VALUES ('610801', '6108', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610802', '6108', '榆阳区'); +INSERT INTO `72crm_crm_area` VALUES ('610821', '6108', '神木县'); +INSERT INTO `72crm_crm_area` VALUES ('610822', '6108', '府谷县'); +INSERT INTO `72crm_crm_area` VALUES ('610823', '6108', '横山县'); +INSERT INTO `72crm_crm_area` VALUES ('610824', '6108', '靖边县'); +INSERT INTO `72crm_crm_area` VALUES ('610825', '6108', '定边县'); +INSERT INTO `72crm_crm_area` VALUES ('610826', '6108', '绥德县'); +INSERT INTO `72crm_crm_area` VALUES ('610827', '6108', '米脂县'); +INSERT INTO `72crm_crm_area` VALUES ('610828', '6108', '佳  县'); +INSERT INTO `72crm_crm_area` VALUES ('610829', '6108', '吴堡县'); +INSERT INTO `72crm_crm_area` VALUES ('610830', '6108', '清涧县'); +INSERT INTO `72crm_crm_area` VALUES ('610831', '6108', '子洲县'); +INSERT INTO `72crm_crm_area` VALUES ('6109', '61', '安康'); +INSERT INTO `72crm_crm_area` VALUES ('610901', '6109', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('610902', '6109', '汉滨区'); +INSERT INTO `72crm_crm_area` VALUES ('610921', '6109', '汉阴县'); +INSERT INTO `72crm_crm_area` VALUES ('610922', '6109', '石泉县'); +INSERT INTO `72crm_crm_area` VALUES ('610923', '6109', '宁陕县'); +INSERT INTO `72crm_crm_area` VALUES ('610924', '6109', '紫阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610925', '6109', '岚皋县'); +INSERT INTO `72crm_crm_area` VALUES ('610926', '6109', '平利县'); +INSERT INTO `72crm_crm_area` VALUES ('610927', '6109', '镇坪县'); +INSERT INTO `72crm_crm_area` VALUES ('610928', '6109', '旬阳县'); +INSERT INTO `72crm_crm_area` VALUES ('610929', '6109', '白河县'); +INSERT INTO `72crm_crm_area` VALUES ('6125', '61', '商洛地区'); +INSERT INTO `72crm_crm_area` VALUES ('612501', '6125', '商州市'); +INSERT INTO `72crm_crm_area` VALUES ('612522', '6125', '洛南县'); +INSERT INTO `72crm_crm_area` VALUES ('612523', '6125', '丹凤县'); +INSERT INTO `72crm_crm_area` VALUES ('612524', '6125', '商南县'); +INSERT INTO `72crm_crm_area` VALUES ('612525', '6125', '山阳县'); +INSERT INTO `72crm_crm_area` VALUES ('612526', '6125', '镇安县'); +INSERT INTO `72crm_crm_area` VALUES ('612527', '6125', '柞水县'); +INSERT INTO `72crm_crm_area` VALUES ('62', '0', '甘肃'); +INSERT INTO `72crm_crm_area` VALUES ('6201', '62', '兰州'); +INSERT INTO `72crm_crm_area` VALUES ('620101', '6201', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('620102', '6201', '城关区'); +INSERT INTO `72crm_crm_area` VALUES ('620103', '6201', '七里河区'); +INSERT INTO `72crm_crm_area` VALUES ('620104', '6201', '西固区'); +INSERT INTO `72crm_crm_area` VALUES ('620105', '6201', '安宁区'); +INSERT INTO `72crm_crm_area` VALUES ('620111', '6201', '红古区'); +INSERT INTO `72crm_crm_area` VALUES ('620121', '6201', '永登县'); +INSERT INTO `72crm_crm_area` VALUES ('620122', '6201', '皋兰县'); +INSERT INTO `72crm_crm_area` VALUES ('620123', '6201', '榆中县'); +INSERT INTO `72crm_crm_area` VALUES ('6202', '62', '嘉峪关'); +INSERT INTO `72crm_crm_area` VALUES ('620201', '6202', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('6203', '62', '金昌'); +INSERT INTO `72crm_crm_area` VALUES ('620301', '6203', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('620302', '6203', '金川区'); +INSERT INTO `72crm_crm_area` VALUES ('620321', '6203', '永昌县'); +INSERT INTO `72crm_crm_area` VALUES ('6204', '62', '白银'); +INSERT INTO `72crm_crm_area` VALUES ('620401', '6204', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('620402', '6204', '白银区'); +INSERT INTO `72crm_crm_area` VALUES ('620403', '6204', '平川区'); +INSERT INTO `72crm_crm_area` VALUES ('620421', '6204', '靖远县'); +INSERT INTO `72crm_crm_area` VALUES ('620422', '6204', '会宁县'); +INSERT INTO `72crm_crm_area` VALUES ('620423', '6204', '景泰县'); +INSERT INTO `72crm_crm_area` VALUES ('6205', '62', '天水'); +INSERT INTO `72crm_crm_area` VALUES ('620501', '6205', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('620502', '6205', '秦城区'); +INSERT INTO `72crm_crm_area` VALUES ('620503', '6205', '北道区'); +INSERT INTO `72crm_crm_area` VALUES ('620521', '6205', '清水县'); +INSERT INTO `72crm_crm_area` VALUES ('620522', '6205', '秦安县'); +INSERT INTO `72crm_crm_area` VALUES ('620523', '6205', '甘谷县'); +INSERT INTO `72crm_crm_area` VALUES ('620524', '6205', '武山县'); +INSERT INTO `72crm_crm_area` VALUES ('620525', '6205', '张家川回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6221', '62', '酒泉地区'); +INSERT INTO `72crm_crm_area` VALUES ('622101', '6221', '玉门市'); +INSERT INTO `72crm_crm_area` VALUES ('622102', '6221', '酒泉市'); +INSERT INTO `72crm_crm_area` VALUES ('622103', '6221', '敦煌市'); +INSERT INTO `72crm_crm_area` VALUES ('622123', '6221', '金塔县'); +INSERT INTO `72crm_crm_area` VALUES ('622124', '6221', '肃北蒙古族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('622125', '6221', '阿克塞哈萨克族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('622126', '6221', '安西县'); +INSERT INTO `72crm_crm_area` VALUES ('6222', '62', '张掖地区'); +INSERT INTO `72crm_crm_area` VALUES ('622201', '6222', '张掖市'); +INSERT INTO `72crm_crm_area` VALUES ('622222', '6222', '肃南裕固族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('622223', '6222', '民乐县'); +INSERT INTO `72crm_crm_area` VALUES ('622224', '6222', '临泽县'); +INSERT INTO `72crm_crm_area` VALUES ('622225', '6222', '高台县'); +INSERT INTO `72crm_crm_area` VALUES ('622226', '6222', '山丹县'); +INSERT INTO `72crm_crm_area` VALUES ('6223', '62', '武威地区'); +INSERT INTO `72crm_crm_area` VALUES ('622301', '6223', '武威市'); +INSERT INTO `72crm_crm_area` VALUES ('622322', '6223', '民勤县'); +INSERT INTO `72crm_crm_area` VALUES ('622323', '6223', '古浪县'); +INSERT INTO `72crm_crm_area` VALUES ('622326', '6223', '天祝藏族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6224', '62', '定西地区'); +INSERT INTO `72crm_crm_area` VALUES ('622421', '6224', '定西县'); +INSERT INTO `72crm_crm_area` VALUES ('622424', '6224', '通渭县'); +INSERT INTO `72crm_crm_area` VALUES ('622425', '6224', '陇西县'); +INSERT INTO `72crm_crm_area` VALUES ('622426', '6224', '渭源县'); +INSERT INTO `72crm_crm_area` VALUES ('622427', '6224', '临洮县'); +INSERT INTO `72crm_crm_area` VALUES ('622428', '6224', '漳  县'); +INSERT INTO `72crm_crm_area` VALUES ('622429', '6224', '岷  县'); +INSERT INTO `72crm_crm_area` VALUES ('6226', '62', '陇南地区'); +INSERT INTO `72crm_crm_area` VALUES ('622621', '6226', '武都县'); +INSERT INTO `72crm_crm_area` VALUES ('622623', '6226', '宕昌县'); +INSERT INTO `72crm_crm_area` VALUES ('622624', '6226', '成  县'); +INSERT INTO `72crm_crm_area` VALUES ('622625', '6226', '康  县'); +INSERT INTO `72crm_crm_area` VALUES ('622626', '6226', '文  县'); +INSERT INTO `72crm_crm_area` VALUES ('622627', '6226', '西和县'); +INSERT INTO `72crm_crm_area` VALUES ('622628', '6226', '礼  县'); +INSERT INTO `72crm_crm_area` VALUES ('622629', '6226', '两当县'); +INSERT INTO `72crm_crm_area` VALUES ('622630', '6226', '徽  县'); +INSERT INTO `72crm_crm_area` VALUES ('6227', '62', '平凉地区'); +INSERT INTO `72crm_crm_area` VALUES ('622701', '6227', '平凉市'); +INSERT INTO `72crm_crm_area` VALUES ('622722', '6227', '泾川县'); +INSERT INTO `72crm_crm_area` VALUES ('622723', '6227', '灵台县'); +INSERT INTO `72crm_crm_area` VALUES ('622724', '6227', '崇信县'); +INSERT INTO `72crm_crm_area` VALUES ('622725', '6227', '华亭县'); +INSERT INTO `72crm_crm_area` VALUES ('622726', '6227', '庄浪县'); +INSERT INTO `72crm_crm_area` VALUES ('622727', '6227', '静宁县'); +INSERT INTO `72crm_crm_area` VALUES ('6228', '62', '庆阳地区'); +INSERT INTO `72crm_crm_area` VALUES ('622801', '6228', '西峰市'); +INSERT INTO `72crm_crm_area` VALUES ('622821', '6228', '庆阳县'); +INSERT INTO `72crm_crm_area` VALUES ('622822', '6228', '环  县'); +INSERT INTO `72crm_crm_area` VALUES ('622823', '6228', '华池县'); +INSERT INTO `72crm_crm_area` VALUES ('622824', '6228', '合水县'); +INSERT INTO `72crm_crm_area` VALUES ('622825', '6228', '正宁县'); +INSERT INTO `72crm_crm_area` VALUES ('622826', '6228', '宁  县'); +INSERT INTO `72crm_crm_area` VALUES ('622827', '6228', '镇原县'); +INSERT INTO `72crm_crm_area` VALUES ('6229', '62', '临夏回族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('622901', '6229', '临夏市'); +INSERT INTO `72crm_crm_area` VALUES ('622921', '6229', '临夏县'); +INSERT INTO `72crm_crm_area` VALUES ('622922', '6229', '康乐县'); +INSERT INTO `72crm_crm_area` VALUES ('622923', '6229', '永靖县'); +INSERT INTO `72crm_crm_area` VALUES ('622924', '6229', '广河县'); +INSERT INTO `72crm_crm_area` VALUES ('622925', '6229', '和政县'); +INSERT INTO `72crm_crm_area` VALUES ('622926', '6229', '东乡族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('622927', '6229', '积石山保安族东乡族撒'); +INSERT INTO `72crm_crm_area` VALUES ('6230', '62', '甘南藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('623001', '6230', '合作市'); +INSERT INTO `72crm_crm_area` VALUES ('623021', '6230', '临潭县'); +INSERT INTO `72crm_crm_area` VALUES ('623022', '6230', '卓尼县'); +INSERT INTO `72crm_crm_area` VALUES ('623023', '6230', '舟曲县'); +INSERT INTO `72crm_crm_area` VALUES ('623024', '6230', '迭部县'); +INSERT INTO `72crm_crm_area` VALUES ('623025', '6230', '玛曲县'); +INSERT INTO `72crm_crm_area` VALUES ('623026', '6230', '碌曲县'); +INSERT INTO `72crm_crm_area` VALUES ('623027', '6230', '夏河县'); +INSERT INTO `72crm_crm_area` VALUES ('63', '0', '青海'); +INSERT INTO `72crm_crm_area` VALUES ('6301', '63', '西宁'); +INSERT INTO `72crm_crm_area` VALUES ('630101', '6301', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('630102', '6301', '城东区'); +INSERT INTO `72crm_crm_area` VALUES ('630103', '6301', '城中区'); +INSERT INTO `72crm_crm_area` VALUES ('630104', '6301', '城西区'); +INSERT INTO `72crm_crm_area` VALUES ('630105', '6301', '城北区'); +INSERT INTO `72crm_crm_area` VALUES ('630121', '6301', '大通回族土族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('630122', '6301', '湟中县'); +INSERT INTO `72crm_crm_area` VALUES ('630123', '6301', '湟源县'); +INSERT INTO `72crm_crm_area` VALUES ('6321', '63', '海东地区'); +INSERT INTO `72crm_crm_area` VALUES ('632121', '6321', '平安县'); +INSERT INTO `72crm_crm_area` VALUES ('632122', '6321', '民和回族土族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('632123', '6321', '乐都县'); +INSERT INTO `72crm_crm_area` VALUES ('632126', '6321', '互助土族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('632127', '6321', '化隆回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('632128', '6321', '循化撒拉族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6322', '63', '海北藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632221', '6322', '门源回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('632222', '6322', '祁连县'); +INSERT INTO `72crm_crm_area` VALUES ('632223', '6322', '海晏县'); +INSERT INTO `72crm_crm_area` VALUES ('632224', '6322', '刚察县'); +INSERT INTO `72crm_crm_area` VALUES ('6323', '63', '黄南藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632321', '6323', '同仁县'); +INSERT INTO `72crm_crm_area` VALUES ('632322', '6323', '尖扎县'); +INSERT INTO `72crm_crm_area` VALUES ('632323', '6323', '泽库县'); +INSERT INTO `72crm_crm_area` VALUES ('632324', '6323', '河南蒙古族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6325', '63', '海南藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632521', '6325', '共和县'); +INSERT INTO `72crm_crm_area` VALUES ('632522', '6325', '同德县'); +INSERT INTO `72crm_crm_area` VALUES ('632523', '6325', '贵德县'); +INSERT INTO `72crm_crm_area` VALUES ('632524', '6325', '兴海县'); +INSERT INTO `72crm_crm_area` VALUES ('632525', '6325', '贵南县'); +INSERT INTO `72crm_crm_area` VALUES ('6326', '63', '果洛藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632621', '6326', '玛沁县'); +INSERT INTO `72crm_crm_area` VALUES ('632622', '6326', '班玛县'); +INSERT INTO `72crm_crm_area` VALUES ('632623', '6326', '甘德县'); +INSERT INTO `72crm_crm_area` VALUES ('632624', '6326', '达日县'); +INSERT INTO `72crm_crm_area` VALUES ('632625', '6326', '久治县'); +INSERT INTO `72crm_crm_area` VALUES ('632626', '6326', '玛多县'); +INSERT INTO `72crm_crm_area` VALUES ('6327', '63', '玉树藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632721', '6327', '玉树县'); +INSERT INTO `72crm_crm_area` VALUES ('632722', '6327', '杂多县'); +INSERT INTO `72crm_crm_area` VALUES ('632723', '6327', '称多县'); +INSERT INTO `72crm_crm_area` VALUES ('632724', '6327', '治多县'); +INSERT INTO `72crm_crm_area` VALUES ('632725', '6327', '囊谦县'); +INSERT INTO `72crm_crm_area` VALUES ('632726', '6327', '曲麻莱县'); +INSERT INTO `72crm_crm_area` VALUES ('6328', '63', '海西蒙古族藏族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('632801', '6328', '格尔木市'); +INSERT INTO `72crm_crm_area` VALUES ('632802', '6328', '德令哈市'); +INSERT INTO `72crm_crm_area` VALUES ('632821', '6328', '乌兰县'); +INSERT INTO `72crm_crm_area` VALUES ('632822', '6328', '都兰县'); +INSERT INTO `72crm_crm_area` VALUES ('632823', '6328', '天峻县'); +INSERT INTO `72crm_crm_area` VALUES ('64', '0', '宁夏回族自治区'); +INSERT INTO `72crm_crm_area` VALUES ('6401', '64', '银川'); +INSERT INTO `72crm_crm_area` VALUES ('640101', '6401', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('640102', '6401', '城  区'); +INSERT INTO `72crm_crm_area` VALUES ('640103', '6401', '新城区'); +INSERT INTO `72crm_crm_area` VALUES ('640111', '6401', '郊  区'); +INSERT INTO `72crm_crm_area` VALUES ('640121', '6401', '永宁县'); +INSERT INTO `72crm_crm_area` VALUES ('640122', '6401', '贺兰县'); +INSERT INTO `72crm_crm_area` VALUES ('6402', '64', '石嘴山'); +INSERT INTO `72crm_crm_area` VALUES ('640201', '6402', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('640202', '6402', '大武口区'); +INSERT INTO `72crm_crm_area` VALUES ('640203', '6402', '石嘴山区'); +INSERT INTO `72crm_crm_area` VALUES ('640204', '6402', '石炭井区'); +INSERT INTO `72crm_crm_area` VALUES ('640221', '6402', '平罗县'); +INSERT INTO `72crm_crm_area` VALUES ('640222', '6402', '陶乐县'); +INSERT INTO `72crm_crm_area` VALUES ('640223', '6402', '惠农县'); +INSERT INTO `72crm_crm_area` VALUES ('6403', '64', '吴忠'); +INSERT INTO `72crm_crm_area` VALUES ('640301', '6403', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('640302', '6403', '利通区'); +INSERT INTO `72crm_crm_area` VALUES ('640321', '6403', '中卫县'); +INSERT INTO `72crm_crm_area` VALUES ('640322', '6403', '中宁县'); +INSERT INTO `72crm_crm_area` VALUES ('640323', '6403', '盐池县'); +INSERT INTO `72crm_crm_area` VALUES ('640324', '6403', '同心县'); +INSERT INTO `72crm_crm_area` VALUES ('640381', '6403', '青铜峡市'); +INSERT INTO `72crm_crm_area` VALUES ('640382', '6403', '灵武市'); +INSERT INTO `72crm_crm_area` VALUES ('6422', '64', '固原地区'); +INSERT INTO `72crm_crm_area` VALUES ('642221', '6422', '固原县'); +INSERT INTO `72crm_crm_area` VALUES ('642222', '6422', '海原县'); +INSERT INTO `72crm_crm_area` VALUES ('642223', '6422', '西吉县'); +INSERT INTO `72crm_crm_area` VALUES ('642224', '6422', '隆德县'); +INSERT INTO `72crm_crm_area` VALUES ('642225', '6422', '泾源县'); +INSERT INTO `72crm_crm_area` VALUES ('642226', '6422', '彭阳县'); +INSERT INTO `72crm_crm_area` VALUES ('65', '0', '新疆维吾尔自治区'); +INSERT INTO `72crm_crm_area` VALUES ('6501', '65', '乌鲁木齐'); +INSERT INTO `72crm_crm_area` VALUES ('650101', '6501', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('650102', '6501', '天山区'); +INSERT INTO `72crm_crm_area` VALUES ('650103', '6501', '沙依巴克区'); +INSERT INTO `72crm_crm_area` VALUES ('650104', '6501', '新市区'); +INSERT INTO `72crm_crm_area` VALUES ('650105', '6501', '水磨沟区'); +INSERT INTO `72crm_crm_area` VALUES ('650106', '6501', '头屯河区'); +INSERT INTO `72crm_crm_area` VALUES ('650107', '6501', '南泉区'); +INSERT INTO `72crm_crm_area` VALUES ('650108', '6501', '东山区'); +INSERT INTO `72crm_crm_area` VALUES ('650121', '6501', '乌鲁木齐县'); +INSERT INTO `72crm_crm_area` VALUES ('6502', '65', '克拉玛依'); +INSERT INTO `72crm_crm_area` VALUES ('650201', '6502', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('650202', '6502', '独山子区'); +INSERT INTO `72crm_crm_area` VALUES ('650203', '6502', '克拉玛依区'); +INSERT INTO `72crm_crm_area` VALUES ('650204', '6502', '白碱滩区'); +INSERT INTO `72crm_crm_area` VALUES ('650205', '6502', '乌尔禾区'); +INSERT INTO `72crm_crm_area` VALUES ('6521', '65', '吐鲁番地区'); +INSERT INTO `72crm_crm_area` VALUES ('652101', '6521', '吐鲁番市'); +INSERT INTO `72crm_crm_area` VALUES ('652122', '6521', '鄯善县'); +INSERT INTO `72crm_crm_area` VALUES ('652123', '6521', '托克逊县'); +INSERT INTO `72crm_crm_area` VALUES ('6522', '65', '哈密地区'); +INSERT INTO `72crm_crm_area` VALUES ('652201', '6522', '哈密市'); +INSERT INTO `72crm_crm_area` VALUES ('652222', '6522', '巴里坤哈萨克自治县'); +INSERT INTO `72crm_crm_area` VALUES ('652223', '6522', '伊吾县'); +INSERT INTO `72crm_crm_area` VALUES ('6523', '65', '昌吉回族自治州'); +INSERT INTO `72crm_crm_area` VALUES ('652301', '6523', '昌吉市'); +INSERT INTO `72crm_crm_area` VALUES ('652302', '6523', '阜康市'); +INSERT INTO `72crm_crm_area` VALUES ('652303', '6523', '米泉市'); +INSERT INTO `72crm_crm_area` VALUES ('652323', '6523', '呼图壁县'); +INSERT INTO `72crm_crm_area` VALUES ('652324', '6523', '玛纳斯县'); +INSERT INTO `72crm_crm_area` VALUES ('652325', '6523', '奇台县'); +INSERT INTO `72crm_crm_area` VALUES ('652327', '6523', '吉木萨尔县'); +INSERT INTO `72crm_crm_area` VALUES ('652328', '6523', '木垒哈萨克自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6527', '65', '博尔塔拉蒙古自治州'); +INSERT INTO `72crm_crm_area` VALUES ('652701', '6527', '博乐市'); +INSERT INTO `72crm_crm_area` VALUES ('652722', '6527', '精河县'); +INSERT INTO `72crm_crm_area` VALUES ('652723', '6527', '温泉县'); +INSERT INTO `72crm_crm_area` VALUES ('6528', '65', '巴音郭楞蒙古自治州'); +INSERT INTO `72crm_crm_area` VALUES ('652801', '6528', '库尔勒市'); +INSERT INTO `72crm_crm_area` VALUES ('652822', '6528', '轮台县'); +INSERT INTO `72crm_crm_area` VALUES ('652823', '6528', '尉犁县'); +INSERT INTO `72crm_crm_area` VALUES ('652824', '6528', '若羌县'); +INSERT INTO `72crm_crm_area` VALUES ('652825', '6528', '且末县'); +INSERT INTO `72crm_crm_area` VALUES ('652826', '6528', '焉耆回族自治县'); +INSERT INTO `72crm_crm_area` VALUES ('652827', '6528', '和静县'); +INSERT INTO `72crm_crm_area` VALUES ('652828', '6528', '和硕县'); +INSERT INTO `72crm_crm_area` VALUES ('652829', '6528', '博湖县'); +INSERT INTO `72crm_crm_area` VALUES ('6529', '65', '阿克苏地区'); +INSERT INTO `72crm_crm_area` VALUES ('652901', '6529', '阿克苏市'); +INSERT INTO `72crm_crm_area` VALUES ('652922', '6529', '温宿县'); +INSERT INTO `72crm_crm_area` VALUES ('652923', '6529', '库车县'); +INSERT INTO `72crm_crm_area` VALUES ('652924', '6529', '沙雅县'); +INSERT INTO `72crm_crm_area` VALUES ('652925', '6529', '新和县'); +INSERT INTO `72crm_crm_area` VALUES ('652926', '6529', '拜城县'); +INSERT INTO `72crm_crm_area` VALUES ('652927', '6529', '乌什县'); +INSERT INTO `72crm_crm_area` VALUES ('652928', '6529', '阿瓦提县'); +INSERT INTO `72crm_crm_area` VALUES ('652929', '6529', '柯坪县'); +INSERT INTO `72crm_crm_area` VALUES ('6530', '65', '克孜勒苏柯尔克孜自治'); +INSERT INTO `72crm_crm_area` VALUES ('653001', '6530', '阿图什市'); +INSERT INTO `72crm_crm_area` VALUES ('653022', '6530', '阿克陶县'); +INSERT INTO `72crm_crm_area` VALUES ('653023', '6530', '阿合奇县'); +INSERT INTO `72crm_crm_area` VALUES ('653024', '6530', '乌恰县'); +INSERT INTO `72crm_crm_area` VALUES ('6531', '65', '喀什地区'); +INSERT INTO `72crm_crm_area` VALUES ('653101', '6531', '喀什市'); +INSERT INTO `72crm_crm_area` VALUES ('653121', '6531', '疏附县'); +INSERT INTO `72crm_crm_area` VALUES ('653122', '6531', '疏勒县'); +INSERT INTO `72crm_crm_area` VALUES ('653123', '6531', '英吉沙县'); +INSERT INTO `72crm_crm_area` VALUES ('653124', '6531', '泽普县'); +INSERT INTO `72crm_crm_area` VALUES ('653125', '6531', '莎车县'); +INSERT INTO `72crm_crm_area` VALUES ('653126', '6531', '叶城县'); +INSERT INTO `72crm_crm_area` VALUES ('653127', '6531', '麦盖提县'); +INSERT INTO `72crm_crm_area` VALUES ('653128', '6531', '岳普湖县'); +INSERT INTO `72crm_crm_area` VALUES ('653129', '6531', '伽师县'); +INSERT INTO `72crm_crm_area` VALUES ('653130', '6531', '巴楚县'); +INSERT INTO `72crm_crm_area` VALUES ('653131', '6531', '塔什库尔干塔吉克自治'); +INSERT INTO `72crm_crm_area` VALUES ('6532', '65', '和田地区'); +INSERT INTO `72crm_crm_area` VALUES ('653201', '6532', '和田市'); +INSERT INTO `72crm_crm_area` VALUES ('653221', '6532', '和田县'); +INSERT INTO `72crm_crm_area` VALUES ('653222', '6532', '墨玉县'); +INSERT INTO `72crm_crm_area` VALUES ('653223', '6532', '皮山县'); +INSERT INTO `72crm_crm_area` VALUES ('653224', '6532', '洛浦县'); +INSERT INTO `72crm_crm_area` VALUES ('653225', '6532', '策勒县'); +INSERT INTO `72crm_crm_area` VALUES ('653226', '6532', '于田县'); +INSERT INTO `72crm_crm_area` VALUES ('653227', '6532', '民丰县'); +INSERT INTO `72crm_crm_area` VALUES ('6540', '65', '伊犁哈萨克自治州'); +INSERT INTO `72crm_crm_area` VALUES ('654001', '6540', '奎屯市'); +INSERT INTO `72crm_crm_area` VALUES ('6541', '65', '伊犁地区'); +INSERT INTO `72crm_crm_area` VALUES ('654101', '6541', '伊宁市'); +INSERT INTO `72crm_crm_area` VALUES ('654121', '6541', '伊宁县'); +INSERT INTO `72crm_crm_area` VALUES ('654122', '6541', '察布查尔锡伯自治县'); +INSERT INTO `72crm_crm_area` VALUES ('654123', '6541', '霍城县'); +INSERT INTO `72crm_crm_area` VALUES ('654124', '6541', '巩留县'); +INSERT INTO `72crm_crm_area` VALUES ('654125', '6541', '新源县'); +INSERT INTO `72crm_crm_area` VALUES ('654126', '6541', '昭苏县'); +INSERT INTO `72crm_crm_area` VALUES ('654127', '6541', '特克斯县'); +INSERT INTO `72crm_crm_area` VALUES ('654128', '6541', '尼勒克县'); +INSERT INTO `72crm_crm_area` VALUES ('6542', '65', '塔城地区'); +INSERT INTO `72crm_crm_area` VALUES ('654201', '6542', '塔城市'); +INSERT INTO `72crm_crm_area` VALUES ('654202', '6542', '乌苏市'); +INSERT INTO `72crm_crm_area` VALUES ('654221', '6542', '额敏县'); +INSERT INTO `72crm_crm_area` VALUES ('654223', '6542', '沙湾县'); +INSERT INTO `72crm_crm_area` VALUES ('654224', '6542', '托里县'); +INSERT INTO `72crm_crm_area` VALUES ('654225', '6542', '裕民县'); +INSERT INTO `72crm_crm_area` VALUES ('654226', '6542', '和布克赛尔蒙古自治县'); +INSERT INTO `72crm_crm_area` VALUES ('6543', '65', '阿勒泰地区'); +INSERT INTO `72crm_crm_area` VALUES ('654301', '6543', '阿勒泰市'); +INSERT INTO `72crm_crm_area` VALUES ('654321', '6543', '布尔津县'); +INSERT INTO `72crm_crm_area` VALUES ('654322', '6543', '富蕴县'); +INSERT INTO `72crm_crm_area` VALUES ('654323', '6543', '福海县'); +INSERT INTO `72crm_crm_area` VALUES ('654324', '6543', '哈巴河县'); +INSERT INTO `72crm_crm_area` VALUES ('654325', '6543', '青河县'); +INSERT INTO `72crm_crm_area` VALUES ('654326', '6543', '吉木乃县'); +INSERT INTO `72crm_crm_area` VALUES ('6590', '65', '省直辖行政单位'); +INSERT INTO `72crm_crm_area` VALUES ('659001', '6590', '石河子市'); +INSERT INTO `72crm_crm_area` VALUES ('71', '0', '台湾'); +INSERT INTO `72crm_crm_area` VALUES ('7101', '71', '台湾市辖'); +INSERT INTO `72crm_crm_area` VALUES ('710101', '7101', '请选择'); +INSERT INTO `72crm_crm_area` VALUES ('710102', '7101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('710103', '7101', '台湾省'); +INSERT INTO `72crm_crm_area` VALUES ('81', '0', '香港'); +INSERT INTO `72crm_crm_area` VALUES ('8101', '81', '香港特区'); +INSERT INTO `72crm_crm_area` VALUES ('810101', '8101', '请选择'); +INSERT INTO `72crm_crm_area` VALUES ('810102', '8101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('810103', '8101', '香港特区'); +INSERT INTO `72crm_crm_area` VALUES ('91', '0', '澳门'); +INSERT INTO `72crm_crm_area` VALUES ('9101', '91', '澳门特区'); +INSERT INTO `72crm_crm_area` VALUES ('910101', '9101', '请选择'); +INSERT INTO `72crm_crm_area` VALUES ('910102', '9101', '市辖区'); +INSERT INTO `72crm_crm_area` VALUES ('910103', '9101', '澳门特区'); \ No newline at end of file diff --git a/docs/update20190702.sql b/docs/update20190702.sql new file mode 100644 index 0000000..ddee290 --- /dev/null +++ b/docs/update20190702.sql @@ -0,0 +1,129 @@ +SET FOREIGN_KEY_CHECKS=0; + +ALTER TABLE `72crm_admin_field` MODIFY COLUMN `type` int(2) NOT NULL DEFAULT 1 COMMENT 'ֶ 1 ı 2 ı 3 ѡ 4 5 6 С 7 ֻ 8 ļ 9 ѡ 10 Ա 11 12 13 ʱ 14 15ͻ 16 ̻ 17 ϵ 18 ͼ 19 Ʒ 20 ͬ 21 ؿƻ' AFTER `name`; +ALTER TABLE `72crm_admin_field` ADD COLUMN `field_type` int(2) NOT NULL DEFAULT 0 COMMENT 'ǷԶֶ 0.Զ 1.̶' AFTER `examine_category_id`; + +DROP TABLE IF EXISTS `72crm_admin_fieldv`; +CREATE TABLE `72crm_admin_fieldv` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_id` int(11) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL COMMENT 'ֶ', + `value` longtext, + `create_time` datetime DEFAULT NULL, + `batch_id` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; + +INSERT INTO `72crm_admin_fieldv` (`field_id`,`name`, `value`, `create_time`, `batch_id`) SELECT f.parent_id,f.name,f.`value`,f.update_time,f.batch_id FROM 72crm_admin_field as f WHERE f.batch_id is not NULL and f.batch_id !=''; + +DELETE FROM 72crm_admin_field WHERE (batch_id IS NOT NULL OR batch_id = ''); + +ALTER TABLE `72crm_admin_field` DROP COLUMN `parent_id`; +ALTER TABLE `72crm_admin_field` DROP COLUMN `value`; +ALTER TABLE `72crm_admin_field` DROP COLUMN `batch_id`; + +UPDATE `72crm_admin_field` SET `field_type`='0'; + +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('leads_name', '', '1', '1', NULL, NULL, '255', '', '1', '1', '0', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('telephone', '绰', '1', '1', NULL, NULL, '255', '', '0', '0', '2', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('mobile', 'ֻ', '7', '1', NULL, NULL, '255', '', '0', '0', '3', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('address', 'ַ', '1', '1', NULL, NULL, '255', '', '0', '0', '6', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('next_time', '´ϵʱ', '13', '1', NULL, NULL, NULL, '', '0', '0', '7', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '1', '1', NULL, NULL, '255', '', '0', '0', '8', NULL, '1', '2019-07-02 09:10:19', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_name', 'ͻ', '1', '2', NULL, NULL, '255', '', '1', '1', '0', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('mobile', 'ֻ', '7', '2', NULL, NULL, '255', '', '0', '0', '1', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('telephone', '绰', '1', '2', NULL, NULL, '255', '', '0', '0', '2', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('website', 'ַ', '1', '2', NULL, NULL, '255', '', '0', '0', '6', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('deal_status', 'ɽ״̬', '3', '2', NULL, NULL, NULL, '', '0', '1', '7', 'δɽ,ѳɽ', '3', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('next_time', '´ϵʱ', '13', '2', NULL, NULL, NULL, '', '0', '0', '8', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '1', '2', NULL, NULL, '255', '', '0', '0', '9', NULL, '1', '2019-07-02 09:10:41', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('name', '', '1', '3', NULL, NULL, '255', '', '0', '1', '0', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_id', 'ͻ', '15', '3', NULL, NULL, NULL, '', '0', '0', '1', NULL, '3', '2019-07-01 17:13:28', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('mobile', 'ֻ', '7', '3', NULL, NULL, '255', '', '0', '0', '2', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('telephone', '绰', '1', '3', NULL, NULL, '255', '', '0', '0', '3', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('email', '', '14', '3', NULL, NULL, '255', '', '0', '0', '4', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('post', 'ְ', '1', '3', NULL, NULL, '255', '', '0', '0', '5', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('address', 'ַ', '1', '3', NULL, NULL, '255', '', '0', '0', '6', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('next_time', '´ϵʱ', '13', '3', NULL, NULL, NULL, '', '0', '0', '7', NULL, '1', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('Ա', 'Ա', '3', '3', NULL, NULL, NULL, '', '0', '0', '10', ',Ů', '3', '2019-07-01 17:10:21', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('name', 'Ʒ', '1', '4', NULL, NULL, '255', '', '0', '0', '0', NULL, '1', '2019-07-01 17:22:28', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('category_id', 'Ʒ', '19', '4', NULL, NULL, NULL, '', '0', '1', '1', NULL, '3', '2019-07-01 17:55:24', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('num', 'Ʒ', '5', '4', NULL, NULL, '255', '', '1', '1', '2', NULL, '1', '2019-07-01 17:22:28', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('price', '۸', '6', '4', NULL, NULL, '255', '', '0', '1', '3', NULL, '1', '2019-07-01 17:57:01', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('description', 'Ʒ', '1', '4', NULL, NULL, '255', '', '0', '0', '4', NULL, '1', '2019-07-01 17:22:28', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('business_name', '̻', '1', '5', NULL, NULL, '255', '', '0', '0', '0', NULL, '3', '2019-07-01 17:10:31', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_id', 'ͻ', '15', '5', NULL, NULL, NULL, '', '0', '1', '1', NULL, '3', '2019-07-01 17:13:25', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', '̻', '6', '5', NULL, NULL, '255', '', '0', '0', '2', NULL, '1', '2019-07-01 17:10:31', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('deal_date', 'ԤƳɽ', '13', '5', NULL, NULL, NULL, '', '0', '0', '3', NULL, '1', '2019-07-01 17:10:31', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '1', '5', NULL, NULL, '255', '', '0', '0', '4', NULL, '1', '2019-07-01 17:10:31', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('num', 'ͬ', '5', '6', NULL, NULL, '255', '', '1', '1', '0', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('name', 'ͬ', '1', '6', NULL, NULL, '255', '', '0', '1', '1', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_id', 'ͻ', '15', '6', NULL, NULL, NULL, '', '0', '1', '2', NULL, '3', '2019-07-01 17:22:49', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('business_id', '̻', '16', '6', NULL, NULL, NULL, '', '0', '0', '3', NULL, '3', '2019-07-01 17:22:57', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('order_date', 'µʱ', '4', '6', NULL, NULL, NULL, '', '0', '0', '4', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', 'ͬ', '6', '6', NULL, NULL, '255', '', '0', '0', '5', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('start_time', 'ͬʼʱ', '4', '6', NULL, NULL, NULL, '', '0', '0', '6', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('end_tme', 'ͬʱ', '4', '6', NULL, NULL, NULL, '', '0', '0', '7', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('contacts_id', 'ͻǩԼ', '17', '6', NULL, NULL, NULL, '', '0', '0', '8', NULL, '3', '2019-07-01 17:23:11', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('company_user_id', '˾ǩԼ', '10', '6', NULL, NULL, NULL, '', '0', '0', '9', NULL, '3', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '1', '6', NULL, NULL, '255', '', '0', '0', '10', NULL, '1', '2019-07-01 17:10:34', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('number', 'ؿ', '5', '7', NULL, NULL, '255', '', '0', '1', '0', NULL, '1', '2019-07-01 17:10:36', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_id', 'ͻ', '15', '7', NULL, NULL, NULL, '', '0', '1', '1', NULL, '3', '2019-07-01 17:23:15', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('contract_id', 'ͬ', '20', '7', NULL, NULL, NULL, '', '0', '1', '2', NULL, '3', '2019-07-01 17:23:24', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('return_time', 'ؿ', '4', '7', NULL, NULL, NULL, '', '0', '0', '3', NULL, '1', '2019-07-01 17:10:36', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', 'ؿ', '6', '7', NULL, NULL, '255', '', '0', '0', '4', NULL, '1', '2019-07-01 17:10:36', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('plan_id', '', '21', '7', NULL, NULL, NULL, '', '0', '0', '5', NULL, '3', '2019-07-01 17:23:35', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '1', '7', NULL, NULL, '255', '', '0', '0', '6', NULL, '1', '2019-07-01 17:10:36', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '2', '10', NULL, NULL, '0', '', '0', '1', '0', NULL, '1', '2019-06-27 14:00:42', '7', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, NULL, '0', '', '0', '1', '1', NULL, '1', '2019-06-27 14:01:13', '7', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('customer_id', 'ͻ', '15', '8', NULL, NULL, NULL, '', '0', '0', '1', NULL, '3', '2019-06-28 16:52:13', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('contract_id', 'ͬ', '20', '8', NULL, NULL, '11', '', '0', '0', '2', NULL, '3', '2019-06-28 16:55:17', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', 'ƻؿ', '6', '8', NULL, NULL, NULL, '', '0', '0', '3', NULL, '3', '2019-06-28 16:53:04', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('return_date', 'ƻؿ', '4', '8', NULL, NULL, NULL, '', '0', '0', '4', NULL, '3', '2019-06-28 16:54:01', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remind', 'ǰ', '5', '8', NULL, NULL, '11', '', '0', '0', '5', NULL, '3', '2019-06-28 16:55:13', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '8', NULL, NULL, '1000', '', '0', '0', '6', NULL, '3', '2019-06-28 16:55:07', NULL, '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '1', '10', NULL, '', NULL, '', '0', '1', '0', NULL, '3', NULL, '1', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '1', NULL, '3', NULL, '1', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('type_id', '', '3', '10', NULL, '', NULL, '', '0', '1', '0', ',¼,,,,,ɥ,', '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '1', '10', NULL, '', NULL, '', '0', '1', '1', NULL, '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('start_time', 'ʼʱ', '13', '10', NULL, '', NULL, '', '0', '1', '2', NULL, '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('end_time', 'ʱ', '13', '10', NULL, '', NULL, '', '0', '1', '3', NULL, '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('duration', 'ʱ', '6', '10', NULL, '', NULL, '', '0', '1', '4', NULL, '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '5', NULL, '3', NULL, '2', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '1', '10', NULL, '', NULL, '', '0', '1', '0', NULL, '3', '2019-06-30 18:13:08', '3', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '1', NULL, '3', '2019-06-30 18:13:08', '3', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('duration', '', '6', '10', NULL, '', NULL, '', '0', '1', '2', NULL, '3', '2019-06-30 18:13:08', '3', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('cause', 'гϸ', '22', '10', NULL, '', NULL, '', '0', '1', '2', NULL, '3', '2019-06-30 18:13:08', '3', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', 'Ӱԭ', '1', '10', NULL, '', NULL, '', '0', '1', '0', NULL, '3', '2019-06-30 18:13:08', '4', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('start_time', 'ʼʱ', '13', '10', NULL, '', NULL, '', '0', '1', '1', NULL, '3', '2019-06-30 18:13:08', '4', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('end_time', 'ʱ', '13', '10', NULL, '', NULL, '', '0', '1', '2', NULL, '3', '2019-06-30 18:13:08', '4', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('duration', 'Ӱ', '6', '10', NULL, '', NULL, '', '0', '1', '3', NULL, '3', '2019-06-30 18:13:08', '4', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '4', NULL, '3', '2019-06-30 18:13:08', '4', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '1', '10', NULL, '', NULL, '', '0', '1', '0', NULL, '3', '2019-06-30 18:13:08', '5', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', 'ܽ', '6', '10', NULL, '', '0', '', '0', '1', '1', NULL, '3', '2019-06-30 18:13:08', '5', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '2', NULL, '3', '2019-06-30 18:13:08', '5', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('cause', 'ϸ', '23', '10', NULL, '', '1000', '', '0', '0', '2', NULL, '3', '2019-06-30 18:13:08', '5', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('content', '', '1', '10', NULL, '', NULL, '', '0', '1', '0', NULL, '3', '2019-06-30 18:13:08', '6', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('money', 'Ԫ', '6', '10', NULL, '', '0', '', '0', '1', '1', NULL, '3', '2019-06-30 18:13:08', '6', '1'); +INSERT INTO `72crm_admin_field` (`field_name`, `name`, `type`, `label`, `remark`, `input_tips`, `max_length`, `default_value`, `is_unique`, `is_null`, `sorting`, `options`, `operating`, `update_time`, `examine_category_id`, `field_type`) VALUES ('remark', 'ע', '2', '10', NULL, '', '1000', '', '0', '0', '2', NULL, '3', '2019-06-30 18:13:08', '6', '1'); + + + +ALTER TABLE `72crm_crm_customer` MODIFY COLUMN `followup` int(11) NULL DEFAULT NULL COMMENT '״̬ 0δ1Ѹ' AFTER `customer_name`; +ALTER TABLE `72crm_crm_leads` MODIFY COLUMN `followup` int(11) NULL DEFAULT NULL COMMENT '״̬ 0δ1Ѹ' AFTER `is_transform`; + +INSERT INTO `72crm_admin_menu` VALUES ('127', '1', '', 'pool', '1', '4', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('128', '127', '鿴б', 'index', '3', '1', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('129', '127', '', 'distribute', '3', '1', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('130', '127', 'ȡ', 'receive', '3', '1', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('131', '127', '', 'excelexport', '3', '1', '1', null); + + +ALTER TABLE `72crm_oa_examine_category` ADD COLUMN `type` int(1) NULL DEFAULT 0 COMMENT '1 ͨ 2 3 4 Ӱ 5 ñ 6 0 Զ' AFTER `remarks`; + +UPDATE `72crm_oa_examine_category` SET `type`='1' WHERE (`category_id`='1'); +UPDATE `72crm_oa_examine_category` SET `type`='2' WHERE (`category_id`='2'); +UPDATE `72crm_oa_examine_category` SET `type`='3' WHERE (`category_id`='3'); +UPDATE `72crm_oa_examine_category` SET `type`='4' WHERE (`category_id`='4'); +UPDATE `72crm_oa_examine_category` SET `type`='5' WHERE (`category_id`='5'); +UPDATE `72crm_oa_examine_category` SET `type`='6' WHERE (`category_id`='6'); \ No newline at end of file diff --git a/docs/update20190715.sql b/docs/update20190715.sql new file mode 100644 index 0000000..52dde12 --- /dev/null +++ b/docs/update20190715.sql @@ -0,0 +1,62 @@ + +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for 72crm_work_user +-- ---------------------------- +DROP TABLE IF EXISTS `72crm_work_user`; +CREATE TABLE `72crm_work_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `work_id` int(11) NOT NULL COMMENT '项目ID', + `user_id` int(11) NOT NULL COMMENT '成员ID', + `role_id` int(11) NOT NULL COMMENT '角色ID', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='项目成员表'; + +ALTER TABLE 72crm_work_task_lable RENAME TO 72crm_work_task_label; + +ALTER TABLE `72crm_work_task_label` +CHANGE COLUMN `lable_id` `label_id` int(11) NOT NULL AUTO_INCREMENT FIRST ; + +ALTER TABLE `72crm_admin_role` +ADD COLUMN `is_hidden` int(1) NULL DEFAULT 1 COMMENT '0 隐藏 1 不隐藏' AFTER `data_type`; + +DROP TABLE IF EXISTS `72crm_work_relation`; + +ALTER TABLE `72crm_task` +CHANGE COLUMN `lable_id` `label_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签 ,号拼接' AFTER `class_id`; + +ALTER TABLE `72crm_task` +ADD COLUMN `is_archive` int(1) NULL DEFAULT 0 COMMENT '是否归档 0 否 1 是' AFTER `batch_id`; + +ALTER TABLE `72crm_admin_role` +ADD COLUMN `label` int(2) NULL COMMENT '1 系统项目管理员角色 2 项目管理角色 3 项目编辑角色 4 项目只读角色' AFTER `is_hidden`; + +DELETE FROM `72crm_admin_role` WHERE (`role_type`='5') + +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('项目管理员', '1', '1','1'); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('管理', '5', '0','2'); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('编辑', '5', '1','3'); +set @rid = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( '0', '项目管理', 'work', '0', '0', '1', NULL); +set @workId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '任务', 'task', '1', '0', '1', NULL); +set @taskId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @taskId, '创建', 'save', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '任务列表', 'taskClass', '1', '0', '1', NULL); +set @classId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '新建任务列表', 'save', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '编辑任务列表', 'update', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '删除任务列表', 'delete', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '项目', 'work', '1', '0', '1', NULL); +set @wId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @wId, '项目设置', 'update', '3', '0', '1', NULL); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('只读', '5', '1','4'); + +ALTER TABLE `72crm_task` +MODIFY COLUMN `order_num` int(4) NULL DEFAULT 999 COMMENT '排序ID' AFTER `is_open`, +MODIFY COLUMN `top_order_num` int(4) NULL DEFAULT 999 COMMENT '我的任务排序ID' AFTER `order_num`; \ No newline at end of file diff --git a/docs/update20190719.sql b/docs/update20190719.sql new file mode 100644 index 0000000..52dde12 --- /dev/null +++ b/docs/update20190719.sql @@ -0,0 +1,62 @@ + +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for 72crm_work_user +-- ---------------------------- +DROP TABLE IF EXISTS `72crm_work_user`; +CREATE TABLE `72crm_work_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `work_id` int(11) NOT NULL COMMENT '项目ID', + `user_id` int(11) NOT NULL COMMENT '成员ID', + `role_id` int(11) NOT NULL COMMENT '角色ID', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='项目成员表'; + +ALTER TABLE 72crm_work_task_lable RENAME TO 72crm_work_task_label; + +ALTER TABLE `72crm_work_task_label` +CHANGE COLUMN `lable_id` `label_id` int(11) NOT NULL AUTO_INCREMENT FIRST ; + +ALTER TABLE `72crm_admin_role` +ADD COLUMN `is_hidden` int(1) NULL DEFAULT 1 COMMENT '0 隐藏 1 不隐藏' AFTER `data_type`; + +DROP TABLE IF EXISTS `72crm_work_relation`; + +ALTER TABLE `72crm_task` +CHANGE COLUMN `lable_id` `label_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签 ,号拼接' AFTER `class_id`; + +ALTER TABLE `72crm_task` +ADD COLUMN `is_archive` int(1) NULL DEFAULT 0 COMMENT '是否归档 0 否 1 是' AFTER `batch_id`; + +ALTER TABLE `72crm_admin_role` +ADD COLUMN `label` int(2) NULL COMMENT '1 系统项目管理员角色 2 项目管理角色 3 项目编辑角色 4 项目只读角色' AFTER `is_hidden`; + +DELETE FROM `72crm_admin_role` WHERE (`role_type`='5') + +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('项目管理员', '1', '1','1'); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('管理', '5', '0','2'); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('编辑', '5', '1','3'); +set @rid = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( '0', '项目管理', 'work', '0', '0', '1', NULL); +set @workId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '任务', 'task', '1', '0', '1', NULL); +set @taskId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @taskId, '创建', 'save', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '任务列表', 'taskClass', '1', '0', '1', NULL); +set @classId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '新建任务列表', 'save', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '编辑任务列表', 'update', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @classId, '删除任务列表', 'delete', '3', '0', '1', NULL); +INSERT INTO`72crm_admin_role_menu` (`role_id`, `menu_id`) VALUES (@rid, last_insert_id()); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @workId, '项目', 'work', '1', '0', '1', NULL); +set @wId = last_insert_id(); +INSERT INTO `72crm_admin_menu` ( `parent_id`, `menu_name`, `realm`, `menu_type`, `sort`, `status`, `remarks`) VALUES ( @wId, '项目设置', 'update', '3', '0', '1', NULL); +INSERT INTO `72crm_admin_role` (`role_name`, `role_type`, `is_hidden`, `label`) VALUES ('只读', '5', '1','4'); + +ALTER TABLE `72crm_task` +MODIFY COLUMN `order_num` int(4) NULL DEFAULT 999 COMMENT '排序ID' AFTER `is_open`, +MODIFY COLUMN `top_order_num` int(4) NULL DEFAULT 999 COMMENT '我的任务排序ID' AFTER `order_num`; \ No newline at end of file diff --git a/docs/update20190820.sql b/docs/update20190820.sql new file mode 100644 index 0000000..4a32180 --- /dev/null +++ b/docs/update20190820.sql @@ -0,0 +1,11 @@ +ALTER TABLE `72crm_admin_field` +ADD COLUMN `relevant` int(11) NULL COMMENT 'ֻҪװͻԶֶID' AFTER `field_type`; + +ALTER TABLE `72crm_crm_contract` +ADD COLUMN `total_price` decimal(10,2) NULL COMMENT 'Ʒܽ' AFTER `discount_rate`; + +ALTER TABLE `72crm_crm_business` +ADD COLUMN `total_price` decimal(10,2) NULL COMMENT 'Ʒܽ' AFTER `discount_rate`; + +INSERT INTO `72crm_admin_menu` VALUES ('146', '2', '칫', 'oa', '1', '10', '1', null); +INSERT INTO `72crm_admin_menu` VALUES ('147', '146', '鿴', 'read', '3', '1', '1', null); \ No newline at end of file diff --git a/pom.xml b/pom.xml index 002c57b..3795fd1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.kakarote crm9 jar - 1.3.0 + 1.3.2 crm9-master @@ -54,7 +54,7 @@ com.jfinal cos - 2017.5 + 2019.8 it.sauronsoftware.cron4j diff --git a/src/main/java/com/kakarote/crm9/common/annotation/LoginFormCookie.java b/src/main/java/com/kakarote/crm9/common/annotation/LoginFormCookie.java new file mode 100644 index 0000000..92d1a2d --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/annotation/LoginFormCookie.java @@ -0,0 +1,13 @@ +package com.kakarote.crm9.common.annotation; + +import java.lang.annotation.*; + +/** + * 有此注解的方法会尝试从cookie获取登录状态 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +@Inherited +@Documented +public @interface LoginFormCookie { +} diff --git a/src/main/java/com/kakarote/crm9/common/annotation/RequestBody.java b/src/main/java/com/kakarote/crm9/common/annotation/RequestBody.java new file mode 100644 index 0000000..60fbb7a --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/annotation/RequestBody.java @@ -0,0 +1,13 @@ +package com.kakarote.crm9.common.annotation; + +import java.lang.annotation.*; + +/** + * json数据注入 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.PARAMETER) +@Inherited +@Documented +public @interface RequestBody { +} diff --git a/src/main/java/com/kakarote/crm9/common/config/JfinalConfig.java b/src/main/java/com/kakarote/crm9/common/config/JfinalConfig.java index 788bd7a..d8731bf 100644 --- a/src/main/java/com/kakarote/crm9/common/config/JfinalConfig.java +++ b/src/main/java/com/kakarote/crm9/common/config/JfinalConfig.java @@ -1,14 +1,15 @@ package com.kakarote.crm9.common.config; import cn.hutool.core.util.ClassLoaderUtil; -import cn.hutool.core.util.StrUtil; import com.alibaba.druid.wall.WallFilter; import com.jfinal.aop.Aop; import com.kakarote.crm9.common.config.cache.CaffeineCache; import com.kakarote.crm9.common.config.druid.DruidConfig; import com.kakarote.crm9.common.config.json.ErpJsonFactory; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; +import com.kakarote.crm9.common.config.paragetter.MapParaGetter; import com.kakarote.crm9.common.config.paragetter.PageParaGetter; +import com.kakarote.crm9.common.config.redis.RedisPlugin; import com.kakarote.crm9.common.config.render.ErpRenderFactory; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.common.interceptor.AuthInterceptor; @@ -31,19 +32,19 @@ import com.jfinal.plugin.cron4j.Cron4jPlugin; import com.jfinal.plugin.druid.DruidPlugin; import com.jfinal.plugin.druid.DruidStatViewHandler; -import com.jfinal.plugin.redis.RedisPlugin; import com.jfinal.render.RenderManager; import com.jfinal.template.Engine; import com.kakarote.crm9.erp.work.service.WorkService; import java.io.File; +import java.util.Map; /** * API 引导式配置 */ public class JfinalConfig extends JFinalConfig { - public static Prop prop = PropKit.use("config/crm9-config.txt"); + public final static Prop prop = PropKit.use("config/crm9-config.txt"); /** * 配置常量 @@ -85,9 +86,9 @@ public void configEngine(Engine me) { @Override public void configPlugin(Plugins me) { ParaProcessorBuilder.me.regist(BasePageRequest.class, PageParaGetter.class, null); + ParaProcessorBuilder.me.regist(Map.class, MapParaGetter.class, null); // 配置 druid 数据库连接池插件 DruidPlugin druidPlugin = createDruidPlugin(); - druidPlugin.addFilter(new WallFilter()); druidPlugin.setInitialSize(0); druidPlugin.setMinIdle(0); druidPlugin.setMaxActive(2000); @@ -106,7 +107,8 @@ public void configPlugin(Plugins me) { //扫描sql模板 getSqlTemplate(PathKit.getRootClassPath() + "/template", arp); //Redis以及缓存插件 - createRedisPlugin(me); + RedisPlugin redisPlugin=new RedisPlugin(); + me.add(redisPlugin); //cron定时器 me.add(new Cron4jPlugin(PropKit.use("config/cron4j.txt"))); @@ -118,20 +120,6 @@ public static DruidPlugin createDruidPlugin() { return new DruidPlugin(prop.get("mysql.jdbcUrl"), prop.get("mysql.user"), prop.get("mysql.password").trim()).setInitialSize(1).setMinIdle(1).setMaxActive(2000).setTimeBetweenEvictionRunsMillis(5000).setValidationQuery("select 1").setTimeBetweenEvictionRunsMillis(60000).setMinEvictableIdleTimeMillis(30000).setFilters("stat,wall"); } - private void createRedisPlugin(Plugins me) { - for (String configName : prop.get("jfinal.redis", "").split(",")) { - RedisPlugin redisPlugin; - if (prop.getBoolean(configName + ".open", false)) { - if (prop.containsKey(configName + ".password") && StrUtil.isNotEmpty(prop.get(configName + ".password"))) { - redisPlugin = new RedisPlugin(prop.get(configName + ".cacheName").trim(), prop.get(configName + ".host").trim(), prop.getInt(configName + ".port", 6379), prop.getInt(configName + ".timeout", 20000), prop.get(configName + ".password", null),prop.getInt(configName+".database",0)); - } else { - redisPlugin = new RedisPlugin(prop.get(configName + ".cacheName").trim(), prop.get(configName + ".host").trim(), prop.getInt(configName + ".port", 6379), prop.getInt(configName + ".timeout", 20000)); - } - me.add(redisPlugin); - } - } - } - /** * 配置全局拦截器 */ diff --git a/src/main/java/com/kakarote/crm9/common/config/druid/DruidConfig.java b/src/main/java/com/kakarote/crm9/common/config/druid/DruidConfig.java index a2795fa..d41633a 100644 --- a/src/main/java/com/kakarote/crm9/common/config/druid/DruidConfig.java +++ b/src/main/java/com/kakarote/crm9/common/config/druid/DruidConfig.java @@ -1,8 +1,8 @@ package com.kakarote.crm9.common.config.druid; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.utils.BaseUtil; import com.jfinal.plugin.druid.IDruidStatViewAuth; -import com.jfinal.plugin.redis.Redis; import javax.servlet.http.HttpServletRequest; @@ -14,6 +14,6 @@ public class DruidConfig implements IDruidStatViewAuth { @Override public boolean isPermitted(HttpServletRequest request) { String token = BaseUtil.getToken(request); - return Redis.use().exists(token); + return RedisManager.getRedis().exists(token); } } diff --git a/src/main/java/com/kakarote/crm9/common/config/paragetter/MapParaGetter.java b/src/main/java/com/kakarote/crm9/common/config/paragetter/MapParaGetter.java new file mode 100644 index 0000000..feafa2e --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/paragetter/MapParaGetter.java @@ -0,0 +1,25 @@ +package com.kakarote.crm9.common.config.paragetter; + +import com.jfinal.core.Action; +import com.jfinal.core.Controller; +import com.jfinal.core.paragetter.ParaGetter; + +import java.util.HashMap; +import java.util.Map; + +public class MapParaGetter extends ParaGetter { + + public MapParaGetter(String parameterName, String defaultValue) { + super(parameterName, defaultValue); + } + + @Override + protected Map to(String s) { + return null; + } + + @Override + public Map get(Action action, Controller controller) { + return new HashMap<>(); + } +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/JedisClusterImpl.java b/src/main/java/com/kakarote/crm9/common/config/redis/JedisClusterImpl.java new file mode 100644 index 0000000..14ba2e1 --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/JedisClusterImpl.java @@ -0,0 +1,1286 @@ +package com.kakarote.crm9.common.config.redis; + +import com.jfinal.plugin.redis.IKeyNamingPolicy; +import com.jfinal.plugin.redis.serializer.ISerializer; +import redis.clients.jedis.JedisCluster; + +import java.io.IOException; +import java.util.*; + +/** + * Redis的cluster集群实现 + * + * @author z + */ +@SuppressWarnings("unused") +public class JedisClusterImpl implements Redis { + + private JedisCluster jedisCluster; + private ISerializer serializer; + private IKeyNamingPolicy keyNamingPolicy; + + JedisClusterImpl(JedisCluster jedisCluster, ISerializer serializer, IKeyNamingPolicy keyNamingPolicy) { + this.jedisCluster = jedisCluster; + this.serializer = serializer; + this.keyNamingPolicy = keyNamingPolicy; + } + + /** + * 存放 key value 对到 redis + * 如果 key 已经持有其他值, SET 就覆写旧值,无视类型。 + * 对于某个原本带有生存时间(TTL)的键来说, 当 SET 命令成功在这个键上执行时, 这个键原有的 TTL 将被清除。 + */ + @Override + public String set(Object key, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.set(keyToBytes(key), valueToBytes(value)); + } finally { + close(jedisCluster); + } + } + + /** + * 存放 key value 对到 redis,并将 key 的生存时间设为 seconds (以秒为单位)。 + * 如果 key 已经存在, SETEX 命令将覆写旧值。 + */ + @Override + public String setex(Object key, int seconds, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.setex(keyToBytes(key), seconds, valueToBytes(value)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回 key 所关联的 value 值 + * 如果 key 不存在那么返回特殊值 nil 。 + */ + @SuppressWarnings("unchecked") + @Override + public T get(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.get(keyToBytes(key))); + } finally { + close(jedisCluster); + } + } + + /** + * 删除给定的一个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.del(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 删除给定的多个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object... keys) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.del(keysToBytesArray(keys)); + } finally { + close(jedisCluster); + } + } + + /** + * cluster模式下禁用keys命令 + */ + @Override + + public Set keys(String pattern) { + return new HashSet<>(); + } + + /** + * 同时设置一个或多个 key-value 对。 + * 如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值,如果这不是你所希望的效果,请考虑使用 MSETNX 命令:它只会在所有给定 key 都不存在的情况下进行设置操作。 + * MSET 是一个原子性(atomic)操作,所有给定 key 都会在同一时间内被设置,某些给定 key 被更新而另一些给定 key 没有改变的情况,不可能发生。 + *
+     * 例子:
+     * Cache cache = RedisKit.use();			// 使用 Redis 的 cache
+     * cache.mset("k1", "v1", "k2", "v2");		// 放入多个 key value 键值对
+     * List list = cache.mget("k1", "k2");		// 利用多个键值得到上面代码放入的值
+     * 
+ */ + @Override + public String mset(Object... keysValues) { + if (keysValues.length % 2 != 0) { + throw new IllegalArgumentException("wrong number of arguments for met, keysValues length can not be odd"); + } + JedisCluster jedisCluster = getJedisCluster(); + try { + byte[][] kv = new byte[keysValues.length][]; + for (int i = 0; i < keysValues.length; i++) { + if (i % 2 == 0) { + kv[i] = keyToBytes(keysValues[i]); + } else { + kv[i] = valueToBytes(keysValues[i]); + } + + } + return jedisCluster.mset(kv); + } finally { + close(jedisCluster); + } + } + + /** + * 返回所有(一个或多个)给定 key 的值。 + * 如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。因此,该命令永不失败。 + */ + @SuppressWarnings("rawtypes") + @Override + public List mget(Object... keys) { + JedisCluster jedisCluster = getJedisCluster(); + try { + byte[][] keysBytesArray = keysToBytesArray(keys); + List data = jedisCluster.mget(keysBytesArray); + return valueListFromBytesList(data); + } finally { + close(jedisCluster); + } + } + + /** + * 将 key 中储存的数字值减一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decr(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.decr(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 将 key 所储存的值减去减量 decrement 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECRBY 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于更多递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decrBy(Object key, long longValue) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.decrBy(keyToBytes(key), longValue); + } finally { + close(jedisCluster); + } + } + + /** + * 将 key 中储存的数字值增一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long incr(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.incr(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 将 key 所储存的值加上增量 increment 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCRBY 命令。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,参见 INCR 命令。 + */ + @Override + public Long incrBy(Object key, long longValue) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.incrBy(keyToBytes(key), longValue); + } finally { + close(jedisCluster); + } + } + + /** + * 检查给定 key 是否存在。 + */ + @Override + public boolean exists(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.exists(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 从当前数据库中随机返回(不删除)一个 key 。 + * cluster模式下,该命令被禁用 + */ + @Override + public String randomKey() { + return null; + } + + + /** + * 将 key 改名为 newkey 。 + * 当 key 和 newkey 相同,或者 key 不存在时,返回一个错误。 + * 当 newkey 已经存在时, RENAME 命令将覆盖旧值。 + */ + @Override + public String rename(Object oldkey, Object newkey) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.rename(keyToBytes(oldkey), keyToBytes(newkey)); + } finally { + close(jedisCluster); + } + } + + /** + * 将当前数据库的 key 移动到给定的数据库 db 当中。 + * 如果当前数据库(源数据库)和给定数据库(目标数据库)有相同名字的给定 key ,或者 key 不存在于当前数据库,那么 MOVE 没有任何效果。 + * 因此,也可以利用这一特性,将 MOVE 当作锁(locking)原语(primitive)。 + * cluster模式下,该命令被禁用 + */ + @Override + public Long move(Object key, int dbIndex) { + return null; + } + + /** + * 将 key 原子性地从当前实例传送到目标实例的指定数据库上,一旦传送成功, key 保证会出现在目标实例上,而当前实例上的 key 会被删除。 + * cluster模式下,该命令被禁用 + */ + @Override + public String migrate(String host, int port, Object key, int destinationDb, int timeout) { + return null; + } + + /** + * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。 + * 默认使用 0 号数据库。 + * 注意:在 Jedis 对象被关闭时,数据库又会重新被设置为初始值,所以本方法 select(...) + * 正常工作需要使用如下方式之一: + * 1:使用 RedisInterceptor,在本线程内共享同一个 Jedis 对象 + * 2:使用 JbootRedis.call(ICallback) 进行操作 + * 3:自行获取 Jedis 对象进行操作 + */ + @Override + public String select(int databaseIndex) { + return null; + } + + + /** + * 为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。 + * 在 Redis 中,带有生存时间的 key 被称为『易失的』(volatile)。 + */ + @Override + public Long expire(Object key, int seconds) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.expire(keyToBytes(key), seconds); + } finally { + close(jedisCluster); + } + } + + /** + * EXPIREAT 的作用和 EXPIRE 类似,都用于为 key 设置生存时间。不同在于 EXPIREAT 命令接受的时间参数是 UNIX 时间戳(unix timestamp)。 + */ + @Override + public Long expireAt(Object key, long unixTime) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.expireAt(keyToBytes(key), unixTime); + } finally { + close(jedisCluster); + } + } + + /** + * 这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。 + */ + @Override + public Long pexpire(Object key, long milliseconds) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.pexpire(keyToBytes(key), milliseconds); + } finally { + close(jedisCluster); + } + } + + /** + * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。 + */ + @Override + public Long pexpireAt(Object key, long millisecondsTimestamp) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.pexpireAt(keyToBytes(key), millisecondsTimestamp); + } finally { + close(jedisCluster); + } + } + + /** + * 将给定 key 的值设为 value ,并返回 key 的旧值(old value)。 + * 当 key 存在但不是字符串类型时,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T getSet(Object key, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.getSet(keyToBytes(key), valueToBytes(value))); + } finally { + close(jedisCluster); + } + } + + /** + * 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 + */ + @Override + public Long persist(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.persist(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回 key 所储存的值的类型。 + */ + @Override + public String type(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.type(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 以秒为单位,返回给定 key 的剩余生存时间(TTL, time to live)。 + */ + @Override + public Long ttl(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.ttl(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 这个命令类似于 TTL 命令,但它以毫秒为单位返回 key 的剩余生存时间,而不是像 TTL 命令那样,以秒为单位。 + * cluster模式下,该命令被禁用 + */ + @Override + public Long pttl(Object key) { + return null; + } + + /** + * 对象被引用的数量 + * cluster模式下,该命令被禁用 + */ + @Override + public Long objectRefcount(Object key) { + return null; + } + + /** + * 对象没有被访问的空闲时间 + * cluster模式下,该命令被禁用 + */ + @Override + public Long objectIdletime(Object key) { + return null; + } + + + /** + * 将哈希表 key 中的域 field 的值设为 value 。 + * 如果 key 不存在,一个新的哈希表被创建并进行 HSET 操作。 + * 如果域 field 已经存在于哈希表中,旧值将被覆盖。 + */ + @Override + public Long hset(Object key, Object field, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hset(keyToBytes(key), fieldToBytes(field), valueToBytes(value)); + } finally { + close(jedisCluster); + } + } + + /** + * 同时将多个 field-value (域-值)对设置到哈希表 key 中。 + * 此命令会覆盖哈希表中已存在的域。 + * 如果 key 不存在,一个空哈希表被创建并执行 HMSET 操作。 + */ + @Override + public String hmset(Object key, Map hash) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Map para = new HashMap<>(); + hash.forEach((k, v) -> { + para.put(fieldToBytes(k), valueToBytes(v)); + }); + return jedisCluster.hmset(keyToBytes(key), para); + } finally { + close(jedisCluster); + } + } + + /** + * 返回哈希表 key 中给定域 field 的值。 + */ + @SuppressWarnings("unchecked") + @Override + public T hget(Object key, Object field) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.hget(keyToBytes(key), fieldToBytes(field))); + } finally { + close(jedisCluster); + } + } + + /** + * 返回哈希表 key 中,一个或多个给定域的值。 + * 如果给定的域不存在于哈希表,那么返回一个 nil 值。 + * 因为不存在的 key 被当作一个空哈希表来处理,所以对一个不存在的 key 进行 HMGET 操作将返回一个只带有 nil 值的表。 + */ + @SuppressWarnings("rawtypes") + @Override + public List hmget(Object key, Object... fields) { + JedisCluster jedisCluster = getJedisCluster(); + try { + List data = jedisCluster.hmget(keyToBytes(key), fieldsToBytesArray(fields)); + return valueListFromBytesList(data); + } finally { + close(jedisCluster); + } + } + + /** + * 删除哈希表 key 中的一个或多个指定域,不存在的域将被忽略。 + */ + @Override + public Long hdel(Object key, Object... fields) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hdel(keyToBytes(key), fieldsToBytesArray(fields)); + } finally { + close(jedisCluster); + } + } + + /** + * 查看哈希表 key 中,给定域 field 是否存在。 + */ + @Override + public boolean hexists(Object key, Object field) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hexists(keyToBytes(key), fieldToBytes(field)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回哈希表 key 中,所有的域和值。 + * 在返回值里,紧跟每个域名(field name)之后是域的值(value),所以返回值的长度是哈希表大小的两倍。 + */ + @SuppressWarnings("rawtypes") + @Override + public Map hgetAll(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Map data = jedisCluster.hgetAll(keyToBytes(key)); + Map result = new HashMap<>(); + data.forEach((k, v) -> { + result.put(fieldFromBytes(k), valueFromBytes(v)); + }); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回哈希表 key 中所有域的值。 + * cluster模式下,该命令被禁用 + */ + @Override + public List hvals(Object key) { + return null; + } + + /** + * 返回哈希表 key 中的所有域。 + * 底层实现此方法取名为 hfields 更为合适,在此仅为与底层保持一致 + */ + @Override + public Set hkeys(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set fieldSet = jedisCluster.hkeys(keyToBytes(key)); + Set result = new HashSet<>(); + fieldSetFromBytesSet(fieldSet, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回哈希表 key 中域的数量。 + */ + @Override + public Long hlen(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hlen(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 为哈希表 key 中的域 field 的值加上增量 increment 。 + * 增量也可以为负数,相当于对给定域进行减法操作。 + * 如果 key 不存在,一个新的哈希表被创建并执行 HINCRBY 命令。 + * 如果域 field 不存在,那么在执行命令前,域的值被初始化为 0 。 + * 对一个储存字符串值的域 field 执行 HINCRBY 命令将造成一个错误。 + * 本操作的值被限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long hincrBy(Object key, Object field, long value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hincrBy(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedisCluster); + } + } + + /** + * 为哈希表 key 中的域 field 加上浮点数增量 increment 。 + * 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 + * 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 + * 当以下任意一个条件发生时,返回一个错误: + * 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属于字符串类型) + * 2:域 field 当前的值或给定的增量 increment 不能解释(parse)为双精度浮点数(double precision floating point number) + * HINCRBYFLOAT 命令的详细功能和 INCRBYFLOAT 命令类似,请查看 INCRBYFLOAT 命令获取更多相关信息。 + */ + @Override + public Double hincrByFloat(Object key, Object field, double value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.hincrByFloat(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedisCluster); + } + } + + /** + * 返回列表 key 中,下标为 index 的元素。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 如果 key 不是列表类型,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T lindex(Object key, long index) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.lindex(keyToBytes(key), index)); + } finally { + close(jedisCluster); + } + } + + /** + * 获取记数器的值 + */ + public Long getCounter(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + String ret = jedisCluster.get(keyNamingPolicy.getKeyName(key)); + return ret != null ? Long.parseLong(ret) : null; + } finally { + close(jedisCluster); + } + } + + /** + * 返回列表 key 的长度。 + * 如果 key 不存在,则 key 被解释为一个空列表,返回 0 . + * 如果 key 不是列表类型,返回一个错误。 + */ + @Override + public Long llen(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.llen(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 移除并返回列表 key 的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T lpop(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.lpop(keyToBytes(key))); + } finally { + close(jedisCluster); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表头 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表头: 比如说, + * 对空列表 mylist 执行命令 LPUSH mylist a b c ,列表的值将是 c b a , + * 这等同于原子性地执行 LPUSH mylist a 、 LPUSH mylist b 和 LPUSH mylist c 三个命令。 + * 如果 key 不存在,一个空列表会被创建并执行 LPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long lpush(Object key, Object... values) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.lpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedisCluster); + } + } + + /** + * 将列表 key 下标为 index 的元素的值设置为 value 。 + * 当 index 参数超出范围,或对一个空列表( key 不存在)进行 LSET 时,返回一个错误。 + * 关于列表下标的更多信息,请参考 LINDEX 命令。 + */ + @Override + public String lset(Object key, long index, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.lset(keyToBytes(key), index, valueToBytes(value)); + } finally { + close(jedisCluster); + } + } + + /** + * 根据参数 count 的值,移除列表中与参数 value 相等的元素。 + * count 的值可以是以下几种: + * count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。 + * count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。 + * count = 0 : 移除表中所有与 value 相等的值。 + */ + @Override + public Long lrem(Object key, long count, Object value) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.lrem(keyToBytes(key), count, valueToBytes(value)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 指定。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + *
+     * 例子:
+     * 获取 list 中所有数据:cache.lrange(listKey, 0, -1);
+     * 获取 list 中下标 1 到 3 的数据: cache.lrange(listKey, 1, 3);
+     * 
+ */ + @SuppressWarnings("rawtypes") + @Override + public List lrange(Object key, long start, long end) { + JedisCluster jedisCluster = getJedisCluster(); + try { + List data = jedisCluster.lrange(keyToBytes(key), start, end); + if (data != null) { + return valueListFromBytesList(data); + } else { + return new ArrayList(0); + } + } finally { + close(jedisCluster); + } + } + + /** + * 对一个列表进行修剪(trim),就是说,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除。 + * 举个例子,执行命令 LTRIM list 0 2 ,表示只保留列表 list 的前三个元素,其余元素全部删除。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 当 key 不是列表类型时,返回一个错误。 + */ + @Override + public String ltrim(Object key, long start, long end) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.ltrim(keyToBytes(key), start, end); + } finally { + close(jedisCluster); + } + } + + /** + * 移除并返回列表 key 的尾元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpop(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.rpop(keyToBytes(key))); + } finally { + close(jedisCluster); + } + } + + /** + * 命令 RPOPLPUSH 在一个原子时间内,执行以下两个动作: + * 将列表 source 中的最后一个元素(尾元素)弹出,并返回给客户端。 + * 将 source 弹出的元素插入到列表 destination ,作为 destination 列表的的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpoplpush(Object srcKey, Object dstKey) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.rpoplpush(keyToBytes(srcKey), keyToBytes(dstKey))); + } finally { + close(jedisCluster); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表尾(最右边)。 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表尾:比如 + * 对一个空列表 mylist 执行 RPUSH mylist a b c ,得出的结果列表为 a b c , + * 等同于执行命令 RPUSH mylist a 、 RPUSH mylist b 、 RPUSH mylist c 。 + * 如果 key 不存在,一个空列表会被创建并执行 RPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long rpush(Object key, Object... values) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.rpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedisCluster); + } + } + + /** + * 使用客户端向 JbootRedis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG 。 + * 通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值。 + * cluster模式下,该命令被禁用 + */ + @Override + public String ping() { + return "PONG"; + } + + /** + * 将一个或多个 member 元素加入到集合 key 当中,已经存在于集合的 member 元素将被忽略。 + * 假如 key 不存在,则创建一个只包含 member 元素作成员的集合。 + * 当 key 不是集合类型时,返回一个错误。 + */ + @Override + public Long sadd(Object key, Object... members) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.sadd(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回集合 key 的基数(集合中元素的数量)。 + */ + @Override + public Long scard(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.scard(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 移除并返回集合中的一个随机元素。 + * 如果只想获取一个随机元素,但不想该元素从集合中被移除的话,可以使用 SRANDMEMBER 命令。 + */ + @SuppressWarnings("unchecked") + @Override + public T spop(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.spop(keyToBytes(key))); + } finally { + close(jedisCluster); + } + } + + /** + * 返回集合 key 中的所有成员。 + * 不存在的 key 被视为空集合。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set smembers(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.smembers(keyToBytes(key)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 判断 member 元素是否集合 key 的成员。 + */ + @Override + public boolean sismember(Object key, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.sismember(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回多个集合的交集,多个集合由 keys 指定 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sinter(Object... keys) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.sinter(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回集合中的一个随机元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T srandmember(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return (T) valueFromBytes(jedisCluster.srandmember(keyToBytes(key))); + } finally { + close(jedisCluster); + } + } + + /** + * 返回集合中的 count 个随机元素。 + * 从 Redis 2.6 版本开始, SRANDMEMBER 命令接受可选的 count 参数: + * 如果 count 为正数,且小于集合基数,那么命令返回一个包含 count 个元素的数组,数组中的元素各不相同。 + * 如果 count 大于等于集合基数,那么返回整个集合。 + * 如果 count 为负数,那么命令返回一个数组,数组中的元素可能会重复出现多次,而数组的长度为 count 的绝对值。 + * 该操作和 SPOP 相似,但 SPOP 将随机元素从集合中移除并返回,而 SRANDMEMBER 则仅仅返回随机元素,而不对集合进行任何改动。 + */ + @SuppressWarnings("rawtypes") + @Override + public List srandmember(Object key, int count) { + JedisCluster jedisCluster = getJedisCluster(); + try { + List data = jedisCluster.srandmember(keyToBytes(key), count); + return valueListFromBytesList(data); + } finally { + close(jedisCluster); + } + } + + /** + * 移除集合 key 中的一个或多个 member 元素,不存在的 member 元素会被忽略。 + */ + @Override + public Long srem(Object key, Object... members) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.srem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回多个集合的并集,多个集合由 keys 指定 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sunion(Object... keys) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.sunion(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回一个集合的全部成员,该集合是所有给定集合之间的差集。 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sdiff(Object... keys) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.sdiff(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 将一个或多个 member 元素及其 score 值加入到有序集 key 当中。 + * 如果某个 member 已经是有序集的成员,那么更新这个 member 的 score 值, + * 并通过重新插入这个 member 元素,来保证该 member 在正确的位置上。 + */ + @Override + public Long zadd(Object key, double score, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zadd(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + @Override + public Long zadd(Object key, Map scoreMembers) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Map para = new HashMap<>(); + scoreMembers.forEach((k, v) -> para.put(valueToBytes(k), v)); + return jedisCluster.zadd(keyToBytes(key), para); + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 的基数。 + */ + @Override + public Long zcard(Object key) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zcard(keyToBytes(key)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 + * 关于参数 min 和 max 的详细使用方法,请参考 ZRANGEBYSCORE 命令。 + */ + @Override + public Long zcount(Object key, double min, double max) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zcount(keyToBytes(key), min, max); + } finally { + close(jedisCluster); + } + } + + /** + * 为有序集 key 的成员 member 的 score 值加上增量 increment 。 + */ + @Override + public Double zincrby(Object key, double score, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zincrby(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递增(从小到大)来排序。 + * 具有相同 score 值的成员按字典序(lexicographical order )来排列。 + * 如果你需要成员按 score 值递减(从大到小)来排列,请使用 ZREVRANGE 命令。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrange(Object key, long start, long end) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.zrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递减(从大到小)来排列。 + * 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列。 + * 除了成员按 score 值递减的次序排列这一点外, ZREVRANGE 命令的其他方面和 ZRANGE 命令一样。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrevrange(Object key, long start, long end) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.zrevrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中,所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。 + * 有序集成员按 score 值递增(从小到大)次序排列。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrangeByScore(Object key, double min, double max) { + JedisCluster jedisCluster = getJedisCluster(); + try { + Set data = jedisCluster.zrangeByScore(keyToBytes(key), min, max); + Set result = new LinkedHashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列。 + * 排名以 0 为底,也就是说, score 值最小的成员排名为 0 。 + * 使用 ZREVRANK 命令可以获得成员按 score 值递减(从大到小)排列的排名。 + */ + @Override + public Long zrank(Object key, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)排序。 + * 排名以 0 为底,也就是说, score 值最大的成员排名为 0 。 + * 使用 ZRANK 命令可以获得成员按 score 值递增(从小到大)排列的排名。 + */ + @Override + public Long zrevrank(Object key, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zrevrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + /** + * 移除有序集 key 中的一个或多个成员,不存在的成员将被忽略。 + * 当 key 存在但不是有序集类型时,返回一个错误。 + */ + @Override + public Long zrem(Object key, Object... members) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zrem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedisCluster); + } + } + + /** + * 返回有序集 key 中,成员 member 的 score 值。 + * 如果 member 元素不是有序集 key 的成员,或 key 不存在,返回 nil 。 + */ + @Override + public Double zscore(Object key, Object member) { + JedisCluster jedisCluster = getJedisCluster(); + try { + return jedisCluster.zscore(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedisCluster); + } + } + + + @Override + public byte[] keyToBytes(Object key) { + String keyStr = keyNamingPolicy.getKeyName(key); + return serializer.keyToBytes(keyStr); + } + + @Override + public String bytesToKey(byte[] bytes) { + return serializer.keyFromBytes(bytes); + } + + @Override + public byte[][] keysToBytesArray(Object... keys) { + byte[][] result = new byte[keys.length][]; + for (int i = 0; i < result.length; i++) { + result[i] = keyToBytes(keys[i]); + } + return result; + } + + @Override + public byte[] fieldToBytes(Object field) { + return serializer.fieldToBytes(field); + } + + @Override + public Object fieldFromBytes(byte[] bytes) { + return serializer.fieldFromBytes(bytes); + } + + @Override + public byte[][] fieldsToBytesArray(Object... fieldsArray) { + byte[][] data = new byte[fieldsArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = fieldToBytes(fieldsArray[i]); + } + return data; + } + + @Override + public void fieldSetFromBytesSet(Set data, Set result) { + for (byte[] fieldBytes : data) { + result.add(this.valueFromBytes(fieldBytes)); + } + } + + @Override + public byte[] valueToBytes(Object value) { + return serializer.valueToBytes(value); + } + + @Override + public Object valueFromBytes(byte[] bytes) { + return serializer.valueFromBytes(bytes); + } + + @Override + public byte[][] valuesToBytesArray(Object... valuesArray) { + byte[][] data = new byte[valuesArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = valueToBytes(valuesArray[i]); + } + return data; + } + + @Override + public void valueSetFromBytesSet(Set data, Set result) { + for (byte[] valueBytes : data) { + result.add(valueFromBytes(valueBytes)); + } + } + + @Override + public List valueListFromBytesList(Collection data) { + List result = new ArrayList<>(); + for (byte[] d : data) { + result.add(valueFromBytes(d)); + } + return result; + } + + @Override + public void destroy(){ + try { + jedisCluster.close(); + } catch (IOException e) { + throw new RuntimeException(); + } + } + + public void close(JedisCluster jedisCluster) { + + } + + private JedisCluster getJedisCluster() { + return this.jedisCluster; + } +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/JedisImpl.java b/src/main/java/com/kakarote/crm9/common/config/redis/JedisImpl.java new file mode 100644 index 0000000..4ff8e2a --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/JedisImpl.java @@ -0,0 +1,1312 @@ +package com.kakarote.crm9.common.config.redis; + +import com.jfinal.plugin.redis.IKeyNamingPolicy; +import com.jfinal.plugin.redis.serializer.ISerializer; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; + +import java.io.IOException; +import java.util.*; + +/** + * 单机版redis实现 + * + * @author z + */ +@SuppressWarnings("unused") +public class JedisImpl implements Redis { + + private JedisPool jedisPool; + private ISerializer serializer; + private IKeyNamingPolicy keyNamingPolicy; + + JedisImpl(JedisPool jedisPool, ISerializer serializer, IKeyNamingPolicy keyNamingPolicy) { + this.jedisPool = jedisPool; + this.serializer = serializer; + this.keyNamingPolicy = keyNamingPolicy; + } + + /** + * 存放 key value 对到 redis + * 如果 key 已经持有其他值, SET 就覆写旧值,无视类型。 + * 对于某个原本带有生存时间(TTL)的键来说, 当 SET 命令成功在这个键上执行时, 这个键原有的 TTL 将被清除。 + */ + @Override + public String set(Object key, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.set(keyToBytes(key), valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 存放 key value 对到 redis,并将 key 的生存时间设为 seconds (以秒为单位)。 + * 如果 key 已经存在, SETEX 命令将覆写旧值。 + */ + @Override + public String setex(Object key, int seconds, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.setex(keyToBytes(key), seconds, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 返回 key 所关联的 value 值 + * 如果 key 不存在那么返回特殊值 nil 。 + */ + @SuppressWarnings("unchecked") + @Override + public T get(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.get(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 删除给定的一个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.del(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 删除给定的多个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object... keys) { + Jedis jedis = getJedis(); + try { + return jedis.del(keysToBytesArray(keys)); + } finally { + close(jedis); + } + } + + /** + * 查找所有符合给定模式 pattern 的 key 。 + * KEYS * 匹配数据库中所有 key 。 + * KEYS h?llo 匹配 hello , hallo 和 hxllo 等。 + * KEYS h*llo 匹配 hllo 和 heeeeello 等。 + * KEYS h[ae]llo 匹配 hello 和 hallo ,但不匹配 hillo 。 + * 特殊符号用 \ 隔开 + */ + @Override + public Set keys(String pattern) { + Jedis jedis = getJedis(); + try { + return jedis.keys(pattern); + } finally { + close(jedis); + } + } + + /** + * 同时设置一个或多个 key-value 对。 + * 如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值,如果这不是你所希望的效果,请考虑使用 MSETNX 命令:它只会在所有给定 key 都不存在的情况下进行设置操作。 + * MSET 是一个原子性(atomic)操作,所有给定 key 都会在同一时间内被设置,某些给定 key 被更新而另一些给定 key 没有改变的情况,不可能发生。 + *
+     * 例子:
+     * Cache cache = RedisKit.use();			// 使用 Redis 的 cache
+     * cache.mset("k1", "v1", "k2", "v2");		// 放入多个 key value 键值对
+     * List list = cache.mget("k1", "k2");		// 利用多个键值得到上面代码放入的值
+     * 
+ */ + @Override + public String mset(Object... keysValues) { + if (keysValues.length % 2 != 0) { + throw new IllegalArgumentException("wrong number of arguments for met, keysValues length can not be odd"); + } + Jedis jedis = getJedis(); + try { + byte[][] kv = new byte[keysValues.length][]; + for (int i = 0; i < keysValues.length; i++) { + if (i % 2 == 0) { + kv[i] = keyToBytes(keysValues[i]); + } else { + kv[i] = valueToBytes(keysValues[i]); + } + + } + return jedis.mset(kv); + } finally { + close(jedis); + } + } + + /** + * 返回所有(一个或多个)给定 key 的值。 + * 如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。因此,该命令永不失败。 + */ + @SuppressWarnings("rawtypes") + @Override + public List mget(Object... keys) { + Jedis jedis = getJedis(); + try { + byte[][] keysBytesArray = keysToBytesArray(keys); + List data = jedis.mget(keysBytesArray); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 将 key 中储存的数字值减一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decr(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.decr(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将 key 所储存的值减去减量 decrement 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECRBY 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于更多递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decrBy(Object key, long longValue) { + Jedis jedis = getJedis(); + try { + return jedis.decrBy(keyToBytes(key), longValue); + } finally { + close(jedis); + } + } + + /** + * 将 key 中储存的数字值增一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long incr(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.incr(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将 key 所储存的值加上增量 increment 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCRBY 命令。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,参见 INCR 命令。 + */ + @Override + public Long incrBy(Object key, long longValue) { + Jedis jedis = getJedis(); + try { + return jedis.incrBy(keyToBytes(key), longValue); + } finally { + close(jedis); + } + } + + /** + * 检查给定 key 是否存在。 + */ + @Override + public boolean exists(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.exists(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 从当前数据库中随机返回(不删除)一个 key 。 + */ + @Override + public String randomKey() { + Jedis jedis = getJedis(); + try { + return jedis.randomKey(); + } finally { + close(jedis); + } + } + + /** + * 将 key 改名为 newkey 。 + * 当 key 和 newkey 相同,或者 key 不存在时,返回一个错误。 + * 当 newkey 已经存在时, RENAME 命令将覆盖旧值。 + */ + @Override + public String rename(Object oldkey, Object newkey) { + Jedis jedis = getJedis(); + try { + return jedis.rename(keyToBytes(oldkey), keyToBytes(newkey)); + } finally { + close(jedis); + } + } + + /** + * 将当前数据库的 key 移动到给定的数据库 db 当中。 + * 如果当前数据库(源数据库)和给定数据库(目标数据库)有相同名字的给定 key ,或者 key 不存在于当前数据库,那么 MOVE 没有任何效果。 + * 因此,也可以利用这一特性,将 MOVE 当作锁(locking)原语(primitive)。 + */ + @Override + public Long move(Object key, int dbIndex) { + Jedis jedis = getJedis(); + try { + return jedis.move(keyToBytes(key), dbIndex); + } finally { + close(jedis); + } + } + + /** + * 将 key 原子性地从当前实例传送到目标实例的指定数据库上,一旦传送成功, key 保证会出现在目标实例上,而当前实例上的 key 会被删除。 + */ + @Override + public String migrate(String host, int port, Object key, int destinationDb, int timeout) { + Jedis jedis = getJedis(); + try { + return jedis.migrate(valueToBytes(host), port, keyToBytes(key), destinationDb, timeout); + } finally { + close(jedis); + } + } + + /** + * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。 + * 默认使用 0 号数据库。 + * 注意:在 Jedis 对象被关闭时,数据库又会重新被设置为初始值,所以本方法 select(...) + * 正常工作需要使用如下方式之一: + * 1:使用 RedisInterceptor,在本线程内共享同一个 Jedis 对象 + * 2:使用 Redis.call(ICallback) 进行操作 + * 3:自行获取 Jedis 对象进行操作 + */ + @Override + public String select(int databaseIndex) { + Jedis jedis = getJedis(); + try { + return jedis.select(databaseIndex); + } finally { + close(jedis); + } + } + + /** + * 为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。 + * 在 Redis 中,带有生存时间的 key 被称为『易失的』(volatile)。 + */ + @Override + public Long expire(Object key, int seconds) { + Jedis jedis = getJedis(); + try { + return jedis.expire(keyToBytes(key), seconds); + } finally { + close(jedis); + } + } + + /** + * EXPIREAT 的作用和 EXPIRE 类似,都用于为 key 设置生存时间。不同在于 EXPIREAT 命令接受的时间参数是 UNIX 时间戳(unix timestamp)。 + */ + @Override + public Long expireAt(Object key, long unixTime) { + Jedis jedis = getJedis(); + try { + return jedis.expireAt(keyToBytes(key), unixTime); + } finally { + close(jedis); + } + } + + /** + * 这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。 + */ + @Override + public Long pexpire(Object key, long milliseconds) { + Jedis jedis = getJedis(); + try { + return jedis.pexpire(keyToBytes(key), milliseconds); + } finally { + close(jedis); + } + } + + /** + * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。 + */ + @Override + public Long pexpireAt(Object key, long millisecondsTimestamp) { + Jedis jedis = getJedis(); + try { + return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp); + } finally { + close(jedis); + } + } + + /** + * 将给定 key 的值设为 value ,并返回 key 的旧值(old value)。 + * 当 key 存在但不是字符串类型时,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T getSet(Object key, Object value) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.getSet(keyToBytes(key), valueToBytes(value))); + } finally { + close(jedis); + } + } + + /** + * 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 + */ + @Override + public Long persist(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.persist(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 返回 key 所储存的值的类型。 + */ + @Override + public String type(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.type(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 以秒为单位,返回给定 key 的剩余生存时间(TTL, time to live)。 + */ + @Override + public Long ttl(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.ttl(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 这个命令类似于 TTL 命令,但它以毫秒为单位返回 key 的剩余生存时间,而不是像 TTL 命令那样,以秒为单位。 + */ + @Override + public Long pttl(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.pttl(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 对象被引用的数量 + */ + @Override + public Long objectRefcount(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.objectRefcount(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 对象没有被访问的空闲时间 + */ + @Override + public Long objectIdletime(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.objectIdletime(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将哈希表 key 中的域 field 的值设为 value 。 + * 如果 key 不存在,一个新的哈希表被创建并进行 HSET 操作。 + * 如果域 field 已经存在于哈希表中,旧值将被覆盖。 + */ + @Override + public Long hset(Object key, Object field, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.hset(keyToBytes(key), fieldToBytes(field), valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 同时将多个 field-value (域-值)对设置到哈希表 key 中。 + * 此命令会覆盖哈希表中已存在的域。 + * 如果 key 不存在,一个空哈希表被创建并执行 HMSET 操作。 + */ + @Override + public String hmset(Object key, Map hash) { + Jedis jedis = getJedis(); + try { + Map para = new HashMap<>(); + hash.forEach((k, v) -> para.put(fieldToBytes(k), valueToBytes(v))); + return jedis.hmset(keyToBytes(key), para); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中给定域 field 的值。 + */ + @SuppressWarnings("unchecked") + @Override + public T hget(Object key, Object field) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.hget(keyToBytes(key), fieldToBytes(field))); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中,一个或多个给定域的值。 + * 如果给定的域不存在于哈希表,那么返回一个 nil 值。 + * 因为不存在的 key 被当作一个空哈希表来处理,所以对一个不存在的 key 进行 HMGET 操作将返回一个只带有 nil 值的表。 + */ + @SuppressWarnings("rawtypes") + @Override + public List hmget(Object key, Object... fields) { + Jedis jedis = getJedis(); + try { + List data = jedis.hmget(keyToBytes(key), fieldsToBytesArray(fields)); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 删除哈希表 key 中的一个或多个指定域,不存在的域将被忽略。 + */ + @Override + public Long hdel(Object key, Object... fields) { + Jedis jedis = getJedis(); + try { + return jedis.hdel(keyToBytes(key), fieldsToBytesArray(fields)); + } finally { + close(jedis); + } + } + + /** + * 查看哈希表 key 中,给定域 field 是否存在。 + */ + @Override + public boolean hexists(Object key, Object field) { + Jedis jedis = getJedis(); + try { + return jedis.hexists(keyToBytes(key), fieldToBytes(field)); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中,所有的域和值。 + * 在返回值里,紧跟每个域名(field name)之后是域的值(value),所以返回值的长度是哈希表大小的两倍。 + */ + @SuppressWarnings("rawtypes") + @Override + public Map hgetAll(Object key) { + Jedis jedis = getJedis(); + try { + Map data = jedis.hgetAll(keyToBytes(key)); + Map result = new HashMap<>(); + data.forEach((k, v) -> result.put(fieldFromBytes(k), valueFromBytes(v))); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中所有域的值。 + */ + @SuppressWarnings("rawtypes") + @Override + public List hvals(Object key) { + Jedis jedis = getJedis(); + try { + List data = jedis.hvals(keyToBytes(key)); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中的所有域。 + * 底层实现此方法取名为 hfields 更为合适,在此仅为与底层保持一致 + */ + @Override + public Set hkeys(Object key) { + Jedis jedis = getJedis(); + try { + Set fieldSet = jedis.hkeys(keyToBytes(key)); + Set result = new HashSet<>(); + fieldSetFromBytesSet(fieldSet, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中域的数量。 + */ + @Override + public Long hlen(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.hlen(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 为哈希表 key 中的域 field 的值加上增量 increment 。 + * 增量也可以为负数,相当于对给定域进行减法操作。 + * 如果 key 不存在,一个新的哈希表被创建并执行 HINCRBY 命令。 + * 如果域 field 不存在,那么在执行命令前,域的值被初始化为 0 。 + * 对一个储存字符串值的域 field 执行 HINCRBY 命令将造成一个错误。 + * 本操作的值被限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long hincrBy(Object key, Object field, long value) { + Jedis jedis = getJedis(); + try { + return jedis.hincrBy(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedis); + } + } + + /** + * 为哈希表 key 中的域 field 加上浮点数增量 increment 。 + * 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 + * 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 + * 当以下任意一个条件发生时,返回一个错误: + * 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属于字符串类型) + * 2:域 field 当前的值或给定的增量 increment 不能解释(parse)为双精度浮点数(double precision floating point number) + * HINCRBYFLOAT 命令的详细功能和 INCRBYFLOAT 命令类似,请查看 INCRBYFLOAT 命令获取更多相关信息。 + */ + @Override + public Double hincrByFloat(Object key, Object field, double value) { + Jedis jedis = getJedis(); + try { + return jedis.hincrByFloat(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 中,下标为 index 的元素。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 如果 key 不是列表类型,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T lindex(Object key, long index) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.lindex(keyToBytes(key), index)); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 的长度。 + * 如果 key 不存在,则 key 被解释为一个空列表,返回 0 . + * 如果 key 不是列表类型,返回一个错误。 + */ + @Override + public Long llen(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.llen(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 移除并返回列表 key 的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T lpop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.lpop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表头 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表头: 比如说, + * 对空列表 mylist 执行命令 LPUSH mylist a b c ,列表的值将是 c b a , + * 这等同于原子性地执行 LPUSH mylist a 、 LPUSH mylist b 和 LPUSH mylist c 三个命令。 + * 如果 key 不存在,一个空列表会被创建并执行 LPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long lpush(Object key, Object... values) { + Jedis jedis = getJedis(); + try { + return jedis.lpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedis); + } + } + + /** + * 将列表 key 下标为 index 的元素的值设置为 value 。 + * 当 index 参数超出范围,或对一个空列表( key 不存在)进行 LSET 时,返回一个错误。 + * 关于列表下标的更多信息,请参考 LINDEX 命令。 + */ + @Override + public String lset(Object key, long index, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.lset(keyToBytes(key), index, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 根据参数 count 的值,移除列表中与参数 value 相等的元素。 + * count 的值可以是以下几种: + * count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。 + * count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。 + * count = 0 : 移除表中所有与 value 相等的值。 + */ + @Override + public Long lrem(Object key, long count, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.lrem(keyToBytes(key), count, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 指定。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + *
+     * 例子:
+     * 获取 list 中所有数据:cache.lrange(listKey, 0, -1);
+     * 获取 list 中下标 1 到 3 的数据: cache.lrange(listKey, 1, 3);
+     * 
+ */ + @SuppressWarnings("rawtypes") + @Override + public List lrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + List data = jedis.lrange(keyToBytes(key), start, end); + if (data != null) { + return valueListFromBytesList(data); + } else { + return new ArrayList(0); + } + } finally { + close(jedis); + } + } + + /** + * 对一个列表进行修剪(trim),就是说,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除。 + * 举个例子,执行命令 LTRIM list 0 2 ,表示只保留列表 list 的前三个元素,其余元素全部删除。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 当 key 不是列表类型时,返回一个错误。 + */ + @Override + public String ltrim(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + return jedis.ltrim(keyToBytes(key), start, end); + } finally { + close(jedis); + } + } + + /** + * 移除并返回列表 key 的尾元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.rpop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 命令 RPOPLPUSH 在一个原子时间内,执行以下两个动作: + * 将列表 source 中的最后一个元素(尾元素)弹出,并返回给客户端。 + * 将 source 弹出的元素插入到列表 destination ,作为 destination 列表的的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpoplpush(Object srcKey, Object dstKey) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.rpoplpush(keyToBytes(srcKey), keyToBytes(dstKey))); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表尾(最右边)。 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表尾:比如 + * 对一个空列表 mylist 执行 RPUSH mylist a b c ,得出的结果列表为 a b c , + * 等同于执行命令 RPUSH mylist a 、 RPUSH mylist b 、 RPUSH mylist c 。 + * 如果 key 不存在,一个空列表会被创建并执行 RPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long rpush(Object key, Object... values) { + Jedis jedis = getJedis(); + try { + return jedis.rpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedis); + } + } + + /** + * 使用客户端向 Redis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG 。 + * 通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值。 + */ + @Override + public String ping() { + Jedis jedis = getJedis(); + try { + return jedis.ping(); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个 member 元素加入到集合 key 当中,已经存在于集合的 member 元素将被忽略。 + * 假如 key 不存在,则创建一个只包含 member 元素作成员的集合。 + * 当 key 不是集合类型时,返回一个错误。 + */ + @Override + public Long sadd(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.sadd(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回集合 key 的基数(集合中元素的数量)。 + */ + @Override + public Long scard(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.scard(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 移除并返回集合中的一个随机元素。 + * 如果只想获取一个随机元素,但不想该元素从集合中被移除的话,可以使用 SRANDMEMBER 命令。 + */ + @SuppressWarnings("unchecked") + @Override + public T spop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.spop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 返回集合 key 中的所有成员。 + * 不存在的 key 被视为空集合。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set smembers(Object key) { + Jedis jedis = getJedis(); + try { + Set data = jedis.smembers(keyToBytes(key)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 判断 member 元素是否集合 key 的成员。 + */ + @Override + public boolean sismember(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.sismember(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回多个集合的交集,多个集合由 keys 指定 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sinter(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sinter(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回集合中的一个随机元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T srandmember(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.srandmember(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 返回集合中的 count 个随机元素。 + * 从 Redis 2.6 版本开始, SRANDMEMBER 命令接受可选的 count 参数: + * 如果 count 为正数,且小于集合基数,那么命令返回一个包含 count 个元素的数组,数组中的元素各不相同。 + * 如果 count 大于等于集合基数,那么返回整个集合。 + * 如果 count 为负数,那么命令返回一个数组,数组中的元素可能会重复出现多次,而数组的长度为 count 的绝对值。 + * 该操作和 SPOP 相似,但 SPOP 将随机元素从集合中移除并返回,而 SRANDMEMBER 则仅仅返回随机元素,而不对集合进行任何改动。 + */ + @SuppressWarnings("rawtypes") + @Override + public List srandmember(Object key, int count) { + Jedis jedis = getJedis(); + try { + List data = jedis.srandmember(keyToBytes(key), count); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 移除集合 key 中的一个或多个 member 元素,不存在的 member 元素会被忽略。 + */ + @Override + public Long srem(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.srem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回多个集合的并集,多个集合由 keys 指定 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sunion(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sunion(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回一个集合的全部成员,该集合是所有给定集合之间的差集。 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sdiff(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sdiff(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 将一个或多个 member 元素及其 score 值加入到有序集 key 当中。 + * 如果某个 member 已经是有序集的成员,那么更新这个 member 的 score 值, + * 并通过重新插入这个 member 元素,来保证该 member 在正确的位置上。 + */ + @Override + public Long zadd(Object key, double score, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zadd(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedis); + } + } + + @Override + public Long zadd(Object key, Map scoreMembers) { + Jedis jedis = getJedis(); + try { + Map para = new HashMap<>(); + scoreMembers.forEach((k, v) -> para.put(valueToBytes(k), v)); + return jedis.zadd(keyToBytes(key), para); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 的基数。 + */ + @Override + public Long zcard(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.zcard(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 + * 关于参数 min 和 max 的详细使用方法,请参考 ZRANGEBYSCORE 命令。 + */ + @Override + public Long zcount(Object key, double min, double max) { + Jedis jedis = getJedis(); + try { + return jedis.zcount(keyToBytes(key), min, max); + } finally { + close(jedis); + } + } + + /** + * 为有序集 key 的成员 member 的 score 值加上增量 increment 。 + */ + @Override + public Double zincrby(Object key, double score, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zincrby(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递增(从小到大)来排序。 + * 具有相同 score 值的成员按字典序(lexicographical order )来排列。 + * 如果你需要成员按 score 值递减(从大到小)来排列,请使用 ZREVRANGE 命令。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递减(从大到小)来排列。 + * 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列。 + * 除了成员按 score 值递减的次序排列这一点外, ZREVRANGE 命令的其他方面和 ZRANGE 命令一样。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrevrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrevrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。 + * 有序集成员按 score 值递增(从小到大)次序排列。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrangeByScore(Object key, double min, double max) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrangeByScore(keyToBytes(key), min, max); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列。 + * 排名以 0 为底,也就是说, score 值最小的成员排名为 0 。 + * 使用 ZREVRANK 命令可以获得成员按 score 值递减(从大到小)排列的排名。 + */ + @Override + public Long zrank(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)排序。 + * 排名以 0 为底,也就是说, score 值最大的成员排名为 0 。 + * 使用 ZRANK 命令可以获得成员按 score 值递增(从小到大)排列的排名。 + */ + @Override + public Long zrevrank(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zrevrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 移除有序集 key 中的一个或多个成员,不存在的成员将被忽略。 + * 当 key 存在但不是有序集类型时,返回一个错误。 + */ + @Override + public Long zrem(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.zrem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,成员 member 的 score 值。 + * 如果 member 元素不是有序集 key 的成员,或 key 不存在,返回 nil 。 + */ + @Override + public Double zscore(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zscore(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + @Override + public byte[] keyToBytes(Object key) { + String keyStr = keyNamingPolicy.getKeyName(key); + return serializer.keyToBytes(keyStr); + } + + @Override + public String bytesToKey(byte[] bytes) { + return serializer.keyFromBytes(bytes); + } + + @Override + public byte[][] keysToBytesArray(Object... keys) { + byte[][] result = new byte[keys.length][]; + for (int i = 0; i < result.length; i++) { + result[i] = keyToBytes(keys[i]); + } + return result; + } + + @Override + public byte[] fieldToBytes(Object field) { + return serializer.fieldToBytes(field); + } + + @Override + public Object fieldFromBytes(byte[] bytes) { + return serializer.fieldFromBytes(bytes); + } + + @Override + public byte[][] fieldsToBytesArray(Object... fieldsArray) { + byte[][] data = new byte[fieldsArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = fieldToBytes(fieldsArray[i]); + } + return data; + } + + @Override + public void fieldSetFromBytesSet(Set data, Set result) { + for (byte[] fieldBytes : data) { + result.add(this.valueFromBytes(fieldBytes)); + } + } + + @Override + public byte[] valueToBytes(Object value) { + return serializer.valueToBytes(value); + } + + @Override + public Object valueFromBytes(byte[] bytes) { + return serializer.valueFromBytes(bytes); + } + + @Override + public byte[][] valuesToBytesArray(Object... valuesArray) { + byte[][] data = new byte[valuesArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = valueToBytes(valuesArray[i]); + } + return data; + } + + @Override + public void valueSetFromBytesSet(Set data, Set result) { + for (byte[] valueBytes : data) { + result.add(valueFromBytes(valueBytes)); + } + } + + @Override + public List valueListFromBytesList(Collection data) { + List result = new ArrayList<>(); + for (byte[] d : data) { + result.add(valueFromBytes(d)); + } + return result; + } + + @Override + public void destroy() { + jedisPool.destroy(); + } + + private Jedis getJedis() { + return jedisPool.getResource(); + } + + private void close(Jedis jedis) { + if (jedis != null) { + jedis.close(); + } + } +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/JedisSentinelImpl.java b/src/main/java/com/kakarote/crm9/common/config/redis/JedisSentinelImpl.java new file mode 100644 index 0000000..35b57ff --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/JedisSentinelImpl.java @@ -0,0 +1,1307 @@ +package com.kakarote.crm9.common.config.redis; + +import com.jfinal.plugin.redis.IKeyNamingPolicy; +import com.jfinal.plugin.redis.serializer.ISerializer; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisSentinelPool; + +import java.util.*; + +/** + * Redis的sentinel实现 + */ +public class JedisSentinelImpl implements Redis { + private JedisSentinelPool jedisSentinelPool; + private ISerializer serializer; + private IKeyNamingPolicy keyNamingPolicy; + + JedisSentinelImpl(JedisSentinelPool jedisSentinelPool, ISerializer serializer, IKeyNamingPolicy keyNamingPolicy) { + this.jedisSentinelPool = jedisSentinelPool; + this.serializer = serializer; + this.keyNamingPolicy = keyNamingPolicy; + } + + /** + * 存放 key value 对到 redis + * 如果 key 已经持有其他值, SET 就覆写旧值,无视类型。 + * 对于某个原本带有生存时间(TTL)的键来说, 当 SET 命令成功在这个键上执行时, 这个键原有的 TTL 将被清除。 + */ + @Override + public String set(Object key, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.set(keyToBytes(key), valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 存放 key value 对到 redis,并将 key 的生存时间设为 seconds (以秒为单位)。 + * 如果 key 已经存在, SETEX 命令将覆写旧值。 + */ + @Override + public String setex(Object key, int seconds, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.setex(keyToBytes(key), seconds, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 返回 key 所关联的 value 值 + * 如果 key 不存在那么返回特殊值 nil 。 + */ + @SuppressWarnings("unchecked") + @Override + public T get(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.get(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 删除给定的一个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.del(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 删除给定的多个 key + * 不存在的 key 会被忽略。 + */ + @Override + public Long del(Object... keys) { + Jedis jedis = getJedis(); + try { + return jedis.del(keysToBytesArray(keys)); + } finally { + close(jedis); + } + } + + /** + * 查找所有符合给定模式 pattern 的 key 。 + * KEYS * 匹配数据库中所有 key 。 + * KEYS h?llo 匹配 hello , hallo 和 hxllo 等。 + * KEYS h*llo 匹配 hllo 和 heeeeello 等。 + * KEYS h[ae]llo 匹配 hello 和 hallo ,但不匹配 hillo 。 + * 特殊符号用 \ 隔开 + */ + @Override + public Set keys(String pattern) { + Jedis jedis = getJedis(); + try { + return jedis.keys(pattern); + } finally { + close(jedis); + } + } + + /** + * 同时设置一个或多个 key-value 对。 + * 如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值,如果这不是你所希望的效果,请考虑使用 MSETNX 命令:它只会在所有给定 key 都不存在的情况下进行设置操作。 + * MSET 是一个原子性(atomic)操作,所有给定 key 都会在同一时间内被设置,某些给定 key 被更新而另一些给定 key 没有改变的情况,不可能发生。 + *
+     * 例子:
+     * Cache cache = RedisKit.use();			// 使用 Redis 的 cache
+     * cache.mset("k1", "v1", "k2", "v2");		// 放入多个 key value 键值对
+     * List list = cache.mget("k1", "k2");		// 利用多个键值得到上面代码放入的值
+     * 
+ */ + @Override + public String mset(Object... keysValues) { + if (keysValues.length % 2 != 0) { + throw new IllegalArgumentException("wrong number of arguments for met, keysValues length can not be odd"); + } + Jedis jedis = getJedis(); + try { + byte[][] kv = new byte[keysValues.length][]; + for (int i = 0; i < keysValues.length; i++) { + if (i % 2 == 0) { + kv[i] = keyToBytes(keysValues[i]); + } else { + kv[i] = valueToBytes(keysValues[i]); + } + + } + return jedis.mset(kv); + } finally { + close(jedis); + } + } + + /** + * 返回所有(一个或多个)给定 key 的值。 + * 如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。因此,该命令永不失败。 + */ + @SuppressWarnings("rawtypes") + @Override + public List mget(Object... keys) { + Jedis jedis = getJedis(); + try { + byte[][] keysBytesArray = keysToBytesArray(keys); + List data = jedis.mget(keysBytesArray); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 将 key 中储存的数字值减一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decr(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.decr(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将 key 所储存的值减去减量 decrement 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECRBY 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于更多递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + @Override + public Long decrBy(Object key, long longValue) { + Jedis jedis = getJedis(); + try { + return jedis.decrBy(keyToBytes(key), longValue); + } finally { + close(jedis); + } + } + + /** + * 将 key 中储存的数字值增一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long incr(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.incr(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将 key 所储存的值加上增量 increment 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCRBY 命令。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,参见 INCR 命令。 + */ + @Override + public Long incrBy(Object key, long longValue) { + Jedis jedis = getJedis(); + try { + return jedis.incrBy(keyToBytes(key), longValue); + } finally { + close(jedis); + } + } + + /** + * 检查给定 key 是否存在。 + */ + @Override + public boolean exists(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.exists(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 从当前数据库中随机返回(不删除)一个 key 。 + */ + @Override + public String randomKey() { + Jedis jedis = getJedis(); + try { + return jedis.randomKey(); + } finally { + close(jedis); + } + } + + /** + * 将 key 改名为 newkey 。 + * 当 key 和 newkey 相同,或者 key 不存在时,返回一个错误。 + * 当 newkey 已经存在时, RENAME 命令将覆盖旧值。 + */ + @Override + public String rename(Object oldkey, Object newkey) { + Jedis jedis = getJedis(); + try { + return jedis.rename(keyToBytes(oldkey), keyToBytes(newkey)); + } finally { + close(jedis); + } + } + + /** + * 将当前数据库的 key 移动到给定的数据库 db 当中。 + * 如果当前数据库(源数据库)和给定数据库(目标数据库)有相同名字的给定 key ,或者 key 不存在于当前数据库,那么 MOVE 没有任何效果。 + * 因此,也可以利用这一特性,将 MOVE 当作锁(locking)原语(primitive)。 + */ + @Override + public Long move(Object key, int dbIndex) { + Jedis jedis = getJedis(); + try { + return jedis.move(keyToBytes(key), dbIndex); + } finally { + close(jedis); + } + } + + /** + * 将 key 原子性地从当前实例传送到目标实例的指定数据库上,一旦传送成功, key 保证会出现在目标实例上,而当前实例上的 key 会被删除。 + */ + @Override + public String migrate(String host, int port, Object key, int destinationDb, int timeout) { + Jedis jedis = getJedis(); + try { + return jedis.migrate(valueToBytes(host), port, keyToBytes(key), destinationDb, timeout); + } finally { + close(jedis); + } + } + + /** + * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。 + * 默认使用 0 号数据库。 + * 注意:在 Jedis 对象被关闭时,数据库又会重新被设置为初始值,所以本方法 select(...) + * 正常工作需要使用如下方式之一: + * 1:使用 RedisInterceptor,在本线程内共享同一个 Jedis 对象 + * 2:使用 Redis.call(ICallback) 进行操作 + * 3:自行获取 Jedis 对象进行操作 + */ + @Override + public String select(int databaseIndex) { + Jedis jedis = getJedis(); + try { + return jedis.select(databaseIndex); + } finally { + close(jedis); + } + } + + /** + * 为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。 + * 在 Redis 中,带有生存时间的 key 被称为『易失的』(volatile)。 + */ + @Override + public Long expire(Object key, int seconds) { + Jedis jedis = getJedis(); + try { + return jedis.expire(keyToBytes(key), seconds); + } finally { + close(jedis); + } + } + + /** + * EXPIREAT 的作用和 EXPIRE 类似,都用于为 key 设置生存时间。不同在于 EXPIREAT 命令接受的时间参数是 UNIX 时间戳(unix timestamp)。 + */ + @Override + public Long expireAt(Object key, long unixTime) { + Jedis jedis = getJedis(); + try { + return jedis.expireAt(keyToBytes(key), unixTime); + } finally { + close(jedis); + } + } + + /** + * 这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。 + */ + @Override + public Long pexpire(Object key, long milliseconds) { + Jedis jedis = getJedis(); + try { + return jedis.pexpire(keyToBytes(key), milliseconds); + } finally { + close(jedis); + } + } + + /** + * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。 + */ + @Override + public Long pexpireAt(Object key, long millisecondsTimestamp) { + Jedis jedis = getJedis(); + try { + return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp); + } finally { + close(jedis); + } + } + + /** + * 将给定 key 的值设为 value ,并返回 key 的旧值(old value)。 + * 当 key 存在但不是字符串类型时,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T getSet(Object key, Object value) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.getSet(keyToBytes(key), valueToBytes(value))); + } finally { + close(jedis); + } + } + + /** + * 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 + */ + @Override + public Long persist(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.persist(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 返回 key 所储存的值的类型。 + */ + @Override + public String type(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.type(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 以秒为单位,返回给定 key 的剩余生存时间(TTL, time to live)。 + */ + @Override + public Long ttl(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.ttl(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 这个命令类似于 TTL 命令,但它以毫秒为单位返回 key 的剩余生存时间,而不是像 TTL 命令那样,以秒为单位。 + */ + @Override + public Long pttl(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.pttl(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 对象被引用的数量 + */ + @Override + public Long objectRefcount(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.objectRefcount(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 对象没有被访问的空闲时间 + */ + @Override + public Long objectIdletime(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.objectIdletime(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 将哈希表 key 中的域 field 的值设为 value 。 + * 如果 key 不存在,一个新的哈希表被创建并进行 HSET 操作。 + * 如果域 field 已经存在于哈希表中,旧值将被覆盖。 + */ + @Override + public Long hset(Object key, Object field, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.hset(keyToBytes(key), fieldToBytes(field), valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 同时将多个 field-value (域-值)对设置到哈希表 key 中。 + * 此命令会覆盖哈希表中已存在的域。 + * 如果 key 不存在,一个空哈希表被创建并执行 HMSET 操作。 + */ + @Override + public String hmset(Object key, Map hash) { + Jedis jedis = getJedis(); + try { + Map para = new HashMap<>(); + hash.forEach((k, v) -> para.put(fieldToBytes(k), valueToBytes(v))); + return jedis.hmset(keyToBytes(key), para); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中给定域 field 的值。 + */ + @SuppressWarnings("unchecked") + @Override + public T hget(Object key, Object field) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.hget(keyToBytes(key), fieldToBytes(field))); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中,一个或多个给定域的值。 + * 如果给定的域不存在于哈希表,那么返回一个 nil 值。 + * 因为不存在的 key 被当作一个空哈希表来处理,所以对一个不存在的 key 进行 HMGET 操作将返回一个只带有 nil 值的表。 + */ + @SuppressWarnings("rawtypes") + @Override + public List hmget(Object key, Object... fields) { + Jedis jedis = getJedis(); + try { + List data = jedis.hmget(keyToBytes(key), fieldsToBytesArray(fields)); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 删除哈希表 key 中的一个或多个指定域,不存在的域将被忽略。 + */ + @Override + public Long hdel(Object key, Object... fields) { + Jedis jedis = getJedis(); + try { + return jedis.hdel(keyToBytes(key), fieldsToBytesArray(fields)); + } finally { + close(jedis); + } + } + + /** + * 查看哈希表 key 中,给定域 field 是否存在。 + */ + @Override + public boolean hexists(Object key, Object field) { + Jedis jedis = getJedis(); + try { + return jedis.hexists(keyToBytes(key), fieldToBytes(field)); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中,所有的域和值。 + * 在返回值里,紧跟每个域名(field name)之后是域的值(value),所以返回值的长度是哈希表大小的两倍。 + */ + @SuppressWarnings("rawtypes") + @Override + public Map hgetAll(Object key) { + Jedis jedis = getJedis(); + try { + Map data = jedis.hgetAll(keyToBytes(key)); + Map result = new HashMap<>(); + data.forEach((k, v) -> result.put(fieldFromBytes(k), valueFromBytes(v))); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中所有域的值。 + */ + @SuppressWarnings("rawtypes") + @Override + public List hvals(Object key) { + Jedis jedis = getJedis(); + try { + List data = jedis.hvals(keyToBytes(key)); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中的所有域。 + * 底层实现此方法取名为 hfields 更为合适,在此仅为与底层保持一致 + */ + @Override + public Set hkeys(Object key) { + Jedis jedis = getJedis(); + try { + Set fieldSet = jedis.hkeys(keyToBytes(key)); + Set result = new HashSet<>(); + fieldSetFromBytesSet(fieldSet, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回哈希表 key 中域的数量。 + */ + @Override + public Long hlen(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.hlen(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 为哈希表 key 中的域 field 的值加上增量 increment 。 + * 增量也可以为负数,相当于对给定域进行减法操作。 + * 如果 key 不存在,一个新的哈希表被创建并执行 HINCRBY 命令。 + * 如果域 field 不存在,那么在执行命令前,域的值被初始化为 0 。 + * 对一个储存字符串值的域 field 执行 HINCRBY 命令将造成一个错误。 + * 本操作的值被限制在 64 位(bit)有符号数字表示之内。 + */ + @Override + public Long hincrBy(Object key, Object field, long value) { + Jedis jedis = getJedis(); + try { + return jedis.hincrBy(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedis); + } + } + + /** + * 为哈希表 key 中的域 field 加上浮点数增量 increment 。 + * 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 + * 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 + * 当以下任意一个条件发生时,返回一个错误: + * 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属于字符串类型) + * 2:域 field 当前的值或给定的增量 increment 不能解释(parse)为双精度浮点数(double precision floating point number) + * HINCRBYFLOAT 命令的详细功能和 INCRBYFLOAT 命令类似,请查看 INCRBYFLOAT 命令获取更多相关信息。 + */ + @Override + public Double hincrByFloat(Object key, Object field, double value) { + Jedis jedis = getJedis(); + try { + return jedis.hincrByFloat(keyToBytes(key), fieldToBytes(field), value); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 中,下标为 index 的元素。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 如果 key 不是列表类型,返回一个错误。 + */ + @SuppressWarnings("unchecked") + @Override + public T lindex(Object key, long index) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.lindex(keyToBytes(key), index)); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 的长度。 + * 如果 key 不存在,则 key 被解释为一个空列表,返回 0 . + * 如果 key 不是列表类型,返回一个错误。 + */ + @Override + public Long llen(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.llen(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 移除并返回列表 key 的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T lpop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.lpop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表头 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表头: 比如说, + * 对空列表 mylist 执行命令 LPUSH mylist a b c ,列表的值将是 c b a , + * 这等同于原子性地执行 LPUSH mylist a 、 LPUSH mylist b 和 LPUSH mylist c 三个命令。 + * 如果 key 不存在,一个空列表会被创建并执行 LPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long lpush(Object key, Object... values) { + Jedis jedis = getJedis(); + try { + return jedis.lpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedis); + } + } + + /** + * 将列表 key 下标为 index 的元素的值设置为 value 。 + * 当 index 参数超出范围,或对一个空列表( key 不存在)进行 LSET 时,返回一个错误。 + * 关于列表下标的更多信息,请参考 LINDEX 命令。 + */ + @Override + public String lset(Object key, long index, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.lset(keyToBytes(key), index, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 根据参数 count 的值,移除列表中与参数 value 相等的元素。 + * count 的值可以是以下几种: + * count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。 + * count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。 + * count = 0 : 移除表中所有与 value 相等的值。 + */ + @Override + public Long lrem(Object key, long count, Object value) { + Jedis jedis = getJedis(); + try { + return jedis.lrem(keyToBytes(key), count, valueToBytes(value)); + } finally { + close(jedis); + } + } + + /** + * 返回列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 指定。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + *
+     * 例子:
+     * 获取 list 中所有数据:cache.lrange(listKey, 0, -1);
+     * 获取 list 中下标 1 到 3 的数据: cache.lrange(listKey, 1, 3);
+     * 
+ */ + @SuppressWarnings("rawtypes") + @Override + public List lrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + List data = jedis.lrange(keyToBytes(key), start, end); + if (data != null) { + return valueListFromBytesList(data); + } else { + return new ArrayList(0); + } + } finally { + close(jedis); + } + } + + /** + * 对一个列表进行修剪(trim),就是说,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除。 + * 举个例子,执行命令 LTRIM list 0 2 ,表示只保留列表 list 的前三个元素,其余元素全部删除。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 当 key 不是列表类型时,返回一个错误。 + */ + @Override + public String ltrim(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + return jedis.ltrim(keyToBytes(key), start, end); + } finally { + close(jedis); + } + } + + /** + * 移除并返回列表 key 的尾元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.rpop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 命令 RPOPLPUSH 在一个原子时间内,执行以下两个动作: + * 将列表 source 中的最后一个元素(尾元素)弹出,并返回给客户端。 + * 将 source 弹出的元素插入到列表 destination ,作为 destination 列表的的头元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T rpoplpush(Object srcKey, Object dstKey) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.rpoplpush(keyToBytes(srcKey), keyToBytes(dstKey))); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个值 value 插入到列表 key 的表尾(最右边)。 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表尾:比如 + * 对一个空列表 mylist 执行 RPUSH mylist a b c ,得出的结果列表为 a b c , + * 等同于执行命令 RPUSH mylist a 、 RPUSH mylist b 、 RPUSH mylist c 。 + * 如果 key 不存在,一个空列表会被创建并执行 RPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + @Override + public Long rpush(Object key, Object... values) { + Jedis jedis = getJedis(); + try { + return jedis.rpush(keyToBytes(key), valuesToBytesArray(values)); + } finally { + close(jedis); + } + } + + /** + * 使用客户端向 Redis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG 。 + * 通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值。 + */ + @Override + public String ping() { + Jedis jedis = getJedis(); + try { + return jedis.ping(); + } finally { + close(jedis); + } + } + + /** + * 将一个或多个 member 元素加入到集合 key 当中,已经存在于集合的 member 元素将被忽略。 + * 假如 key 不存在,则创建一个只包含 member 元素作成员的集合。 + * 当 key 不是集合类型时,返回一个错误。 + */ + @Override + public Long sadd(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.sadd(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回集合 key 的基数(集合中元素的数量)。 + */ + @Override + public Long scard(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.scard(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 移除并返回集合中的一个随机元素。 + * 如果只想获取一个随机元素,但不想该元素从集合中被移除的话,可以使用 SRANDMEMBER 命令。 + */ + @SuppressWarnings("unchecked") + @Override + public T spop(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.spop(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 返回集合 key 中的所有成员。 + * 不存在的 key 被视为空集合。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set smembers(Object key) { + Jedis jedis = getJedis(); + try { + Set data = jedis.smembers(keyToBytes(key)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 判断 member 元素是否集合 key 的成员。 + */ + @Override + public boolean sismember(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.sismember(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回多个集合的交集,多个集合由 keys 指定 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sinter(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sinter(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回集合中的一个随机元素。 + */ + @SuppressWarnings("unchecked") + @Override + public T srandmember(Object key) { + Jedis jedis = getJedis(); + try { + return (T) valueFromBytes(jedis.srandmember(keyToBytes(key))); + } finally { + close(jedis); + } + } + + /** + * 返回集合中的 count 个随机元素。 + * 从 Redis 2.6 版本开始, SRANDMEMBER 命令接受可选的 count 参数: + * 如果 count 为正数,且小于集合基数,那么命令返回一个包含 count 个元素的数组,数组中的元素各不相同。 + * 如果 count 大于等于集合基数,那么返回整个集合。 + * 如果 count 为负数,那么命令返回一个数组,数组中的元素可能会重复出现多次,而数组的长度为 count 的绝对值。 + * 该操作和 SPOP 相似,但 SPOP 将随机元素从集合中移除并返回,而 SRANDMEMBER 则仅仅返回随机元素,而不对集合进行任何改动。 + */ + @SuppressWarnings("rawtypes") + @Override + public List srandmember(Object key, int count) { + Jedis jedis = getJedis(); + try { + List data = jedis.srandmember(keyToBytes(key), count); + return valueListFromBytesList(data); + } finally { + close(jedis); + } + } + + /** + * 移除集合 key 中的一个或多个 member 元素,不存在的 member 元素会被忽略。 + */ + @Override + public Long srem(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.srem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回多个集合的并集,多个集合由 keys 指定 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sunion(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sunion(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回一个集合的全部成员,该集合是所有给定集合之间的差集。 + * 不存在的 key 被视为空集。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set sdiff(Object... keys) { + Jedis jedis = getJedis(); + try { + Set data = jedis.sdiff(keysToBytesArray(keys)); + Set result = new HashSet<>(); + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 将一个或多个 member 元素及其 score 值加入到有序集 key 当中。 + * 如果某个 member 已经是有序集的成员,那么更新这个 member 的 score 值, + * 并通过重新插入这个 member 元素,来保证该 member 在正确的位置上。 + */ + @Override + public Long zadd(Object key, double score, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zadd(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedis); + } + } + + @Override + public Long zadd(Object key, Map scoreMembers) { + Jedis jedis = getJedis(); + try { + Map para = new HashMap<>(); + scoreMembers.forEach((k, v) -> para.put(valueToBytes(k), v)); + return jedis.zadd(keyToBytes(key), para); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 的基数。 + */ + @Override + public Long zcard(Object key) { + Jedis jedis = getJedis(); + try { + return jedis.zcard(keyToBytes(key)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 + * 关于参数 min 和 max 的详细使用方法,请参考 ZRANGEBYSCORE 命令。 + */ + @Override + public Long zcount(Object key, double min, double max) { + Jedis jedis = getJedis(); + try { + return jedis.zcount(keyToBytes(key), min, max); + } finally { + close(jedis); + } + } + + /** + * 为有序集 key 的成员 member 的 score 值加上增量 increment 。 + */ + @Override + public Double zincrby(Object key, double score, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zincrby(keyToBytes(key), score, valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递增(从小到大)来排序。 + * 具有相同 score 值的成员按字典序(lexicographical order )来排列。 + * 如果你需要成员按 score 值递减(从大到小)来排列,请使用 ZREVRANGE 命令。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递减(从大到小)来排列。 + * 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列。 + * 除了成员按 score 值递减的次序排列这一点外, ZREVRANGE 命令的其他方面和 ZRANGE 命令一样。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrevrange(Object key, long start, long end) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrevrange(keyToBytes(key), start, end); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。 + * 有序集成员按 score 值递增(从小到大)次序排列。 + */ + @SuppressWarnings("rawtypes") + @Override + public Set zrangeByScore(Object key, double min, double max) { + Jedis jedis = getJedis(); + try { + Set data = jedis.zrangeByScore(keyToBytes(key), min, max); + Set result = new LinkedHashSet<>(); // 有序集合必须 LinkedHashSet + valueSetFromBytesSet(data, result); + return result; + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列。 + * 排名以 0 为底,也就是说, score 值最小的成员排名为 0 。 + * 使用 ZREVRANK 命令可以获得成员按 score 值递减(从大到小)排列的排名。 + */ + @Override + public Long zrank(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)排序。 + * 排名以 0 为底,也就是说, score 值最大的成员排名为 0 。 + * 使用 ZRANK 命令可以获得成员按 score 值递增(从小到大)排列的排名。 + */ + @Override + public Long zrevrank(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zrevrank(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + /** + * 移除有序集 key 中的一个或多个成员,不存在的成员将被忽略。 + * 当 key 存在但不是有序集类型时,返回一个错误。 + */ + @Override + public Long zrem(Object key, Object... members) { + Jedis jedis = getJedis(); + try { + return jedis.zrem(keyToBytes(key), valuesToBytesArray(members)); + } finally { + close(jedis); + } + } + + /** + * 返回有序集 key 中,成员 member 的 score 值。 + * 如果 member 元素不是有序集 key 的成员,或 key 不存在,返回 nil 。 + */ + @Override + public Double zscore(Object key, Object member) { + Jedis jedis = getJedis(); + try { + return jedis.zscore(keyToBytes(key), valueToBytes(member)); + } finally { + close(jedis); + } + } + + @Override + public byte[] keyToBytes(Object key) { + String keyStr = keyNamingPolicy.getKeyName(key); + return serializer.keyToBytes(keyStr); + } + + @Override + public String bytesToKey(byte[] bytes) { + return serializer.keyFromBytes(bytes); + } + + @Override + public byte[][] keysToBytesArray(Object... keys) { + byte[][] result = new byte[keys.length][]; + for (int i = 0; i < result.length; i++) { + result[i] = keyToBytes(keys[i]); + } + return result; + } + + @Override + public byte[] fieldToBytes(Object field) { + return serializer.fieldToBytes(field); + } + + @Override + public Object fieldFromBytes(byte[] bytes) { + return serializer.fieldFromBytes(bytes); + } + + @Override + public byte[][] fieldsToBytesArray(Object... fieldsArray) { + byte[][] data = new byte[fieldsArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = fieldToBytes(fieldsArray[i]); + } + return data; + } + + @Override + public void fieldSetFromBytesSet(Set data, Set result) { + for (byte[] fieldBytes : data) { + result.add(this.valueFromBytes(fieldBytes)); + } + } + + @Override + public byte[] valueToBytes(Object value) { + return serializer.valueToBytes(value); + } + + @Override + public Object valueFromBytes(byte[] bytes) { + return serializer.valueFromBytes(bytes); + } + + @Override + public byte[][] valuesToBytesArray(Object... valuesArray) { + byte[][] data = new byte[valuesArray.length][]; + for (int i = 0; i < data.length; i++) { + data[i] = valueToBytes(valuesArray[i]); + } + return data; + } + + @Override + public void valueSetFromBytesSet(Set data, Set result) { + for (byte[] valueBytes : data) { + result.add(valueFromBytes(valueBytes)); + } + } + + @Override + public List valueListFromBytesList(Collection data) { + List result = new ArrayList<>(); + for (byte[] d : data) { + result.add(valueFromBytes(d)); + } + return result; + } + + @Override + public void destroy() { + jedisSentinelPool.destroy(); + } + + private Jedis getJedis() { + return jedisSentinelPool.getResource(); + } + + private void close(Jedis jedis) { + if (jedis != null) { + jedis.close(); + } + } +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/Redis.java b/src/main/java/com/kakarote/crm9/common/config/redis/Redis.java new file mode 100644 index 0000000..08cfa2b --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/Redis.java @@ -0,0 +1,555 @@ +package com.kakarote.crm9.common.config.redis; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Redis的 + * @author z + */ + +@SuppressWarnings({"unused"}) +public interface Redis { + /** + * + * 存放 key value 到 redis + * 如果 key 已经持有其他值,SET 就覆写旧值,无视类型。 + * 对于某个原本带有生存时间(TTL)的键来说, 当 SET 命令成功在这个键上执行时, 这个键原有的 TTL 将被清除。 + */ + public String set(Object key, Object value); + + /** + * + * @return + * 存放 key value 对到 redis,并将 key 的生存时间设为 seconds (以秒为单位)。 + * 如果 key 已经存在, SETEX 命令将覆写旧值。 + */ + public String setex(Object key, int seconds, Object value); + + /** + * 返回 key 所关联的 value 值 + * 如果 key 不存在那么返回特殊值 nil 。 + */ + @SuppressWarnings("unchecked") + public T get(Object key); + + /** + * 删除给定的一个 key + * 不存在的 key 会被忽略。 + */ + public Long del(Object key); + + /** + * 删除给定的多个 key + * 不存在的 key 会被忽略。 + */ + public Long del(Object... keys); + + /** + * 查找所有符合给定模式 pattern 的 key 。 + * KEYS * 匹配数据库中所有 key 。 + * KEYS h?llo 匹配 hello , hallo 和 hxllo 等。 + * KEYS h*llo 匹配 hllo 和 heeeeello 等。 + * KEYS h[ae]llo 匹配 hello 和 hallo ,但不匹配 hillo 。 + * 特殊符号用 \ 隔开 + */ + public Set keys(String pattern); + + /** + * 同时设置一个或多个 key-value 对。 + * 如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值,如果这不是你所希望的效果,请考虑使用 MSETNX 命令:它只会在所有给定 key 都不存在的情况下进行设置操作。 + * MSET 是一个原子性(atomic)操作,所有给定 key 都会在同一时间内被设置,某些给定 key 被更新而另一些给定 key 没有改变的情况,不可能发生。 + *
+     * 例子:
+     * mset("k1", "v1", "k2", "v2");		// 放入多个 key value 键值对
+     * List list = cache.mget("k1", "k2");		// 利用多个键值得到上面代码放入的值
+     * 
+ */ + public String mset(Object... keysValues); + + /** + * 返回所有(一个或多个)给定 key 的值。 + * 如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。因此,该命令永不失败。 + */ + @SuppressWarnings("rawtypes") + public List mget(Object... keys); + + /** + * 将 key 中储存的数字值减一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + public Long decr(Object key); + + /** + * 将 key 所储存的值减去减量 decrement 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECRBY 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于更多递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 + */ + public Long decrBy(Object key, long value); + + /** + * 将 key 中储存的数字值增一。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCR 操作。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + */ + public Long incr(Object key); + + /** + * 将 key 所储存的值加上增量 increment 。 + * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 INCRBY 命令。 + * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 + * 本操作的值限制在 64 位(bit)有符号数字表示之内。 + * 关于递增(increment) / 递减(decrement)操作的更多信息,参见 INCR 命令。 + */ + public Long incrBy(Object key, long value); + + /** + * 检查给定 key 是否存在。 + */ + public boolean exists(Object key); + + /** + * 从当前数据库中随机返回(不删除)一个 key 。 + */ + public String randomKey(); + + /** + * 将 key 改名为 newkey 。 + * 当 key 和 newkey 相同,或者 key 不存在时,返回一个错误。 + * 当 newkey 已经存在时, RENAME 命令将覆盖旧值。 + */ + public String rename(Object oldkey, Object newkey); + + /** + * 将当前数据库的 key 移动到给定的数据库 db 当中。 + * 如果当前数据库(源数据库)和给定数据库(目标数据库)有相同名字的给定 key ,或者 key 不存在于当前数据库,那么 MOVE 没有任何效果。 + * 因此,也可以利用这一特性,将 MOVE 当作锁(locking)原语(primitive)。 + */ + public Long move(Object key, int dbIndex); + + /** + * 将 key 原子性地从当前实例传送到目标实例的指定数据库上,一旦传送成功, key 保证会出现在目标实例上,而当前实例上的 key 会被删除。 + */ + public String migrate(String host, int port, Object key, int destinationDb, int timeout); + + /** + * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。 + * 默认使用 0 号数据库。 + * 注意:在 Jedis 对象被关闭时,数据库又会重新被设置为初始值,所以本方法 select(...) + * 正常工作需要使用如下方式之一: + * 1:使用 RedisInterceptor,在本线程内共享同一个 Jedis 对象 + * 2:使用 JbootRedis.call(ICallback) 进行操作 + * 3:自行获取 Jedis 对象进行操作 + */ + public String select(int databaseIndex); + + /** + * 为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。 + * 在 JbootRedis 中,带有生存时间的 key 被称为『易失的』(volatile)。 + */ + public Long expire(Object key, int seconds); + + /** + * EXPIREAT 的作用和 EXPIRE 类似,都用于为 key 设置生存时间。不同在于 EXPIREAT 命令接受的时间参数是 UNIX 时间戳(unix timestamp)。 + */ + public Long expireAt(Object key, long unixTime); + + /** + * 这个命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。 + */ + public Long pexpire(Object key, long milliseconds); + + /** + * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。 + */ + public Long pexpireAt(Object key, long millisecondsTimestamp); + + /** + * 将给定 key 的值设为 value ,并返回 key 的旧值(old value)。 + * 当 key 存在但不是字符串类型时,返回一个错误。 + */ + public T getSet(Object key, Object value); + + /** + * 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 + */ + public Long persist(Object key); + + /** + * 返回 key 所储存的值的类型。 + */ + public String type(Object key); + + /** + * 以秒为单位,返回给定 key 的剩余生存时间(TTL, time to live)。 + */ + public Long ttl(Object key); + + /** + * 这个命令类似于 TTL 命令,但它以毫秒为单位返回 key 的剩余生存时间,而不是像 TTL 命令那样,以秒为单位。 + */ + public Long pttl(Object key); + + /** + * 对象被引用的数量 + */ + public Long objectRefcount(Object key); + + /** + * 对象没有被访问的空闲时间 + */ + public Long objectIdletime(Object key); + + /** + * 将哈希表 key 中的域 field 的值设为 value 。 + * 如果 key 不存在,一个新的哈希表被创建并进行 HSET 操作。 + * 如果域 field 已经存在于哈希表中,旧值将被覆盖。 + */ + public Long hset(Object key, Object field, Object value); + + /** + * 同时将多个 field-value (域-值)对设置到哈希表 key 中。 + * 此命令会覆盖哈希表中已存在的域。 + * 如果 key 不存在,一个空哈希表被创建并执行 HMSET 操作。 + */ + public String hmset(Object key, Map hash); + + /** + * 返回哈希表 key 中给定域 field 的值。 + */ + public T hget(Object key, Object field); + + /** + * 返回哈希表 key 中,一个或多个给定域的值。 + * 如果给定的域不存在于哈希表,那么返回一个 nil 值。 + * 因为不存在的 key 被当作一个空哈希表来处理,所以对一个不存在的 key 进行 HMGET 操作将返回一个只带有 nil 值的表。 + */ + public List hmget(Object key, Object... fields); + + /** + * 删除哈希表 key 中的一个或多个指定域,不存在的域将被忽略。 + */ + public Long hdel(Object key, Object... fields); + + /** + * 查看哈希表 key 中,给定域 field 是否存在。 + */ + public boolean hexists(Object key, Object field); + + /** + * 返回哈希表 key 中,所有的域和值。 + * 在返回值里,紧跟每个域名(field name)之后是域的值(value),所以返回值的长度是哈希表大小的两倍。 + */ + public Map hgetAll(Object key); + + /** + * 返回哈希表 key 中所有域的值。 + */ + @SuppressWarnings("rawtypes") + public List hvals(Object key); + + /** + * 返回哈希表 key 中的所有域。 + * 底层实现此方法取名为 hfields 更为合适,在此仅为与底层保持一致 + */ + public Set hkeys(Object key); + + /** + * 返回哈希表 key 中域的数量。 + */ + public Long hlen(Object key); + + /** + * 为哈希表 key 中的域 field 的值加上增量 increment 。 + * 增量也可以为负数,相当于对给定域进行减法操作。 + * 如果 key 不存在,一个新的哈希表被创建并执行 HINCRBY 命令。 + * 如果域 field 不存在,那么在执行命令前,域的值被初始化为 0 。 + * 对一个储存字符串值的域 field 执行 HINCRBY 命令将造成一个错误。 + * 本操作的值被限制在 64 位(bit)有符号数字表示之内。 + */ + public Long hincrBy(Object key, Object field, long value); + + /** + * 为哈希表 key 中的域 field 加上浮点数增量 increment 。 + * 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 + * 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 + * 当以下任意一个条件发生时,返回一个错误: + * 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属于字符串类型) + * 2:域 field 当前的值或给定的增量 increment 不能解释(parse)为双精度浮点数(double precision floating point number) + * HINCRBYFLOAT 命令的详细功能和 INCRBYFLOAT 命令类似,请查看 INCRBYFLOAT 命令获取更多相关信息。 + */ + public Double hincrByFloat(Object key, Object field, double value); + + + /** + * 返回列表 key 中,下标为 index 的元素。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素, + * 以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 如果 key 不是列表类型,返回一个错误。 + */ + public T lindex(Object key, long index); + + + /** + * 返回列表 key 的长度。 + * 如果 key 不存在,则 key 被解释为一个空列表,返回 0 . + * 如果 key 不是列表类型,返回一个错误。 + */ + public Long llen(Object key); + + /** + * 移除并返回列表 key 的头元素。 + */ + @SuppressWarnings("unchecked") + public T lpop(Object key); + + /** + * 将一个或多个值 value 插入到列表 key 的表头 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表头: 比如说, + * 对空列表 mylist 执行命令 LPUSH mylist a b c ,列表的值将是 c b a , + * 这等同于原子性地执行 LPUSH mylist a 、 LPUSH mylist b 和 LPUSH mylist c 三个命令。 + * 如果 key 不存在,一个空列表会被创建并执行 LPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + public Long lpush(Object key, Object... values); + + /** + * 将列表 key 下标为 index 的元素的值设置为 value 。 + * 当 index 参数超出范围,或对一个空列表( key 不存在)进行 LSET 时,返回一个错误。 + * 关于列表下标的更多信息,请参考 LINDEX 命令。 + */ + public String lset(Object key, long index, Object value); + + /** + * 根据参数 count 的值,移除列表中与参数 value 相等的元素。 + * count 的值可以是以下几种: + * count 大于 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。 + * count 小于 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。 + * count 等于 0 : 移除表中所有与 value 相等的值。 + */ + public Long lrem(Object key, long count, Object value); + + /** + * 返回列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 指定。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + *
+     * 例子:
+     * 获取 list 中所有数据:cache.lrange(listKey, 0, -1);
+     * 获取 list 中下标 1 到 3 的数据: cache.lrange(listKey, 1, 3);
+     * 
+ */ + public List lrange(Object key, long start, long end); + + /** + * 对一个列表进行修剪(trim),就是说,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除。 + * 举个例子,执行命令 LTRIM list 0 2 ,表示只保留列表 list 的前三个元素,其余元素全部删除。 + * 下标(index)参数 start 和 stop 都以 0 为底,也就是说,以 0 表示列表的第一个元素,以 1 表示列表的第二个元素,以此类推。 + * 你也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推。 + * 当 key 不是列表类型时,返回一个错误。 + */ + public String ltrim(Object key, long start, long end); + + /** + * 移除并返回列表 key 的尾元素。 + */ + public T rpop(Object key); + + /** + * 命令 RPOPLPUSH 在一个原子时间内,执行以下两个动作: + * 将列表 source 中的最后一个元素(尾元素)弹出,并返回给客户端。 + * 将 source 弹出的元素插入到列表 destination ,作为 destination 列表的的头元素。 + */ + @SuppressWarnings("unchecked") + public T rpoplpush(Object srcKey, Object dstKey); + + /** + * 将一个或多个值 value 插入到列表 key 的表尾(最右边)。 + * 如果有多个 value 值,那么各个 value 值按从左到右的顺序依次插入到表尾:比如 + * 对一个空列表 mylist 执行 RPUSH mylist a b c ,得出的结果列表为 a b c , + * 等同于执行命令 RPUSH mylist a 、 RPUSH mylist b 、 RPUSH mylist c 。 + * 如果 key 不存在,一个空列表会被创建并执行 RPUSH 操作。 + * 当 key 存在但不是列表类型时,返回一个错误。 + */ + public Long rpush(Object key, Object... values); + + /** + * 使用客户端向 JbootRedis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG 。 + * 通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值。 + */ + public String ping(); + + /** + * 将一个或多个 member 元素加入到集合 key 当中,已经存在于集合的 member 元素将被忽略。 + * 假如 key 不存在,则创建一个只包含 member 元素作成员的集合。 + * 当 key 不是集合类型时,返回一个错误。 + */ + public Long sadd(Object key, Object... members); + + /** + * 返回集合 key 的基数(集合中元素的数量)。 + */ + public Long scard(Object key); + + /** + * 移除并返回集合中的一个随机元素。 + * 如果只想获取一个随机元素,但不想该元素从集合中被移除的话,可以使用 SRANDMEMBER 命令。 + */ + public T spop(Object key); + + /** + * 返回集合 key 中的所有成员。 + * 不存在的 key 被视为空集合。 + */ + public Set smembers(Object key); + + /** + * 判断 member 元素是否集合 key 的成员。 + */ + public boolean sismember(Object key, Object member); + + /** + * 返回多个集合的交集,多个集合由 keys 指定 + */ + public Set sinter(Object... keys); + + /** + * 返回集合中的一个随机元素。 + */ + public T srandmember(Object key); + + /** + * 返回集合中的 count 个随机元素。 + * 如果 count 为正数,且小于集合基数,那么命令返回一个包含 count 个元素的数组,数组中的元素各不相同。 + * 如果 count 大于等于集合基数,那么返回整个集合。 + * 如果 count 为负数,那么命令返回一个数组,数组中的元素可能会重复出现多次,而数组的长度为 count 的绝对值。 + * 该操作和 SPOP 相似,但 SPOP 将随机元素从集合中移除并返回,而 SRANDMEMBER 则仅仅返回随机元素,而不对集合进行任何改动。 + */ + public List srandmember(Object key, int count); + + /** + * 移除集合 key 中的一个或多个 member 元素,不存在的 member 元素会被忽略。 + */ + public Long srem(Object key, Object... members); + + /** + * 返回多个集合的并集,多个集合由 keys 指定 + * 不存在的 key 被视为空集。 + */ + public Set sunion(Object... keys); + + /** + * 返回一个集合的全部成员,该集合是所有给定集合之间的差集。 + * 不存在的 key 被视为空集。 + */ + public Set sdiff(Object... keys); + + /** + * 将一个或多个 member 元素及其 score 值加入到有序集 key 当中。 + * 如果某个 member 已经是有序集的成员,那么更新这个 member 的 score 值, + * 并通过重新插入这个 member 元素,来保证该 member 在正确的位置上。 + */ + public Long zadd(Object key, double score, Object member); + + public Long zadd(Object key, Map scoreMembers); + + /** + * 返回有序集 key 的基数。 + */ + public Long zcard(Object key); + + /** + * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 + * 关于参数 min 和 max 的详细使用方法,请参考 ZRANGEBYSCORE 命令。 + */ + public Long zcount(Object key, double min, double max); + + /** + * 为有序集 key 的成员 member 的 score 值加上增量 increment 。 + */ + public Double zincrby(Object key, double score, Object member); + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递增(从小到大)来排序。 + * 具有相同 score 值的成员按字典序(lexicographical order )来排列。 + * 如果你需要成员按 score 值递减(从大到小)来排列,请使用 ZREVRANGE 命令。 + */ + public Set zrange(Object key, long start, long end); + + /** + * 返回有序集 key 中,指定区间内的成员。 + * 其中成员的位置按 score 值递减(从大到小)来排列。 + * 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列。 + * 除了成员按 score 值递减的次序排列这一点外, ZREVRANGE 命令的其他方面和 ZRANGE 命令一样。 + */ + public Set zrevrange(Object key, long start, long end); + + /** + * 返回有序集 key 中,所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。 + * 有序集成员按 score 值递增(从小到大)次序排列。 + */ + public Set zrangeByScore(Object key, double min, double max); + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列。 + * 排名以 0 为底,也就是说, score 值最小的成员排名为 0 。 + * 使用 ZREVRANK 命令可以获得成员按 score 值递减(从大到小)排列的排名。 + */ + public Long zrank(Object key, Object member); + + /** + * 返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)排序。 + * 排名以 0 为底,也就是说, score 值最大的成员排名为 0 。 + * 使用 ZRANK 命令可以获得成员按 score 值递增(从小到大)排列的排名。 + */ + public Long zrevrank(Object key, Object member); + + /** + * 移除有序集 key 中的一个或多个成员,不存在的成员将被忽略。 + * 当 key 存在但不是有序集类型时,返回一个错误。 + */ + public Long zrem(Object key, Object... members); + + /** + * 返回有序集 key 中,成员 member 的 score 值。 + * 如果 member 元素不是有序集 key 的成员,或 key 不存在,返回 nil 。 + */ + public Double zscore(Object key, Object member); + + + public byte[] keyToBytes(Object key); + + public String bytesToKey(byte[] bytes); + + public byte[][] keysToBytesArray(Object... keys); + + public byte[] fieldToBytes(Object field); + + public Object fieldFromBytes(byte[] bytes); + + public byte[][] fieldsToBytesArray(Object... fieldsArray); + + public void fieldSetFromBytesSet(Set data, Set result); + + public byte[] valueToBytes(Object value); + + public Object valueFromBytes(byte[] bytes); + + public byte[][] valuesToBytesArray(Object... valuesArray); + + public void valueSetFromBytesSet(Set data, Set result); + + public List valueListFromBytesList(Collection data); + + public void destroy(); +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/RedisManager.java b/src/main/java/com/kakarote/crm9/common/config/redis/RedisManager.java new file mode 100644 index 0000000..c182583 --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/RedisManager.java @@ -0,0 +1,113 @@ +package com.kakarote.crm9.common.config.redis; + +import cn.hutool.core.util.CharsetUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.json.JSONArray; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.jfinal.kit.PathKit; +import com.jfinal.plugin.redis.IKeyNamingPolicy; +import com.jfinal.plugin.redis.serializer.FstSerializer; +import com.kakarote.crm9.common.constant.BaseConstant; +import redis.clients.jedis.*; + +import java.io.File; +import java.nio.charset.Charset; +import java.util.HashSet; +import java.util.Set; + +/** + * Redis管理 + */ +public class RedisManager { + private static RedisManager redisManager=new RedisManager(); + private Redis redis; + private Integer maxTotal = 1000; + private Integer maxIdle = 200; + private Long maxWaitMillis = 2000L; + private Boolean testOnBorrow = true; + + private RedisManager(){} + + public static RedisManager me(){ + return redisManager; + } + public static Redis getRedis(){ + return RedisManager.me().getRedisConfig(); + } + + public Redis getRedisConfig(){ + if(this.redis!=null){ + return redis; + } + JSONObject readJSONObject= JSONUtil.readJSONObject(new File(PathKit.getRootClassPath()+"/config/redis.json"), Charset.defaultCharset()); + return _init(readJSONObject); + } + + public synchronized Redis _init(JSONObject jsonObject){ + if(this.redis!=null){ + return redis; + } + JedisPoolConfig jedisPoolConfig=new JedisPoolConfig(); + jedisPoolConfig.setTestOnBorrow(testOnBorrow); + jedisPoolConfig.setMaxTotal(maxTotal); + jedisPoolConfig.setMaxIdle(maxIdle); + jedisPoolConfig.setMaxWaitMillis(maxWaitMillis); + JSONArray jsonArray=jsonObject.getJSONArray("host"); + if(jsonArray.size()==0){ + throw new RuntimeException("redis信息配置错误"); + } + String password=jsonObject.getStr("password"); + //1 单机版redis + if(jsonObject.getInt("type").equals(1)){ + String host=jsonArray.getStr(0).split(":")[0]; + Integer port=jsonArray.getStr(0).split(":").length>1?Integer.valueOf(jsonArray.getStr(0).split(":")[1]):6379; + JedisPool jedisPool; + if(StrUtil.isNotEmpty(password)){ + jedisPool=new JedisPool(jedisPoolConfig,host,port,2000,password,jsonObject.getInt("database",0)); + }else { + jedisPool=new JedisPool(jedisPoolConfig,host,port,2000); + } + redis=new JedisImpl(jedisPool,FstSerializer.me, IKeyNamingPolicy.defaultKeyNamingPolicy); + } + // RedisCluster + else if(jsonObject.getInt("type").equals(2)){ + Set hostAndPorts=new HashSet<>(); + jsonArray.forEach(obj->{ + String host=obj.toString().split(":")[0]; + Integer port=obj.toString().split(":").length>1?Integer.valueOf(obj.toString().split(":")[1]):6379; + HostAndPort hostAndPort=new HostAndPort(host,port); + hostAndPorts.add(hostAndPort); + }); + JedisCluster jedisCluster=new JedisCluster(hostAndPorts,2000,2000,2000,password,jedisPoolConfig); + redis=new JedisClusterImpl(jedisCluster,FstSerializer.me, IKeyNamingPolicy.defaultKeyNamingPolicy); + } + // RedisSentinel + else if(jsonObject.getInt("type").equals(3)){ + Set stringHashSet=new HashSet<>(); + jsonArray.forEach(obj->stringHashSet.add(obj.toString())); + JedisSentinelPool jedisSentinelPool; + if(StrUtil.isNotEmpty(password)){ + jedisSentinelPool=new JedisSentinelPool(jsonObject.getStr("cacheName"),stringHashSet,jedisPoolConfig,2000,password,jsonObject.getInt("database",0)); + }else { + jedisSentinelPool=new JedisSentinelPool(jsonObject.getStr("cacheName"),stringHashSet,jedisPoolConfig); + } + redis=new JedisSentinelImpl(jedisSentinelPool,FstSerializer.me, IKeyNamingPolicy.defaultKeyNamingPolicy); + } + + return redis; + } + + private String decrypt(String str){ + RSA rsa=SecureUtil.rsa("PRIVATE_KEY","PUBILC_KEY"); + return rsa.decryptFromBcdToStr(str,KeyType.PrivateKey, CharsetUtil.CHARSET_UTF_8); + } + private String encrypt(String key){ + RSA rsa=SecureUtil.rsa("PRIVATE_KEY","PUBILC_KEY"); + return rsa.encryptHex(key,CharsetUtil.CHARSET_UTF_8,KeyType.PublicKey); + } + +} diff --git a/src/main/java/com/kakarote/crm9/common/config/redis/RedisPlugin.java b/src/main/java/com/kakarote/crm9/common/config/redis/RedisPlugin.java new file mode 100644 index 0000000..50466b5 --- /dev/null +++ b/src/main/java/com/kakarote/crm9/common/config/redis/RedisPlugin.java @@ -0,0 +1,32 @@ +package com.kakarote.crm9.common.config.redis; + +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.jfinal.kit.PathKit; +import com.jfinal.plugin.IPlugin; + +import java.io.File; +import java.nio.charset.Charset; + +/** + * RedisPlugin + */ +public class RedisPlugin implements IPlugin { + + public RedisPlugin(){ + + } + + @Override + public boolean start() { + JSONObject readJSONObject= JSONUtil.readJSONObject(new File(PathKit.getRootClassPath()+"/config/redis.json"), Charset.defaultCharset()); + RedisManager.me()._init(readJSONObject); + return true; + } + + @Override + public boolean stop() { + RedisManager.getRedis().destroy(); + return true; + } +} diff --git a/src/main/java/com/kakarote/crm9/common/constant/BaseConstant.java b/src/main/java/com/kakarote/crm9/common/constant/BaseConstant.java index 155009c..db86886 100644 --- a/src/main/java/com/kakarote/crm9/common/constant/BaseConstant.java +++ b/src/main/java/com/kakarote/crm9/common/constant/BaseConstant.java @@ -12,7 +12,7 @@ public class BaseConstant implements Serializable { public static final String NAME = "72CRM"; - public static final String VERSION = "1.3.0"; + public static final String VERSION = "1.3.2"; private static final long serialVersionUID = 1L; /** @@ -49,15 +49,14 @@ public class BaseConstant implements Serializable { /** * 项目管理员角色ID */ - public static Integer WORK_ADMIN_ROLE_ID; + public static Integer WORK_ADMIN_ROLE_ID ; /** * 每个项目管理员角色ID */ - public static Integer SMALL_WORK_ADMIN_ROLE_ID; + public static Integer SMALL_WORK_ADMIN_ROLE_ID ; /** * 每个项目编辑角色ID */ public static Integer SMALL_WORK_EDIT_ROLE_ID; - } diff --git a/src/main/java/com/kakarote/crm9/common/interceptor/ErpInterceptor.java b/src/main/java/com/kakarote/crm9/common/interceptor/ErpInterceptor.java index e4a8f5e..8d7ba94 100644 --- a/src/main/java/com/kakarote/crm9/common/interceptor/ErpInterceptor.java +++ b/src/main/java/com/kakarote/crm9/common/interceptor/ErpInterceptor.java @@ -1,5 +1,6 @@ package com.kakarote.crm9.common.interceptor; +import cn.hutool.core.convert.BasicType; import cn.hutool.core.util.ArrayUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -7,42 +8,35 @@ import com.jfinal.aop.Invocation; import com.jfinal.core.Controller; import com.jfinal.log.Log; -import com.jfinal.plugin.redis.Redis; +import com.jfinal.plugin.activerecord.Record; import com.kakarote.crm9.common.annotation.HttpEnum; import com.kakarote.crm9.common.annotation.NotNullValidate; +import com.kakarote.crm9.common.annotation.RequestBody; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.utils.BaseUtil; import com.kakarote.crm9.utils.R; +import java.lang.reflect.Parameter; + public class ErpInterceptor implements Interceptor { @Override public void intercept(Invocation invocation) { try { Controller controller = invocation.getController(); BaseUtil.setRequest(controller.getRequest()); - String token = controller.getHeader("Admin-Token") != null ? controller.getHeader("Admin-Token") : controller.getCookie("Admin-Token", ""); - if (!Redis.use().exists(token)) { + String token = BaseUtil.getToken(); + if (!RedisManager.getRedis().exists(token)) { controller.renderJson(R.error(302, "请先登录!")); return; } - NotNullValidate[] validates = invocation.getMethod().getAnnotationsByType(NotNullValidate.class); - if (ArrayUtil.isNotEmpty(validates)) { - if (HttpEnum.PARA.equals(validates[0].type())) { - for (NotNullValidate validate : validates) { - if (controller.getPara(validate.value()) == null) { - controller.renderJson(R.error(500, validate.message())); - return; - } - } - } else if (HttpEnum.JSON.equals(validates[0].type())) { - JSONObject jsonObject = JSON.parseObject(controller.getRawData()); - for (NotNullValidate validate : validates) { - if (!jsonObject.containsKey(validate.value())||jsonObject.get(validate.value())==null) { - controller.renderJson(R.error(500, validate.message())); - return; - } - } - } + //数据非空验证 + if(!this.notNullValidate(invocation)){ + return; } + //数据转换json的处理 + this.modelToJson(invocation); + + RedisManager.getRedis().expire(token, 3600); invocation.invoke(); } catch (Exception e) { invocation.getController().renderJson(R.error("服务器响应异常")); @@ -52,4 +46,54 @@ public void intercept(Invocation invocation) { } } + + /** + * 数据非空校验 + */ + private boolean notNullValidate(Invocation inv) { + NotNullValidate[] validates = inv.getMethod().getAnnotationsByType(NotNullValidate.class); + Controller controller = inv.getController(); + if (ArrayUtil.isNotEmpty(validates)) { + if (HttpEnum.PARA.equals(validates[0].type())) { + for (NotNullValidate validate : validates) { + if (controller.getPara(validate.value()) == null) { + controller.renderJson(R.error(500, validate.message())); + return false; + } + } + } else if (HttpEnum.JSON.equals(validates[0].type())) { + JSONObject jsonObject = JSON.parseObject(controller.getRawData()); + for (NotNullValidate validate : validates) { + if (!jsonObject.containsKey(validate.value()) || jsonObject.get(validate.value()) == null) { + controller.renderJson(R.error(500, validate.message())); + return false; + } + } + } + } + return true; + } + + @SuppressWarnings("unchecked") + private void modelToJson(Invocation inv){ + Parameter[] parameters = inv.getMethod().getParameters(); + JSONObject jsonObject = null; + for (int i = 0; i < parameters.length; i++) { + if (parameters[i].getAnnotation(RequestBody.class) != null) { + if(jsonObject==null){ + jsonObject=JSON.parseObject(inv.getController().getRawData()); + } + //TODO 目前的处理是直接对整个json数据进行初始化 + Class clazz = parameters[i].getType(); + if (clazz.isAssignableFrom(Record.class)) { + inv.setArg(i, new Record().setColumns(jsonObject)); + }else if(BasicType.unWrap(clazz).isPrimitive()||clazz.isAssignableFrom(String.class)){ + String name=parameters[i].getName(); + inv.setArg(i,jsonObject.getObject(name,clazz)); + } else { + inv.setArg(i, jsonObject.toJavaObject(clazz)); + } + } + } + } } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminAchievementController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminAchievementController.java index b550898..7413535 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminAchievementController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminAchievementController.java @@ -1,6 +1,7 @@ package com.kakarote.crm9.erp.admin.controller; import com.alibaba.fastjson.JSON; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.erp.admin.entity.CrmAchievement; import com.kakarote.crm9.erp.admin.service.AdminAchievementService; import com.jfinal.aop.Inject; @@ -22,6 +23,7 @@ public class AdminAchievementController extends Controller { * 设置业绩目标 * @author hmb */ + @Permissions("manage:crm") public void setAchievement(){ String data = getRawData(); List crmAchievements = JSON.parseArray(data, CrmAchievement.class); @@ -33,6 +35,7 @@ public void setAchievement(){ * @param achievement 业绩目标对象 * @author hmb */ + @Permissions("manage:crm") public void queryAchievementList(@Para("")CrmAchievement achievement){ String userId = getPara("userId"); Integer deptId = getParaToInt("deptId"); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminBusinessTypeController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminBusinessTypeController.java index aaee4b2..3fd353e 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminBusinessTypeController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminBusinessTypeController.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.entity.CrmBusinessType; import com.kakarote.crm9.erp.admin.service.AdminBusinessTypeService; @@ -28,6 +29,7 @@ public class AdminBusinessTypeController extends Controller { * @author hmb * 设置商机组 */ + @Permissions("manage:crm") public void setBusinessType() { JSONObject jsonObject = JSON.parseObject(getRawData()); @@ -46,6 +48,8 @@ public void setBusinessType() { * @param basePageRequest 分页对象 * 查询商机组列表 */ + + @Permissions("manage:crm") public void queryBusinessTypeList(BasePageRequest basePageRequest) { renderJson(R.ok().put("data", adminBusinessTypeService.queryBusinessTypeList(basePageRequest))); } @@ -54,6 +58,7 @@ public void queryBusinessTypeList(BasePageRequest basePageRequest) { * @author hmb * 获取详细信息 */ + @Permissions("manage:crm") public void getBusinessType() { String typeId = getPara("id"); renderJson(adminBusinessTypeService.getBusinessType(typeId)); @@ -63,6 +68,7 @@ public void getBusinessType() { * @author hmb * 删除商机状态组 */ + @Permissions("manage:crm") public void deleteById() { String typeId = getPara("id"); renderJson(adminBusinessTypeService.deleteById(typeId)); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminDeptController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminDeptController.java index c1d35d7..9a735b4 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminDeptController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminDeptController.java @@ -1,5 +1,6 @@ package com.kakarote.crm9.erp.admin.controller; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.erp.admin.entity.AdminDept; import com.kakarote.crm9.erp.admin.service.AdminDeptService; import com.kakarote.crm9.utils.BaseUtil; @@ -21,6 +22,7 @@ public class AdminDeptController extends Controller { * 设置部门 * @param adminDept 部门对象 */ + @Permissions("manage:user") public void setDept(@Para("") AdminDept adminDept){ renderJson(adminDeptService.setDept(adminDept)); } @@ -47,6 +49,7 @@ public void queryDeptByAuth(){ * @author hmb * 删除部门 */ + @Permissions("manage:user") public void deleteDept(){ String id = getPara("id"); renderJson(adminDeptService.deleteDept(id)); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminExamineController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminExamineController.java index dec612c..45957a0 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminExamineController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminExamineController.java @@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.entity.AdminExamine; import com.kakarote.crm9.erp.admin.service.AdminExamineService; @@ -19,6 +20,7 @@ public class AdminExamineController extends Controller { /** * 添加审批流程 */ + @Permissions("manage:examineFlow") public void saveExamine(){ JSONObject jsonObject = JSON.parseObject(getRawData()); renderJson(examineService.saveExamine(jsonObject)); @@ -26,6 +28,7 @@ public void saveExamine(){ /** * 查询所有未删除审批流程 */ + @Permissions("manage:examineFlow") public void queryAllExamine(BasePageRequest basePageRequest){ renderJson(examineService.queryAllExamine(basePageRequest)); } @@ -33,6 +36,7 @@ public void queryAllExamine(BasePageRequest basePageRequest){ * 根据id查询审批流程 examineId 审批流程id * @author zxy */ + @Permissions("manage:examineFlow") public void queryExamineById(){ Integer examineId = getInt("examineId"); renderJson(examineService.queryExamineById(examineId)); @@ -42,6 +46,7 @@ public void queryExamineById(){ * examineId 审批流程id * status 审批状态 1启用 0禁用 2 删除 */ + @Permissions("manage:examineFlow") public void updateStatus(@Para("") AdminExamine adminExamine){ renderJson(examineService.updateStatus(adminExamine)); } @@ -49,6 +54,7 @@ public void updateStatus(@Para("") AdminExamine adminExamine){ * 查询当前启用审核流程步骤 * categoryType 1 合同 2 回款 */ + @Permissions("manage:examineFlow") public void queryExaminStep(){ Integer categoryType = getInt("categoryType"); renderJson(examineService.queryExaminStep(categoryType)); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminFieldController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminFieldController.java index f219ef0..425edd0 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminFieldController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminFieldController.java @@ -2,12 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.jfinal.aop.Clear; import com.jfinal.aop.Inject; import com.jfinal.core.Controller; import com.jfinal.core.paragetter.Para; import com.jfinal.plugin.activerecord.Record; import com.kakarote.crm9.common.annotation.NotNullValidate; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.erp.admin.entity.AdminFieldSort; import com.kakarote.crm9.erp.admin.entity.AdminFieldStyle; import com.kakarote.crm9.erp.admin.service.AdminFieldService; @@ -60,6 +60,7 @@ public class AdminFieldController extends Controller { * @author zhangzhiwei * 保存自定义字段E */ + @Permissions("manage:crm") public void save() { String str=getRawData(); JSONObject jsonObject= JSON.parseObject(str); @@ -159,17 +160,17 @@ public void information(@Para("types")Integer types,@Para("id")Integer id){ * @author zhangzhiwei * 设置字段样式 */ - public void setFelidStyle(@Para("") AdminFieldStyle adminFleldStyle){ + public void setFelidStyle(){ renderJson(adminFieldService.setFelidStyle(getKv())); } /** * @author zhangzhiwei * 验证字段数据 */ - @Clear @NotNullValidate(value = "val",message = "字段校验参数错误") @NotNullValidate(value = "types",message = "字段校验参数错误") - @NotNullValidate(value = "name",message = "字段校验参数错误") + @NotNullValidate(value = "fieldName",message = "字段校验参数错误") + @NotNullValidate(value = "fieldType",message = "字段校验参数错误") public void verify(){ renderJson(adminFieldService.verify(getKv())); } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminLoginController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminLoginController.java index 7f7ae6c..b24dba6 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminLoginController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminLoginController.java @@ -7,7 +7,8 @@ import com.jfinal.core.paragetter.Para; import com.jfinal.kit.Prop; import com.jfinal.kit.PropKit; -import com.jfinal.plugin.redis.Cache; +import com.kakarote.crm9.common.config.redis.Redis; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.admin.entity.AdminUser; import com.kakarote.crm9.erp.admin.service.AdminRoleService; @@ -18,7 +19,6 @@ import com.jfinal.core.Controller; import com.jfinal.log.Log; import com.jfinal.plugin.activerecord.Db; -import com.jfinal.plugin.redis.Redis; import java.sql.Connection; import java.sql.SQLException; @@ -35,10 +35,11 @@ @Clear public class AdminLoginController extends Controller{ + @Inject private AdminRoleService adminRoleService; - public static Prop prop = PropKit.use("config/crm9-config.txt"); + public final static Prop prop = PropKit.use("config/crm9-config.txt"); public void index(){ redirect("/index.html"); @@ -52,7 +53,7 @@ public void index(){ */ public void login(@Para("username") String username, @Para("password") String password){ String key = BaseConstant.USER_LOGIN_ERROR_KEY + username; - Cache redis = Redis.use(); + Redis redis= RedisManager.getRedis(); long beforeTime = System.currentTimeMillis() - 60 * 5 * 1000; if(redis.exists(key)){ if(redis.zcount(key, beforeTime, System.currentTimeMillis()) >= 5){ @@ -87,9 +88,9 @@ public void login(@Para("username") String username, @Para("password") String pa user.setLastLoginTime(new Date()); user.update(); user.setRoles(adminRoleService.queryRoleIdsByUserId(user.getUserId())); - Redis.use().setex(token, 360000, user); + redis.setex(token, 3600, user); user.remove("password", "salt"); - setCookie("Admin-Token", token, 360000); + //setCookie("Admin-Token", token, 3600*24,true); renderJson(R.ok().put("Admin-Token", token).put("user", user).put("auth", adminRoleService.auth(user.getUserId()))); }else{ Log.getLog(getClass()).warn("用户登录失败"); @@ -105,7 +106,7 @@ public void login(@Para("username") String username, @Para("password") String pa public void logout(){ String token = BaseUtil.getToken(getRequest()); if(! StrUtil.isEmpty(token)){ - Redis.use().del(token); + RedisManager.getRedis().del(token); removeCookie("Admin-Token"); } renderJson(R.ok()); @@ -115,6 +116,7 @@ public void version(){ renderJson(R.ok().put("name", BaseConstant.NAME).put("version", BaseConstant.VERSION)); } + public void ping(){ List arrays = new ArrayList<>(); Connection connection = null; @@ -130,13 +132,13 @@ public void ping(){ try{ connection.close(); }catch(SQLException e){ - e.printStackTrace(); + Log.getLog(getClass()).error("",e); } } } try{ - String ping = Redis.use().ping(); + String ping = RedisManager.getRedis().ping(); if("PONG".equals(ping)){ arrays.add("Redis配置成功"); }else{ @@ -147,34 +149,4 @@ public void ping(){ } renderJson(R.ok().put("data", arrays)); } - - /** - * @author wyq - * 接入钉钉 - */ - public void dingLogin(String code){ - String appkey = prop.get("appkey"); - String appSecert = prop.get("appSecret"); - String tokenJson = HttpUtil.get("https://oapi.dingtalk.com/gettoken?appkey=" + appkey + "&appsecret=" + appSecert); - String accessToken = JSONObject.parseObject(tokenJson).getString("access_token"); - String userJson = HttpUtil.get("https://oapi.dingtalk.com/user/getuserinfo?access_token=" + accessToken + "&code=" + code); - String userId = JSONObject.parseObject(userJson).getString("userid"); - String userInfo = HttpUtil.get("https://oapi.dingtalk.com/user/get?access_token=" + accessToken + "&userid=" + userId); - String mobile = JSONObject.parseObject(userInfo).getString("mobile"); - Integer isUser = Db.queryInt("select count(*) from 72crm_admin_user where mobile = ?", mobile); - if(isUser > 0){ - AdminUser user = AdminUser.dao.findFirst(Db.getSql("admin.user.queryByUserName"), mobile.trim()); - String token = IdUtil.simpleUUID(); - user.setLastLoginIp(BaseUtil.getLoginAddress(getRequest())); - user.setLastLoginTime(new Date()); - user.update(); - user.setRoles(adminRoleService.queryRoleIdsByUserId(user.getUserId())); - Redis.use().setex(token, 360000, user); - user.remove("password", "salt"); - setCookie("Admin-Token", token, 360000); - renderJson(R.ok().put("Admin-Token", token).put("user", user).put("auth", adminRoleService.auth(user.getUserId()))); - }else{ - renderJson(R.error("账户不存在")); - } - } } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminMenuController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminMenuController.java index f6d1011..7b5c15f 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminMenuController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminMenuController.java @@ -1,6 +1,7 @@ package com.kakarote.crm9.erp.admin.controller; import com.jfinal.plugin.activerecord.Db; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.admin.entity.AdminMenu; import com.kakarote.crm9.erp.admin.service.AdminMenuService; @@ -18,6 +19,7 @@ public class AdminMenuController extends Controller { * @param roleId 角色id * 根据角色id查询菜单id */ + @Permissions("manage:permission") public void getRoleMenu(@Para("roleId") Integer roleId){ renderJson(R.ok().put("data",adminMenuService.getMenuIdByRoleId(roleId))); } @@ -26,6 +28,7 @@ public void getRoleMenu(@Para("roleId") Integer roleId){ * @author wyq * 展示全部菜单 */ + @Permissions("manage:permission") public void getAllMenuList(){ renderJson(R.ok().put("data",adminMenuService.getAllMenuList(0,20))); } @@ -34,6 +37,7 @@ public void getAllMenuList(){ * @author hmb * 展示全部菜单 */ + @Permissions("manage:permission") public void getWorkMenuList(){ Integer workMenuId = Db.queryInt("select menu_id from `72crm_admin_menu` where parent_id = 0 and realm = 'work'"); AdminMenu root = new AdminMenu().findById(workMenuId); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminRoleController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminRoleController.java index e3c14cc..2310a51 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminRoleController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminRoleController.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.kakarote.crm9.common.annotation.NotNullValidate; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.erp.admin.entity.AdminRole; import com.kakarote.crm9.erp.admin.entity.AdminUserRole; import com.kakarote.crm9.erp.admin.service.AdminRoleService; @@ -23,6 +24,7 @@ public class AdminRoleController extends Controller { * @author wyq * 获取全部角色列表 */ + @Permissions("manage:permission") public void getAllRoleList(){ renderJson(R.ok().put("data",adminRoleService.getAllRoleList())); } @@ -32,6 +34,7 @@ public void getAllRoleList(){ * @param roleType 角色类型 * 根据角色类型查询关联员工 */ + @Permissions("manage:permission") public void getRoleUser(@Para("roleType")Integer roleType){ renderJson(R.ok().put("data",adminRoleService.getRoleUser(roleType))); } @@ -40,6 +43,7 @@ public void getRoleUser(@Para("roleType")Integer roleType){ * @author wyq * 新建 */ + @Permissions("manage:permission") @Before(Tx.class) public void add(@Para("")AdminRole adminRole){ renderJson(adminRoleService.save(adminRole)); @@ -49,6 +53,7 @@ public void add(@Para("")AdminRole adminRole){ * @author wyq * 编辑角色 */ + @Permissions("manage:permission") @NotNullValidate(value = "roleId",message = "角色id不能为空") @NotNullValidate(value = "roleName",message = "角色名称不能为空") public void update(@Para("")AdminRole adminRole){ @@ -64,6 +69,7 @@ public void update(@Para("")AdminRole adminRole){ * 修改角色菜单 * @author zhangzhiwei */ + @Permissions("manage:permission") public void updateRoleMenu(){ adminRoleService.updateRoleMenu(JSON.parseObject(getRawData())); renderJson(R.ok()); @@ -81,6 +87,7 @@ public void auth(){ * @param roleId 角色id * 复制 */ + @Permissions("manage:permission") public void copy(@Para("roleId")Integer roleId){ adminRoleService.copy(roleId); renderJson(R.ok()); @@ -91,6 +98,7 @@ public void copy(@Para("roleId")Integer roleId){ * @param roleId 角色id * 删除 */ + @Permissions("manage:permission") public void delete(@Para("roleId")Integer roleId){ renderJson(adminRoleService.delete(roleId) ? R.ok() : R.error()); } @@ -100,6 +108,7 @@ public void delete(@Para("roleId")Integer roleId){ * @param roleId 角色项目管理角色id * 删除 */ + @Permissions("manage:permission") public void deleteWorkRole(@Para("roleId")Integer roleId){ renderJson(adminRoleService.deleteWorkRole(roleId) ? R.ok() : R.error()); } @@ -108,6 +117,7 @@ public void deleteWorkRole(@Para("roleId")Integer roleId){ * @author wyq * 关联员工 */ + @Permissions("manage:permission") public void relatedUser(@Para("")AdminUserRole adminUserRole){ renderJson(adminRoleService.relatedUser(adminUserRole)); } @@ -116,6 +126,7 @@ public void relatedUser(@Para("")AdminUserRole adminUserRole){ * @author wyq * 解除角色关联员工 */ + @Permissions("manage:permission") public void unbindingUser(@Para("") AdminUserRole adminUserRole){ renderJson(adminRoleService.unbindingUser(adminUserRole)); } @@ -124,6 +135,7 @@ public void unbindingUser(@Para("") AdminUserRole adminUserRole){ * 项目管理角色列表 * @author wyq */ + @Permissions("manage:permission") public void queryProjectRoleList(){ renderJson(adminRoleService.queryProjectRoleList()); } @@ -133,6 +145,7 @@ public void queryProjectRoleList(){ * 设置项目管理角色 * @author wyq */ + @Permissions("manage:permission") public void setWorkRole(){ JSONObject jsonObject = JSON.parseObject(getRawData()); renderJson(adminRoleService.setWorkRole(jsonObject)); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminSysConfigController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminSysConfigController.java index dbf64f9..da10ae4 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminSysConfigController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminSysConfigController.java @@ -3,13 +3,13 @@ import com.alibaba.fastjson.JSON; import com.jfinal.aop.Clear; import com.jfinal.aop.Inject; +import com.kakarote.crm9.common.annotation.Permissions; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.erp.admin.service.AdminFileService; import com.kakarote.crm9.utils.BaseUtil; import com.kakarote.crm9.utils.R; import com.jfinal.core.Controller; import com.jfinal.kit.Kv; -import com.jfinal.plugin.redis.Cache; -import com.jfinal.plugin.redis.Redis; import com.jfinal.upload.UploadFile; import java.util.Map; @@ -29,6 +29,7 @@ public class AdminSysConfigController extends Controller { * 设置系统配置 * @author hmb */ + @Permissions("manage:system") public void setSysConfig(){ String prefix=BaseUtil.getDate(); UploadFile file = getFile("file", prefix); @@ -37,9 +38,7 @@ public void setSysConfig(){ R r=adminFileService.upload(file,null,"file","/"+prefix); kv.set("logo",r.get("url")); } - - Cache cache = Redis.use(); - cache.set(SYS_CONFIG_KEY, JSON.toJSONString(kv)); + RedisManager.getRedis().set(SYS_CONFIG_KEY, JSON.toJSONString(kv)); renderJson(R.ok()); } @@ -49,12 +48,11 @@ public void setSysConfig(){ */ @Clear public void querySysConfig(){ - Cache cache = Redis.use(); - if (cache.get(SYS_CONFIG_KEY) == null){ + if (RedisManager.getRedis().get(SYS_CONFIG_KEY) == null){ renderJson(R.ok().put("data",Kv.by("logo","").set("name",""))); return; } - String data = cache.get(SYS_CONFIG_KEY); + String data = RedisManager.getRedis().get(SYS_CONFIG_KEY); Map map = JSON.parseObject(data, Map.class); renderJson(R.ok().put("data",map)); } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminUserController.java b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminUserController.java index 0e32811..725c9d3 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminUserController.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/controller/AdminUserController.java @@ -1,7 +1,9 @@ package com.kakarote.crm9.erp.admin.controller; import com.kakarote.crm9.common.annotation.NotNullValidate; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.erp.admin.entity.AdminUser; import com.kakarote.crm9.erp.admin.service.AdminFileService; import com.kakarote.crm9.erp.admin.service.AdminUserService; @@ -10,7 +12,6 @@ import com.jfinal.aop.Inject; import com.jfinal.core.Controller; import com.jfinal.core.paragetter.Para; -import com.jfinal.plugin.redis.Redis; import com.jfinal.upload.UploadFile; /** @@ -29,6 +30,7 @@ public class AdminUserController extends Controller { * 设置系统用户 * @param adminUser */ + @Permissions("manage:user") public void setUser(@Para("") AdminUser adminUser){ renderJson(adminUserService.setUser(adminUser,getPara("roleIds"))); } @@ -37,6 +39,7 @@ public void setUser(@Para("") AdminUser adminUser){ * @author hmb * 更新状态 */ + @Permissions("manage:user") public void setUserStatus(){ String ids = getPara("userIds"); String status = getPara("status"); @@ -57,6 +60,7 @@ public void queryUserList(BasePageRequest basePageRequest){ * @author hmb * 重置密码 */ + @Permissions("manage:user") public void resetPassword(){ String ids = getPara("userIds"); String pwd = getPara("password"); @@ -67,6 +71,7 @@ public void resetPassword(){ * @author hmb * 查询上级列表 */ + @Permissions("manage:user") public void querySuperior(){ String realName = getPara("realName"); renderJson(adminUserService.querySuperior(realName)); @@ -76,6 +81,7 @@ public void querySuperior(){ * 查询所用用户列表 * @author hmb */ + @Permissions("manage:user") public void queryAllUserList(){ renderJson(adminUserService.queryAllUserList()); } @@ -115,7 +121,6 @@ public void updateImg(){ } renderJson(R.error("修改头像失败")); } - public void updatePassword(){ String oldPass=getPara("oldPwd"); String newPass=getPara("newPwd"); @@ -127,7 +132,7 @@ public void updatePassword(){ adminUser.setPassword(newPass); boolean b=adminUserService.updateUser(adminUser); if(b){ - Redis.use().del(BaseUtil.getToken()); + RedisManager.getRedis().del(BaseUtil.getToken()); removeCookie("Admin-Token"); } renderJson(R.isSuccess(b)); @@ -147,6 +152,7 @@ public void updateUser(@Para("")AdminUser adminUser){ * @param username 用户新账号 * @param password 用户新密码 */ + @Permissions("manage:user") @NotNullValidate(value = "username",message = "账号不能为空") @NotNullValidate(value = "password",message = "密码不能为空") @NotNullValidate("id") @@ -154,7 +160,6 @@ public void usernameEdit(@Para("id")Integer id,@Para("username")String username, renderJson(adminUserService.usernameEdit(id,username,password)); } - public void queryUserByDeptId(@Para("deptId")Integer deptId){ renderJson(R.ok().put("data",adminUserService.queryUserByDeptId(deptId)));; } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/entity/base/BaseAdminField.java b/src/main/java/com/kakarote/crm9/erp/admin/entity/base/BaseAdminField.java index 18078f52..fcd8cec 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/entity/base/BaseAdminField.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/entity/base/BaseAdminField.java @@ -143,4 +143,12 @@ public void setFieldType(java.lang.Integer fieldType) { public java.lang.Integer getFieldType() { return getInt("field_type"); } + + public void setRelevant(java.lang.Integer relevant) { + set("relevant", relevant); + } + + public java.lang.Integer getRelevant() { + return getInt("relevant"); + } } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminExamineRecordService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminExamineRecordService.java index 191b56c..1366e72 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminExamineRecordService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminExamineRecordService.java @@ -20,10 +20,7 @@ import com.jfinal.plugin.activerecord.tx.Tx; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class AdminExamineRecordService { /** @@ -92,7 +89,7 @@ public Map saveExamineRecord(Integer type, Long userId, Integer //如果是负责人主管审批 获取主管的主管ID Record r = Db.findFirst(Db.getSql("admin.examineLog.queryUserByUserId"), Db.findFirst(Db.getSql("admin.examineLog.queryUserByUserId"), ownerUserId).getLong("user_id")); if (r == null || r.getLong("user_id") == null){ - examineLog.setExamineUser(Long.valueOf(BaseConstant.SUPER_ADMIN_USER_ID)); + examineLog.setExamineUser(BaseConstant.SUPER_ADMIN_USER_ID); }else { examineLog.setExamineUser(r.getLong("user_id"));} examineLog.setRecordId(examineRecord.getRecordId()); @@ -190,10 +187,11 @@ public R auditExamine(Integer recordId, Integer status, String remarks, Integer //判断审核撤回 AdminExamineLog examineLog = new AdminExamineLog(); examineLog.setLogId(null); - examineLog.setExamineUser(Long.valueOf(auditUserId)); + examineLog.setExamineUser(auditUserId); examineLog.setCreateTime(DateUtil.date()); examineLog.setCreateUser(auditUserId); examineLog.setExamineStatus(status); + examineLog.setExamineTime(new Date()); examineLog.setIsRecheck(0); if (examine.getExamineType() == 1) { examineRecord.setExamineStepId(oneExamineStep.getStepId()); @@ -354,6 +352,7 @@ public R auditExamine(Integer recordId, Integer status, String remarks, Integer //授权审批 if (nextUserId != null) { //有下一审批人 + examineRecord.setExamineStatus(3); AdminExamineLog examineLog = new AdminExamineLog(); examineLog.setCreateTime(DateUtil.date()); examineLog.setCreateUser(BaseUtil.getUser().getUserId()); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFieldService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFieldService.java index d13d887..02be7cb 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFieldService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFieldService.java @@ -14,10 +14,7 @@ import com.jfinal.plugin.activerecord.tx.Tx; import com.kakarote.crm9.common.config.cache.CaffeineCache; import com.kakarote.crm9.erp.admin.entity.*; -import com.kakarote.crm9.utils.BaseUtil; -import com.kakarote.crm9.utils.FieldUtil; -import com.kakarote.crm9.utils.ParamsUtil; -import com.kakarote.crm9.utils.R; +import com.kakarote.crm9.utils.*; import java.lang.reflect.Type; import java.math.BigDecimal; @@ -26,8 +23,6 @@ public class AdminFieldService { - @Inject - private ParamsUtil paramsUtil; /** * @author wyq @@ -63,12 +58,22 @@ public List queryAddField(Integer label){ public List queryUpdateField(Integer label,Record record){ List recordList = Db.find(Db.getSql("admin.field.queryAddField"),label); recordList.forEach(r ->{ - r.set("value",record.get(r.getStr("field_name"))!=null ? record.get(r.getStr("field_name")):""); + if (r.getInt("type") == 10 || r.getInt("type") == 12){ + r.set("value",Db.queryStr("select value from 72crm_admin_fieldv where field_id = ? and batch_id = ?",r.getInt("field_id"),record.getStr("batch_id"))); + }else { + r.set("value",record.get(r.getStr("field_name"))!=null ? record.get(r.getStr("field_name")):""); + } }); recordList.forEach(field ->{ if (field.getInt("type") == 8){ field.set("value",Db.find("select * from 72crm_admin_file where batch_id = ?",StrUtil.isNotEmpty(field.getStr("value"))?field.getStr("value"):"")); } + if (field.getInt("type") == 10){ + field.set("value",Db.find("select user_id,realname from 72crm_admin_user where find_in_set(user_id,ifnull(?,0))",field.getStr("value"))); + } + if (field.getInt("type") == 12){ + field.set("value",Db.find("select dept_id,name from 72crm_admin_dept where find_in_set(dept_id,ifnull(?,0))",field.getStr("value"))); + } }); recordToFormType(recordList); return recordList; @@ -106,6 +111,8 @@ public R save(JSONObject jsonObject) { List nameList = fieldSorts.stream().map(AdminField::getName).collect(Collectors.toList()); if (arr.size() > 0) { SqlPara sql = Db.getSqlPara("admin.field.deleteByChooseId", Kv.by("ids", arr).set("label", label).set("categoryId", categoryId)); + SqlPara sqlPara = Db.getSqlPara("admin.field.deleteByFieldValue", Kv.by("ids", arr).set("label", label).set("categoryId", categoryId)); + Db.delete(sqlPara.getSql(),sqlPara.getPara()); Db.delete(sql.getSql(), sql.getPara()); } List fieldList = new ArrayList<>(); @@ -191,7 +198,7 @@ public R verify(Kv kv) { default: return R.error("type不符合要求"); } - if (!paramsUtil.isValid(kv.getStr("fieldName"))){ + if (!ParamsUtil.isValid(kv.getStr("fieldName"))){ return R.error("参数包含非法字段"); } number = Db.queryInt("select count(*) from 72crm_crm_"+tableName+" where "+kv.getStr("fieldName")+" = ? and "+primaryKey+" != ?",kv.getStr("val"),kv.getStr("id")!=null?Integer.valueOf(kv.getStr("id")):0); @@ -264,8 +271,8 @@ public synchronized void createView(Integer label) { sql.append(String.format("max(if(a.name = '%s',value, null)) AS `%s`,", name, name)); } }); - String create = ""; - String filedCreate = ""; + String create; + String filedCreate; switch (label) { case 1: filedCreate = String.format(Db.getSql("admin.field.fieldleadsview"), sql, userJoin.append(deptJoin), label); @@ -296,6 +303,8 @@ public synchronized void createView(Integer label) { create = Db.getSql("admin.field.receivablesview"); break; default: + create=""; + filedCreate=""; break; } if (StrUtil.isNotBlank(filedCreate)) { @@ -474,14 +483,12 @@ public R setFelidStyle(Kv kv) { } AdminFieldStyle adminFleldStyle = AdminFieldStyle.dao.findFirst(AdminFieldStyle.dao.getSql("admin.field.queryFieldStyle"), type, kv.getStr("field"), BaseUtil.getUser().getUserId()); if (adminFleldStyle != null) { - // TODO 列表宽度舍弃小数点 adminFleldStyle.setStyle(new BigDecimal(kv.getStr("width")).intValue()); adminFleldStyle.update(); } else { adminFleldStyle = new AdminFieldStyle(); adminFleldStyle.setType(type); adminFleldStyle.setCreateTime(new Date()); - // TODO 列表宽度舍弃小数点 adminFleldStyle.setStyle(new BigDecimal(kv.getStr("width")).intValue()); adminFleldStyle.setFieldName(kv.getStr("field")); adminFleldStyle.setUserId(BaseUtil.getUser().getUserId()); @@ -595,4 +602,43 @@ public R fieldConfig(AdminFieldSort adminFieldSort) { CaffeineCache.ME.remove("field", "listHead:" + adminFieldSort.getLabel() + userId); return R.ok(); } + + + /** + * 自定义字段人员和部门转换 + * @author hmb + * @param recordList 自定义字段列表 + * @param isDetail 1 value返回name字符串 2 value返回id数组字符串 + */ + public void transferFieldList(List recordList, Integer isDetail){ + recordList.forEach(record -> { + Integer dataType = record.getInt("type"); + if(isDetail == 2){ + if(10 == dataType){ + if(StrUtil.isNotEmpty(record.getStr("value"))){ + record.set("value",TagUtil.toSet(record.getStr("value"))); + } + }else if (12 == dataType) { + if(StrUtil.isNotEmpty(record.getStr("value"))){ + record.set("value", TagUtil.toSet(record.getStr("value"))); + } + } + }else { + if(10 == dataType){ + if(StrUtil.isNotEmpty(record.getStr("value"))){ + record.set("value",Db.queryStr("select group_concat(realname) from `72crm_admin_user` where user_id in ("+record.getStr("value")+")")); + } + }else if (12 == dataType) { + if(StrUtil.isNotEmpty(record.getStr("value"))){ + record.set("value",Db.queryStr("select group_concat(name) from `72crm_admin_dept` where dept_id in ("+record.getStr("value")+")")); + } + } + } + if(dataType == 8){ + if(StrUtil.isNotEmpty(record.getStr("value"))){ + record.set("value",Db.find("select * from `72crm_admin_file` where batch_id = ?",record.getStr("value"))); + } + } + }); + } } diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFileService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFileService.java index 71a1aed..5a24170 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFileService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminFileService.java @@ -20,7 +20,7 @@ import java.util.stream.Collectors; public class AdminFileService { - public static Prop prop = PropKit.use("config/crm9-config.txt"); + public final static Prop prop = PropKit.use("config/crm9-config.txt"); /** * @param file 文件 * @param batchId 批次ID diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminRoleService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminRoleService.java index f8c763d..3cc5d88 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminRoleService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminRoleService.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.jfinal.log.Log; import com.kakarote.crm9.common.config.cache.CaffeineCache; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.admin.entity.AdminMenu; @@ -23,6 +24,7 @@ import java.util.List; public class AdminRoleService { + @Inject private AdminMenuService adminMenuService; @@ -80,7 +82,7 @@ public Integer update(AdminRole adminRole) { try { menuList = JSON.parseArray(URLDecoder.decode(adminRole.getMenuIds(), "utf-8"), Integer.class); } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + Log.getLog(getClass()).error("",e); throw new RuntimeException("数据错误"); } adminMenuService.saveRoleMenu(adminRole.getRoleId(), adminRole.getDataType(), menuList); diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminSceneService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminSceneService.java index 645d369..ac5a586 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminSceneService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminSceneService.java @@ -35,9 +35,6 @@ public class AdminSceneService { @Inject private CrmBusinessService crmBusinessService; - - @Inject - private ParamsUtil paramsUtil; /** * @author wyq * 查询场景字段 @@ -65,13 +62,12 @@ public R queryField(Integer label) { .add("website", "网址", "text", settingArr) .add("next_time", "下次联系时间", "datetime", settingArr) .add("remark", "备注", "text", settingArr) -// .add("detail_address", "详细地址", "text", settingArr) - .add("map_address","地区","map_address",settingArr) .add("deal_status", "成交状态", "select", dealStatusArr) .add("owner_user_id", "负责人", "user", settingArr) .add("create_user_id", "创建人", "user", settingArr) .add("update_time", "更新时间", "datetime", settingArr) - .add("create_time", "创建时间", "datetime", settingArr); + .add("create_time", "创建时间", "datetime", settingArr) + .add("address", "地区定位", "map_address", settingArr); } else if (3 == label) { fieldUtil.add("name", "姓名", "text", settingArr) .add("customer_name", "客户名称", "customer", settingArr) @@ -88,7 +84,7 @@ public R queryField(Integer label) { .add("create_time", "创建时间", "datetime", settingArr); } else if (4 == label) { fieldUtil.add("name", "产品名称", "text", settingArr) - .add("category_id", "产品分类", "category", settingArr) + .add("category_id", "产品类别", "category", settingArr) .add("num", "产品编码", "number", settingArr) .add("price", "价格", "floatnumber", settingArr) .add("description", "产品描述", "text", settingArr) @@ -124,7 +120,7 @@ public R queryField(Integer label) { .add("money", "合同金额", "floatnumber", settingArr) .add("start_time", "合同开始时间", "datetime", settingArr) .add("end_time", "合同结束时间", "datetime", settingArr) - .add("contacts_id", "客户签约人", "contacts", settingArr) + .add("contacts_name", "客户签约人", "contacts", settingArr) .add("company_user_id", "公司签约人", "user", settingArr) .add("remark", "备注", "number", settingArr) .add("product", "产品", "product", settingArr) @@ -170,9 +166,6 @@ public R queryField(Integer label) { */ @Before(Tx.class) public R addScene(AdminScene adminScene) { - if (!paramsUtil.isValid(adminScene.getData())){ - return R.error("参数包含非法字段"); - } Long userId = BaseUtil.getUser().getUserId(); adminScene.setIsHide(0).setSort(99999).setIsSystem(0).setCreateTime(DateUtil.date()).setUserId(userId); adminScene.save(); @@ -195,7 +188,7 @@ public R updateScene(AdminScene adminScene) { Db.update("update 72crm_admin_scene_default set scene_id = ? where user_id = ? and type = ?", adminScene.getSceneId(), userId, oldAdminScene.getType()); } adminScene.setUserId(userId).setType(oldAdminScene.getType()).setSort(oldAdminScene.getSort()).setIsSystem(oldAdminScene.getIsSystem()).setUpdateTime(DateUtil.date()); - return adminScene.update() ? R.ok() : R.error(); + return R.isSuccess(adminScene.update()); } /** @@ -291,7 +284,7 @@ public R queryScene(Integer type) { * 递归查询下属id */ public String getSubUserId(Integer userId,Integer deepness) { - StringBuffer ids = new StringBuffer(); + StringBuilder ids = new StringBuilder(); if (deepness > 0){ List list = Db.query("select user_id from 72crm_admin_user where parent_id = ?", userId); if (list != null && list.size() > 0) { @@ -356,7 +349,7 @@ public R filterConditionAndGetPageList(BasePageRequest basePageRequest){ data = JSON.parseObject(AdminScene.dao.findById(sceneId).getData()); } if (sceneId == null && jsonObject.getInteger("type") == 1){ - data = new JSONObject().fluentPut("is_transform",new JSONObject().fluentPut("name","is_transform").fluentPut("condition","is").fluentPut("value","下架")); + data = new JSONObject().fluentPut("is_transform",new JSONObject().fluentPut("name","is_transform").fluentPut("condition","is").fluentPut("value","0")); } if (sceneId == null && jsonObject.getInteger("type") == 4){ data = new JSONObject().fluentPut("是否上下架",new JSONObject().fluentPut("name","是否上下架").fluentPut("condition","is").fluentPut("value","上架")); @@ -379,30 +372,40 @@ public R filterConditionAndGetPageList(BasePageRequest basePageRequest){ public R getCrmPageList(BasePageRequest basePageRequest) { Integer type = basePageRequest.getJsonObject().getInteger("type"); String viewName; + //操作地址 + String realm; switch (type) { case 1: viewName = "leadsview"; + realm="leads"; break; case 2: viewName = "customerview"; + realm="customer"; break; case 3: viewName = "contactsview"; + realm="contacts"; break; case 4: viewName = "productview"; + realm="product"; break; case 5: viewName = "businessview"; + realm="business"; break; case 6: viewName = "contractview"; + realm="contract"; break; case 7: viewName = "receivablesview"; + realm="receivables"; break; case 8: viewName = "customerview"; + realm="customer"; break; default: return R.error("type不符合要求"); @@ -417,16 +420,16 @@ public R getCrmPageList(BasePageRequest basePageRequest) { String condition = jsonObject.getString("condition"); String value = jsonObject.getString("value"); String name = jsonObject.getString("name"); - if (!paramsUtil.isValid(name)){ + if (!ParamsUtil.isValid(name)){ return R.error("参数包含非法字段"); } - if (StrUtil.isNotEmpty(value)&&!paramsUtil.isValid(value)){ + if (StrUtil.isNotEmpty(value)&&!ParamsUtil.isValid(value)){ return R.error("参数包含非法字段"); } - if (StrUtil.isNotEmpty(jsonObject.getString("start"))&&!paramsUtil.isValid(jsonObject.getString("start"))){ + if (StrUtil.isNotEmpty(jsonObject.getString("start"))&&!ParamsUtil.isValid(jsonObject.getString("start"))){ return R.error("参数包含非法字段"); } - if (StrUtil.isNotEmpty(jsonObject.getString("end"))&&!paramsUtil.isValid(jsonObject.getString("end"))){ + if (StrUtil.isNotEmpty(jsonObject.getString("end"))&&!ParamsUtil.isValid(jsonObject.getString("end"))){ return R.error("参数包含非法字段"); } String formType = jsonObject.getString("formType"); @@ -444,6 +447,10 @@ public R getCrmPageList(BasePageRequest basePageRequest) { } } continue; + }else if ("map_address".equals(formType)){ + String address = value.substring(0,value.length()-1); + conditions.append(" and ").append(name).append(" like '%").append(address).append("%'"); + continue; } if (StrUtil.isNotEmpty(value) || StrUtil.isNotEmpty(jsonObject.getString("start")) || StrUtil.isNotEmpty(jsonObject.getString("end"))) { if ("takePart".equals(condition)) { @@ -484,7 +491,7 @@ public R getCrmPageList(BasePageRequest basePageRequest) { } String search = basePageRequest.getJsonObject().getString("search"); if (StrUtil.isNotEmpty(search)) { - if (!paramsUtil.isValid(search)){ + if (!ParamsUtil.isValid(search)){ return R.error("参数包含非法字段"); } if (type == 1){ @@ -504,23 +511,18 @@ public R getCrmPageList(BasePageRequest basePageRequest) { conditions.append(" and (number like '%").append(search).append("%')"); } } - - String sortField = basePageRequest.getJsonObject().getString("sortField"); + String camelField = basePageRequest.getJsonObject().getString("sortField"); + String sortField = StrUtil.toUnderlineCase(camelField); String orderNum = basePageRequest.getJsonObject().getString("order"); if (StrUtil.isEmpty(sortField) || StrUtil.isEmpty(orderNum)){ sortField = "update_time"; orderNum = "desc"; }else { - if (!paramsUtil.isValid(sortField)){ + if (!ParamsUtil.isValid(sortField)){ return R.error("参数包含非法字段"); } - if ("2".equals(orderNum)){ - orderNum = "asc"; - }else { - orderNum = "desc"; - } + orderNum="2".equals(orderNum)?"asc":"desc"; } - if (2 == type) { conditions.append(" and owner_user_id is not null"); } else if (8 == type) { @@ -528,7 +530,7 @@ public R getCrmPageList(BasePageRequest basePageRequest) { } Long userId=BaseUtil.getUserId(); if(!type.equals(8)&&!type.equals(4)&& !BaseConstant.SUPER_ADMIN_USER_ID.equals(userId)){ - List longs= Aop.get(AdminUserService.class).queryUserByAuth(userId); + List longs= Aop.get(AdminUserService.class).queryUserByAuth(userId,realm); if(longs!=null&&longs.size()>0){ conditions.append(" and owner_user_id in (").append(StrUtil.join(",", longs)).append(")"); if(type.equals(2)||type.equals(6)||type.equals(5)){ @@ -578,6 +580,9 @@ public void setBusinessStatus(List list){ if (record.getInt("is_end") == 0){ Integer sortNum = Db.queryInt("select order_num from 72crm_crm_business_status where status_id = ?",record.getInt("status_id")); int totalStatsNum = Db.queryInt("select count(*) from 72crm_crm_business_status where type_id = ?",record.getInt("type_id")) + 1; + if(sortNum == null){ + sortNum = 0; + } record.set("progressBar",sortNum+"/"+totalStatsNum); }else if (record.getInt("is_end") == 1){ int totalStatsNum = Db.queryInt("select count(*) from 72crm_crm_business_status where type_id = ?",record.getInt("type_id")) + 1; diff --git a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminUserService.java b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminUserService.java index c72ff99..1175569 100644 --- a/src/main/java/com/kakarote/crm9/erp/admin/service/AdminUserService.java +++ b/src/main/java/com/kakarote/crm9/erp/admin/service/AdminUserService.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.admin.entity.AdminUser; import com.kakarote.crm9.erp.admin.entity.AdminUserRole; @@ -19,7 +20,6 @@ import com.jfinal.plugin.activerecord.Record; import com.jfinal.plugin.activerecord.SqlPara; import com.jfinal.plugin.activerecord.tx.Tx; -import com.jfinal.plugin.redis.Redis; import java.util.*; @@ -32,6 +32,7 @@ public class AdminUserService { @Before(Tx.class) public R setUser(AdminUser adminUser, String roleIds) { boolean bol; + updateScene(adminUser); if (adminUser.getUserId() == null) { Integer count = Db.queryInt("select count(*) from 72crm_admin_user where username = ?", adminUser.getUsername()); if (count > 0) { @@ -78,6 +79,44 @@ public R setUser(AdminUser adminUser, String roleIds) { return R.isSuccess(bol); } + private void updateScene(AdminUser adminUser){ + List ids = new ArrayList<>(); + if (adminUser.getUserId() == null && adminUser.getParentId() != null){ + ids.add(adminUser.getParentId()); + }else if (adminUser.getUserId() != null){ + AdminUser oldAdminUser = AdminUser.dao.findById(adminUser.getUserId()); + if (oldAdminUser.getParentId() == null && adminUser.getParentId() != null){ + ids.add(adminUser.getParentId()); + }else if (oldAdminUser.getParentId() != null && !oldAdminUser.getParentId().equals(adminUser.getParentId())){ + ids.add(oldAdminUser.getParentId()); + ids.add(adminUser.getParentId()); + } + } + if (ids.size() > 0){ + HashSet idsSet = new HashSet<>(); + ids.forEach(id -> idsSet.addAll(queryTopUserId(id,BaseConstant.AUTH_DATA_RECURSION_NUM))); + SqlPara sqlPara=Db.getSqlPara("admin.user.updateScene",Kv.by("ids",idsSet)); + Db.delete(sqlPara.getSql(),sqlPara.getPara()); + } + } + + /** + * @author wyq + * 查询上级id + * @param userId + */ + private List queryTopUserId(Long userId,Integer deepness){ + List arrUsers=new ArrayList<>(); + if (deepness-- > 0){ + AdminUser adminUser=AdminUser.dao.findById(userId); + if(adminUser.getParentId() != null && !adminUser.getParentId().equals(0L)){ + arrUsers.addAll(queryTopUserId(adminUser.getParentId(),deepness)); + } + arrUsers.add(adminUser.getUserId()); + } + return arrUsers; + } + /** * 重置用户信息 * @@ -86,7 +125,8 @@ public R setUser(AdminUser adminUser, String roleIds) { public AdminUser resetUser() { AdminUser adminUser = AdminUser.dao.findFirst(Db.getSql("admin.user.queryUserByUserId"), BaseUtil.getUserId()); adminUser.setRoles(adminRoleService.queryRoleIdsByUserId(adminUser.getUserId())); - Redis.use().setex(BaseUtil.getToken(), 360000, adminUser); + RedisManager.getRedis().setex(BaseUtil.getToken(), 360000, adminUser); + adminUser.remove("password", "salt"); return adminUser; } @@ -242,7 +282,13 @@ public boolean updateUser(AdminUser adminUser) { return adminUser.update(); } - public List queryUserByAuth(Long userId) { + /** + * 查询当前用户权限 用于菜单展示 FFF + * @param userId 用户id + * @param realm 当前操作的菜单 链接地址 + * @return + */ + public List queryUserByAuth(Long userId,String realm) { List adminUsers = new ArrayList<>(); //查询用户数据权限,从高到低排序 List list = Db.query(Db.getSql("admin.role.queryDataTypeByUserId"), userId); @@ -251,26 +297,96 @@ public List queryUserByAuth(Long userId) { adminUsers.add(userId); return adminUsers; } - //拥有最高数据权限 - if (list.contains(5)) { - return null; - } else { - AdminUser adminUser = AdminUser.dao.findById(userId); - if (list.contains(4)) { - List records = adminDeptService.queryDeptByParentDept(adminUser.getDeptId(), BaseConstant.AUTH_DATA_RECURSION_NUM); - List deptIds = new ArrayList<>(); - deptIds.add(adminUser.getDeptId()); - records.forEach(record -> { - deptIds.add(record.getInt("id")); - }); - SqlPara sqlPara = Db.getSqlPara("admin.user.queryUserIdByDeptId", Kv.by("deptIds", deptIds)); - adminUsers.addAll(Db.query(sqlPara.getSql(), sqlPara.getPara())); + //只要上面list的长度不为0 那么这个也不会为0 + List userRoleList=Db.find(Db.getSqlPara("admin.role.queryUserRoleListByUserId",Kv.by("userId",userId).set("realm",realm))); + if(list.size()==1&&userRoleList.size()==1){//如果为1的话 验证是否有最高权限,否则及有多个权限 + //拥有最高数据权限 + if (list.contains(5)) { + return null; + } else { + AdminUser adminUser = AdminUser.dao.findById(userId); + if (list.contains(4)) { + List records = adminDeptService.queryDeptByParentDept(adminUser.getDeptId(), BaseConstant.AUTH_DATA_RECURSION_NUM); + List deptIds = new ArrayList<>(); + deptIds.add(adminUser.getDeptId()); + records.forEach(record -> deptIds.add(record.getInt("id"))); + SqlPara sqlPara = Db.getSqlPara("admin.user.queryUserIdByDeptId", Kv.by("deptIds", deptIds)); + adminUsers.addAll(Db.query(sqlPara.getSql(), sqlPara.getPara())); + } else if(list.contains(3)){ + queryUserByDeptId(adminUser.getDeptId()).forEach(record -> adminUsers.add(record.getLong("id"))); + } + + if (list.contains(2)) { + adminUsers.addAll(queryUserByParentUser(adminUser.getUserId(), BaseConstant.AUTH_DATA_RECURSION_NUM)); + } + adminUsers.add(adminUser.getUserId()); } - if (list.contains(2)) { - adminUsers.addAll(queryUserByParentUser(adminUser.getUserId(), BaseConstant.AUTH_DATA_RECURSION_NUM)); + }else{//多个权限 + if(realm!=null&&!"".equals(realm)) { + AdminUser adminUser = AdminUser.dao.findById(userId); + for (Record r:userRoleList) {//如果有多个权限 验证当前用户是否对当前管理 是否为本人操作 + if(r.getStr("realm").equals(realm)&&r.getStr("data_type").equals("1")){//当前操作的管理链接地址 + adminUsers.add(userId); + HashSet hashSet = new HashSet<>(adminUsers); + adminUsers.clear(); + adminUsers.addAll(hashSet); + return adminUsers; + }else if(r.getStr("realm").equals(realm)&&r.getStr("data_type").equals("2")){//本人及其 + adminUsers.addAll(queryUserByParentUser(adminUser.getUserId(), BaseConstant.AUTH_DATA_RECURSION_NUM)); + adminUsers.add(userId); + HashSet hashSet = new HashSet<>(adminUsers); + adminUsers.clear(); + adminUsers.addAll(hashSet); + return adminUsers; + }else if(r.getStr("realm").equals(realm)&&r.getStr("data_type").equals("3")){//本部门 + queryUserByDeptId(adminUser.getDeptId()).forEach(record -> adminUsers.add(record.getLong("id"))); + adminUsers.add(userId); + HashSet hashSet = new HashSet<>(adminUsers); + adminUsers.clear(); + adminUsers.addAll(hashSet); + return adminUsers; + }else if(r.getStr("realm").equals(realm)&&r.getStr("data_type").equals("4")){//本部门及下属部门 + List records = adminDeptService.queryDeptByParentDept(adminUser.getDeptId(), BaseConstant.AUTH_DATA_RECURSION_NUM); + List deptIds = new ArrayList<>(); + deptIds.add(adminUser.getDeptId()); + records.forEach(record -> { + deptIds.add(record.getInt("id")); + }); + SqlPara sqlPara = Db.getSqlPara("admin.user.queryUserIdByDeptId", Kv.by("deptIds", deptIds)); + adminUsers.addAll(Db.query(sqlPara.getSql(), sqlPara.getPara())); + adminUsers.add(userId); + HashSet hashSet = new HashSet<>(adminUsers); + adminUsers.clear(); + adminUsers.addAll(hashSet); + return adminUsers; + }else if(r.getStr("realm").equals(realm)&&r.getStr("data_type").equals("5")){//全部 + return null; + } + } + }else{ + if (list.contains(5)) { + return null; + } else { + AdminUser adminUser = AdminUser.dao.findById(userId); + if (list.contains(4)) { + List records = adminDeptService.queryDeptByParentDept(adminUser.getDeptId(), BaseConstant.AUTH_DATA_RECURSION_NUM); + List deptIds = new ArrayList<>(); + deptIds.add(adminUser.getDeptId()); + records.forEach(record -> deptIds.add(record.getInt("id"))); + SqlPara sqlPara = Db.getSqlPara("admin.user.queryUserIdByDeptId", Kv.by("deptIds", deptIds)); + adminUsers.addAll(Db.query(sqlPara.getSql(), sqlPara.getPara())); + } else if(list.contains(3)){ + queryUserByDeptId(adminUser.getDeptId()).forEach(record -> adminUsers.add(record.getLong("id"))); + } + + if (list.contains(2)) { + adminUsers.addAll(queryUserByParentUser(adminUser.getUserId(), BaseConstant.AUTH_DATA_RECURSION_NUM)); + } + adminUsers.add(adminUser.getUserId()); + } } - adminUsers.add(adminUser.getUserId()); } + adminUsers.add(userId); HashSet hashSet = new HashSet<>(adminUsers); adminUsers.clear(); diff --git a/src/main/java/com/kakarote/crm9/erp/bi/common/BiRouter.java b/src/main/java/com/kakarote/crm9/erp/bi/common/BiRouter.java index 86a72f1..01ca8a5 100644 --- a/src/main/java/com/kakarote/crm9/erp/bi/common/BiRouter.java +++ b/src/main/java/com/kakarote/crm9/erp/bi/common/BiRouter.java @@ -12,5 +12,6 @@ public void config() { add("/biRanking", BiRankingController.class); add("/biFunnel", BiFunnelController.class); add("/biEmployee", BiEmployeeController.class); + add("/biWork", BiWorkController.class); } } diff --git a/src/main/java/com/kakarote/crm9/erp/bi/common/BiTimeUtil.java b/src/main/java/com/kakarote/crm9/erp/bi/common/BiTimeUtil.java index 4dc6ed9..e4ffaf0 100644 --- a/src/main/java/com/kakarote/crm9/erp/bi/common/BiTimeUtil.java +++ b/src/main/java/com/kakarote/crm9/erp/bi/common/BiTimeUtil.java @@ -4,9 +4,15 @@ import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; +import com.jfinal.aop.Aop; +import com.jfinal.kit.Kv; import com.jfinal.plugin.activerecord.Db; import com.jfinal.plugin.activerecord.Record; +import com.jfinal.plugin.activerecord.SqlPara; +import com.kakarote.crm9.common.constant.BaseConstant; +import com.kakarote.crm9.erp.admin.service.AdminDeptService; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -55,6 +61,7 @@ public Record analyzeType(Record record){ cycleNum = (int)DateUtil.between(beginDate,endDate,DateUnit.DAY)+1; }else if ("week".equals(type)){ beginDate = DateUtil.beginOfWeek(DateUtil.date()); + endDate = DateUtil.endOfWeek(DateUtil.date()); sqlDateFormat = "%Y%m%d"; dateFormat = "yyyyMMdd"; cycleNum = 7; @@ -65,6 +72,8 @@ public Record analyzeType(Record record){ dateFormat = "yyyyMMdd"; cycleNum = 7; }else if ("today".equals(type)){ + beginDate = DateUtil.beginOfDay(DateUtil.date()); + endDate = DateUtil.endOfDay(DateUtil.date()); sqlDateFormat = "%Y%m%d"; dateFormat = "yyyyMMdd"; cycleNum = 1; @@ -97,13 +106,20 @@ public Record analyzeType(Record record){ } if (userId != null){ userIds = userId.toString(); - }else { - List userIdList = Db.query("select user_id from 72crm_admin_user where dept_id = ?",deptId); + }else if(deptId!=null){ + List records = Aop.get(AdminDeptService.class).queryDeptByParentDept(deptId, BaseConstant.AUTH_DATA_RECURSION_NUM); + List deptIds = new ArrayList<>(); + deptIds.add(deptId); + records.forEach(dept ->deptIds.add(dept.getInt("id"))); + SqlPara sqlPara = Db.getSqlPara("admin.user.queryUserIdByDeptId", Kv.by("deptIds", deptIds)); + List userIdList = Db.query(sqlPara.getSql(), sqlPara.getPara()); userIds = CollectionUtil.join(userIdList,","); + }else { + userIds=""; } Integer beginTime = Integer.valueOf(DateUtil.format(beginDate,dateFormat)); Integer finalTime = Integer.valueOf(DateUtil.format(endDate,dateFormat)); - record.set("sqlDateFormat",sqlDateFormat).set("cycleNum",cycleNum).set("userIds",userIds).set("beginTime",beginTime).set("finalTime",finalTime); + record.set("sqlDateFormat",sqlDateFormat).set("beginDate",beginDate).set("endDate",endDate).set("cycleNum",cycleNum).set("userIds",userIds).set("beginTime",beginTime).set("finalTime",finalTime); return record; } diff --git a/src/main/java/com/kakarote/crm9/erp/bi/controller/BiWorkController.java b/src/main/java/com/kakarote/crm9/erp/bi/controller/BiWorkController.java new file mode 100644 index 0000000..c3bd6fc --- /dev/null +++ b/src/main/java/com/kakarote/crm9/erp/bi/controller/BiWorkController.java @@ -0,0 +1,120 @@ +package com.kakarote.crm9.erp.bi.controller; + +import cn.hutool.poi.excel.ExcelUtil; +import cn.hutool.poi.excel.ExcelWriter; +import com.alibaba.fastjson.JSONObject; +import com.jfinal.aop.Inject; +import com.jfinal.core.Controller; +import com.jfinal.core.paragetter.Para; +import com.jfinal.plugin.activerecord.Record; +import com.kakarote.crm9.common.config.paragetter.BasePageRequest; +import com.kakarote.crm9.erp.bi.service.BiWorkService; +import com.kakarote.crm9.utils.R; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +public class BiWorkController extends Controller { + + @Inject + private BiWorkService biWorkService; + + + /** + * 查询日志统计信息 + * @author zhang + */ + public void logStatistics(@Para("deptId")Integer deptId, @Para("userId")Long userId, @Para("type")String type){ + renderJson(R.ok().put("data",biWorkService.logStatistics(deptId,userId,type))); + } + + /** + * 导出日志信息 + * @author zhangzhiwei + */ + public void logStatisticsExport(@Para("deptId")Integer deptId, @Para("userId")Long userId, @Para("type")String type)throws IOException { + List recordList=biWorkService.logStatistics(deptId,userId,type); + List> mapList=new LinkedList<>(); + recordList.forEach(record -> mapList.add(record.remove("img","user_id","username").getColumns())); + ExcelWriter writer=null; + try { + writer = ExcelUtil.getWriter(); + writer.addHeaderAlias("realname", "员工"); + writer.addHeaderAlias("count", "填写数"); + writer.addHeaderAlias("unReadCont", "接收人未读数"); + writer.addHeaderAlias("unCommentCount", "未评论数"); + writer.addHeaderAlias("commentCount", "已评论数"); + writer.setColumnWidth(0,20).setColumnWidth(1,20).setColumnWidth(2,30).setColumnWidth(3,20).setColumnWidth(4,20); + HttpServletResponse response = getResponse(); + writer.write(mapList, true); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=logStatistics.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }finally { + if(writer!=null){ + writer.close(); + } + } + renderNull(); + } + + /** + * 查询审批统计信息 + * @author zhang + */ + public void examineStatistics(@Para("deptId")Integer deptId, @Para("userId")Long userId, @Para("type")String type){ + renderJson(R.ok().put("data",biWorkService.examineStatistics(deptId,userId,type))); + } + + /** + * 导出日志信息 + * @author zhangzhiwei + */ + @SuppressWarnings("unchecked") + public void examineStatisticsExport(@Para("deptId")Integer deptId, @Para("userId")Long userId, @Para("type")String type)throws IOException { + JSONObject object=biWorkService.examineStatistics(deptId,userId,type); + List> mapList=new LinkedList<>(); + ExcelWriter writer=null; + try { + writer = ExcelUtil.getWriter(); + List categoryList= (List) object.get("categoryList"); + writer.addHeaderAlias("realname", "员工"); + for (Record record : categoryList) { + writer.addHeaderAlias("count_"+record.get("category_id"), record.get("title")); + } + writer.setColumnWidth(0,20).setColumnWidth(1,20).setColumnWidth(2,30).setColumnWidth(3,20).setColumnWidth(4,20); + HttpServletResponse response = getResponse(); + ((List)object.get("userList")).forEach(record -> mapList.add(record.remove("img","user_id","username").getColumns())); + writer.write(mapList, true); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=examineStatistics.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }finally { + if(writer!=null){ + writer.close(); + } + } + renderNull(); + } + /** + * 查询审批详情 + * @author zhangzhiwei + */ + public void examineInfo(BasePageRequest basePageRequest){ + renderJson(R.ok().put("data",biWorkService.examineInfo(basePageRequest))); + } +} diff --git a/src/main/java/com/kakarote/crm9/erp/bi/service/BiWorkService.java b/src/main/java/com/kakarote/crm9/erp/bi/service/BiWorkService.java new file mode 100644 index 0000000..0ee2f1e --- /dev/null +++ b/src/main/java/com/kakarote/crm9/erp/bi/service/BiWorkService.java @@ -0,0 +1,114 @@ +package com.kakarote.crm9.erp.bi.service; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.jfinal.aop.Aop; +import com.jfinal.aop.Inject; +import com.jfinal.kit.Kv; +import com.jfinal.plugin.activerecord.Db; +import com.jfinal.plugin.activerecord.Page; +import com.jfinal.plugin.activerecord.Record; +import com.jfinal.plugin.activerecord.SqlPara; +import com.kakarote.crm9.common.config.paragetter.BasePageRequest; +import com.kakarote.crm9.erp.bi.common.BiTimeUtil; +import com.kakarote.crm9.erp.oa.service.OaExamineService; + +import java.util.*; + +public class BiWorkService { + @Inject + private BiTimeUtil biTimeUtil; + + /** + * 查询日志统计信息 + * @author zhang + */ + public List logStatistics(Integer deptId, Long userId, String type) { + Record record = new Record().set("deptId", deptId).set("userId", userId).set("type", type); + biTimeUtil.analyzeType(record); + List records = new ArrayList<>(); + for (String uid : StrUtil.splitTrim(record.getStr("userIds"),",")) { + List recordList = Db.find(Db.getSqlPara("bi.work.queryLogByUser", record.set("userId", uid))); + if (recordList.size() > 0) { + Record userRecord = new Record().setColumns(recordList.get(0)).remove("sum", "send_user_ids", "read_user_ids"); + int commentCount = 0, unCommentCount = 0, unReadCont = 0, count = recordList.size(); + for (Record task : recordList) { + if (task.getInt("sum") > 0) { + commentCount++; + } else { + unCommentCount++; + } + String sendUser = task.getStr("send_user_ids"); + if (StrUtil.isNotEmpty(sendUser) && sendUser.split(",").length > 0) { + if(!isIntersection(StrUtil.splitTrim(sendUser,","),StrUtil.splitTrim(record.getStr("read_user_ids"),","))){ + unReadCont++; + } + } + } + userRecord.set("commentCount",commentCount) + .set("unCommentCount",unCommentCount) + .set("unReadCont",unReadCont) + .set("count",count); + records.add(userRecord); + } + } + return records; + } + + /** + * 查询审批统计信息 + * @author zhang + */ + public JSONObject examineStatistics(Integer deptId, Long userId, String type){ + JSONObject object=new JSONObject(); + Record record = new Record().set("deptId", deptId).set("userId", userId).set("type", type); + biTimeUtil.analyzeType(record); + List categoryList= Db.find(Db.getSql("bi.work.queryExamineCategory")); + object.put("categoryList",categoryList); + List users=StrUtil.splitTrim(record.getStr("userIds"),","); + if(users.size()==0){ + object.put("userList",users); + }else { + SqlPara sql=Db.getSqlPara("bi.work.examineStatistics",record.set("categorys",categoryList).set("userList",users)); + List userList=Db.find(sql); + object.put("userList",userList); + } + return object; + } + + /** + * 审批详情 + * @author zhangz + */ + public Record examineInfo(BasePageRequest request){ + JSONObject jsonObject = request.getJsonObject(); + Record record = new Record().set("userId", jsonObject.getInteger("userId")).set("type", jsonObject.get("type")); + biTimeUtil.analyzeType(record); + Kv kv= Kv.by("userId", jsonObject.get("userId")).set("categoryId", jsonObject.get("categoryId")).set("startTime", record.get("beginDate")).set("endTime", record.get("endDate")); + Page recordList = Db.paginate(request.getPage(), request.getLimit(), Db.getSqlPara("oa.examine.myInitiate", kv)); + Aop.get(OaExamineService.class).transfer(recordList.getList()); + SqlPara sqlPara=Db.getSqlPara("bi.work.queryExamineCount",kv); + Record info=Db.findFirst(sqlPara); + info.set("list",recordList.getList()).set("totalRow",recordList.getTotalRow()); + return info; + } + + + /** + * 判断两个数组是否有交集 + * @author zhang + * @return true为存在交集 + */ + private static boolean isIntersection(List m, List n) { + // 将较长的数组转换为set + Set set = new HashSet<>(m.size() > n.size() ? m : n); + + for (String i : m.size() > n.size() ? n : m) { + if (set.contains(i)) { + return true; + } + } + return false; + } +} diff --git a/src/main/java/com/kakarote/crm9/erp/crm/common/CrmInterceptor.java b/src/main/java/com/kakarote/crm9/erp/crm/common/CrmInterceptor.java index 835fbae..87c19cb 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/common/CrmInterceptor.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/common/CrmInterceptor.java @@ -6,6 +6,7 @@ import com.jfinal.aop.Interceptor; import com.jfinal.aop.Invocation; import com.jfinal.core.Controller; +import com.jfinal.plugin.activerecord.Record; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.crm.entity.*; import com.kakarote.crm9.utils.AuthUtil; @@ -76,8 +77,14 @@ public void intercept(Invocation inv){ } } if(flag){ - controller.renderJson(R.error("无权操作")); - return; + if("queryById".equals(split[2])){ + controller.renderJson(R.ok().put("data",new Record().set("dataAuth",0))); + return ; + }else { + controller.renderJson(R.error("无权操作")); + return; + } + } } } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmBusinessController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmBusinessController.java index 53edad3..e0c8e58 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmBusinessController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmBusinessController.java @@ -202,15 +202,6 @@ public void boostBusinessStatus(@Para("")CrmBusiness crmBusiness){ if(auth){renderJson(R.noAuth()); return; } renderJson(crmBusinessService.boostBusinessStatus(crmBusiness)); } - - /** - * @author wyq - * 查询自定义字段 - */ - public void queryField(){ - renderJson(R.ok().put("data",crmBusinessService.queryField())); - } - /** * @author wyq * 查询商机状态组及商机状态 diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContactsController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContactsController.java index c7b3cab..ee84451 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContactsController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContactsController.java @@ -4,10 +4,11 @@ import cn.hutool.poi.excel.ExcelWriter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.jfinal.aop.Clear; +import com.jfinal.log.Log; import com.jfinal.plugin.activerecord.Db; import com.jfinal.plugin.activerecord.Record; import com.jfinal.upload.UploadFile; +import com.kakarote.crm9.common.annotation.LoginFormCookie; import com.kakarote.crm9.common.annotation.NotNullValidate; import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; @@ -16,7 +17,6 @@ import com.kakarote.crm9.erp.admin.service.AdminSceneService; import com.kakarote.crm9.erp.crm.common.CrmEnum; import com.kakarote.crm9.erp.crm.entity.CrmContacts; -import com.kakarote.crm9.erp.crm.entity.CrmContactsBusiness; import com.kakarote.crm9.erp.crm.service.CrmContactsService; import com.kakarote.crm9.utils.AuthUtil; import com.kakarote.crm9.utils.R; @@ -24,6 +24,8 @@ import com.jfinal.core.Controller; import com.jfinal.core.paragetter.Para; import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddressList; import javax.servlet.ServletOutputStream; @@ -34,6 +36,7 @@ import java.util.Map; public class CrmContactsController extends Controller { + @Inject private CrmContactsService crmContactsService; @@ -48,8 +51,8 @@ public class CrmContactsController extends Controller { * 查看列表页 */ @Permissions({"crm:contacts:index"}) - public void queryPageList(BasePageRequest basePageRequest){ - JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type",3); + public void queryPageList(BasePageRequest basePageRequest) { + JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type", 3); basePageRequest.setJsonObject(jsonObject); renderJson(adminSceneService.filterConditionAndGetPageList(basePageRequest)); } @@ -58,8 +61,8 @@ public void queryPageList(BasePageRequest basePageRequest){ * @author wyq * 分页条件查询联系人 */ - public void queryList(BasePageRequest basePageRequest){ - renderJson(R.ok().put("data",crmContactsService.queryList(basePageRequest))); + public void queryList(BasePageRequest basePageRequest) { + renderJson(R.ok().put("data", crmContactsService.queryList(basePageRequest))); } /** @@ -67,25 +70,28 @@ public void queryList(BasePageRequest basePageRequest){ * 根据id查询联系人 */ @Permissions("crm:contacts:read") - public void queryById(@Para("contactsId")Integer contactsId){ - renderJson(R.ok().put("data",crmContactsService.queryById(contactsId))); + public void queryById(@Para("contactsId") Integer contactsId) { + renderJson(R.ok().put("data", crmContactsService.queryById(contactsId))); } /** * @author wyq * 根据联系人名称查询 */ - public void queryByName(@Para("name")String name){ - renderJson(R.ok().put("data",crmContactsService.queryByName(name))); + public void queryByName(@Para("name") String name) { + renderJson(R.ok().put("data", crmContactsService.queryByName(name))); } /** * @author wyq * 根据联系人id查询商机 */ - public void queryBusiness(BasePageRequest basePageRequest){ + public void queryBusiness(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CONTACTS_TYPE_KEY.getSign()), basePageRequest.getData().getContactsId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmContactsService.queryBusiness(basePageRequest)); } @@ -93,24 +99,24 @@ public void queryBusiness(BasePageRequest basePageRequest){ * @author wyq * 联系人关联商机 */ - public void relateBusiness(@Para("contactsId")Integer contactsId,@Para("businessIds")String businessIds){ - renderJson(crmContactsService.relateBusiness(contactsId,businessIds)); + public void relateBusiness(@Para("contactsId") Integer contactsId, @Para("businessIds") String businessIds) { + renderJson(crmContactsService.relateBusiness(contactsId, businessIds)); } /** * @author wyq * 联系人解除关联商机 */ - public void unrelateBusiness(@Para("contactsId")Integer contactsId,@Para("businessIds")String businessIds){ - renderJson(crmContactsService.unrelateBusiness(contactsId,businessIds)); + public void unrelateBusiness(@Para("contactsId") Integer contactsId, @Para("businessIds") String businessIds) { + renderJson(crmContactsService.unrelateBusiness(contactsId, businessIds)); } /** * @author wyq * 新建或更新联系人 */ - @Permissions({"crm:contacts:save","crm:contacts:update"}) - public void addOrUpdate(){ + @Permissions({"crm:contacts:save", "crm:contacts:update"}) + public void addOrUpdate() { JSONObject jsonObject = JSON.parseObject(getRawData()); renderJson(crmContactsService.addOrUpdate(jsonObject)); } @@ -120,7 +126,7 @@ public void addOrUpdate(){ * 根据id删除联系人 */ @Permissions("crm:contacts:delete") - public void deleteByIds(@Para("contactsIds")String contactsIds){ + public void deleteByIds(@Para("contactsIds") String contactsIds) { renderJson(crmContactsService.deleteByIds(contactsIds)); } @@ -129,30 +135,26 @@ public void deleteByIds(@Para("contactsIds")String contactsIds){ * 联系人转移 */ @Permissions("crm:contacts:transfer") - @NotNullValidate(value = "contactsIds",message = "联系人id不能为空") - @NotNullValidate(value = "newOwnerUserId",message = "新负责人不能为空") - public void transfer(@Para("")CrmContacts crmContacts){ + @NotNullValidate(value = "contactsIds", message = "联系人id不能为空") + @NotNullValidate(value = "newOwnerUserId", message = "新负责人不能为空") + public void transfer(@Para("") CrmContacts crmContacts) { renderJson(crmContactsService.transfer(crmContacts)); } - /** - * @author wyq - * 查询自定义字段 - */ - public void queryField(){ - renderJson(R.ok().put("data",crmContactsService.queryField())); - } /** * @author wyq * 添加跟进记录 */ - @NotNullValidate(value = "typesId",message = "联系人id不能为空") - @NotNullValidate(value = "content",message = "内容不能为空") - @NotNullValidate(value = "category",message = "跟进类型不能为空") - public void addRecord(@Para("")AdminRecord adminRecord){ + @NotNullValidate(value = "typesId", message = "联系人id不能为空") + @NotNullValidate(value = "content", message = "内容不能为空") + @NotNullValidate(value = "category", message = "跟进类型不能为空") + public void addRecord(@Para("") AdminRecord adminRecord) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CONTACTS_TYPE_KEY.getSign()), adminRecord.getTypesId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmContactsService.addRecord(adminRecord)); } @@ -160,10 +162,13 @@ public void addRecord(@Para("")AdminRecord adminRecord){ * @author wyq * 查看跟进记录 */ - public void getRecord(BasePageRequest basePageRequest){ + public void getRecord(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CONTACTS_TYPE_KEY.getSign()), basePageRequest.getData().getContactsId()); - if(auth){renderJson(R.noAuth()); return; } - renderJson(R.ok().put("data",crmContactsService.getRecord(basePageRequest))); + if (auth) { + renderJson(R.noAuth()); + return; + } + renderJson(R.ok().put("data", crmContactsService.getRecord(basePageRequest))); } /** @@ -171,7 +176,7 @@ public void getRecord(BasePageRequest basePageRequest){ * 批量导出线索 */ @Permissions("crm:contacts:excelexport") - public void batchExportExcel(@Para("ids")String contactsIds) throws IOException { + public void batchExportExcel(@Para("ids") String contactsIds) throws IOException { List recordList = crmContactsService.exportContacts(contactsIds); export(recordList); renderNull(); @@ -182,100 +187,137 @@ public void batchExportExcel(@Para("ids")String contactsIds) throws IOException * 导出全部联系人 */ @Permissions("crm:contacts:excelexport") - public void allExportExcel(BasePageRequest basePageRequest) throws IOException{ + public void allExportExcel(BasePageRequest basePageRequest) throws IOException { JSONObject jsonObject = basePageRequest.getJsonObject(); - jsonObject.fluentPut("excel","yes").fluentPut("type","3"); + jsonObject.fluentPut("excel", "yes").fluentPut("type", "3"); AdminSceneService adminSceneService = new AdminSceneService(); - List recordList = (List)adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); + List recordList = (List) adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); export(recordList); renderNull(); } - private void export(List recordList) throws IOException{ - ExcelWriter writer = ExcelUtil.getWriter(); - AdminFieldService adminFieldService = new AdminFieldService(); - List fieldList = adminFieldService.customFieldList("3"); - writer.addHeaderAlias("name","姓名"); - writer.addHeaderAlias("customer_name","客户名称"); - writer.addHeaderAlias("next_time","下次联系时间"); - writer.addHeaderAlias("telephone","电话"); - writer.addHeaderAlias("mobile","手机号"); - writer.addHeaderAlias("email","电子邮箱"); - writer.addHeaderAlias("post","职务"); - writer.addHeaderAlias("address","地址"); - writer.addHeaderAlias("remark","备注"); - writer.addHeaderAlias("create_user_name","创建人"); - writer.addHeaderAlias("owner_user_name","负责人"); - writer.addHeaderAlias("create_time","创建时间"); - writer.addHeaderAlias("update_time","更新时间"); - for (Record field:fieldList){ - writer.addHeaderAlias(field.getStr("name"),field.getStr("name")); - } - writer.merge(12+fieldList.size(),"联系人信息"); - HttpServletResponse response = getResponse(); - List> list = new ArrayList<>(); - for (Record record : recordList){ - list.add(record.remove("batch_id","contacts_name","customer_id","contacts_id","owner_user_id","create_user_id","field_batch_id").getColumns()); - } - writer.write(list,true); - for (int i=0; i < fieldList.size()+15;i++){ - writer.setColumnWidth(i,20); + private void export(List recordList) throws IOException { + ExcelWriter writer = null; + try { + writer = ExcelUtil.getWriter(); + AdminFieldService adminFieldService = new AdminFieldService(); + List fieldList = adminFieldService.customFieldList("3"); + writer.addHeaderAlias("name", "姓名"); + writer.addHeaderAlias("customer_name", "客户名称"); + writer.addHeaderAlias("next_time", "下次联系时间"); + writer.addHeaderAlias("telephone", "电话"); + writer.addHeaderAlias("mobile", "手机号"); + writer.addHeaderAlias("email", "电子邮箱"); + writer.addHeaderAlias("post", "职务"); + writer.addHeaderAlias("address", "地址"); + writer.addHeaderAlias("remark", "备注"); + writer.addHeaderAlias("create_user_name", "创建人"); + writer.addHeaderAlias("owner_user_name", "负责人"); + writer.addHeaderAlias("create_time", "创建时间"); + writer.addHeaderAlias("update_time", "更新时间"); + for (Record field : fieldList) { + writer.addHeaderAlias(field.getStr("name"), field.getStr("name")); + } + writer.merge(12 + fieldList.size(), "联系人信息"); + HttpServletResponse response = getResponse(); + List> list = new ArrayList<>(); + for (Record record : recordList) { + list.add(record.remove("batch_id", "contacts_name", "customer_id", "contacts_id", "owner_user_id", "create_user_id", "field_batch_id").getColumns()); + } + writer.write(list, true); + writer.setRowHeight(0, 20); + writer.setRowHeight(1, 20); + for (int i = 0; i < fieldList.size() + 15; i++) { + writer.setColumnWidth(i, 20); + } + Cell cell = writer.getCell(0, 0); + CellStyle cellStyle = cell.getCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = writer.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short) 16); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=contacts.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }catch (Exception e){ + e.printStackTrace(); + }finally { + // 关闭writer,释放内存 + writer.close(); } - //自定义标题别名 - //response为HttpServletResponse对象 - response.setContentType("application/vnd.ms-excel;charset=utf-8"); - response.setCharacterEncoding("UTF-8"); - //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 - response.setHeader("Content-Disposition", "attachment;filename=contacts.xls"); - ServletOutputStream out = response.getOutputStream(); - writer.flush(out); - // 关闭writer,释放内存 - writer.close(); } /** * @author wyq * 获取联系人导入模板 */ - public void downloadExcel(){ + @LoginFormCookie + public void downloadExcel() { List recordList = adminFieldService.queryAddField(3); - recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); + recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType")) || "user".equals(record.getStr("formType")) || "structure".equals(record.getStr("formType"))); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("联系人导入表"); - HSSFRow row = sheet.createRow(0); - List customerList = Db.query("select customer_name from 72crm_crm_customer"); - for (int i=0;i < recordList.size();i++){ - Record record = recordList.get(i); - String[] setting = record.get("setting"); - // 在第一行第一个单元格,插入选项 - HSSFCell cell = row.createCell(i); - // 普通写入操作 - if (record.getInt("is_null") == 1){ - cell.setCellValue(record.getStr("name")+"(*)"); - }else { - cell.setCellValue(record.getStr("name")); - } - if (setting.length != 0){ - // 生成下拉列表 - CellRangeAddressList regions = new CellRangeAddressList(0, Integer.MAX_VALUE, i, i); - // 生成下拉框内容 - DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); - // 绑定下拉框和作用区域 - HSSFDataValidation dataValidation = new HSSFDataValidation(regions,constraint); - // 对sheet页生效 - sheet.addValidationData(dataValidation); - } - } - HttpServletResponse response = getResponse(); + sheet.setDefaultColumnWidth(12); + sheet.setDefaultRowHeight((short)400); + HSSFRow titleRow = sheet.createRow(0); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = wb.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short)16); + cellStyle.setFont(font); + titleRow.createCell(0).setCellValue("联系人导入模板(*)为必填项"); + cellStyle.setAlignment(HorizontalAlignment.CENTER); + titleRow.getCell(0).setCellStyle(cellStyle); + CellRangeAddress region = new CellRangeAddress(0,0 , 0, recordList.size()-1); + sheet.addMergedRegion(region); try { + HSSFRow row = sheet.createRow(1); + for (int i = 0; i < recordList.size(); i++) { + Record record = recordList.get(i); + String[] setting = record.get("setting"); + // 在第一行第一个单元格,插入选项 + HSSFCell cell = row.createCell(i); + // 普通写入操作 + if (record.getInt("is_null") == 1) { + cell.setCellValue(record.getStr("name") + "(*)"); + } else { + cell.setCellValue(record.getStr("name")); + } + if (setting.length != 0) { + // 生成下拉列表 + CellRangeAddressList regions = new CellRangeAddressList(2, Integer.MAX_VALUE, i, i); + // 生成下拉框内容 + DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); + // 绑定下拉框和作用区域 + HSSFDataValidation dataValidation = new HSSFDataValidation(regions, constraint); + // 对sheet页生效 + sheet.addValidationData(dataValidation); + } + } + HttpServletResponse response = getResponse(); response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setCharacterEncoding("UTF-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 response.setHeader("Content-Disposition", "attachment;filename=contacts_import.xls"); wb.write(response.getOutputStream()); - wb.close(); } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("error", e); + } finally { + try { + wb.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } } renderNull(); } @@ -285,12 +327,12 @@ public void downloadExcel(){ * 联系人导入 */ @Permissions("crm:contacts:excelimport") - @NotNullValidate(value = "ownerUserId",message = "请选择负责人") - public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId){ - Db.tx(() ->{ - R result = crmContactsService.uploadExcel(file,repeatHandling,ownerUserId); + @NotNullValidate(value = "ownerUserId", message = "请选择负责人") + public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId) { + Db.tx(() -> { + R result = crmContactsService.uploadExcel(file, repeatHandling, ownerUserId); renderJson(result); - if (result.get("code").equals(500)){ + if (result.get("code").equals(500)) { return false; } return true; diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContractController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContractController.java index 99d5b93..b568146 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContractController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmContractController.java @@ -164,14 +164,6 @@ public void deleteMembers(@Para("")CrmContract crmContract){ renderJson(crmContractService.deleteMembers(crmContract)); } - /** - * 查询合同自定义字段 - * @author zxy - */ - public void queryField(){ - renderJson(R.ok().put("data",crmContractService.queryField())); - } - /** * @author wyq * 添加跟进记录 diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmCustomerController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmCustomerController.java index a9129d0..917989f 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmCustomerController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmCustomerController.java @@ -6,7 +6,9 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.jfinal.kit.Kv; +import com.jfinal.log.Log; import com.jfinal.plugin.activerecord.Db; +import com.kakarote.crm9.common.annotation.LoginFormCookie; import com.kakarote.crm9.common.annotation.NotNullValidate; import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; @@ -32,6 +34,8 @@ import com.jfinal.plugin.activerecord.tx.Tx; import com.jfinal.upload.UploadFile; import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddressList; import javax.servlet.ServletOutputStream; @@ -42,6 +46,7 @@ import java.util.Map; public class CrmCustomerController extends Controller { + @Inject private CrmCustomerService crmCustomerService; @@ -65,8 +70,8 @@ public class CrmCustomerController extends Controller { * 查看列表页 */ @Permissions({"crm:customer:index"}) - public void queryPageList(BasePageRequest basePageRequest){ - JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type",2); + public void queryPageList(BasePageRequest basePageRequest) { + JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type", 2); basePageRequest.setJsonObject(jsonObject); renderJson(adminSceneService.filterConditionAndGetPageList(basePageRequest)); } @@ -76,8 +81,8 @@ public void queryPageList(BasePageRequest basePageRequest){ * 查看公海列表页 */ @Permissions({"crm:pool:index"}) - public void queryPoolPageList(BasePageRequest basePageRequest){ - JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type",8); + public void queryPoolPageList(BasePageRequest basePageRequest) { + JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type", 8); basePageRequest.setJsonObject(jsonObject); renderJson(adminSceneService.filterConditionAndGetPageList(basePageRequest)); } @@ -86,18 +91,18 @@ public void queryPoolPageList(BasePageRequest basePageRequest){ * @author wyq * 全局搜索查询客户 */ - public void queryList(BasePageRequest basePageRequest){ - renderJson(R.ok().put("data",crmCustomerService.getCustomerPageList(basePageRequest))); + public void queryList(BasePageRequest basePageRequest) { + renderJson(R.ok().put("data", crmCustomerService.getCustomerPageList(basePageRequest))); } /** * @author wyq * 新增或更新客户 */ - @Permissions({"crm:customer:save","crm:customer:update"}) - public void addOrUpdate(){ - JSONObject jsonObject= JSON.parseObject(getRawData()); - renderJson(crmCustomerService.addOrUpdate(jsonObject,"noImport")); + @Permissions({"crm:customer:save", "crm:customer:update"}) + public void addOrUpdate() { + JSONObject jsonObject = JSON.parseObject(getRawData()); + renderJson(crmCustomerService.addOrUpdate(jsonObject, "noImport")); } /** @@ -105,27 +110,30 @@ public void addOrUpdate(){ * 根据客户id查询 */ @Permissions("crm:customer:read") - @NotNullValidate(value = "customerId",message = "客户id不能为空") - public void queryById(@Para("customerId")Integer customerId){ - renderJson(R.ok().put("data",crmCustomerService.queryById(customerId))); + @NotNullValidate(value = "customerId", message = "客户id不能为空") + public void queryById(@Para("customerId") Integer customerId) { + renderJson(R.ok().put("data", crmCustomerService.queryById(customerId))); } /** * @author wyq * 根据客户名称查询 */ - @NotNullValidate(value = "name",message = "客户名称不能为空") - public void queryByName(@Para("name")String name){ - renderJson(R.ok().put("data",crmCustomerService.queryByName(name))); + @NotNullValidate(value = "name", message = "客户名称不能为空") + public void queryByName(@Para("name") String name) { + renderJson(R.ok().put("data", crmCustomerService.queryByName(name))); } /** * @author wyq * 根据客户id查询联系人 */ - public void queryContacts(BasePageRequest basePageRequest){ + public void queryContacts(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.queryContacts(basePageRequest)); } @@ -134,8 +142,8 @@ public void queryContacts(BasePageRequest basePageRequest){ * 根据id删除客户 */ @Permissions("crm:customer:delete") - @NotNullValidate(value = "customerIds",message = "客户id不能为空") - public void deleteByIds(@Para("customerIds")String customerIds){ + @NotNullValidate(value = "customerIds", message = "客户id不能为空") + public void deleteByIds(@Para("customerIds") String customerIds) { renderJson(crmCustomerService.deleteByIds(customerIds)); } @@ -143,9 +151,12 @@ public void deleteByIds(@Para("customerIds")String customerIds){ * @author wyq * 根据客户id查找商机 */ - public void queryBusiness(BasePageRequest basePageRequest){ + public void queryBusiness(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.queryBusiness(basePageRequest)); } @@ -153,9 +164,12 @@ public void queryBusiness(BasePageRequest basePageRequest){ * @author wyq * 根据客户id查询合同 */ - public void queryContract(BasePageRequest basePageRequest){ + public void queryContract(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.queryContract(basePageRequest)); } @@ -163,17 +177,20 @@ public void queryContract(BasePageRequest basePageRequest){ * @author zxy * 条件查询客户公海 */ - public void queryPageGH(BasePageRequest basePageRequest){ - renderJson(R.ok().put("data",crmCustomerService.queryPageGH(basePageRequest))); + public void queryPageGH(BasePageRequest basePageRequest) { + renderJson(R.ok().put("data", crmCustomerService.queryPageGH(basePageRequest))); } /** * @author wyq * 根据客户id查询回款计划 */ - public void queryReceivablesPlan(BasePageRequest basePageRequest){ + public void queryReceivablesPlan(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.queryReceivablesPlan(basePageRequest)); } @@ -181,9 +198,12 @@ public void queryReceivablesPlan(BasePageRequest basePageRequest){ * @author zxy * 根据客户id查询回款 */ - public void queryReceivables(BasePageRequest basePageRequest){ + public void queryReceivables(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.queryReceivables(basePageRequest)); } @@ -192,37 +212,38 @@ public void queryReceivables(BasePageRequest basePageRequest){ * 客户锁定 */ @Permissions("crm:customer:lock") - @NotNullValidate(value = "ids",message = "客户id不能为空") - @NotNullValidate(value = "isLock",message = "锁定状态不能为空") - public void lock(@Para("")CrmCustomer crmCustomer){ + @NotNullValidate(value = "ids", message = "客户id不能为空") + @NotNullValidate(value = "isLock", message = "锁定状态不能为空") + public void lock(@Para("") CrmCustomer crmCustomer) { renderJson(crmCustomerService.lock(crmCustomer)); } /** * 客户转移 + * * @author wyq */ @Permissions("crm:customer:transfer") - @NotNullValidate(value = "customerIds",message = "客户id不能为空") - @NotNullValidate(value = "newOwnerUserId",message = "新负责人不能为空") - @NotNullValidate(value = "transferType",message = "移除方式不能为空") + @NotNullValidate(value = "customerIds", message = "客户id不能为空") + @NotNullValidate(value = "newOwnerUserId", message = "新负责人不能为空") + @NotNullValidate(value = "transferType", message = "移除方式不能为空") @Before(Tx.class) - public void transfer(@Para("")CrmCustomer crmCustomer){ + public void transfer(@Para("") CrmCustomer crmCustomer) { String[] customerIdsArr = crmCustomer.getCustomerIds().split(","); - for (String customerId : customerIdsArr){ + for (String customerId : customerIdsArr) { crmCustomer.setCustomerId(Integer.valueOf(customerId)); renderJson(crmCustomerService.updateOwnerUserId(crmCustomer)); String changeType = crmCustomer.getChangeType(); - if(StrUtil.isNotEmpty(changeType)) { + if (StrUtil.isNotEmpty(changeType)) { String[] changeTypeArr = changeType.split(","); - for(String type : changeTypeArr) { - if("1".equals(type)) {//更新联系人负责人 - renderJson(crmContactsService.updateOwnerUserId(crmCustomer.getCustomerId(),crmCustomer.getNewOwnerUserId()) ? R.ok() : R.error()); + for (String type : changeTypeArr) { + if ("1".equals(type)) {//更新联系人负责人 + renderJson(crmContactsService.updateOwnerUserId(crmCustomer.getCustomerId(), crmCustomer.getNewOwnerUserId()) ? R.ok() : R.error()); } - if("2".equals(type)) {//更新商机负责人 + if ("2".equals(type)) {//更新商机负责人 renderJson(crmBusinessService.updateOwnerUserId(crmCustomer)); } - if("3".equals(type)) {//更新合同负责人 + if ("3".equals(type)) {//更新合同负责人 renderJson(crmContractService.updateOwnerUserId(crmCustomer)); } } @@ -234,11 +255,14 @@ public void transfer(@Para("")CrmCustomer crmCustomer){ * @author wyq * 查询团队成员 */ - @NotNullValidate(value = "customerId",message = "客户id不能为空") - public void getMembers(@Para("customerId")Integer customerId){ + @NotNullValidate(value = "customerId", message = "客户id不能为空") + public void getMembers(@Para("customerId") Integer customerId) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), customerId); - if(auth){renderJson(R.noAuth()); return; } - renderJson(R.ok().put("data",crmCustomerService.getMembers(customerId))); + if (auth) { + renderJson(R.noAuth()); + return; + } + renderJson(R.ok().put("data", crmCustomerService.getMembers(customerId))); } /** @@ -246,16 +270,16 @@ public void getMembers(@Para("customerId")Integer customerId){ * 添加团队成员 */ @Permissions("crm:customer:teamsave") - @NotNullValidate(value = "ids",message = "客户id不能为空") - @NotNullValidate(value = "memberIds",message = "成员id不能为空") - @NotNullValidate(value = "power",message = "读写权限不能为空") + @NotNullValidate(value = "ids", message = "客户id不能为空") + @NotNullValidate(value = "memberIds", message = "成员id不能为空") + @NotNullValidate(value = "power", message = "读写权限不能为空") @Before(Tx.class) - public void addMembers(@Para("")CrmCustomer crmCustomer){ - String changeType=crmCustomer.getChangeType(); - if(StrUtil.isNotEmpty(changeType)) { + public void addMembers(@Para("") CrmCustomer crmCustomer) { + String changeType = crmCustomer.getChangeType(); + if (StrUtil.isNotEmpty(changeType)) { String[] changeTypeArr = changeType.split(","); - for(String type : changeTypeArr) { - if("2".equals(type)) {//更新商机 + for (String type : changeTypeArr) { + if ("2".equals(type)) {//更新商机 CrmBusiness crmBusiness = new CrmBusiness(); crmBusiness.setIds(crmCustomerService.getBusinessIdsByCustomerIds(crmCustomer.getIds())); crmBusiness.setMemberIds(crmCustomer.getMemberIds()); @@ -263,7 +287,7 @@ public void addMembers(@Para("")CrmCustomer crmCustomer){ crmBusiness.setTransferType(crmCustomer.getTransferType()); crmBusinessService.addMember(crmBusiness); } - if("3".equals(type)) {//更新合同 + if ("3".equals(type)) {//更新合同 CrmContract crmContract = new CrmContract(); crmContract.setIds(crmCustomerService.getContractIdsByCustomerIds(crmCustomer.getIds())); crmContract.setMemberIds(crmCustomer.getMemberIds()); @@ -281,10 +305,10 @@ public void addMembers(@Para("")CrmCustomer crmCustomer){ * @author wyq * 编辑团队成员 */ - @NotNullValidate(value = "ids",message = "商机id不能为空") - @NotNullValidate(value = "memberIds",message = "成员id不能为空") - @NotNullValidate(value = "power",message = "读写权限不能为空") - public void updateMembers(@Para("")CrmCustomer crmCustomer){ + @NotNullValidate(value = "ids", message = "商机id不能为空") + @NotNullValidate(value = "memberIds", message = "成员id不能为空") + @NotNullValidate(value = "power", message = "读写权限不能为空") + public void updateMembers(@Para("") CrmCustomer crmCustomer) { renderJson(crmCustomerService.addMember(crmCustomer)); } @@ -292,53 +316,51 @@ public void updateMembers(@Para("")CrmCustomer crmCustomer){ * @author wyq * 删除团队成员 */ - @NotNullValidate(value = "ids",message = "客户id不能为空") - @NotNullValidate(value = "memberIds",message = "成员id不能为空") - public void deleteMembers(@Para("")CrmCustomer crmCustomer){ + @NotNullValidate(value = "ids", message = "客户id不能为空") + @NotNullValidate(value = "memberIds", message = "成员id不能为空") + public void deleteMembers(@Para("") CrmCustomer crmCustomer) { renderJson(crmCustomerService.deleteMembers(crmCustomer)); } + /** * @author zxy * 客户保护规则设置 */ - @NotNullValidate(value = "followupDay",message = "跟进天数不能为空") - @NotNullValidate(value = "dealDay",message = "成交天数不能为空") - @NotNullValidate(value = "type",message = "启用状态不能为空") - public void updateRulesSetting(){ + @Permissions("manage:crm") + @NotNullValidate(value = "followupDay", message = "跟进天数不能为空") + @NotNullValidate(value = "dealDay", message = "成交天数不能为空") + @NotNullValidate(value = "type", message = "启用状态不能为空") + public void updateRulesSetting() { //跟进天数 - Integer followupDay = getParaToInt("followupDay"); + Integer followupDay = getParaToInt("followupDay"); //成交天数 Integer dealDay = getParaToInt("dealDay"); //启用状态 Integer type = getParaToInt("type"); - renderJson(crmCustomerService.updateRulesSetting(dealDay,followupDay,type)); + renderJson(crmCustomerService.updateRulesSetting(dealDay, followupDay, type)); } + /** * @author zxy * 获取客户保护规则设置 */ - public void getRulesSetting(){ + public void getRulesSetting() { renderJson(crmCustomerService.getRulesSetting()); } - /** - * @author wyq - * 查询自定义字段 - */ - public void queryField(){ - renderJson(R.ok().put("data",crmCustomerService.queryField())); - } - /** * @author wyq * 添加跟进记录 */ - @NotNullValidate(value = "typesId",message = "客户id不能为空") - @NotNullValidate(value = "content",message = "内容不能为空") - @NotNullValidate(value = "category",message = "跟进类型不能为空") - public void addRecord(@Para("")AdminRecord adminRecord){ + @NotNullValidate(value = "typesId", message = "客户id不能为空") + @NotNullValidate(value = "content", message = "内容不能为空") + @NotNullValidate(value = "category", message = "跟进类型不能为空") + public void addRecord(@Para("") AdminRecord adminRecord) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), adminRecord.getTypesId()); - if(auth){renderJson(R.noAuth()); return; } + if (auth) { + renderJson(R.noAuth()); + return; + } renderJson(crmCustomerService.addRecord(adminRecord)); } @@ -346,10 +368,13 @@ public void addRecord(@Para("")AdminRecord adminRecord){ * @author wyq * 查看跟进记录 */ - public void getRecord(BasePageRequest basePageRequest){ + public void getRecord(BasePageRequest basePageRequest) { boolean auth = AuthUtil.isCrmAuth(AuthUtil.getCrmTablePara(CrmEnum.CUSTOMER_TYPE_KEY.getSign()), basePageRequest.getData().getCustomerId()); - if(auth){renderJson(R.noAuth()); return; } - renderJson(R.ok().put("data",crmCustomerService.getRecord(basePageRequest))); + if (auth) { + renderJson(R.noAuth()); + return; + } + renderJson(R.ok().put("data", crmCustomerService.getRecord(basePageRequest))); } /** @@ -357,7 +382,7 @@ public void getRecord(BasePageRequest basePageRequest){ * 客户批量导出 */ @Permissions("crm:customer:excelexport") - public void batchExportExcel(@Para("ids")String customerIds) throws IOException { + public void batchExportExcel(@Para("ids") String customerIds) throws IOException { List recordList = crmCustomerService.exportCustomer(customerIds); export(recordList); renderNull(); @@ -368,11 +393,11 @@ public void batchExportExcel(@Para("ids")String customerIds) throws IOException * 全部导出 */ @Permissions("crm:customer:excelexport") - public void allExportExcel(BasePageRequest basePageRequest) throws IOException{ + public void allExportExcel(BasePageRequest basePageRequest) throws IOException { JSONObject jsonObject = basePageRequest.getJsonObject(); - jsonObject.fluentPut("excel","yes").fluentPut("type",2); + jsonObject.fluentPut("excel", "yes").fluentPut("type", 2); AdminSceneService adminSceneService = new AdminSceneService(); - List recordList = (List)adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); + List recordList = (List) adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); export(recordList); renderNull(); } @@ -382,7 +407,7 @@ public void allExportExcel(BasePageRequest basePageRequest) throws IOException{ * 公海批量导出 */ @Permissions("crm:pool:excelexport") - public void poolBatchExportExcel(@Para("ids")String customerIds) throws IOException { + public void poolBatchExportExcel(@Para("ids") String customerIds) throws IOException { List recordList = crmCustomerService.exportCustomer(customerIds); export(recordList); renderNull(); @@ -393,145 +418,191 @@ public void poolBatchExportExcel(@Para("ids")String customerIds) throws IOExcept * 公海全部导出 */ @Permissions("crm:pool:excelexport") - public void poolAllExportExcel(BasePageRequest basePageRequest) throws IOException{ + public void poolAllExportExcel(BasePageRequest basePageRequest) throws IOException { JSONObject jsonObject = basePageRequest.getJsonObject(); - jsonObject.fluentPut("excel","yes").fluentPut("type",8); + jsonObject.fluentPut("excel", "yes").fluentPut("type", 8); AdminSceneService adminSceneService = new AdminSceneService(); - List recordList = (List)adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); + List recordList = (List) adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); export(recordList); renderNull(); } - private void export(List recordList) throws IOException{ - ExcelWriter writer = ExcelUtil.getWriter(); - AdminFieldService adminFieldService = new AdminFieldService(); - List fieldList = adminFieldService.customFieldList("2"); - List customerFields = adminFieldService.list("2"); - Kv kv = new Kv(); - customerFields.forEach(customerField -> kv.set(customerField.getStr("field_name"),customerField.getStr("name"))); - writer.addHeaderAlias("customer_name",kv.getStr("customer_name")); - writer.addHeaderAlias("telephone",kv.getStr("telephone")); - writer.addHeaderAlias("mobile",kv.getStr("mobile")); - writer.addHeaderAlias("website",kv.getStr("website")); - writer.addHeaderAlias("next_time",kv.getStr("next_time")); - writer.addHeaderAlias("deal_status",kv.getStr("deal_status")); - writer.addHeaderAlias("create_user_name","创建人"); - writer.addHeaderAlias("owner_user_name","负责人"); - writer.addHeaderAlias("address","省市区"); - writer.addHeaderAlias("location","定位信息"); - writer.addHeaderAlias("detail_address","详细地址"); - writer.addHeaderAlias("lng","地理位置经度"); - writer.addHeaderAlias("lat","地理位置维度"); - writer.addHeaderAlias("create_time","创建时间"); - writer.addHeaderAlias("update_time","更新时间"); - writer.addHeaderAlias("remark",kv.getStr("remark")); - for (Record field:fieldList){ - writer.addHeaderAlias(field.getStr("name"),field.getStr("name")); - } - writer.merge(fieldList.size()+15,"客户信息"); - HttpServletResponse response = getResponse(); - List> list = new ArrayList<>(); - for (Record record : recordList){ - list.add(record.remove("batch_id","create_user_id","customer_id","is_lock","owner_user_id","ro_user_id","rw_user_id","followup","field_batch_id").getColumns()); - } - writer.write(list,true); - for (int i=0; i < fieldList.size()+16;i++){ - writer.setColumnWidth(i,20); + private void export(List recordList) throws IOException { + ExcelWriter writer = null; + try { + writer = ExcelUtil.getWriter(); + AdminFieldService adminFieldService = new AdminFieldService(); + List fieldList = adminFieldService.customFieldList("2"); + List customerFields = adminFieldService.list("2"); + Kv kv = new Kv(); + customerFields.forEach(customerField -> kv.set(customerField.getStr("field_name"), customerField.getStr("name"))); + writer.addHeaderAlias("customer_name", kv.getStr("customer_name")); + writer.addHeaderAlias("telephone", kv.getStr("telephone")); + writer.addHeaderAlias("mobile", kv.getStr("mobile")); + writer.addHeaderAlias("website", kv.getStr("website")); + writer.addHeaderAlias("next_time", kv.getStr("next_time")); + writer.addHeaderAlias("deal_status", kv.getStr("deal_status")); + writer.addHeaderAlias("create_user_name", "创建人"); + writer.addHeaderAlias("owner_user_name", "负责人"); + writer.addHeaderAlias("address", "省市区"); + writer.addHeaderAlias("location", "定位信息"); + writer.addHeaderAlias("detail_address", "详细地址"); + writer.addHeaderAlias("lng", "地理位置经度"); + writer.addHeaderAlias("lat", "地理位置维度"); + writer.addHeaderAlias("create_time", "创建时间"); + writer.addHeaderAlias("update_time", "更新时间"); + writer.addHeaderAlias("remark", kv.getStr("remark")); + for (Record field : fieldList) { + writer.addHeaderAlias(field.getStr("name"), field.getStr("name")); + } + writer.merge(fieldList.size() + 15, "客户信息"); + HttpServletResponse response = getResponse(); + List> list = new ArrayList<>(); + for (Record record : recordList) { + list.add(record.remove("batch_id", "create_user_id", "customer_id", "is_lock", "owner_user_id", "ro_user_id", "rw_user_id", "followup", "field_batch_id").getColumns()); + } + writer.write(list, true); + writer.setRowHeight(0, 20); + writer.setRowHeight(1, 20); + for (int i = 0; i < fieldList.size() + 16; i++) { + writer.setColumnWidth(i, 20); + } + Cell cell = writer.getCell(0, 0); + CellStyle cellStyle = cell.getCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = writer.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short) 16); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=customer.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }catch (Exception e){ + e.printStackTrace(); + }finally { + // 关闭writer,释放内存 + writer.close(); } - //自定义标题别名 - //response为HttpServletResponse对象 - response.setContentType("application/vnd.ms-excel;charset=utf-8"); - response.setCharacterEncoding("UTF-8"); - //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 - response.setHeader("Content-Disposition", "attachment;filename=customer.xls"); - ServletOutputStream out = response.getOutputStream(); - writer.flush(out); - // 关闭writer,释放内存 - writer.close(); } /** * 客户放入公海 + * * @author zxy */ @Permissions("crm:customer:putinpool") - public void updateCustomerByIds(){ + public void updateCustomerByIds() { String ids = get("ids"); renderJson(crmCustomerService.updateCustomerByIds(ids)); } /** * 领取或分配客户 + * * @author zxy */ @Permissions("crm:customer:distribute") - public void getCustomersByIds(){ + public void getCustomersByIds() { String ids = get("ids"); Long userId = getLong("userId"); - /* JSONObject jsonObject= JSON.parseObject(getRawData());*/ - renderJson(crmCustomerService.getCustomersByIds(ids,userId)); + /* JSONObject jsonObject= JSON.parseObject(getRawData());*/ + renderJson(crmCustomerService.getCustomersByIds(ids, userId)); } /** * 公海分配客户 + * * @author zxy */ @Permissions("crm:pool:distribute") - public void distributeByIds(){ + public void distributeByIds() { String ids = get("ids"); Long userId = getLong("userId"); - renderJson(crmCustomerService.getCustomersByIds(ids,userId)); + renderJson(crmCustomerService.getCustomersByIds(ids, userId)); } /** * 公海领取客户 + * * @author zxy */ @Permissions("crm:pool:receive") - public void receiveByIds(){ + public void receiveByIds() { String ids = get("ids"); Long userId = getLong("userId"); - renderJson(crmCustomerService.getCustomersByIds(ids,userId)); + renderJson(crmCustomerService.getCustomersByIds(ids, userId)); } /** * @author wyq * 获取导入模板 */ - public void downloadExcel(){ + @LoginFormCookie + public void downloadExcel() { List recordList = adminFieldService.queryAddField(2); + recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType")) || "user".equals(record.getStr("formType")) || "structure".equals(record.getStr("formType"))); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("客户导入表"); - HSSFRow row = sheet.createRow(0); - for (int i=0;i < recordList.size();i++){ - Record record = recordList.get(i); - if ("map_address".equals(record.getStr("field_name"))){ - record.set("name","详细地址").set("setting",new String[]{}); - } - String[] setting = record.get("setting"); - HSSFCell cell = row.createCell(i); - if (record.getInt("is_null") == 1){ - cell.setCellValue(record.getStr("name")+"(*)"); - }else { - cell.setCellValue(record.getStr("name")); - } - if (setting != null && setting.length != 0){ - CellRangeAddressList regions = new CellRangeAddressList(0, Integer.MAX_VALUE, i, i); - DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); - HSSFDataValidation dataValidation = new HSSFDataValidation(regions,constraint); - sheet.addValidationData(dataValidation); - } - } - HttpServletResponse response = getResponse(); + sheet.setDefaultColumnWidth(12); + sheet.setDefaultRowHeight((short)400); + HSSFRow titleRow = sheet.createRow(0); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = wb.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short) 16); + cellStyle.setFont(font); + titleRow.createCell(0).setCellValue("客户导入模板(*)为必填项"); + cellStyle.setAlignment(HorizontalAlignment.CENTER); + titleRow.getCell(0).setCellStyle(cellStyle); + CellRangeAddress region = new CellRangeAddress(0,0 , 0, recordList.size()-1); + sheet.addMergedRegion(region); try { + HSSFRow row = sheet.createRow(1); + for (int i = 0; i < recordList.size(); i++) { + Record record = recordList.get(i); + if ("map_address".equals(record.getStr("field_name"))) { + record.set("name", "详细地址").set("setting", new String[]{}); + } + String[] setting = record.get("setting"); + HSSFCell cell = row.createCell(i); + if (record.getInt("is_null") == 1) { + cell.setCellValue(record.getStr("name") + "(*)"); + } else { + cell.setCellValue(record.getStr("name")); + } + if (setting != null && setting.length != 0) { + CellRangeAddressList regions = new CellRangeAddressList(2, Integer.MAX_VALUE, i, i); + DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); + HSSFDataValidation dataValidation = new HSSFDataValidation(regions, constraint); + sheet.addValidationData(dataValidation); + } + } + HttpServletResponse response = getResponse(); + response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setCharacterEncoding("UTF-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 response.setHeader("Content-Disposition", "attachment;filename=customer_import.xls"); wb.write(response.getOutputStream()); - wb.close(); + } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("error", e); + } finally { + try { + wb.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } renderNull(); } @@ -541,12 +612,12 @@ public void downloadExcel(){ * 导入客户 */ @Permissions("crm:customer:excelimport") - @NotNullValidate(value = "ownerUserId",message = "请选择负责人") - public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId){ - Db.tx(() ->{ - R result = crmCustomerService.uploadExcel(file,repeatHandling,ownerUserId); + @NotNullValidate(value = "ownerUserId", message = "请选择负责人") + public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId) { + Db.tx(() -> { + R result = crmCustomerService.uploadExcel(file, repeatHandling, ownerUserId); renderJson(result); - if (result.get("code").equals(500)){ + if (result.get("code").equals(500)) { return false; } return true; diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmLeadsController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmLeadsController.java index 15de128..278830f 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmLeadsController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmLeadsController.java @@ -4,7 +4,9 @@ import cn.hutool.poi.excel.ExcelWriter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.jfinal.log.Log; import com.jfinal.plugin.activerecord.Db; +import com.kakarote.crm9.common.annotation.LoginFormCookie; import com.kakarote.crm9.common.annotation.NotNullValidate; import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; @@ -24,6 +26,8 @@ import com.jfinal.plugin.activerecord.tx.Tx; import com.jfinal.upload.UploadFile; import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddressList; import javax.servlet.ServletOutputStream; @@ -121,14 +125,6 @@ public void transfer(@Para("leadsIds")String leadsIds){ renderJson(crmLeadsService.translate(leadsIds)); } - /** - * @author wyq - * 查询自定义字段 - */ - public void queryField(){ - renderJson(R.ok().put("data",crmLeadsService.queryField())); - } - /** * @author wyq * 添加跟进记录 @@ -181,86 +177,126 @@ public void allExportExcel(BasePageRequest basePageRequest) throws IOException{ } private void export(List recordList) throws IOException{ - ExcelWriter writer = ExcelUtil.getWriter(); - AdminFieldService adminFieldService = new AdminFieldService(); - List fieldList = adminFieldService.customFieldList("1"); - writer.addHeaderAlias("leads_name","线索名称"); - writer.addHeaderAlias("next_time","下次联系时间"); - writer.addHeaderAlias("telephone","电话"); - writer.addHeaderAlias("mobile","手机号"); - writer.addHeaderAlias("address","地址"); - writer.addHeaderAlias("remark","备注"); - writer.addHeaderAlias("create_user_name","创建人"); - writer.addHeaderAlias("owner_user_name","负责人"); - writer.addHeaderAlias("create_time","创建时间"); - writer.addHeaderAlias("update_time","更新时间"); - for (Record field:fieldList){ - writer.addHeaderAlias(field.getStr("name"),field.getStr("name")); - } - writer.merge(10+fieldList.size(),"线索信息"); - HttpServletResponse response = getResponse(); - List> list = new ArrayList<>(); - for (Record record : recordList){ - list.add(record.remove("batch_id","is_transform","customer_id","leads_id","owner_user_id","create_user_id","followup","field_batch_id").getColumns()); - } - writer.write(list,true); - for (int i=0; i < fieldList.size()+15;i++){ - writer.setColumnWidth(i,20); + ExcelWriter writer = null; + try { + writer = ExcelUtil.getWriter(); + AdminFieldService adminFieldService = new AdminFieldService(); + List fieldList = adminFieldService.customFieldList("1"); + writer.addHeaderAlias("leads_name","线索名称"); + writer.addHeaderAlias("next_time","下次联系时间"); + writer.addHeaderAlias("telephone","电话"); + writer.addHeaderAlias("mobile","手机号"); + writer.addHeaderAlias("address","地址"); + writer.addHeaderAlias("remark","备注"); + writer.addHeaderAlias("create_user_name","创建人"); + writer.addHeaderAlias("owner_user_name","负责人"); + writer.addHeaderAlias("create_time","创建时间"); + writer.addHeaderAlias("update_time","更新时间"); + for (Record field:fieldList){ + writer.addHeaderAlias(field.getStr("name"),field.getStr("name")); + } + writer.merge(fieldList.size()+1,"线索信息"); + HttpServletResponse response = getResponse(); + List> list = new ArrayList<>(); + for (Record record : recordList){ + list.add(record.remove("batch_id","is_transform","customer_id","leads_id","owner_user_id","create_user_id","followup","field_batch_id").getColumns()); + } + writer.write(list,true); + writer.setRowHeight(0, 30); + writer.setRowHeight(1, 20); + for (int i=0; i < fieldList.size()+15;i++){ + writer.setColumnWidth(i,20); + } + Cell cell = writer.getCell(0, 0); + CellStyle cellStyle = cell.getCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = writer.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short) 16); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=leads.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }catch (Exception e){ + e.printStackTrace(); + }finally { + // 关闭writer,释放内存 + writer.close(); } - //自定义标题别名 - //response为HttpServletResponse对象 - response.setContentType("application/vnd.ms-excel;charset=utf-8"); - response.setCharacterEncoding("UTF-8"); - //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 - response.setHeader("Content-Disposition", "attachment;filename=leads.xls"); - ServletOutputStream out = response.getOutputStream(); - writer.flush(out); - // 关闭writer,释放内存 - writer.close(); } /** * @author wyq * 获取线索导入模板 */ + @LoginFormCookie public void downloadExcel(){ List recordList = adminFieldService.queryAddField(1); recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("线索导入表"); - HSSFRow row = sheet.createRow(0); - for (int i=0;i < recordList.size();i++){ - Record record = recordList.get(i); - String[] setting = record.get("setting"); - // 在第一行第一个单元格,插入选项 - HSSFCell cell = row.createCell(i); - // 普通写入操作 - if (record.getInt("is_null") == 1){ - cell.setCellValue(record.getStr("name")+"(*)"); - }else { - cell.setCellValue(record.getStr("name")); - } - if (setting.length != 0){ - // 生成下拉列表 - CellRangeAddressList regions = new CellRangeAddressList(0, Integer.MAX_VALUE, i, i); - // 生成下拉框内容 - DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); - // 绑定下拉框和作用区域 - HSSFDataValidation dataValidation = new HSSFDataValidation(regions,constraint); - // 对sheet页生效 - sheet.addValidationData(dataValidation); - } - } - HttpServletResponse response = getResponse(); + sheet.setDefaultColumnWidth(12); + sheet.setDefaultRowHeight((short)400); + HSSFRow titleRow = sheet.createRow(0); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = wb.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short)16); + cellStyle.setFont(font); + titleRow.createCell(0).setCellValue("线索导入模板(*)为必填项"); + cellStyle.setAlignment(HorizontalAlignment.CENTER); + titleRow.getCell(0).setCellStyle(cellStyle); + CellRangeAddress region = new CellRangeAddress(0,0 , 0, recordList.size()-1); + sheet.addMergedRegion(region); try { + HSSFRow row = sheet.createRow(1); + for (int i=0;i < recordList.size();i++){ + Record record = recordList.get(i); + String[] setting = record.get("setting"); + // 在第一行第一个单元格,插入选项 + HSSFCell cell = row.createCell(i); + // 普通写入操作 + if (record.getInt("is_null") == 1){ + cell.setCellValue(record.getStr("name")+"(*)"); + }else { + cell.setCellValue(record.getStr("name")); + } + if (setting.length != 0){ + // 生成下拉列表 + CellRangeAddressList regions = new CellRangeAddressList(2, Integer.MAX_VALUE, i, i); + // 生成下拉框内容 + DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); + // 绑定下拉框和作用区域 + HSSFDataValidation dataValidation = new HSSFDataValidation(regions,constraint); + // 对sheet页生效 + sheet.addValidationData(dataValidation); + } + } + HttpServletResponse response = getResponse(); + response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setCharacterEncoding("UTF-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 response.setHeader("Content-Disposition", "attachment;filename=leads_import.xls"); wb.write(response.getOutputStream()); - wb.close(); + } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("error",e); + }finally { + try { + wb.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } } renderNull(); } @@ -276,10 +312,7 @@ public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") I Db.tx(() ->{ R result = crmLeadsService.uploadExcel(file,repeatHandling,ownerUserId); renderJson(result); - if (result.get("code").equals(500)){ - return false; - } - return true; + return !result.get("code").equals(500); }); } } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmProductController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmProductController.java index 848cd7b..89b4d3b 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmProductController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmProductController.java @@ -2,12 +2,12 @@ import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelWriter; +import cn.hutool.poi.excel.StyleSet; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.jfinal.aop.Before; -import com.jfinal.aop.Clear; +import com.jfinal.log.Log; import com.jfinal.plugin.activerecord.Db; -import com.jfinal.plugin.activerecord.tx.Tx; +import com.kakarote.crm9.common.annotation.LoginFormCookie; import com.kakarote.crm9.common.annotation.NotNullValidate; import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.erp.admin.service.AdminFieldService; @@ -22,12 +22,13 @@ import com.jfinal.plugin.activerecord.Record; import com.jfinal.upload.UploadFile; import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddressList; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -48,8 +49,8 @@ public class CrmProductController extends Controller { * 查看列表页 */ @Permissions({"crm:product:index"}) - public void queryPageList(BasePageRequest basePageRequest){ - JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type",4); + public void queryPageList(BasePageRequest basePageRequest) { + JSONObject jsonObject = basePageRequest.getJsonObject().fluentPut("type", 4); basePageRequest.setJsonObject(jsonObject); renderJson(adminSceneService.filterConditionAndGetPageList(basePageRequest)); } @@ -68,7 +69,7 @@ public void queryList(BasePageRequest basePageRequest) { * * @author zxy */ - @Permissions({"crm:product:save","crm:product:update"}) + @Permissions({"crm:product:save", "crm:product:update"}) public void saveAndUpdate() { String data = getRawData(); JSONObject jsonObject = JSON.parseObject(data); @@ -104,26 +105,18 @@ public void deleteById(@Para("productId") Integer productId) { */ @Permissions("crm:product:status") public void updateStatus(@Para("ids") String ids, @Para("status") Integer status) { - if (status == null) - { status = 1;} + if (status == null) { + status = 1; + } renderJson(crmProductService.updateStatus(ids, status)); } - /** - * 查询产品自定义字段 - * - * @author zxy - */ - public void queryField() { - renderJson(R.ok().put("data", crmProductService.queryField())); - } - /** * @author wyq * 批量导出产品 */ @Permissions("crm:product:excelexport") - public void batchExportExcel(@Para("ids")String productIds) throws IOException { + public void batchExportExcel(@Para("ids") String productIds) throws IOException { List recordList = crmProductService.exportProduct(productIds); export(recordList); renderNull(); @@ -134,90 +127,132 @@ public void batchExportExcel(@Para("ids")String productIds) throws IOException { * 导出全部产品 */ @Permissions("crm:product:excelexport") - public void allExportExcel(BasePageRequest basePageRequest) throws IOException{ + public void allExportExcel(BasePageRequest basePageRequest) throws IOException { JSONObject jsonObject = basePageRequest.getJsonObject(); - jsonObject.fluentPut("excel","yes").fluentPut("type","4"); + jsonObject.fluentPut("excel", "yes").fluentPut("type", "4"); AdminSceneService adminSceneService = new AdminSceneService(); - List recordList = (List)adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); + List recordList = (List) adminSceneService.filterConditionAndGetPageList(basePageRequest).get("data"); export(recordList); renderNull(); } - private void export(List recordList) throws IOException{ - ExcelWriter writer = ExcelUtil.getWriter(); - AdminFieldService adminFieldService = new AdminFieldService(); - List fieldList = adminFieldService.customFieldList("4"); - writer.addHeaderAlias("name","产品名称"); - writer.addHeaderAlias("num","产品编码"); - writer.addHeaderAlias("category_name","产品类别"); - writer.addHeaderAlias("price","价格"); - writer.addHeaderAlias("description","产品描述"); - writer.addHeaderAlias("create_user_name","创建人"); - writer.addHeaderAlias("owner_user_name","负责人"); - writer.addHeaderAlias("create_time","创建时间"); - writer.addHeaderAlias("update_time","更新时间"); - for (Record field:fieldList){ - writer.addHeaderAlias(field.getStr("name"),field.getStr("name")); - } - writer.merge(8+fieldList.size(),"产品信息"); - HttpServletResponse response = getResponse(); - List> list = new ArrayList<>(); - for (Record record : recordList){ - list.add(record.remove("batch_id","status","unit","category_id","product_id","owner_user_id","create_user_id","field_batch_id").getColumns()); - } - writer.write(list,true); - for (int i=0; i < fieldList.size()+15;i++){ - writer.setColumnWidth(i,20); + private void export(List recordList) throws IOException { + ExcelWriter writer = null; + try { + writer = ExcelUtil.getWriter(); + AdminFieldService adminFieldService = new AdminFieldService(); + List fieldList = adminFieldService.customFieldList("4"); + writer.addHeaderAlias("name", "产品名称"); + writer.addHeaderAlias("num", "产品编码"); + writer.addHeaderAlias("category_name", "产品类别"); + writer.addHeaderAlias("price", "价格"); + writer.addHeaderAlias("description", "产品描述"); + writer.addHeaderAlias("create_user_name", "创建人"); + writer.addHeaderAlias("owner_user_name", "负责人"); + writer.addHeaderAlias("create_time", "创建时间"); + writer.addHeaderAlias("update_time", "更新时间"); + for (Record field : fieldList) { + writer.addHeaderAlias(field.getStr("name"), field.getStr("name")); + } + writer.merge(8 + fieldList.size(), "产品信息"); + HttpServletResponse response = getResponse(); + List> list = new ArrayList<>(); + for (Record record : recordList) { + list.add(record.remove("batch_id", "status", "unit", "category_id", "product_id", "owner_user_id", "create_user_id", "field_batch_id", "multi_spec", "using_sn").getColumns()); + } + writer.write(list, true); + writer.setRowHeight(0, 20); + writer.setRowHeight(1, 20); + for (int i = 0; i < fieldList.size() + 15; i++) { + writer.setColumnWidth(i, 20); + } + Cell cell = writer.getCell(0, 0); + CellStyle cellStyle = cell.getCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = writer.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short) 16); + cellStyle.setFont(font); + cell.setCellStyle(cellStyle); + //自定义标题别名 + //response为HttpServletResponse对象 + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("UTF-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=product.xls"); + ServletOutputStream out = response.getOutputStream(); + writer.flush(out); + }catch (Exception e){ + e.printStackTrace(); + }finally { + // 关闭writer,释放内存 + writer.close(); } - //自定义标题别名 - //response为HttpServletResponse对象 - response.setContentType("application/vnd.ms-excel;charset=utf-8"); - response.setCharacterEncoding("UTF-8"); - //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 - response.setHeader("Content-Disposition", "attachment;filename=product.xls"); - ServletOutputStream out = response.getOutputStream(); - writer.flush(out); - // 关闭writer,释放内存 - writer.close(); } /** * @author zxy * 获取导入模板 */ - public void downloadExcel(){ + @LoginFormCookie + public void downloadExcel() { List recordList = adminFieldService.queryAddField(4); - recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); + recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType")) || "user".equals(record.getStr("formType")) || "structure".equals(record.getStr("formType"))); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("产品导入表"); - HSSFRow row = sheet.createRow(0); + sheet.setDefaultColumnWidth(12); + sheet.setDefaultRowHeight((short)400); + HSSFRow titleRow = sheet.createRow(0); + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font font = wb.createFont(); + font.setBold(true); + font.setFontHeightInPoints((short)16); + cellStyle.setFont(font); + titleRow.createCell(0).setCellValue("产品导入模板(*)为必填项"); + cellStyle.setAlignment(HorizontalAlignment.CENTER); + titleRow.getCell(0).setCellStyle(cellStyle); + CellRangeAddress region = new CellRangeAddress(0,0 , 0, recordList.size()-1); + sheet.addMergedRegion(region); List categoryList = Db.query("select name from 72crm_crm_product_category"); - for (int i=0;i < recordList.size();i++){ - Record record = recordList.get(i); - String[] setting = record.get("setting"); - HSSFCell cell = row.createCell(i); - if (record.getInt("is_null") == 1){ - cell.setCellValue(record.getStr("name")+"(*)"); - }else { - cell.setCellValue(record.getStr("name")); - } - if (setting.length != 0){ - CellRangeAddressList regions = new CellRangeAddressList(0, Integer.MAX_VALUE, i, i); - DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); - HSSFDataValidation dataValidation = new HSSFDataValidation(regions,constraint); - sheet.addValidationData(dataValidation); - } - } - HttpServletResponse response = getResponse(); try { + HSSFRow row = sheet.createRow(1); + for (int i = 0; i < recordList.size(); i++) { + Record record = recordList.get(i); + String[] setting = record.get("setting"); + HSSFCell cell = row.createCell(i); + if (record.getInt("is_null") == 1) { + cell.setCellValue(record.getStr("name") + "(*)"); + } else { + cell.setCellValue(record.getStr("name")); + } + if ("产品类型".equals(record.getStr("name"))) { + setting = categoryList.toArray(new String[categoryList.size()]); + } + if (setting.length != 0) { + CellRangeAddressList regions = new CellRangeAddressList(2, Integer.MAX_VALUE, i, i); + DVConstraint constraint = DVConstraint.createExplicitListConstraint(setting); + HSSFDataValidation dataValidation = new HSSFDataValidation(regions, constraint); + sheet.addValidationData(dataValidation); + } + } + HttpServletResponse response = getResponse(); + response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setCharacterEncoding("UTF-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 response.setHeader("Content-Disposition", "attachment;filename=product_import.xls"); wb.write(response.getOutputStream()); - wb.close(); } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("error:", e); + } finally { + try { + wb.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } } renderNull(); } @@ -227,11 +262,11 @@ public void downloadExcel(){ * 导入产品 */ @Permissions("crm:product:excelimport") - public void uploadExcel (@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId){ - Db.tx(() ->{ - R result = crmProductService.uploadExcel(file,repeatHandling,ownerUserId); + public void uploadExcel(@Para("file") UploadFile file, @Para("repeatHandling") Integer repeatHandling, @Para("ownerUserId") Integer ownerUserId) { + Db.tx(() -> { + R result = crmProductService.uploadExcel(file, repeatHandling, ownerUserId); renderJson(result); - if (result.get("code").equals(500)){ + if (result.get("code").equals(500)) { return false; } return true; @@ -242,7 +277,7 @@ public void uploadExcel (@Para("file") UploadFile file, @Para("repeatHandling") * @author zxy * 获取上架商品 */ - public void queryByStatus(BasePageRequest basePageRequest){ + public void queryByStatus(BasePageRequest basePageRequest) { renderJson(crmProductService.queryByStatus(basePageRequest)); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesController.java index 32ba60f..872cdb7 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesController.java @@ -65,13 +65,6 @@ public void queryById(@Para("receivablesId") Integer receivablesId){ public void deleteByIds(@Para("receivablesIds") String receivablesIds){ renderJson(crmReceivablesService.deleteByIds(receivablesIds)); } - /** - * 查询回款自定义字段 - * @author zxy - */ - public void queryField(){ - renderJson(R.ok().put("data",crmReceivablesService.queryField())); - } /** * 根据条件查询回款 diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesPlanController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesPlanController.java index 1d8f564..3cdc867 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesPlanController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/CrmReceivablesPlanController.java @@ -19,13 +19,6 @@ public void saveAndUpdate(){ JSONObject jsonObject = JSONObject.parseObject(getRawData()); renderJson(receivablesPlanService.saveAndUpdate(jsonObject)); } - /** - * @author zxy - * 查询回款计划自定义字段 - */ - public void queryField(){ - renderJson(R.ok().put("data",receivablesPlanService.queryField())); - } /** * 根据合同id和客户id查询未使用的回款计划 diff --git a/src/main/java/com/kakarote/crm9/erp/crm/controller/InstrumentController.java b/src/main/java/com/kakarote/crm9/erp/crm/controller/InstrumentController.java index 44e3030..0ac4b35 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/controller/InstrumentController.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/controller/InstrumentController.java @@ -1,12 +1,15 @@ package com.kakarote.crm9.erp.crm.controller; import cn.hutool.core.util.StrUtil; +import com.jfinal.core.paragetter.Para; import com.jfinal.plugin.activerecord.Record; +import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.service.AdminUserService; import com.kakarote.crm9.erp.crm.service.InstrumentService; import com.kakarote.crm9.utils.BaseUtil; import com.jfinal.aop.Inject; import com.jfinal.core.Controller; +import com.kakarote.crm9.utils.R; public class InstrumentController extends Controller { @@ -29,15 +32,30 @@ public void queryBulletin() { String deptIds = getPara("deptIds"); String startTime = getPara("startTime"); String endTime = getPara("endTime"); + if (StrUtil.isEmpty(userIds) && StrUtil.isEmpty(deptIds)){ + userIds = BaseUtil.getUserId().toString(); + } + if (StrUtil.isNotEmpty(deptIds)){ + String ids = adminUserService.queryUserIdsByDept(deptIds); + if (StrUtil.isEmpty(ids)){ + userIds = ids + userIds; + } + } + renderJson(instrumentService.queryBulletin(type, userIds,startTime,endTime)); + } + + /** + * @author zhang + * 销售简报的数据查看详情 + */ + public void queryBulletinInfo(BasePageRequest basePageRequest,@Para("deptId")String deptIds, @Para("userIds")String userIds, @Para("type")String type, @Para("label")Integer label) { if (userIds == null) { userIds = BaseUtil.getUser().getUserId().intValue() + ""; } else if (deptIds != null && StrUtil.isNotEmpty(deptIds)) { userIds = adminUserService.queryUserIdsByDept(deptIds) + "," + userIds; } - - renderJson(instrumentService.queryBulletin(type, userIds,startTime,endTime)); + renderJson(R.ok().put("data",instrumentService.queryBulletinInfo(basePageRequest,userIds,type,label))); } - /** * 销售趋势 * type 1.今天 2.昨天 3.本周 4.上周 5.本月6.上月7.本季度8.上季度9.本年10上年11.自定义 @@ -50,17 +68,21 @@ public void sellMonth() { String deptIds = getPara("deptIds"); String startTime = getPara("startTime"); String endTime = getPara("endTime"); - if (userIds == null) { - userIds = BaseUtil.getUser().getUserId().toString(); - } else if (deptIds != null && StrUtil.isNotEmpty(deptIds)) { - userIds = adminUserService.queryUserIdsByDept(deptIds) + "," + userIds; + if (StrUtil.isEmpty(userIds) && StrUtil.isEmpty(deptIds)){ + userIds = BaseUtil.getUserId().toString(); + } + if (StrUtil.isNotEmpty(deptIds)){ + String ids = adminUserService.queryUserIdsByDept(deptIds); + if (StrUtil.isEmpty(ids)){ + userIds = ids + userIds; + } } renderJson(instrumentService.salesTrend(type,userIds,startTime,endTime)); } /** * 业绩指标 - * status 1 回款 2.合同 + * status 1 合同 2.回款 * deptIds 门id拼写id之间用‘,’隔开 * userIds 员工id拼写id之间用‘,’隔开 */ @@ -78,6 +100,10 @@ public void queryPerformance() { deptIds = record.getStr("deptIds"); allUsetIds = record.getStr("arrUserIds"); } + if (StrUtil.isEmpty(userIds)){ + renderJson(R.ok()); + return; + } renderJson(instrumentService.queryPerformance(startTime, endTime, userIds,deptIds, status,type,allUsetIds)); } /** @@ -90,10 +116,14 @@ public void queryBusiness() { String startTime = getPara("startTime"); String endTime = getPara("endTime"); Integer typeId = getInt("typeId"); - if (userIds == null) { - userIds = BaseUtil.getUser().getUserId().intValue() + ""; - } else if (deptIds != null && StrUtil.isNotEmpty(deptIds)) { - userIds = adminUserService.queryUserIdsByDept(deptIds) + "," + userIds; + if (StrUtil.isEmpty(userIds) && StrUtil.isEmpty(deptIds)){ + userIds = BaseUtil.getUserId().toString(); + } + if (StrUtil.isNotEmpty(deptIds)){ + String ids = adminUserService.queryUserIdsByDept(deptIds); + if (StrUtil.isEmpty(ids)){ + userIds = ids + userIds; + } } renderJson(instrumentService.sellFunnel(type,userIds,startTime, endTime,typeId)); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmBusiness.java b/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmBusiness.java index 134ec49..a3c73df 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmBusiness.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmBusiness.java @@ -3,6 +3,8 @@ import com.jfinal.plugin.activerecord.IBean; import com.jfinal.plugin.activerecord.Model; +import java.math.BigDecimal; + /** * Generated by JFinal, do not modify this file. */ @@ -81,6 +83,14 @@ public java.math.BigDecimal getDiscountRate() { return get("discount_rate"); } + public void setTotalPrice(String totalPrice) { + set("total_price", new BigDecimal(totalPrice)); + } + + public java.math.BigDecimal getTotalPrice() { + return get("total_price"); + } + public void setRemark(String remark){ set("remark", remark); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmContract.java b/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmContract.java index e9b5270..cee3e31 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmContract.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/entity/base/BaseCrmContract.java @@ -3,6 +3,8 @@ import com.jfinal.plugin.activerecord.IBean; import com.jfinal.plugin.activerecord.Model; +import java.math.BigDecimal; + /** * Generated by JFinal, do not modify this file. */ @@ -137,6 +139,14 @@ public java.math.BigDecimal getDiscountRate() { return get("discount_rate"); } + public void setTotalPrice(String totalPrice) { + set("total_price", new BigDecimal(totalPrice)); + } + + public java.math.BigDecimal getTotalPrice() { + return get("total_price"); + } + public void setTypes(String types) { set("types", types); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBackLogService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBackLogService.java index a2fcf15..2f1716d 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBackLogService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBackLogService.java @@ -137,7 +137,10 @@ public R followLeads(BasePageRequest basePageRequest){ * 标记客户为已跟进 */ public R setCustomerFollowup(String ids){ - Db.update(Db.getSqlPara("crm.backLog.setCustomerFollowup",Kv.by("ids",ids))); + List stringList=StrUtil.splitTrim(ids,","); + if(stringList.size()>0){ + Db.update(Db.getSqlPara("crm.backLog.setCustomerFollowup",Kv.by("ids",stringList))); + } return R.ok(); } @@ -148,7 +151,7 @@ public R followCustomer(BasePageRequest basePageRequest){ JSONObject jsonObject = basePageRequest.getJsonObject(); Integer type = jsonObject.getInteger("type"); Integer isSub = jsonObject.getInteger("isSub"); - StringBuffer stringBuffer = new StringBuffer("from customerview as a where"); + StringBuilder stringBuffer = new StringBuilder("from customerview as a where"); if (type == 1){ stringBuffer.append(" a.followup = 0"); }else if (type == 2){ @@ -182,11 +185,11 @@ public R checkContract(BasePageRequest basePageRequest){ JSONObject jsonObject = basePageRequest.getJsonObject(); Integer type = jsonObject.getInteger("type"); Integer isSub = jsonObject.getInteger("isSub"); - StringBuffer stringBuffer = new StringBuffer("select contract_id from 72crm_crm_contract as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id where ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and"); + StringBuffer stringBuffer = new StringBuffer("select contract_id from 72crm_crm_contract as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id where c.is_recheck != 1 and ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and"); if (type == 1){ - stringBuffer.append(" c.examine_status = 0"); + stringBuffer.append(" a.check_status in (0,1)"); }else if (type == 2){ - stringBuffer.append(" c.examine_status in (1,2)"); + stringBuffer.append(" a.check_status in (2,3)"); }else { return R.error("type类型不正确"); } @@ -208,7 +211,9 @@ public R checkContract(BasePageRequest basePageRequest){ Page page = Db.paginate(basePageRequest.getPage(),basePageRequest.getLimit(),"select *","from contractview as a where a.contract_id in ("+contractIds+")"+getConditionSql(data)); return R.ok().put("data",page); }else { - return R.ok().put("data",new Page<>()); + Page page = new Page<>(); + page.setList(new ArrayList<>()); + return R.ok().put("data",page); } } @@ -219,11 +224,11 @@ public R checkReceivables(BasePageRequest basePageRequest){ JSONObject jsonObject = basePageRequest.getJsonObject(); Integer type = jsonObject.getInteger("type"); Integer isSub = jsonObject.getInteger("isSub"); - StringBuffer stringBuffer = new StringBuffer("select receivables_id from 72crm_crm_receivables as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id where ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and"); + StringBuilder stringBuffer = new StringBuilder("select receivables_id from 72crm_crm_receivables as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id where ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and"); if (type == 1){ - stringBuffer.append(" c.examine_status = 0"); + stringBuffer.append(" a.check_status in (0,1)"); }else if (type == 2){ - stringBuffer.append(" c.examine_status in (1,2)"); + stringBuffer.append(" a.check_status in (2,3)"); }else { return R.error("type类型不正确"); } @@ -245,7 +250,9 @@ public R checkReceivables(BasePageRequest basePageRequest){ Page page = Db.paginate(basePageRequest.getPage(),basePageRequest.getLimit(),"select *","from receivablesview as a where a.receivables_id in ("+contractIds+")"+getConditionSql(data)); return R.ok().put("data",page); }else { - return R.ok().put("data",new Page<>()); + Page page = new Page<>(); + page.setList(new ArrayList<>()); + return R.ok().put("data",new Page()); } } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBusinessService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBusinessService.java index b66bfc8..6512ea4 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBusinessService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmBusinessService.java @@ -76,6 +76,15 @@ public R addOrUpdate(JSONObject jsonObject) { if (crmBusiness.getBusinessId() != null) { crmBusiness.setUpdateTime(DateUtil.date()); crmRecordService.updateRecord(new CrmBusiness().dao().findById(crmBusiness.getBusinessId()), crmBusiness, CrmEnum.BUSINESS_TYPE_KEY.getTypes()); + CrmBusiness oldBusiness = CrmBusiness.dao.findById(crmBusiness.getBusinessId()); + if (!oldBusiness.getStatusId().equals(crmBusiness.getStatusId())){ + CrmBusinessChange change = new CrmBusinessChange(); + change.setBusinessId(crmBusiness.getBusinessId()); + change.setStatusId(crmBusiness.getStatusId()); + change.setCreateTime(DateUtil.date()); + change.setCreateUserId(BaseUtil.getUserId().intValue()); + change.save(); + } saveOrUpdate = crmBusiness.update(); } else { crmBusiness.setCreateTime(DateUtil.date()); @@ -102,9 +111,6 @@ public R addOrUpdate(JSONObject jsonObject) { * 根据商机id查询 */ public R queryById(Integer businessId) { - if(!authUtil.dataAuth("business","business_id",businessId)){ - return R.ok().put("data",new Record().set("dataAuth",0)); - } return R.ok().put("data",CrmBusiness.dao.findFirst(Db.getSql("crm.business.queryById"), businessId)); } @@ -122,7 +128,8 @@ public List information(Integer busienssId) { field.set("商机名称", record.getStr("business_name")).set("商机状态组", record.getStr("type_name")).set("商机阶段", record.getStr("status_name")) .set("预计成交日期", DateUtil.formatDateTime(record.get("deal_date"))).set("客户名称", record.getStr("customer_name")) .set("商机金额", record.getStr("money")).set("备注", record.getStr("remark")); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",record.getStr("batch_id")); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),record.getStr("batch_id")); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -205,7 +212,9 @@ public R relateContacts(Integer businessId, String contactsIds){ * 商机解除关联联系人 */ public R unrelateContacts(Integer businessId, String contactsIds){ - Db.delete("delete from 72crm_crm_contacts_business where business_id = ? and contacts_id in ("+contactsIds+")",businessId); + String[] idsArr = contactsIds.split(","); + SqlPara sqlPara = Db.getSqlPara("crm.business.unrelateContacts",Kv.by("businessId",businessId).set("ids",idsArr)); + Db.delete(sqlPara.getSql(),sqlPara.getPara()); return R.ok(); } @@ -386,25 +395,6 @@ public R boostBusinessStatus(CrmBusiness crmBusiness) { return crmBusiness.update() ? R.ok() : R.error(); } - /** - * @author wyq - * 查询新增字段 - */ - public List queryField() { - List fieldList = new LinkedList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList, "businessName", "商机名称", "", "text", settingArr, 1); - fieldUtil.getFixedField(fieldList, "customerId", "客户名称", "", "customer", settingArr, 1); - fieldUtil.getFixedField(fieldList, "typeId", "商机状态组", "", "business_type", settingArr, 1); - fieldUtil.getFixedField(fieldList, "statusId", "商机阶段", "", "business_status", settingArr, 1); - fieldUtil.getFixedField(fieldList, "money", "商机金额", "", "floatnumber", settingArr, 0); - fieldUtil.getFixedField(fieldList, "dealDate", "预计成交日期", "", "datetime", settingArr, 1); - fieldUtil.getFixedField(fieldList, "remark", "备注", "", "text", settingArr, 0); - fieldUtil.getFixedField(fieldList, "product", "产品", Kv.by("discount_rate", "").set("product", new ArrayList<>()).set("total_price", ""), "product", settingArr, 0); - fieldList.addAll(adminFieldService.list("5")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -418,39 +408,12 @@ public List queryField(Integer businessId) { List fieldList = adminFieldService.queryUpdateField(5,business); fieldList.add(new Record().set("field_name","type_id").set("name","商机状态组").set("value",business.getInt("type_id")).set("form_type","business_type").set("setting",new String[0]).set("is_null",1).set("field_type",1)); fieldList.add(new Record().set("field_name","status_id").set("name","商机阶段").set("value",business.getInt("status_id")).set("form_type","business_status").set("setting",new String[0]).set("is_null",1).set("field_type",1)); - Record totalPrice = Db.findFirst("select IFNULL(SUM(subtotal),0) as total_price from 72crm_crm_business_product where business_id = ?", businessId); List productList = Db.find(Db.getSql("crm.business.queryBusinessProduct"), businessId); - Kv kv = Kv.by("discount_rate", customer.getBigDecimal("discount_rate")).set("product", productList).set("total_price", totalPrice.getStr("total_price")); - fieldList.add(new Record().set("field_name","product").set("name","产品").set("value",kv).set("setting",new String[]{}).set("is_null",0).set("field_type",1)); + Kv kv = Kv.by("discount_rate", business.getBigDecimal("discount_rate")).set("product", productList).set("total_price", business.getStr("total_price")); + fieldList.add(new Record().set("field_name","product").set("name","产品").set("value",kv).set("form_type","product").set("setting",new String[]{}).set("is_null",0).set("field_type",1)); return fieldList; } - /** - * @author wyq - * 查询编辑字段 - */ -// public List queryField(Integer businessId) { -// List fieldList = new LinkedList<>(); -// Record record = Db.findFirst("select * from businessview where business_id = ?", businessId); -// String[] settingArr = new String[]{}; -// fieldUtil.getFixedField(fieldList, "business_name", "商机名称", record.getStr("business_name"), "text", settingArr, 1); -// List customerList = new ArrayList<>(); -// Record customer = new Record(); -// customerList.add(customer.set("customer_id", record.getInt("customer_id")).set("customer_name", record.getStr("customer_name"))); -// fieldUtil.getFixedField(fieldList, "customerId", "客户名称", customerList, "customer", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "typeId", "商机状态组", record.getInt("type_id"), "business_type", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "statusId", "商机阶段", record.getInt("status_id"), "business_status", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "money", "商机金额", record.getStr("money"), "floatnumber", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "dealDate", "预计成交日期", DateUtil.formatDateTime(record.get("deal_date")), "datetime", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "remark", "备注", record.getStr("remark"), "text", settingArr, 0); -// fieldList.addAll(adminFieldService.queryByBatchId(record.getStr("batch_id"))); -// Record totalPrice = Db.findFirst("select IFNULL(SUM(subtotal),0) as total_price from 72crm_crm_business_product where business_id = ?", businessId); -// List productList = Db.find(Db.getSql("crm.business.queryBusinessProduct"), businessId); -// Kv kv = Kv.by("discount_rate", record.getBigDecimal("discount_rate")).set("product", productList).set("total_price", totalPrice.getStr("total_price")); -// fieldUtil.getFixedField(fieldList, "product", "产品", kv, "product", settingArr, 0); -// return fieldList; -// } - /** * @author wyq * 查询商机状态组及商机状态 diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContactsService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContactsService.java index a85f280..276193c 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContactsService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContactsService.java @@ -8,6 +8,7 @@ import cn.hutool.poi.excel.ExcelUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.jfinal.log.Log; import com.jfinal.upload.UploadFile; import com.kakarote.crm9.erp.admin.entity.AdminUser; import com.kakarote.crm9.erp.crm.common.CrmEnum; @@ -35,7 +36,6 @@ import com.jfinal.plugin.activerecord.Record; import com.jfinal.plugin.activerecord.SqlPara; import com.jfinal.plugin.activerecord.tx.Tx; - import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -87,9 +87,6 @@ public Page queryList(BasePageRequest basePageRequest){ * 根据id查询联系人 */ public Record queryById(Integer contactsId){ - if(!authUtil.dataAuth("contacts","contacts_id",contactsId)){ - return new Record().set("dataAuth",0); - } return Db.findFirst(Db.getSql("crm.contact.queryById"),contactsId); } @@ -108,7 +105,8 @@ public List information(Integer contactsId){ .set("下次联系时间",DateUtil.formatDateTime(record.get("next_time"))).set("职务",record.getStr("post")) .set("手机",record.getStr("mobile")).set("电话",record.getStr("telephone")).set("邮箱",record.getStr("email")) .set("地址",record.getStr("address")).set("备注",record.getStr("remark")); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",record.getStr("batch_id")); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),record.getStr("batch_id")); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -139,6 +137,7 @@ public R queryBusiness(BasePageRequest basePageRequest){ * @author wyq * 联系人关联商机 */ + @Before(Tx.class) public R relateBusiness(Integer contactsId, String businessIds){ String[] businessIdsArr = businessIds.split(","); Db.delete("delete from 72crm_crm_contacts_business where contacts_id = ?",contactsId); @@ -158,7 +157,9 @@ public R relateBusiness(Integer contactsId, String businessIds){ * 联系人解除关联商机 */ public R unrelateBusiness(Integer contactsId, String businessIds){ - Db.delete("delete from 72crm_crm_contacts_business where contacts_id = ? and business_id in ("+businessIds+")",contactsId); + String[] idsArr = businessIds.split(","); + SqlPara sqlPara = Db.getSqlPara("crm.contact.unrelateBusiness",Kv.by("contactsId",contactsId).set("ids",idsArr)); + Db.delete(sqlPara.getSql(),sqlPara.getPara()); return R.ok(); } @@ -233,26 +234,6 @@ public boolean updateOwnerUserId(Integer customerId,Integer ownerUserId){ return true; } - /** - * @author wyq - * 查询新增字段 - */ - public List queryField(){ - List fieldList = new LinkedList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList,"name","姓名","","text",settingArr,1); - fieldUtil.getFixedField(fieldList,"customerId","客户名称","","customer",settingArr,1); - fieldUtil.getFixedField(fieldList,"mobile","手机","","mobile",settingArr,0); - fieldUtil.getFixedField(fieldList,"telephone","电话","","text",settingArr,0); - fieldUtil.getFixedField(fieldList,"email","电子邮箱","","email",settingArr,0); - fieldUtil.getFixedField(fieldList,"post","职务","","text",settingArr,0); - fieldUtil.getFixedField(fieldList,"address","地址","","text",settingArr,0); - fieldUtil.getFixedField(fieldList,"nextTime","下次联系时间","","datetime",settingArr,0); - fieldUtil.getFixedField(fieldList,"remark","备注","","text",settingArr,0); - fieldList.addAll(adminFieldService.list("3")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -266,30 +247,6 @@ public List queryField(Integer contactsId) { return adminFieldService.queryUpdateField(3,contacts); } -// /** -// * @author wyq -// * 查询编辑字段 -// */ -// public List queryField(Integer contactsId){ -// List fieldList = new LinkedList<>(); -// Record record = Db.findFirst("select * from contactsview where contacts_id = ?",contactsId); -// String[] settingArr = new String[]{}; -// fieldUtil.getFixedField(fieldList,"name","姓名",record.getStr("name"),"text",settingArr,1); -// List customerList = new ArrayList<>(); -// Record customer = new Record(); -// customerList.add(customer.set("customer_id",record.getInt("customer_id")).set("customer_name",record.getStr("customer_name"))); -// fieldUtil.getFixedField(fieldList,"customerId","客户名称",customerList,"customer",settingArr,1); -// fieldUtil.getFixedField(fieldList,"mobile","手机",record.getStr("mobile"),"mobile",settingArr,0); -// fieldUtil.getFixedField(fieldList,"telephone","电话",record.getStr("telephone"),"text",settingArr,0); -// fieldUtil.getFixedField(fieldList,"email","电子邮箱",record.getStr("email"),"email",settingArr,0); -// fieldUtil.getFixedField(fieldList,"post","职务",record.getStr("post"),"text",settingArr,0); -// fieldUtil.getFixedField(fieldList,"address","地址",record.getStr("address"),"text",settingArr,0); -// fieldUtil.getFixedField(fieldList,"nextTime","下次联系时间",DateUtil.formatDateTime(record.get("next_time")),"datetime",settingArr,0); -// fieldUtil.getFixedField(fieldList,"remark","备注",record.getStr("remark"),"text",settingArr,0); -// fieldList.addAll(adminFieldService.queryByBatchId(record.getStr("batch_id"))); -// return fieldList; -// } - /** * @author wyq * 添加跟进记录 @@ -379,7 +336,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI Integer errNum = 0; try { List> read = reader.read(); - List list = read.get(0); + List list = read.get(2); List recordList = adminFieldService.customFieldList("3"); recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); List fieldList = adminFieldService.queryAddField(3); @@ -398,9 +355,9 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI for (int i = 0; i < list.size(); i++) { kv.set(nameMap.get(list.get(i)), i); } - if (read.size() > 1) { + if (read.size() > 2) { JSONObject object = new JSONObject(); - for (int i = 1; i < read.size(); i++) { + for (int i = 2; i < read.size(); i++) { errNum = i; List contactsList = read.get(i); if (contactsList.size() < list.size()) { @@ -468,7 +425,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI } } } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("",e); if (errNum != 0){ return R.error("第" + (errNum+1) + "行错误!"); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContractService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContractService.java index e8cc5e4..2f8b3fb 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContractService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmContractService.java @@ -33,6 +33,7 @@ import java.util.*; public class CrmContractService { + @Inject private AdminFieldService adminFieldService; @@ -65,9 +66,6 @@ public Page queryPage(BasePageRequest basePageRequest) { * 根据id查询合同 */ public R queryById(Integer id) { - if(!authUtil.dataAuth("contract","contract_id",id)){ - return R.ok().put("data",new Record().set("dataAuth",0)); - } Record record = Db.findFirst(Db.getSql("crm.contract.queryByContractId"), id); return R.ok().put("data", record); } @@ -91,9 +89,10 @@ public List information(Integer id) { .set("合同开始时间", DateUtil.formatDate(record.getDate("start_time"))) .set("合同结束时间", DateUtil.formatDate(record.getDate("end_time"))) .set("客户签约人", record.getStr("contacts_name")) - .set("公司签约人", record.getStr("company_user_name")). - set("备注", record.getStr("remark")); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",record.getStr("batch_id")); + .set("公司签约人", record.getStr("company_user_name")) + .set("备注", record.getStr("remark")); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),record.getStr("batch_id")); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -201,7 +200,7 @@ public R saveAndUpdate(JSONObject jsonObject) { * 根据条件查询合同 */ public List queryList(CrmContract crmContract) { - StringBuffer sql = new StringBuffer("select * from 72crm_crm_contract where 1 = 1 "); + StringBuilder sql = new StringBuilder("select * from 72crm_crm_contract where 1 = 1 "); if (crmContract.getCustomerId() != null) { sql.append(" and customer_id = ").append(crmContract.getCustomerId()); } @@ -215,7 +214,7 @@ public List queryList(CrmContract crmContract) { * 根据条件查询合同 */ public List queryListByType(String type, Integer id) { - StringBuffer sql = new StringBuffer("select * from contractview where "); + StringBuilder sql = new StringBuilder("select * from contractview where "); if (type.equals(CrmEnum.CUSTOMER_TYPE_KEY.getTypes())) { sql.append(" customer_id = ? "); } @@ -382,30 +381,6 @@ public R deleteMembers(CrmContract crmContract) { }) ? R.ok() : R.error(); } - - /** - * @author zxy - * 查询合同自定义字段(添加) - */ - public List queryField() { - List fieldList = new ArrayList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList, "num", "合同编号", "", "number", settingArr, 1); - fieldUtil.getFixedField(fieldList, "name", "合同名称", "", "text", settingArr, 1); - fieldUtil.getFixedField(fieldList, "customerId", "客户名称", settingArr, "customer", settingArr, 1); - fieldUtil.getFixedField(fieldList, "businessId", "商机名称", settingArr, "business", settingArr, 0); - fieldUtil.getFixedField(fieldList, "orderDate", "下单时间", "", "date", settingArr, 0); - fieldUtil.getFixedField(fieldList, "money", "合同金额", "", "floatnumber", settingArr, 1); - fieldUtil.getFixedField(fieldList, "startTime", "合同开始时间", "", "date", settingArr, 0); - fieldUtil.getFixedField(fieldList, "endTime", "合同结束时间", "", "date", settingArr, 0); - fieldUtil.getFixedField(fieldList, "contactsId", "客户签约人", settingArr, "contacts", settingArr, 0); - fieldUtil.getFixedField(fieldList, "companyUserId", "公司签约人", settingArr, "user", settingArr, 0); - fieldUtil.getFixedField(fieldList, "remark", "备注", "", "textarea", settingArr, 0); - fieldUtil.getFixedField(fieldList, "product", "产品", Kv.by("discount_rate", "").set("product", new ArrayList<>()).set("total_price", ""), "product", settingArr, 0); - fieldList.addAll(adminFieldService.list("6")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -431,65 +406,13 @@ public List queryField(Integer contractId) { } contract.set("company_user_id",list); List fieldList = adminFieldService.queryUpdateField(6,contract); - Record totalPrice = Db.findFirst("select IFNULL(SUM(subtotal),0) as total_price from 72crm_crm_contract_product where contract_id = ? ", contractId); Kv kv = Kv.by("discount_rate", contract.getBigDecimal("discount_rate")) .set("product", Db.find(Db.getSql("crm.contract.queryBusinessProduct"), contractId)) - .set("total_price", totalPrice.getStr("total_price")); - fieldList.add(new Record().set("field_name","product").set("name","产品").set("value",kv).set("setting",new String[]{}).set("is_null",0).set("field_type",1)); + .set("total_price", contract.getStr("total_price")); + fieldList.add(new Record().set("field_name","product").set("name","产品").set("value",kv).set("form_type","product").set("setting",new String[]{}).set("is_null",0).set("field_type",1)); return fieldList; } - /** - * @author zxy - * 查询合同自定义字段(编辑) - */ -// public List queryField(Integer contractId) { -// List fieldList = new ArrayList<>(); -// Record record = Db.findFirst("select * from contractview where contract_id = ?", contractId); -// String[] settingArr = new String[]{}; -// fieldUtil.getFixedField(fieldList, "num", "合同编号", record.getStr("num"), "number", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "name", "合同名称", record.getStr("name"), "text", settingArr, 1); -// List customerList = new ArrayList<>(); -// Record customer = new Record(); -// customerList.add(customer.set("customerId", record.getInt("customer_id")).set("customerName", record.getStr("customer_name"))); -// fieldUtil.getFixedField(fieldList, "customerId", "客户名称", customerList, "customer", settingArr, 1); -// customerList = new ArrayList<>(); -// if (record.getStr("business_id") != null && record.getInt("business_id") != 0) { -// customer = new Record(); -// customerList.add(customer.set("businessId", record.getInt("business_id")).set("businessName", record.getStr("business_name"))); -// } -// -// fieldUtil.getFixedField(fieldList, "businessId", "商机名称", customerList, "business", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "orderDate", "下单时间", DateUtil.formatDateTime(record.get("order_date")), "date", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "money", "合同金额", record.getStr("money"), "floatnumber", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "startTime", "合同开始时间", DateUtil.formatDateTime(record.get("start_time")), "date", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "endTime", "合同结束时间", DateUtil.formatDateTime(record.get("end_time")), "date", settingArr, 0); -// customerList = new ArrayList<>(); -// if (record.getStr("contacts_id") != null && record.getInt("contacts_id") != 0) { -// customer = new Record(); -// customerList.add(customer.set("contactsId", record.getStr("contacts_id")).set("name", record.getStr("contacts_name"))); -// } -// fieldUtil.getFixedField(fieldList, "contactsId", "客户签约人", customerList, "contacts", settingArr, 0); -// customerList = new ArrayList<>(); -// if (record.getStr("company_user_id") != null && record.getInt("company_user_id") != 0) { -// customer = new Record(); -// customerList.add(customer.set("companyUserId", record.getStr("company_user_id")).set("realname", record.getStr("company_user_name"))); -// } -// fieldUtil.getFixedField(fieldList, "companyUserId", "公司签约人", customerList, "user", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "remark", "备注", record.getStr("remark"), "textarea", settingArr, 0); -// fieldList.addAll(adminFieldService.queryByBatchId(record.getStr("batch_id"))); -// Record r = Db.findFirst("select IFNULL(SUM(subtotal),0) as total_price \n" + -// " from 72crm_crm_contract_product \n" + -// " where contract_id = ? ", contractId); -// -// Kv kv = Kv.by("discount_rate", record.getBigDecimal("discount_rate")) -// .set("product", Db.find(Db.getSql("crm.contract.queryBusinessProduct"), contractId)) -// .set("total_price", r.getStr("total_price")); -// -// fieldUtil.getFixedField(fieldList, "product", "产品", kv, "product", settingArr, 0); -// return fieldList; -// } - /** * @author wyq * 添加跟进记录 @@ -560,15 +483,14 @@ public R qureyProductListByContractId(BasePageRequest basePa * 查询合同到期提醒设置 */ public R queryContractConfig(){ - Record config = Db.findFirst("select status,value as contractDay from 72crm_admin_config where name = 'expiringContractDays'"); + AdminConfig config = AdminConfig.dao.findFirst("select status,value as contractDay from 72crm_admin_config where name = 'expiringContractDays' limit 1"); if (config == null){ - AdminConfig adminConfig = new AdminConfig(); - adminConfig.setStatus(0); - adminConfig.setName("expiringContractDays"); - adminConfig.setValue("3"); - adminConfig.setDescription("合同到期提醒"); - adminConfig.save(); - config.set("status",0).set("value","3"); + config = new AdminConfig(); + config.setStatus(0); + config.setName("expiringContractDays"); + config.setValue("3"); + config.setDescription("合同到期提醒"); + config.save(); } return R.ok().put("data",config); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmCustomerService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmCustomerService.java index 5f05426..ae0cfb8 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmCustomerService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmCustomerService.java @@ -8,7 +8,7 @@ import cn.hutool.poi.excel.ExcelUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.jfinal.template.stat.ast.If; +import com.jfinal.log.Log; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.entity.AdminConfig; import com.kakarote.crm9.erp.admin.service.AdminSceneService; @@ -33,7 +33,6 @@ import com.jfinal.plugin.activerecord.SqlPara; import com.jfinal.plugin.activerecord.tx.Tx; import com.jfinal.upload.UploadFile; -import org.apache.http.protocol.RequestExpectContinue; import java.util.*; import java.util.stream.Collectors; @@ -115,9 +114,6 @@ public R addOrUpdate(JSONObject jsonObject,String type) { * 根据客户id查询 */ public Record queryById(Integer customerId) { - if(!authUtil.dataAuth("customer","customer_id",customerId)){ - return new Record().set("dataAuth",0); - } return Db.findFirst(Db.getSql("crm.customer.queryById"), customerId); } @@ -139,12 +135,8 @@ public List information(Integer customerId) { .set("定位", crmCustomer.getLocation()) .set("区域", crmCustomer.getAddress()) .set("详细地址", crmCustomer.getDetailAddress()); - List recordList = Db.find("select a.name,a.value,b.type from 72crm_admin_fieldv as a left join 72crm_admin_field as b on a.field_id = b.field_id where batch_id = ?",crmCustomer.getBatchId()); - recordList.forEach(record -> { - if (record.getInt("type") == 8){ - record.set("value",Db.query("select name from 72crm_admin_file where batch_id = ?",record.getStr("value"))); - } - }); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),crmCustomer.getBatchId()); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -185,10 +177,11 @@ public R queryBusiness(BasePageRequest basePageRequest) { public R queryContacts(BasePageRequest basePageRequest) { Integer customerId = basePageRequest.getData().getCustomerId(); Integer pageType = basePageRequest.getPageType(); + String search = basePageRequest.getJsonObject().getString("search"); if (0 == pageType) { - return R.ok().put("data", Db.find(Db.getSql("crm.customer.queryContacts"), customerId)); + return R.ok().put("data", Db.find(Db.getSqlPara("crm.customer.queryContacts",Kv.by("customerId", customerId).set("contactsName", search)))); } else { - return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), new SqlPara().setSql(Db.getSql("crm.customer.queryContacts")).addPara(customerId))); + return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), Db.getSqlPara("crm.customer.queryContacts",Kv.by("customerId", customerId).set("contactsName", search)))); } } @@ -199,17 +192,18 @@ public R queryContacts(BasePageRequest basePageRequest) { public R queryContract(BasePageRequest basePageRequest) { Integer customerId = basePageRequest.getData().getCustomerId(); Integer pageType = basePageRequest.getPageType(); + String search = basePageRequest.getJsonObject().getString("search"); if (basePageRequest.getData().getCheckstatus() != null){ if (0 == pageType) { - return R.ok().put("data", Db.find(Db.getSql("crm.customer.queryPassContract"), customerId,basePageRequest.getData().getCheckstatus())); + return R.ok().put("data", Db.find(Db.getSqlPara("crm.customer.queryPassContract",Kv.by("customerId",customerId).set("checkStatus",basePageRequest.getData().getCheckstatus()).set("contractName",search)))); } else { - return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), new SqlPara().setSql(Db.getSql("crm.customer.queryPassContract")).addPara(customerId).addPara(basePageRequest.getData().getCheckstatus()))); + return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), Db.getSqlPara("crm.customer.queryPassContract",Kv.by("customerId",customerId).set("checkStatus",basePageRequest.getData().getCheckstatus()).set("contractName",search)))); } } if (0 == pageType) { - return R.ok().put("data", Db.find(Db.getSql("crm.customer.queryContract"), customerId)); + return R.ok().put("data", Db.find(Db.getSqlPara("crm.customer.queryContract",Kv.by("customerId",customerId).set("contractName",search)))); } else { - return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), new SqlPara().setSql(Db.getSql("crm.customer.queryContract")).addPara(customerId))); + return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), Db.getSqlPara("crm.customer.queryContract",Kv.by("customerId", customerId).set("contractName", search)))); } } @@ -278,6 +272,7 @@ public Page queryPageGH(BasePageRequest basePageRequest) { */ public R lock(CrmCustomer crmCustomer) { String[] ids = crmCustomer.getIds().split(","); + crmRecordService.addIsLockRecord(ids,CrmEnum.CUSTOMER_TYPE_KEY.getTypes(),crmCustomer.getIsLock()); return Db.update(Db.getSqlPara("crm.customer.lock", Kv.by("isLock", crmCustomer.getIsLock()).set("ids", ids))) > 0 ? R.ok() : R.error(); } @@ -449,30 +444,6 @@ public void putInInternational(Record record) { } } - /** - * @author wyq - * 查询新增字段 - */ - public List queryField() { - List fieldList = new LinkedList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList, "customerName", "客户名称", "", "text", settingArr, 1); - fieldUtil.getFixedField(fieldList, "mobile", "手机", "", "text", settingArr, 0); - fieldUtil.getFixedField(fieldList, "telephone", "电话", "", "text", settingArr, 0); - fieldUtil.getFixedField(fieldList, "website", "网址", "", "text", settingArr, 0); - String[] statusArr = new String[]{"未成交","已成交"}; - fieldUtil.getFixedField(fieldList,"deal_status","成交状态","","select",statusArr,1); - fieldUtil.getFixedField(fieldList, "nextTime", "下次联系时间", "", "datetime", settingArr, 0); - fieldUtil.getFixedField(fieldList, "remark", "备注", "", "text", settingArr, 0); - Record map = new Record(); - fieldList.add(map.set("field_name", "map_address") - .set("name", "地区定位") - .set("form_type", "map_address") - .set("is_null", 0)); - fieldList.addAll(adminFieldService.list("2")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -630,17 +601,16 @@ public R getRulesSetting() { type = 0; } } - Record config = Db.findFirst("select status,value as contractDay from 72crm_admin_config where name = 'expiringContractDays'"); + AdminConfig config = AdminConfig.dao.findFirst("select status,value from 72crm_admin_config where name = 'expiringContractDays' limit 1"); if (config == null){ - AdminConfig adminConfig = new AdminConfig(); - adminConfig.setStatus(0); - adminConfig.setName("expiringContractDays"); - adminConfig.setValue("3"); - adminConfig.setDescription("合同到期提醒"); - adminConfig.save(); - config.set("status",0).set("value","3"); + config = new AdminConfig(); + config.setStatus(0); + config.setName("expiringContractDays"); + config.setValue("3"); + config.setDescription("合同到期提醒"); + config.save(); } - return R.ok().put("data",Kv.by("dealDay",dealDay).set("followupDay",followupDay).set("customerConfig",type).set("contractConfig",config.getInt("status")).set("contractDay",config.getStr("contractDay"))); + return R.ok().put("data",Kv.by("dealDay",dealDay).set("followupDay",followupDay).set("customerConfig",type).set("contractConfig",config.getStatus()).set("contractDay",config.getValue())); } /** @@ -712,10 +682,10 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI ExcelReader reader = ExcelUtil.getReader(FileUtil.file(file.getUploadPath() + "\\" + file.getFileName())); AdminFieldService adminFieldService = new AdminFieldService(); Kv kv = new Kv(); - Integer errNum = 0; + int errNum = 0; try { List> read = reader.read(); - List list = read.get(0); + List list = read.get(1); List recordList = adminFieldService.customFieldList("2"); recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); List fieldList = adminFieldService.queryAddField(2); @@ -737,9 +707,9 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI for (int i = 0; i < list.size(); i++) { kv.set(nameMap.get(list.get(i)), i); } - if (read.size() > 1) { + if (read.size() > 2) { JSONObject object = new JSONObject(); - for (int i = 1; i < read.size(); i++) { + for (int i = 2; i < read.size(); i++) { errNum = i; List customerList = read.get(i); if (customerList.size() < list.size()) { @@ -757,6 +727,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI .fluentPut("next_time", customerList.get(kv.getInt("next_time"))) .fluentPut("remark", customerList.get(kv.getInt("remark"))) .fluentPut("detail_address", customerList.get(kv.getInt("map_address"))) + .fluentPut("deal_status",customerList.get(kv.getInt("deal_status"))) .fluentPut("owner_user_id", ownerUserId)); } else if (number > 0 && repeatHandling == 1) { Record leads = Db.findFirst("select customer_id,batch_id from 72crm_crm_customer where customer_name = ?", customerName); @@ -768,6 +739,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI .fluentPut("next_time", customerList.get(kv.getInt("next_time"))) .fluentPut("remark", customerList.get(kv.getInt("remark"))) .fluentPut("detail_address", customerList.get(kv.getInt("map_address"))) + .fluentPut("deal_status",customerList.get(kv.getInt("deal_status"))) .fluentPut("owner_user_id", ownerUserId) .fluentPut("batch_id", leads.getStr("batch_id"))); } else if (number > 0 && repeatHandling == 2) { @@ -785,6 +757,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI } } catch (Exception e) { e.printStackTrace(); + Log.getLog(getClass()).error("",e); if (errNum != 0){ return R.error("第" + (errNum+1) + "行错误!"); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmLeadsService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmLeadsService.java index 2173315..04f8e37 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmLeadsService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmLeadsService.java @@ -8,6 +8,7 @@ import cn.hutool.poi.excel.ExcelUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.jfinal.log.Log; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.entity.AdminField; import com.kakarote.crm9.erp.admin.entity.AdminFieldv; @@ -33,6 +34,7 @@ import com.jfinal.plugin.activerecord.tx.Tx; import com.jfinal.upload.UploadFile; + import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -114,7 +116,8 @@ public List information(Integer leadsId) { field.set("线索名称", crmLeads.getLeadsName()).set("电话", crmLeads.getMobile()) .set("手机", crmLeads.getTelephone()).set("下次联系时间", DateUtil.formatDateTime(crmLeads.getNextTime())) .set("地址", crmLeads.getAddress()).set("备注", crmLeads.getRemark()); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",crmLeads.getBatchId()); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),crmLeads.getBatchId()); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -124,9 +127,6 @@ public List information(Integer leadsId) { * 根据线索id查询 */ public Record queryById(Integer leadsId) { - if(!authUtil.dataAuth("leads","leads_id",leadsId)){ - return new Record().set("dataAuth",0); - } return Db.findFirst(Db.getSql("crm.leads.queryById"), leadsId); } @@ -182,7 +182,7 @@ public R translate(String leadsIds) { if (1 == crmLeads.getInt("is_transform")) { return R.error("已转化线索不能再次转化"); } - List leadsFields = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",crmLeads.getStr("batch_id")); + List leadsFields = adminFieldService.list("1"); CrmCustomer crmCustomer = new CrmCustomer(); crmCustomer.setCustomerName(crmLeads.getStr("leads_name")); crmCustomer.setIsLock(0); @@ -204,35 +204,50 @@ public R translate(String leadsIds) { crmCustomer.setRemark(""); String customerBatchId = IdUtil.simpleUUID(); crmCustomer.setBatchId(customerBatchId); - crmCustomer.save(); - crmRecordService.addConversionCustomerRecord(crmCustomer.getCustomerId(), CrmEnum.CUSTOMER_TYPE_KEY.getTypes(), crmCustomer.getCustomerName()); - List customerFields = AdminField.dao.find("select field_id,name from 72crm_admin_field where label = 2 and field_type = 0"); + List customerFields = AdminField.dao.find("select field_id,name,field_name,field_type from 72crm_admin_field where label = '2'"); List adminFieldvList = new ArrayList<>(); - customerFields.forEach(customerField ->{ - leadsFields.forEach(leadsFIeld ->{ + for (Record leadsFIeld : leadsFields) { + for (AdminField customerField : customerFields) { + if(leadsFIeld.get("relevant")!=null&&customerField.getFieldId().equals(leadsFIeld.get("relevant"))){ + if(customerField.getFieldType().equals(1)){ + crmCustomer.set(customerField.getFieldName(),crmLeads.get(leadsFIeld.get("field_name"))); + }else { + AdminFieldv adminFieldv = new AdminFieldv(); + adminFieldv.setValue(crmLeads.get(leadsFIeld.get("name"))); + adminFieldv.setFieldId(customerField.getFieldId()); + adminFieldv.setName(customerField.getName()); + adminFieldvList.add(adminFieldv); + } + continue; + } + if(!customerField.getFieldType().equals(0)){ + continue; + } if ("客户来源".equals(customerField.getName()) && "线索来源".equals(leadsFIeld.getStr("name"))){ AdminFieldv adminFieldv = new AdminFieldv(); - adminFieldv.setValue(leadsFIeld.getStr("value")); + adminFieldv.setValue(crmLeads.get(leadsFIeld.get("name"))); adminFieldv.setFieldId(customerField.getFieldId()); adminFieldv.setName(customerField.getName()); adminFieldvList.add(adminFieldv); } if ("客户行业".equals(customerField.getName()) && "客户行业".equals(leadsFIeld.getStr("name"))){ AdminFieldv adminFieldv = new AdminFieldv(); - adminFieldv.setValue(leadsFIeld.getStr("value")); + adminFieldv.setValue(crmLeads.get(leadsFIeld.get("name"))); adminFieldv.setFieldId(customerField.getFieldId()); adminFieldv.setName(customerField.getName()); adminFieldvList.add(adminFieldv); } if ("客户级别".equals(customerField.getName()) && "客户级别".equals(leadsFIeld.getStr("name"))){ AdminFieldv adminFieldv = new AdminFieldv(); - adminFieldv.setValue(leadsFIeld.getStr("value")); + adminFieldv.setValue(crmLeads.get(leadsFIeld.get("name"))); adminFieldv.setFieldId(customerField.getFieldId()); adminFieldv.setName(customerField.getName()); adminFieldvList.add(adminFieldv); } - }); - }); + }; + }; + crmCustomer.save(); + crmRecordService.addConversionCustomerRecord(crmCustomer.getCustomerId(), CrmEnum.CUSTOMER_TYPE_KEY.getTypes(), crmCustomer.getCustomerName()); adminFieldService.save(adminFieldvList, customerBatchId); Db.update("update 72crm_crm_leads set is_transform = 1,update_time = ?,customer_id = ? where leads_id = ?", DateUtil.date(), crmCustomer.getCustomerId(), Integer.valueOf(leadsId)); @@ -268,33 +283,6 @@ public R translate(String leadsIds) { return R.ok(); } - /** - * @author wyq - * 查询新增字段 - */ - public List queryField() { - List fieldList = new LinkedList<>(); - String[] settingArr = new String[]{}; - List fixedFieldList = adminFieldService.list("1"); - List filterList = new LinkedList<>(); - filterList.add("线索来源"); - filterList.add("客户级别"); - filterList.add("客户行业"); - List list = fixedFieldList.stream().filter((Record record) -> filterList.contains(record.getStr("name"))).collect(Collectors.toList()); - fieldUtil.getFixedField(fieldList, "leadsName", "线索名称", "", "text", settingArr, 1); - fieldList.add((Record) list.get(0)); - fieldUtil.getFixedField(fieldList, "telephone", "电话", "", "text", settingArr, 0); - fieldUtil.getFixedField(fieldList, "mobile", "手机", "", "mobile", settingArr, 0); - fieldList.add((Record) list.get(1)); - fieldList.add((Record) list.get(2)); - fieldUtil.getFixedField(fieldList, "address", "地址", "", "text", settingArr, 0); - fieldUtil.getFixedField(fieldList, "nextTime", "下次联系时间", "", "datetime", settingArr, 0); - fieldUtil.getFixedField(fieldList, "remark", "备注", "", "text", settingArr, 0); - fieldList.addAll(fixedFieldList); - List endList = fieldList.stream().distinct().collect(Collectors.toList()); - return endList; - } - /** * @author wyq * 查询编辑字段 @@ -302,19 +290,6 @@ public List queryField() { public List queryField(Integer leadsId) { Record leads = Db.findFirst("select * from leadsview where leads_id = ?",leadsId); return adminFieldService.queryUpdateField(1,leads); -// List fieldList = new LinkedList<>(); -// Record leads = Db.findFirst("select * from leadsview where leads_id = ?", leadsId); -// String[] settingArr = new String[]{}; -// List fixedFieldList = adminFieldService.queryByBatchId(leads.getStr("batch_id")); -// fieldUtil.getFixedField(fieldList, "leadsName", "线索名称", leads.getStr("leads_name"), "text", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "telephone", "电话", leads.getStr("telephone"), "text", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "mobile", "手机", leads.getStr("mobile"), "mobile", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "address", "地址", leads.getStr("address"), "text", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "nextTime", "下次联系时间", DateUtil.formatDateTime(leads.get("next_time")), "datetime", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "remark", "备注", leads.getStr("remark"), "text", settingArr, 0); -// fieldList.addAll(fixedFieldList); -// List endList = fieldList.stream().distinct().collect(Collectors.toList()); -// return endList; } /** @@ -380,7 +355,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI Integer errNum = 0; try { List> read = reader.read(); - List list = read.get(0); + List list = read.get(1); List recordList = adminFieldService.customFieldList("1"); recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); List fieldList = adminFieldService.queryAddField(1); @@ -399,9 +374,9 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI for (int i = 0; i < list.size(); i++) { kv.set(nameMap.get(list.get(i)), i); } - if (read.size() > 1) { + if (read.size() > 2) { JSONObject object = new JSONObject(); - for (int i = 1; i < read.size(); i++) { + for (int i = 2; i < read.size(); i++) { errNum = i; List leadsList = read.get(i); if (leadsList.size() < list.size()) { @@ -444,7 +419,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI } } } catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("",e); if (errNum != 0){ return R.error("第" + (errNum+1) + "行错误!"); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmProductService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmProductService.java index 2b0a693..75e30fb 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmProductService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmProductService.java @@ -8,6 +8,7 @@ import cn.hutool.poi.excel.ExcelUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.jfinal.log.Log; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.admin.service.AdminFieldService; import com.kakarote.crm9.erp.admin.service.AdminSceneService; @@ -26,13 +27,12 @@ import com.jfinal.plugin.activerecord.tx.Tx; import com.jfinal.upload.UploadFile; -import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; public class CrmProductService { + @Inject private AdminFieldService adminFieldService; @@ -94,9 +94,6 @@ public R saveAndUpdate(JSONObject jsonObject) { * 根据id查询产品 */ public R queryById(Integer id) { - if(!authUtil.dataAuth("product","product_id",id)){ - return R.ok().put("data",new Record().set("dataAuth",0)); - } Record record = Db.findFirst("select * from productview where product_id = ?", id); return R.ok().put("data", record); } @@ -116,7 +113,8 @@ public List information(Integer id) { .set("产品编码", record.getStr("num")) .set("标准价格", record.getStr("price")) .set("产品描述", record.getStr("description")); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",record.getStr("batch_id")); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),record.getStr("batch_id")); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -159,22 +157,6 @@ public R updateStatus(String ids, Integer status) { return R.isSuccess(f > 0); } - /** - * @author zxy - * 查询产品自定义字段(新增) - */ - public List queryField() { - List fieldList = new ArrayList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList, "name", "产品名称", "", "text", settingArr, 1); - fieldUtil.getFixedField(fieldList, "categoryId", "产品分类", settingArr, "category", settingArr, 1); - fieldUtil.getFixedField(fieldList, "num", "产品编码", "", "number", settingArr, 1); - fieldUtil.getFixedField(fieldList, "price", "价格", "", "floatnumber", settingArr, 1); - fieldUtil.getFixedField(fieldList, "description", "产品描述", "", "text", settingArr, 0); - fieldList.addAll(adminFieldService.list("4")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -188,26 +170,6 @@ public List queryField(Integer productId) { return adminFieldService.queryUpdateField(4,product); } -// /** -// * @author zxy -// * 查询产品自定义字段(修改) -// */ -// public List queryField(Integer productId) { -// List fieldList = new ArrayList<>(); -// Record record = Db.findFirst("select * from productview where product_id = ?", productId); -// String[] settingArr = new String[]{}; -// fieldUtil.getFixedField(fieldList, "name", "产品名称", record.getStr("name"), "text", settingArr, 1); -// List list = crmProductCategoryService.queryId(null, record.getInt("category_id")); -// Integer[] categoryIds = new Integer[list.size()]; -// categoryIds = list.toArray(categoryIds); -// fieldUtil.getFixedField(fieldList, "categoryId", "产品分类", categoryIds, "category", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "num", "产品编码", record.getStr("num"), "number", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "price", "价格", record.getStr("price"), "floatnumber", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "description", "产品描述", record.getStr("description"), "text", settingArr, 0); -// fieldList.addAll(adminFieldService.queryByBatchId(record.getStr("batch_id"))); -// return fieldList; -// } - /** * @author wyq * 产品导出 @@ -237,7 +199,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI Integer errNum = 0; try { List> read = reader.read(); - List list = read.get(0); + List list = read.get(1); List recordList = adminFieldService.customFieldList("4"); recordList.removeIf(record -> "file".equals(record.getStr("formType")) || "checkbox".equals(record.getStr("formType"))|| "user".equals(record.getStr("formType"))|| "structure".equals(record.getStr("formType"))); List fieldList = adminFieldService.queryAddField(4); @@ -256,9 +218,9 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI for (int i = 0; i < list.size(); i++) { kv.set(nameMap.get(list.get(i)), i); } - if (read.size() > 1) { + if (read.size() > 2) { JSONObject object = new JSONObject(); - for (int i = 1; i < read.size(); i++) { + for (int i = 2; i < read.size(); i++) { errNum = i; List productList = read.get(i); if (productList.size() < list.size()) { @@ -304,7 +266,7 @@ public R uploadExcel(UploadFile file, Integer repeatHandling, Integer ownerUserI } } }catch (Exception e) { - e.printStackTrace(); + Log.getLog(getClass()).error("",e); if (errNum != 0){ return R.error("第" + (errNum+1) + "行错误!"); } diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmReceivablesService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmReceivablesService.java index 28efca9..07f2ab8 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmReceivablesService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmReceivablesService.java @@ -137,9 +137,6 @@ public R saveOrUpdate(JSONObject jsonObject) { * 根据id查询回款 */ public R queryById(Integer id) { - if(!authUtil.dataAuth("receivables","receivables_id",id)){ - return R.ok().put("data",new Record().set("dataAuth",0)); - } Record record = Db.findFirst(Db.getSqlPara("crm.receivables.queryReceivablesById", Kv.by("id", id))); return R.ok().put("data", record); } @@ -161,7 +158,8 @@ public List information(Integer id) { .set("回款金额", record.getStr("money")) .set("期数", record.getStr("plan_num")) .set("备注", record.getStr("remark")); - List recordList = Db.find("select name,value from 72crm_admin_fieldv where batch_id = ?",record.getStr("batch_id")); + List recordList = Db.find(Db.getSql("admin.field.queryCustomField"),record.getStr("batch_id")); + fieldUtil.handleType(recordList); fieldList.addAll(recordList); return fieldList; } @@ -188,24 +186,6 @@ public R deleteByIds(String receivablesIds) { return R.ok(); } - /** - * @author zxy - * 查询回款自定义字段(新增) - */ - public List queryField() { - List fieldList = new ArrayList<>(); - String[] settingArr = new String[]{}; - fieldUtil.getFixedField(fieldList, "number", "回款编号", "", "number", settingArr, 1); - fieldUtil.getFixedField(fieldList, "customerId", "客户名称", "", "customer", settingArr, 1); - fieldUtil.getFixedField(fieldList, "contractId", "合同编号", "", "contract", settingArr, 1); - fieldUtil.getFixedField(fieldList, "returnTime", "回款日期", "", "date", settingArr, 1); - fieldUtil.getFixedField(fieldList, "money", "回款金额", "", "floatnumber", settingArr, 1); - fieldUtil.getFixedField(fieldList, "planId", "期数", "", "receivables_plan", settingArr, 0); - fieldUtil.getFixedField(fieldList, "remark", "备注", "", "textarea", settingArr, 0); - fieldList.addAll(adminFieldService.list("7")); - return fieldList; - } - /** * @author wyq * 查询编辑字段 @@ -221,31 +201,6 @@ public List queryField(Integer receivablesId) { return adminFieldService.queryUpdateField(7,receivables); } - /** - * @author zxy - * 查询回款自定义字段(修改) - */ -// public List queryField(Integer receivablesId) { -// List fieldList = new ArrayList<>(); -// Record record = Db.findFirst("select * from receivablesview where receivables_id = ?", receivablesId); -// String[] settingArr = new String[]{}; -// fieldUtil.getFixedField(fieldList, "number", "回款编号", record.getStr("number"), "number", settingArr, 1); -// List customerList = new ArrayList<>(); -// Record customer = new Record(); -// customerList.add(customer.set("customerId", record.getInt("customer_id")).set("customerName", record.getStr("customer_name"))); -// fieldUtil.getFixedField(fieldList, "customerId", "客户名称", customerList, "customer", settingArr, 1); -// customerList = new ArrayList<>(); -// customer = new Record(); -// customerList.add(customer.set("contractId", record.getStr("contract_id")).set("contract_num", record.getStr("contract_num"))); -// fieldUtil.getFixedField(fieldList, "contractId", "合同编号", customerList, "contract", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "returnTime", "回款日期", DateUtil.formatDate(record.get("return_time")), "date", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "money", "回款金额", record.getStr("money"), "floatnumber", settingArr, 1); -// fieldUtil.getFixedField(fieldList, "planId", "期数", record.getInt("plan_id"), "receivables_plan", settingArr, 0); -// fieldUtil.getFixedField(fieldList, "remark", "备注", record.getStr("remark"), "textarea", settingArr, 0); -// fieldList.addAll(adminFieldService.queryByBatchId(record.getStr("batch_id"))); -// return fieldList; -// } - /** * 根据条件查询回款 */ diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmRecordService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmRecordService.java index 7d46191..e1c08ea 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/CrmRecordService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/CrmRecordService.java @@ -207,6 +207,28 @@ public void addConversionRecord(Integer actionId, String crmTypes, Integer userI crmActionRecord.setContent(JSON.toJSONString(strings)); crmActionRecord.save(); } + + /** + * 添加(锁定/解锁)记录 + * + */ + public void addIsLockRecord(String[] ids, String crmTypes, Integer isLock) { + CrmActionRecord crmActionRecord = new CrmActionRecord(); + crmActionRecord.setCreateUserId(BaseUtil.getUser().getUserId().intValue()); + crmActionRecord.setCreateTime(new Date()); + crmActionRecord.setTypes(crmTypes); + ArrayList strings = new ArrayList<>(); + if(isLock == 1){ + strings.add("将客户锁定。"); + }else { + strings.add("将客户解锁。"); + } + crmActionRecord.setContent(JSON.toJSONString(strings)); + for(String actionId : ids){ + crmActionRecord.setActionId(Integer.valueOf(actionId)); + crmActionRecord.save(); + } + } /** * 线索转化客户 * diff --git a/src/main/java/com/kakarote/crm9/erp/crm/service/InstrumentService.java b/src/main/java/com/kakarote/crm9/erp/crm/service/InstrumentService.java index f243c7f..41e218a 100644 --- a/src/main/java/com/kakarote/crm9/erp/crm/service/InstrumentService.java +++ b/src/main/java/com/kakarote/crm9/erp/crm/service/InstrumentService.java @@ -1,13 +1,14 @@ package com.kakarote.crm9.erp.crm.service; import cn.hutool.core.date.DateField; -import cn.hutool.core.date.DatePattern; -import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.jfinal.aop.Inject; +import com.jfinal.plugin.activerecord.Page; +import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.bi.common.BiTimeUtil; +import com.kakarote.crm9.utils.ParamsUtil; import com.kakarote.crm9.utils.R; import com.jfinal.kit.Kv; import com.jfinal.plugin.activerecord.Db; @@ -53,6 +54,48 @@ public R queryBulletin(String status, String userIds,String startTime ,String en return R.error(); } + /** + * @author zhang + * 销售简报的数据查看详情 + */ + public Page queryBulletinInfo(BasePageRequest basePageRequest,String userIds, String type, Integer label) { + Record record = new Record().set("type", type); + biTimeUtil.analyzeType(record); + String viewName; + switch (label) { + case 2: + viewName = "customerview";break; + case 3: + viewName = "contactsview";break; + case 5: + viewName = "businessview";break; + case 6: + viewName = "contractview";break; + case 7: + viewName = "receivablesview";break; + case 0: + viewName = "businessview";record.set("tn",true);break; + default: + return new Page<>(); + } + record.set("userIds",userIds.split(",")).set("viewName",viewName); + String sortField=basePageRequest.getJsonObject().getString("sortField"); + if(!ParamsUtil.isValid(sortField)){ + return new Page<>(); + } + if(StrUtil.isEmpty(sortField)){ + sortField="update_time"; + } + Integer order=basePageRequest.getJsonObject().getInteger("order"); + if(order==null||(order!=1&&order!=2)){ + order=1; + } + String orderType=order==1?"desc":"asc"; + record.set("sortField",sortField); + record.set("orderType",orderType); + return Db.paginate(basePageRequest.getPage(),basePageRequest.getLimit(),Db.getSqlPara("crm.Instrument.queryBulletinInfo",record)); + + } /** * 业绩指标 @@ -75,7 +118,7 @@ public R queryPerformance(String startTime, String endTime, String userIds,Strin startTime = r.getStr("startTime"); endTime = r.getStr("endTime"); } - //status 1 回款 2.合同 + //status 1 合同 2.回款 Record record = Db.findFirst(Db.getSqlPara("crm.Instrument.queryMoneys", Kv.by("startTime", startTime).set("endTime", endTime).set("userIds", allUsetIdss))); if (record == null) { return R.ok().put("data", new Record().set("contractMoneys", 0).set("receivablesMoneys", 0).set("achievementMoneys", 0).set("proportion", 0)); @@ -247,9 +290,9 @@ public R queryPerformance(String startTime, String endTime, String userIds,Strin if (money.compareTo(new BigDecimal(0)) == 0) { record.set("proportion", 0); } else { - if (status == 1) { + if (status == 2) { record.set("proportion", new BigDecimal(record.getStr("receivablesMoneys")).multiply(new BigDecimal(100)).divide(money, 2, BigDecimal.ROUND_HALF_UP)); - } else if (status == 2) { + } else if (status == 1) { record.set("proportion", new BigDecimal(record.getStr("contractMoneys")).multiply(new BigDecimal(100)).divide(money, 2, BigDecimal.ROUND_HALF_UP)); } } diff --git a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaEventController.java b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaEventController.java index acef8a4..7654212 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaEventController.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaEventController.java @@ -23,6 +23,14 @@ public void queryList(@Para("")OaEvent oaEvent){ renderJson(R.ok().put("data",oaEventService.queryList(oaEvent))); } + /** + * @author wyq + * 查询日程列表 + */ + public void queryById(@Para("eventId")Integer eventId){ + renderJson(R.ok().put("data",oaEventService.queryById(eventId))); + } + /** * @author wyq * 新增日程 diff --git a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineCategoryController.java b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineCategoryController.java index fd0ccb8..4549666 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineCategoryController.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineCategoryController.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.kakarote.crm9.common.annotation.Permissions; import com.kakarote.crm9.common.config.paragetter.BasePageRequest; import com.kakarote.crm9.erp.oa.entity.OaExamineCategory; import com.kakarote.crm9.erp.oa.entity.OaExamineStep; @@ -29,6 +30,7 @@ public class OaExamineCategoryController extends Controller { * * @author hmb */ + @Permissions("manage:oa") public void setExamineCategory() { JSONObject jsonObject = JSON.parseObject(getRawData()); OaExamineCategory oaExamineCategory = new OaExamineCategory(); @@ -86,6 +88,7 @@ public void queryAllExamineCategoryList() { * * @author hmb */ + @Permissions("manage:oa") public void deleteExamineCategory() { String id = getPara("id"); renderJson(oaExamineCategoryService.deleteExamineCategory(id)); @@ -123,6 +126,7 @@ public void queryExamineCategoryById() { /** * 启用/禁用 */ + @Permissions("manage:oa") public void updateStatus() { String id = getPara("id"); renderJson(oaExamineCategoryService.updateStatus(id)); diff --git a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineController.java b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineController.java index 47982d1..43ebcc0 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineController.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/controller/OaExamineController.java @@ -40,9 +40,10 @@ public void myOaExamine(BasePageRequest basePageRequest){ public void getField(){ String id = getPara("examineId"); + Integer isDetail = getInt("isDetail");//1详情 2 编辑 boolean oaAuth = AuthUtil.isOaAuth(- 1, Integer.valueOf(id)); if(oaAuth){renderJson(R.noAuth());return;} - renderJson(oaExamineService.getField(id)); + renderJson(oaExamineService.getField(id,isDetail)); } /** diff --git a/src/main/java/com/kakarote/crm9/erp/oa/service/OaActionRecordService.java b/src/main/java/com/kakarote/crm9/erp/oa/service/OaActionRecordService.java index ff37f9c..3621cd8 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/service/OaActionRecordService.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/service/OaActionRecordService.java @@ -141,7 +141,7 @@ public R queryEvent(String month) { public R queryEventByDay(String day) { Long userId = BaseUtil.getUser().getUserId(); - List recordList = Db.find("select title,date_format(start_time,'%Y-%d-%m') as start_time ,date_format(end_time,'%Y-%d-%m') as end_time ,owner_user_ids from 72crm_oa_event where (create_user_id = ? or owner_user_ids like concat('%', ?, '%')) and ? between date_format(start_time,'%Y-%m-%d') and date_format(end_time,'%Y-%m-%d')", userId, userId,day); + List recordList = Db.find("select event_id,title,date_format(start_time,'%Y-%m-%d') as start_time ,date_format(end_time,'%Y-%m-%d') as end_time ,owner_user_ids from 72crm_oa_event where (create_user_id = ? or owner_user_ids like concat('%', ?, '%')) and ? between date_format(start_time,'%Y-%m-%d') and date_format(end_time,'%Y-%m-%d')", userId, userId,day); recordList.forEach(record -> { StringBuilder realnames = new StringBuilder(); diff --git a/src/main/java/com/kakarote/crm9/erp/oa/service/OaAnnouncementService.java b/src/main/java/com/kakarote/crm9/erp/oa/service/OaAnnouncementService.java index 83b0b34..7128373 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/service/OaAnnouncementService.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/service/OaAnnouncementService.java @@ -40,10 +40,16 @@ public R saveAndUpdate(OaAnnouncement oaAnnouncement){ } boolean flag; if (oaAnnouncement.getStartTime() != null && oaAnnouncement.getEndTime() != null){ - if(oaAnnouncement.getStartTime().compareTo(oaAnnouncement.getEndTime()) == 1){ + if((oaAnnouncement.getStartTime().compareTo(oaAnnouncement.getEndTime()))==1){ return R.error("结束时间早于开始时间"); } } + if (oaAnnouncement.getStartTime() == null ){ + return R.error("开始时间不能为空!"); + } + if (oaAnnouncement.getEndTime() == null ){ + return R.error("结束时间不能为空!"); + } oaAnnouncement.setDeptIds(TagUtil.fromString(oaAnnouncement.getDeptIds())); oaAnnouncement.setOwnerUserIds(TagUtil.fromString(oaAnnouncement.getOwnerUserIds())); if (oaAnnouncement.getAnnouncementId() == null){ @@ -73,7 +79,7 @@ public R delete(Integer id){ * 根据ID查询详情 */ public R queryById(Integer id){ - return R.ok().put("data", Db.find(Db.getSql("oa.announcement.queryById"),id)); + return R.ok().put("data", Db.findFirst(Db.getSql("oa.announcement.queryById"),id)); } /** * 倒叙查询公告集合 diff --git a/src/main/java/com/kakarote/crm9/erp/oa/service/OaEventService.java b/src/main/java/com/kakarote/crm9/erp/oa/service/OaEventService.java index 47db38c..6c17ae0 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/service/OaEventService.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/service/OaEventService.java @@ -53,7 +53,7 @@ public List queryList(OaEvent oaEvent){ */ public R add(OaEvent oaEvent){ if (oaEvent.getStartTime() != null && oaEvent.getEndTime() != null){ - if(oaEvent.getStartTime().compareTo(oaEvent.getEndTime()) == 1){ + if((oaEvent.getStartTime().compareTo(oaEvent.getEndTime())) == 1){ return R.error("结束时间早于开始时间"); } } @@ -82,7 +82,7 @@ public R add(OaEvent oaEvent){ */ public R update(OaEvent oaEvent){ if (oaEvent.getStartTime() != null && oaEvent.getEndTime() != null){ - if(oaEvent.getStartTime().compareTo(oaEvent.getEndTime()) == 1){ + if((oaEvent.getStartTime().compareTo(oaEvent.getEndTime())) == 1){ return R.error("结束时间早于开始时间"); } } @@ -169,4 +169,12 @@ public void queryRelateList(Record record){ } record.set("contractList",contractList); } + + public Record queryById(Integer eventId){ + Record record = Db.findFirst(Db.getSql("oa.event.queryById"),eventId); + record.set("createUser", Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", record.getInt("create_user_id"))); + queryRelateList(record); + return record; + } + } diff --git a/src/main/java/com/kakarote/crm9/erp/oa/service/OaExamineService.java b/src/main/java/com/kakarote/crm9/erp/oa/service/OaExamineService.java index 915f3ee..315a9ec 100644 --- a/src/main/java/com/kakarote/crm9/erp/oa/service/OaExamineService.java +++ b/src/main/java/com/kakarote/crm9/erp/oa/service/OaExamineService.java @@ -46,20 +46,32 @@ public class OaExamineService{ public R myInitiate(BasePageRequest request){ JSONObject jsonObject = request.getJsonObject(); Long userId = BaseUtil.getUser().getUserId(); - Page recordList = Db.paginate(request.getPage(), request.getLimit(), Db.getSqlPara("oa.examine.myInitiate", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("checkStatus")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); - transfer(recordList.getList()); - return R.ok().put("data", recordList); + if(request.getPageType() == 0){ + List recordList = Db.find(Db.getSqlPara("oa.examine.myInitiate", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("checkStatus")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); + transfer(recordList); + return R.ok().put("data", recordList); + }else{ + Page recordList = Db.paginate(request.getPage(), request.getLimit(), Db.getSqlPara("oa.examine.myInitiate", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("checkStatus")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); + transfer(recordList.getList()); + return R.ok().put("data", recordList); + } } public R myOaExamine(BasePageRequest request){ Long userId = BaseUtil.getUser().getUserId(); JSONObject jsonObject = request.getJsonObject(); - Page recordList = Db.paginate(request.getPage(), request.getLimit(), Db.getSqlPara("oa.examine.myOaExamine", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("status")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); - transfer(recordList.getList()); - return R.ok().put("data", recordList); + if(request.getPageType() == 0){ + List recordList = Db.find(Db.getSqlPara("oa.examine.myOaExamine", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("status")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); + transfer(recordList); + return R.ok().put("data", recordList); + }else{ + Page recordList = Db.paginate(request.getPage(), request.getLimit(), Db.getSqlPara("oa.examine.myOaExamine", Kv.by("userId", userId).set("categoryId", jsonObject.getInteger("categoryId")).set("status", jsonObject.getInteger("status")).set("startTime", jsonObject.getDate("startTime")).set("endTime", jsonObject.getDate("endTime")))); + transfer(recordList.getList()); + return R.ok().put("data", recordList); + } } - private void transfer(List recordList){ + public void transfer(List recordList){ recordList.forEach(record -> { setRelation(record); record.set("createUser", Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", record.getInt("create_user_id"))); @@ -81,7 +93,7 @@ private void transfer(List recordList){ }else{ permission.put("isDelete", 0); } - if(((userId.equals(BaseConstant.SUPER_ADMIN_USER_ID) || userId.equals(record.getInt("create_user_id"))) && (examineStatus == 0 || examineStatus == 3)) && examineStatus != 4){ + if(((userId.equals(BaseConstant.SUPER_ADMIN_USER_ID) || userId.equals(record.getLong("create_user_id"))) && (examineStatus == 0 || examineStatus == 3)) && examineStatus != 4){ permission.put("isChecked", 1); }else{ permission.put("isChecked", 0); @@ -140,14 +152,15 @@ public R setOaExamine(JSONObject jsonObject){ if(oaAuth){ return R.noAuth(); } - if (oaExamine.getStartTime() != null && oaExamine.getEndTime() != null){ - if(oaExamine.getStartTime().compareTo(oaExamine.getEndTime()) == 1){ + if(oaExamine.getStartTime() != null && oaExamine.getEndTime() != null){ + if((oaExamine.getStartTime().compareTo(oaExamine.getEndTime())) == 1){ return R.error("审批结束时间早于开始时间"); } } boolean bol; String batchId = StrUtil.isNotEmpty(oaExamine.getBatchId()) ? oaExamine.getBatchId() : IdUtil.simpleUUID(); adminFieldService.save(jsonObject.getJSONArray("field"), batchId); + oaExamine.setBatchId(batchId); String checkUserIds = jsonObject.getString("checkUserId"); Integer categoryId = oaExamine.getCategoryId(); OaExamineCategory oaExamineCategory = OaExamineCategory.dao.findById(categoryId); @@ -198,7 +211,7 @@ public R setOaExamine(JSONObject jsonObject){ checkUserIds = oaExamineStep.getCheckUserId(); } } - if("0".equals(checkUserIds) && ! oaExamine.getCreateUserId().equals(BaseConstant.SUPER_ADMIN_USER_ID)){ + if("0".equals(checkUserIds) && ! oaExamine.getCreateUserId().equals(BaseConstant.SUPER_ADMIN_USER_ID.intValue())){ checkUserIds = BaseConstant.SUPER_ADMIN_USER_ID + ""; } if(StrUtil.isEmpty(checkUserIds)){ @@ -208,20 +221,20 @@ public R setOaExamine(JSONObject jsonObject){ }else{ //添加审核日志 for(Integer userId : TagUtil.toSet(checkUserIds)){ - OaExamineLog oaExamineLog = new OaExamineLog(); - oaExamineLog.setRecordId(oaExamineRecord.getRecordId()); - oaExamineLog.setOrderId(1); - if(oaExamineStep.getStepId() != null){ - oaExamineLog.setExamineStepId(oaExamineStep.getStepId()); - } - oaExamineLog.setExamineStatus(0); - oaExamineLog.setCreateUser(user.getUserId()); - oaExamineLog.setCreateTime(new Date()); - oaExamineLog.setExamineUser(Long.valueOf(userId)); - oaExamineLog.save(); + OaExamineLog oaExamineLog = new OaExamineLog(); + oaExamineLog.setRecordId(oaExamineRecord.getRecordId()); + oaExamineLog.setOrderId(1); + if(oaExamineStep.getStepId() != null){ + oaExamineLog.setExamineStepId(oaExamineStep.getStepId()); + } + oaExamineLog.setExamineStatus(0); + oaExamineLog.setCreateUser(user.getUserId()); + oaExamineLog.setCreateTime(new Date()); + oaExamineLog.setExamineUser(Long.valueOf(userId)); + oaExamineLog.save(); } } - oaActionRecordService.addRecord(oaExamine.getExamineId(), OaEnum.EXAMINE_TYPE_KEY.getTypes(), oaExamine.getUpdateTime() == null ? 1 : 2, oaActionRecordService.getJoinIds(user.getUserId().intValue(),TagUtil.fromString(checkUserIds)), ""); + oaActionRecordService.addRecord(oaExamine.getExamineId(), OaEnum.EXAMINE_TYPE_KEY.getTypes(), oaExamine.getUpdateTime() == null ? 1 : 2, oaActionRecordService.getJoinIds(user.getUserId().intValue(), TagUtil.fromString(checkUserIds)), ""); if(jsonObject.get("oaExamineRelation") != null){ OaExamineRelation oaExamineRelation = jsonObject.getObject("oaExamineRelation", OaExamineRelation.class); oaExamineRelation.setRId(null); @@ -237,8 +250,8 @@ public R setOaExamine(JSONObject jsonObject){ JSONArray oaExamineRelation = jsonObject.getJSONArray("oaExamineTravelList"); for(Object json : oaExamineRelation){ OaExamineTravel oaExamineTravel = TypeUtils.castToJavaBean(json, OaExamineTravel.class); - if (oaExamineTravel.getStartTime() != null && oaExamineTravel.getEndTime() != null){ - if(oaExamineTravel.getStartTime().compareTo(oaExamineTravel.getEndTime()) == 1){ + if(oaExamineTravel.getStartTime() != null && oaExamineTravel.getEndTime() != null){ + if((oaExamineTravel.getStartTime().compareTo(oaExamineTravel.getEndTime())) == 1){ return R.error("差旅结束时间早于开始时间"); } } @@ -251,7 +264,6 @@ public R setOaExamine(JSONObject jsonObject){ } - public R oaExamine(OaExamineLog nowadayExamineLog, Long nextUserId){ //当前审批人 Long auditUserId = BaseUtil.getUser().getUserId(); @@ -358,12 +370,12 @@ public R oaExamine(OaExamineLog nowadayExamineLog, Long nextUserId){ // List examineLogs = AdminExamineLog.dao.find(Db.getSql("admin.examineLog.queryNowadayExamineLogByRecordIdAndStepId"),examineRecord.getRecordId(),examineRecord.getExamineStepId()); //当前并签人员 for(Integer userId : TagUtil.toSet(examineStep.getCheckUserId())){ - AdminExamineLog examineLog = AdminExamineLog.dao.findFirst(Db.getSql("oa.examine.queryNowadayExamineLogByRecordIdAndStepId"), examineRecord.getRecordId(), examineRecord.getExamineStepId(), userId); - if(examineLog.getExamineStatus() == 0){ - //并签未走完 - flag = false; - break; - } + AdminExamineLog examineLog = AdminExamineLog.dao.findFirst(Db.getSql("oa.examine.queryNowadayExamineLogByRecordIdAndStepId"), examineRecord.getRecordId(), examineRecord.getExamineStepId(), userId); + if(examineLog.getExamineStatus() == 0){ + //并签未走完 + flag = false; + break; + } } //并签未完成 if(! flag){ @@ -386,12 +398,12 @@ public R oaExamine(OaExamineLog nowadayExamineLog, Long nextUserId){ checkUserIds = nextExamineStep.getCheckUserId(); } } - if("0".equals(checkUserIds) && ! createUserId.equals(BaseConstant.SUPER_ADMIN_USER_ID)){ + if("0".equals(checkUserIds) && ! createUserId.equals(BaseConstant.SUPER_ADMIN_USER_ID.intValue())){ checkUserIds = BaseConstant.SUPER_ADMIN_USER_ID + ""; } } } - if(((examineCategory.getExamineType() == 2 ) || (examineCategory.getExamineType() == 1 && flag)) && StrUtil.isEmpty(checkUserIds)){ + if(((examineCategory.getExamineType() == 2) || (examineCategory.getExamineType() == 1 && flag)) && StrUtil.isEmpty(checkUserIds)){ //没有上级,审核通过 examineRecord.setExamineStatus(1); }else{ @@ -403,18 +415,18 @@ public R oaExamine(OaExamineLog nowadayExamineLog, Long nextUserId){ oaActionRecord.update(); //添加审核日志 for(Integer userId : TagUtil.toSet(checkUserIds)){ - OaExamineLog oaExamineLog = new OaExamineLog(); - oaExamineLog.setRecordId(examineRecord.getRecordId()); - oaExamineLog.setOrderId(nowadayExamineLog.getOrderId() + 1); - if(nextExamineStep != null){ - oaExamineLog.setOrderId(nextExamineStep.getStepNum()); - oaExamineLog.setExamineStepId(nextExamineStep.getStepId()); - } - oaExamineLog.setExamineStatus(0); - oaExamineLog.setCreateUser(BaseUtil.getUser().getUserId()); - oaExamineLog.setCreateTime(new Date()); - oaExamineLog.setExamineUser(Long.valueOf(userId)); - oaExamineLog.save(); + OaExamineLog oaExamineLog = new OaExamineLog(); + oaExamineLog.setRecordId(examineRecord.getRecordId()); + oaExamineLog.setOrderId(nowadayExamineLog.getOrderId() + 1); + if(nextExamineStep != null){ + oaExamineLog.setOrderId(nextExamineStep.getStepNum()); + oaExamineLog.setExamineStepId(nextExamineStep.getStepId()); + } + oaExamineLog.setExamineStatus(0); + oaExamineLog.setCreateUser(BaseUtil.getUser().getUserId()); + oaExamineLog.setCreateTime(new Date()); + oaExamineLog.setExamineUser(Long.valueOf(userId)); + oaExamineLog.save(); } } @@ -423,7 +435,7 @@ public R oaExamine(OaExamineLog nowadayExamineLog, Long nextUserId){ } public R queryOaExamineInfo(String id){ - Record oaExamineInfo = Db.findFirst("select a.*,b.title as category,b.type from 72crm_oa_examine as a left join 72crm_oa_examine_category b on a.category_id = b.category_id where a.examine_id = ? ", id); + Record oaExamineInfo = Db.findFirst(Db.getSql("oa.examine.queryExamineById"), id); oaExamineInfo.set("createUser", Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", oaExamineInfo.getInt("create_user_id"))); String batchId = oaExamineInfo.getStr("batch_id"); setRelation(oaExamineInfo); @@ -437,7 +449,7 @@ public R queryOaExamineInfo(String id){ return R.ok().put("data", oaExamineInfo); } - public R getField(String id){ + public R getField(String id, Integer isDetail){ Record oaExamineInfo = Db.findFirst("select * from 72crm_oa_examine where examine_id = ?", id); String categoryId = oaExamineInfo.getStr("category_id"); OaExamineCategory oaExamineCategory = new OaExamineCategory().findById(categoryId); @@ -448,50 +460,47 @@ public R getField(String id){ String[] arr = new String[0]; switch(oaExamineCategory.getType()){ case 1: - fieldUtil.oaFieldAdd("content", "审批内容", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3); + fieldUtil.oaFieldAdd("content", "审批内容", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1); break; case 2: - fieldUtil.oaFieldAdd("type_id", "请假类型", "select", new String[]{"年假", "事假", "病假", "产假", "调休", "婚假", "丧假", "其他"}, 1, 0, oaExamineInfo.get("type_id"), "", 3) - .oaFieldAdd("content", "审批内容", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("start_time", "开始时间", "datetime", arr, 1, 0, oaExamineInfo.get("start_time"), "", 3) - .oaFieldAdd("end_time", "结束时间", "datetime", arr, 1, 0, oaExamineInfo.get("end_time"), "", 3) - .oaFieldAdd("duration", "时长(天)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getBigDecimal("duration")), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3); + fieldUtil.oaFieldAdd("type_id", "请假类型", "select", new String[]{"年假", "事假", "病假", "产假", "调休", "婚假", "丧假", "其他"}, 1, 0, oaExamineInfo.get("type_id"), "", 3, 1) + .oaFieldAdd("content", "审批内容", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("start_time", "开始时间", "datetime", arr, 1, 0, oaExamineInfo.get("start_time"), "", 3, 1) + .oaFieldAdd("end_time", "结束时间", "datetime", arr, 1, 0, oaExamineInfo.get("end_time"), "", 3, 1) + .oaFieldAdd("duration", "时长(天)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getBigDecimal("duration")), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1); break; case 3: - fieldUtil.oaFieldAdd("content", "出差事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3) - .oaFieldAdd("cause", "行程明细", "business_cause", arr, 1, 0, examineTravelList, "", 3) - .oaFieldAdd("duration", "时长(天)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getBigDecimal("duration")), "", 3); + fieldUtil.oaFieldAdd("content", "出差事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1) + .oaFieldAdd("cause", "行程明细", "business_cause", arr, 1, 0, examineTravelList, "", 3, 1) + .oaFieldAdd("duration", "时长(天)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getBigDecimal("duration")), "", 3, 1); break; case 4: - fieldUtil.oaFieldAdd("content", "加班原因", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("start_time", "开始时间", "datetime", arr, 1, 0, oaExamineInfo.get("start_time"), "", 3) - .oaFieldAdd("end_time", "结束时间", "datetime", arr, 1, 0, oaExamineInfo.get("end_time"), "", 3) - .oaFieldAdd("duration", "加班总天数", "floatnumber", arr, 1, 0, oaExamineInfo.get("duration"), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3); + fieldUtil.oaFieldAdd("content", "加班原因", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("start_time", "开始时间", "datetime", arr, 1, 0, oaExamineInfo.get("start_time"), "", 3, 1) + .oaFieldAdd("end_time", "结束时间", "datetime", arr, 1, 0, oaExamineInfo.get("end_time"), "", 3, 1) + .oaFieldAdd("duration", "加班总天数", "floatnumber", arr, 1, 0, oaExamineInfo.get("duration"), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1); break; case 5: - fieldUtil.oaFieldAdd("content", "差旅事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("cause", "费用明细", "examine_cause", arr, 1, 0, examineTravelList, "", 3) - .oaFieldAdd("money", "报销总金额", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getInt("money")), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3); + fieldUtil.oaFieldAdd("content", "差旅事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("cause", "费用明细", "examine_cause", arr, 1, 0, examineTravelList, "", 3, 1) + .oaFieldAdd("money", "报销总金额", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getInt("money")), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1); break; case 6: - fieldUtil.oaFieldAdd("content", "借款事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3) - .oaFieldAdd("money", "借款金额(元)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getInt("money")), "", 3) - .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3); + fieldUtil.oaFieldAdd("content", "借款事由", "text", arr, 1, 0, oaExamineInfo.get("content"), "", 3, 1) + .oaFieldAdd("money", "借款金额(元)", "floatnumber", arr, 1, 0, String.valueOf(oaExamineInfo.getInt("money")), "", 3, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 0, 0, oaExamineInfo.get("remark"), "", 3, 1); break; default: - fieldUtil.oaFieldAdd("content", "审批事由", "textarea", arr, 1, 0, oaExamineInfo.get("content"), "", 1) - .oaFieldAdd("remark", "备注", "textarea", arr, 1, 0, oaExamineInfo.get("remark"), "", 1); - List recordList1 = adminFieldService.queryByBatchId(oaExamineInfo.getStr("batch_id"),10); - recordList1.forEach(field -> { - if (field.getInt("type")==8 && StrUtil.isNotEmpty(field.getStr("value"))){ - field.set("value",Db.find("select * from 72crm_admin_file where batch_id = ?",field.getStr("value"))); - } - }); + fieldUtil.oaFieldAdd("content", "审批事由", "textarea", arr, 1, 0, oaExamineInfo.get("content"), "", 1, 1) + .oaFieldAdd("remark", "备注", "textarea", arr, 1, 0, oaExamineInfo.get("remark"), "", 1, 1); + List recordList1 = Db.find(Db.getSql("oa.examine.queryFieldByBatchId"), categoryId, oaExamineInfo.getStr("batch_id")); + adminFieldService.recordToFormType(recordList1); + adminFieldService.transferFieldList(recordList1, isDetail); recordList.addAll(recordList1); break; } @@ -505,40 +514,40 @@ private void setRelation(Record relationRecord){ List customerList = new ArrayList<>(); if(record.getStr("customer_ids") != null && ! record.getStr("customer_ids").isEmpty()){ for(Integer customerId : TagUtil.toSet(record.getStr("customer_ids"))){ - CrmCustomer crmCustomer = CrmCustomer.dao.findById(Integer.valueOf(customerId)); - if(crmCustomer != null){ - customerList.add(crmCustomer); - } + CrmCustomer crmCustomer = CrmCustomer.dao.findById(customerId); + if(crmCustomer != null){ + customerList.add(crmCustomer); + } } } relationRecord.set("customerList", customerList); List contactsList = new ArrayList<>(); if(record.getStr("contacts_ids") != null && ! record.getStr("contacts_ids").isEmpty()){ for(Integer contactsId : TagUtil.toSet(record.getStr("contacts_ids"))){ - CrmContacts crmContacts = CrmContacts.dao.findById(Integer.valueOf(contactsId)); - if(crmContacts != null){ - contactsList.add(crmContacts); - } + CrmContacts crmContacts = CrmContacts.dao.findById(contactsId); + if(crmContacts != null){ + contactsList.add(crmContacts); + } } } relationRecord.set("contactsList", contactsList); List businessList = new ArrayList<>(); if(record.getStr("business_ids") != null && ! record.getStr("business_ids").isEmpty()){ for(Integer businessId : TagUtil.toSet(record.getStr("business_ids"))){ - CrmBusiness crmBusiness = CrmBusiness.dao.findById(Integer.valueOf(businessId)); - if(crmBusiness != null){ - businessList.add(crmBusiness); - } + CrmBusiness crmBusiness = CrmBusiness.dao.findById(Integer.valueOf(businessId)); + if(crmBusiness != null){ + businessList.add(crmBusiness); + } } } relationRecord.set("businessList", businessList); List contractList = new ArrayList<>(); if(record.getStr("contract_ids") != null && ! record.getStr("contract_ids").isEmpty()){ for(Integer contractId : TagUtil.toSet(record.getStr("contract_ids"))){ - CrmContract crmContract = CrmContract.dao.findById(Integer.valueOf(contractId)); - if(crmContract != null){ - contractList.add(crmContract); - } + CrmContract crmContract = CrmContract.dao.findById(Integer.valueOf(contractId)); + if(crmContract != null){ + contractList.add(crmContract); + } } } relationRecord.set("contractList", contractList); @@ -549,7 +558,7 @@ private void setRelation(Record relationRecord){ @Before(Tx.class) public R deleteOaExamine(Integer oaExamineId){ Integer recordId = Db.queryInt("select record_id from 72crm_oa_examine_record where examine_id = ? limit 1", oaExamineId); - Db.delete("delete from `72crm_admin_fieldv` where batch_id = (select `72crm_oa_examine`.batch_id from `72crm_oa_examine` where examine_id = ?)",oaExamineId); + Db.delete("delete from `72crm_admin_fieldv` where batch_id = (select `72crm_oa_examine`.batch_id from `72crm_oa_examine` where examine_id = ?)", oaExamineId); Db.delete("delete from 72crm_oa_examine where examine_id = ?", oaExamineId); Db.delete("delete from 72crm_oa_examine_relation where examine_id = ?", oaExamineId); Db.delete("delete from 72crm_oa_examine_travel where examine_id = ?", oaExamineId); @@ -606,7 +615,7 @@ public R queryExamineRecordList(Integer recordId){ Long auditUserId = BaseUtil.getUser().getUserId(); //jsonObject.put("isRecheck",0); //判断是否有撤回权限 - if((auditUserId.equals(examineRecord.getLong("create_user")) || auditUserId.equals(BaseConstant.SUPER_ADMIN_USER_ID)) && (examineStatus == 0 ||examineStatus == 3)){ + if((auditUserId.equals(examineRecord.getLong("create_user")) || auditUserId.equals(BaseConstant.SUPER_ADMIN_USER_ID)) && (examineStatus == 0 || examineStatus == 3)){ jsonObject.put("isRecheck", 1); }else{ jsonObject.put("isRecheck", 0); @@ -666,11 +675,11 @@ public R queryExamineRecordList(Integer recordId){ if(record.getInt("examine_status") == 1){ status = 1; } - if (record.getInt("examine_status") == 2) { + if(record.getInt("examine_status") == 2){ i++; } } - if (i == logs.size()) { + if(i == logs.size()){ status = 2; } } @@ -694,7 +703,7 @@ public R queryExamineRecordList(Integer recordId){ //该步骤还未审核 logs = new ArrayList<>(); for(Integer userId : TagUtil.toSet(step.getStr("check_user_id"))){ - logs.add(Db.findFirst(Db.getSql("oa.examine.queryUserByUserIdAndStatus"), userId)); + logs.add(Db.findFirst(Db.getSql("oa.examine.queryUserByUserIdAndStatus"), userId)); } step.set("examine_status", 0); step.set("userList", logs); @@ -712,9 +721,12 @@ public R queryExamineRecordList(Integer recordId){ step.set("examine_status", 0); //还未创建审核日志 //查询负责人主管的主管 - List r = Db.find(Db.getSql("oa.examine.queryUserByUserId"), Db.findFirst(Db.getSql("oa.examine.queryUserByUserId"), oaExamine.getCreateUserId()).getLong("user_id")); - if(r == null && r.size() == 0){ - r = Db.find(Db.getSql("admin.examineLog.queryUserByUserIdAnd"), BaseConstant.SUPER_ADMIN_USER_ID); + Record r = Db.findFirst(Db.getSql("oa.examine.queryUserByUserId"), Db.findFirst(Db.getSql("oa.examine.queryUserByUserId"), oaExamine.getCreateUserId()).getLong("user_id")); + if(r != null && r.getInt("user_id") == null){ + r = null; + } + if(r == null){ + r = Db.findFirst(Db.getSql("admin.examineLog.queryUserByUserIdAnd"), BaseConstant.SUPER_ADMIN_USER_ID); } step.set("userList", r); } diff --git a/src/main/java/com/kakarote/crm9/erp/work/controller/TaskController.java b/src/main/java/com/kakarote/crm9/erp/work/controller/TaskController.java index 9096101..d7096f3 100644 --- a/src/main/java/com/kakarote/crm9/erp/work/controller/TaskController.java +++ b/src/main/java/com/kakarote/crm9/erp/work/controller/TaskController.java @@ -80,10 +80,10 @@ public void setTask(@Para("") Task task){ TaskRelation taskRelation = new TaskRelation(); if(customerIds != null || contactsIds != null || businessIds != null || contractIds != null){ - taskRelation.setBusinessIds(businessIds); - taskRelation.setContactsIds(contactsIds); - taskRelation.setContractIds(contractIds); - taskRelation.setCustomerIds(customerIds); + taskRelation.setBusinessIds(TagUtil.fromString(businessIds)); + taskRelation.setContactsIds(TagUtil.fromString(contactsIds)); + taskRelation.setContractIds(TagUtil.fromString(contractIds)); + taskRelation.setCustomerIds(TagUtil.fromString(customerIds)); } renderJson(taskService.setTask(task, taskRelation)); } @@ -112,10 +112,10 @@ public void setWorkTask(@Para("") Task task){ TaskRelation taskRelation = new TaskRelation(); if(customerIds != null || contactsIds != null || businessIds != null || contractIds != null){ - taskRelation.setBusinessIds(businessIds); - taskRelation.setContactsIds(contactsIds); - taskRelation.setContractIds(contractIds); - taskRelation.setCustomerIds(customerIds); + taskRelation.setBusinessIds(TagUtil.fromString(businessIds)); + taskRelation.setContactsIds(TagUtil.fromString(contactsIds)); + taskRelation.setContractIds(TagUtil.fromString(contractIds)); + taskRelation.setCustomerIds(TagUtil.fromString(customerIds)); } renderJson(taskService.setTask(task, taskRelation)); } @@ -169,7 +169,6 @@ public void queryTaskList(BasePageRequest basePageRequest){ List userIds = new ArrayList<>(); if(mold == null){ userIds.add(BaseUtil.getUser().getUserId().intValue()); - //userIds.add(1); }else if(mold == 1 && userId == null){ userIds = userService.queryUserIdsByParentId(BaseUtil.getUser().getUserId().intValue()); }else{ diff --git a/src/main/java/com/kakarote/crm9/erp/work/service/TaskService.java b/src/main/java/com/kakarote/crm9/erp/work/service/TaskService.java index 029bad1..f107a78 100644 --- a/src/main/java/com/kakarote/crm9/erp/work/service/TaskService.java +++ b/src/main/java/com/kakarote/crm9/erp/work/service/TaskService.java @@ -230,101 +230,25 @@ private Record transfer(String taskId){ * 查询任务列表 */ public R getTaskList(Integer type, Integer status, Integer priority, Integer date, List userIds, BasePageRequest basePageRequest, String name){ - String total = "select count(*) from 72crm_task a where a.pid = 0 and a.ishidden = 0 "; - StringBuffer sql = new StringBuffer(); Page page = new Page<>(); - if(userIds.size() > 0){ - if(type == null || type == 0){ - - sql.append(" and ( a.main_user_id in ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append("'").append(userIds.get(i)).append("'"); - }else{ - sql.append(",'").append(userIds.get(i)).append("'"); - } - } - sql.append(")"); - sql.append(" or a.create_user_id in ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append("'").append(userIds.get(i)).append("'"); - }else{ - sql.append(",'").append(userIds.get(i)).append("'"); - } - } - sql.append(")"); - sql.append(" or ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append(" a.owner_user_id like concat('%,',").append(userIds.get(i)).append(",',%')"); - }else{ - sql.append(" or a.owner_user_id like concat('%,',").append(userIds.get(i)).append(",',%')"); - } - } - sql.append("))"); - }else if(type == 1){ - sql.append(" and a.main_user_id in ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append("'").append(userIds.get(i)).append("'"); - }else{ - sql.append(",'").append(userIds.get(i)).append("'"); - } - } - sql.append(")"); - }else if(type == 2){ - sql.append(" and a.create_user_id in ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append("'").append(userIds.get(i)).append("'"); - }else{ - sql.append(",'").append(userIds.get(i)).append("'"); - } - } - sql.append(")"); - }else if(type == 3){ - sql.append(" and ( "); - for(int i = 0; i < userIds.size(); i++){ - if(i == 0){ - sql.append(" a.owner_user_id like concat('%,',").append(userIds.get(i)).append(",',%')"); - }else{ - sql.append(" or a.owner_user_id like concat('%,',").append(userIds.get(i)).append(",',%')"); - } - } - sql.append(")"); - } - }else{ + if(userIds.size() == 0){ page.setList(new ArrayList<>()); return R.ok().put("data", page); } - if(status != null){ - sql.append(" and a.status = ").append(status); - } - if(priority != null){ - sql.append(" and a.priority = ").append(priority); - } - if(date != null){ - if(date == 1){ - sql.append(" and TO_DAYS(a.stop_time) = TO_DAYS(now()) "); - } - if(date == 2){ - sql.append(" and to_days(NOW()) - TO_DAYS(a.stop_time) = -1 "); - } - if(date == 3){ - sql.append(" and to_days(NOW()) - TO_DAYS(a.stop_time) >= -7 and to_days(NOW()) - TO_DAYS(a.stop_time) <= 0 "); - } - if(date == 4){ - sql.append(" and to_days(NOW()) - TO_DAYS(a.stop_time) >= -30 and to_days(NOW()) - TO_DAYS(a.stop_time) <= 0 "); - } - } - if(StrUtil.isNotEmpty(name)){ - sql.append(" and a.name like '%").append(name).append("%' "); + if(basePageRequest.getPageType() == 0){ + List recordList = Db.find(Db.getSqlPara("work.task.getTaskList", + Kv.by("type",type).set("userIds",userIds).set("status",status). + set("priority",priority).set("date",date).set("taskName",name))); + return R.ok().put("data", queryUser(recordList)); + }else { + page = Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), + Db.getSqlPara("work.task.getTaskList", + Kv.by("type",type).set("userIds",userIds).set("status",status). + set("priority",priority).set("date",date).set("taskName",name))); + page.setList(queryUser(page.getList())); + return R.ok().put("data", page); } - sql.append(" order by a.create_time desc "); - page = Db.paginateByFullSql(basePageRequest.getPage(), basePageRequest.getLimit(), total + sql, Db.getSql("work.task.getTaskList") + sql); - page.setList(queryUser(page.getList())); - return R.ok().put("data", page); + } private List queryUser(List tasks){ @@ -591,7 +515,20 @@ public R queryTaskRelation(BasePageRequest basePageRequest){ if(AuthUtil.oaAnth(relation.toRecord())){ return R.noAuth(); } - return R.ok().put("data", Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), Db.getSqlPara("work.task.queryTaskRelation", Kv.by("businessIds", relation.getBusinessIds()).set("contactsIds", relation.getContactsIds()).set("contractIds", relation.getContractIds()).set("customerIds", relation.getCustomerIds())))); + Page paginate = Db.paginate(basePageRequest.getPage(), basePageRequest.getLimit(), Db.getSqlPara("work.task.queryTaskRelation", Kv.by("businessIds", relation.getBusinessIds()).set("contactsIds", relation.getContactsIds()).set("contractIds", relation.getContractIds()).set("customerIds", relation.getCustomerIds()))); + paginate.getList().forEach(this::composeUser); + return R.ok().put("data", paginate); + } + + private void composeUser(Record record){ + Integer createUserId = record.getInt("create_user_id"); + record.set("createUser",Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", createUserId)); + Integer mainUserId = record.getInt("main_user_id"); + record.set("mainUser",Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", mainUserId)); + String ownerUserId = record.getStr("owner_user_id"); + List ownerUserList = new ArrayList<>(); + TagUtil.toSet(ownerUserId).forEach(userId-> ownerUserList.add(Db.findFirst("select user_id,realname,img from 72crm_admin_user where user_id = ?", userId))); + record.set("ownerUserList",ownerUserList); } diff --git a/src/main/java/com/kakarote/crm9/utils/AuthUtil.java b/src/main/java/com/kakarote/crm9/utils/AuthUtil.java index 6161cb4..6316948 100644 --- a/src/main/java/com/kakarote/crm9/utils/AuthUtil.java +++ b/src/main/java/com/kakarote/crm9/utils/AuthUtil.java @@ -8,6 +8,7 @@ import com.jfinal.plugin.activerecord.Record; import com.kakarote.crm9.common.constant.BaseConstant; import com.kakarote.crm9.erp.admin.entity.AdminUser; +import com.kakarote.crm9.erp.admin.service.AdminRoleService; import com.kakarote.crm9.erp.admin.service.AdminUserService; import com.kakarote.crm9.erp.crm.common.CrmEnum; @@ -20,32 +21,6 @@ * @author wyq */ public class AuthUtil { - @Inject - private AdminUserService adminUserService; - - public boolean dataAuth( String table,String fieldName,Integer dataId){ - List roles = BaseUtil.getUser().getRoles(); - List dataAuth = Db.query("select data_type from 72crm_admin_role where role_id in ("+CollectionUtil.join(roles,",")+")"); - List userIdList = new ArrayList<>(); - Integer deptId = BaseUtil.getUser().getDeptId(); - if (dataAuth.contains(5)){ - return true; - }else if (dataAuth.contains(4)){ - List deptIdList = adminUserService.queryChileDeptIds(deptId, BaseConstant.AUTH_DATA_RECURSION_NUM); - deptIdList.add(deptId); - List userIds = Db.query("select user_id from 72crm_admin_user where dept_id in ("+CollectionUtil.join(deptIdList,",")+")"); - userIdList.addAll(userIds); - }else if (dataAuth.contains(3)){ - userIdList.addAll(Db.query("select user_id from 72crm_admin_user where dept_id = ?",deptId)); - }else if (dataAuth.contains(2)){ - userIdList.addAll(adminUserService.queryChileUserIds(BaseUtil.getUserId(),BaseConstant.AUTH_DATA_RECURSION_NUM)); - userIdList.add(BaseUtil.getUserId()); - }else if (dataAuth.contains(1)){ - userIdList.add(BaseUtil.getUserId()); - } - Long ownerUserId = Db.queryLong("select owner_user_id from 72crm_crm_"+table+" where "+fieldName+" = ?",dataId); - return userIdList.contains(ownerUserId); - } public static Map getCrmTablePara(String urlPrefix){ Map tableParaMap = new HashMap<>(); @@ -85,13 +60,13 @@ public static boolean isCrmAuth(Map tablePara, Integer id){ return false; } Long userId = BaseUtil.getUserId(); - List longs = Aop.get(AdminUserService.class).queryUserByAuth(userId); + List longs = Aop.get(AdminUserService.class).queryUserByAuth(userId,null); StringBuilder authSql = new StringBuilder("select count(*) from "); authSql.append(tablePara.get("tableName")).append(" where ").append(tablePara.get("tableId")).append(" = ").append(id); if(longs != null && longs.size() > 0){ authSql.append(" and owner_user_id in (").append(StrUtil.join(",", longs)).append(")"); if("72crm_crm_customer".equals(tablePara.get("tableName")) || "72crm_crm_business".equals(tablePara.get("tableName")) || "72crm_crm_contract".equals(tablePara.get("tableName"))){ - authSql.append(" or ro_user_id like CONCAT('%,','" + userId + "',',%')" + " or rw_user_id like CONCAT('%,','" + userId + "',',%')"); + authSql.append(" or ro_user_id like CONCAT('%,','").append(userId).append("',',%')").append(" or rw_user_id like CONCAT('%,','").append(userId).append("',',%')"); } } return Db.queryInt(authSql.toString()) == 0; @@ -117,6 +92,12 @@ public static boolean isOaAuth(Integer type, Integer id){ } Map tablePara = getOaTablePara(type); Long userId = BaseUtil.getUserId(); + List roleIds=Aop.get(AdminRoleService.class).queryRoleIdsByUserId(userId); + + //超级管理员角色拥有最高权限 + if (roleIds.contains(BaseConstant.SUPER_ADMIN_ROLE_ID)||userId.equals(BaseConstant.SUPER_ADMIN_USER_ID)) { + return false; + } if(tablePara == null){ List userIds = Db.query("select create_user_id from `72crm_oa_examine` where examine_id = ? union all select b.examine_user from `72crm_oa_examine_record` as a left join `72crm_oa_examine_log` b on a.record_id = b.record_id where a.examine_id = ?", id, id); return ! userIds.contains(userId); @@ -128,13 +109,13 @@ public static boolean isOaAuth(Integer type, Integer id){ List childIdList = Aop.get(AdminUserService.class).queryChileUserIds(userId, 20); authSql.append(tablePara.get("tableName")).append(" where ").append(tablePara.get("tableId")).append(" = ").append(id); if(childIdList != null && childIdList.size()>0){ - authSql.append(" and (").append(" (owner_user_id like CONCAT('%,','" + userId + "',',%')" ).append(" or main_user_id = ").append(userId).append(") "); + authSql.append(" and (").append(" (owner_user_id like CONCAT('%,','").append(userId).append("',',%')").append(" or main_user_id = ").append(userId).append(") "); childIdList.forEach(childId->{ - authSql.append(" or (owner_user_id like CONCAT('%,','" + childId + "',',%')" ).append(" or main_user_id = ").append(childId).append(") "); + authSql.append(" or (owner_user_id like CONCAT('%,','").append(childId).append("',',%')").append(" or main_user_id = ").append(childId).append(") "); }); authSql.append(") "); }else { - authSql.append(" and ").append(" (owner_user_id like CONCAT('%,','" + userId + "',',%')" ).append(" or main_user_id = ").append(userId).append(") "); + authSql.append(" and ").append(" (owner_user_id like CONCAT('%,','").append(userId).append("',',%')").append(" or main_user_id = ").append(userId).append(") "); } } return Db.queryInt(authSql.toString()) == 0; diff --git a/src/main/java/com/kakarote/crm9/utils/BaseUtil.java b/src/main/java/com/kakarote/crm9/utils/BaseUtil.java index da4a037..3d001ec 100644 --- a/src/main/java/com/kakarote/crm9/utils/BaseUtil.java +++ b/src/main/java/com/kakarote/crm9/utils/BaseUtil.java @@ -2,11 +2,11 @@ import cn.hutool.core.date.DateUtil; import com.jfinal.kit.PropKit; +import com.jfinal.log.Log; import com.kakarote.crm9.common.config.JfinalConfig; -import com.kakarote.crm9.common.constant.BaseConstant; +import com.kakarote.crm9.common.config.redis.RedisManager; import com.kakarote.crm9.erp.admin.entity.AdminUser; import com.jfinal.kit.Prop; -import com.jfinal.plugin.redis.Redis; import org.apache.commons.codec.digest.DigestUtils; import javax.servlet.http.Cookie; @@ -15,6 +15,7 @@ import java.util.Date; public class BaseUtil { + private static ThreadLocal threadLocal = new ThreadLocal<>(); /** @@ -74,7 +75,7 @@ public static String getIpAddress() { } } catch (Exception e) { // TODO Auto-generated catch block - e.printStackTrace(); + Log.getLog(BaseUtil.class).error("",e); } HttpServletRequest request=getRequest(); /** @@ -127,7 +128,7 @@ public static HttpServletRequest getRequest() { public static AdminUser getUser() { - return Redis.use().get(getToken()); + return RedisManager.getRedis().get(getToken()); } public static Long getUserId(){ @@ -143,20 +144,7 @@ public static String getToken(){ } public static String getToken(HttpServletRequest request){ - return request.getHeader("Admin-Token") != null ? request.getHeader("Admin-Token") : getCookieValue(request,"Admin-Token"); + return request.getHeader("Admin-Token") != null ? request.getHeader("Admin-Token") : ""; } - public static String getCookieValue(HttpServletRequest request,String name) { - String cookieValue= ""; - Cookie[] cookies = request.getCookies(); - if (cookies != null) { - for (Cookie cookie : cookies) { - if (cookie.getName().equals(name)) { - cookieValue = cookie.getValue(); - break; - } - } - } - return cookieValue; - } } diff --git a/src/main/java/com/kakarote/crm9/utils/FieldUtil.java b/src/main/java/com/kakarote/crm9/utils/FieldUtil.java index 02bc5cf..04c7d3c 100644 --- a/src/main/java/com/kakarote/crm9/utils/FieldUtil.java +++ b/src/main/java/com/kakarote/crm9/utils/FieldUtil.java @@ -1,5 +1,7 @@ package com.kakarote.crm9.utils; +import cn.hutool.core.collection.CollectionUtil; +import com.jfinal.plugin.activerecord.Db; import com.kakarote.crm9.erp.admin.entity.AdminFieldSort; import com.jfinal.plugin.activerecord.Record; @@ -97,11 +99,25 @@ public FieldUtil add(String fieldName, String name, String formType,T settin * @param isUnique 是否验证 0否 1 是 * @return */ - public FieldUtil oaFieldAdd(String fieldName, String name, String formType, String[] settingArr, Integer isNull,Integer isUnique,Object value,String defaultValue,Integer operating){ + public FieldUtil oaFieldAdd(String fieldName, String name, String formType, String[] settingArr, Integer isNull,Integer isUnique,Object value,String defaultValue,Integer operating,Integer fieldType){ Record record = new Record(); - record.set("fieldName",fieldName).set("name",name).set("formType",formType).set("setting",settingArr).set("isNull",isNull).set("isUnique",isUnique).set("value",value).set("defaultValue",defaultValue).set("operating",operating).set("maxLength",0); + record.set("fieldName",fieldName).set("name",name).set("formType",formType).set("setting",settingArr).set("isNull",isNull).set("isUnique",isUnique).set("value",value).set("defaultValue",defaultValue).set("operating",operating).set("maxLength",0).set("fieldType",fieldType); recordList.add(record); return this; } + public void handleType(List recordList){ + recordList.forEach(record -> { + if (record.getInt("type") == 8){ + record.set("value", Db.find("select * from 72crm_admin_file where batch_id = ?",record.getStr("value"))); + }else if (record.getInt("type") == 10){ + List userList = Db.query("select realname from 72crm_admin_user where find_in_set(user_id,ifnull(?,0))",record.getStr("value")); + record.set("value", CollectionUtil.join(userList,",")); + }else if (record.getInt("type") == 12){ + List deptList = Db.query("select name from 72crm_admin_dept where find_in_set(dept_id,ifnull(?,0))",record.getStr("value")); + record.set("value", CollectionUtil.join(deptList,",")); + } + }); + } + } diff --git a/src/main/java/com/kakarote/crm9/utils/ParamsUtil.java b/src/main/java/com/kakarote/crm9/utils/ParamsUtil.java index f9bb3c7..66af6dd 100644 --- a/src/main/java/com/kakarote/crm9/utils/ParamsUtil.java +++ b/src/main/java/com/kakarote/crm9/utils/ParamsUtil.java @@ -6,9 +6,12 @@ * @author wyq */ public class ParamsUtil { - public boolean isValid(String param){ + public static boolean isValid(String param){ + if(param==null){ + return true; + } String reg = "(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|" - + "(\\b(select|update|union|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\\b)"; + + "(\\b(select|update|union|and|or|delete|insert|trancate|char|substr|ascii|declare|exec|count|master|into|drop|execute)\\b)"; Pattern sqlPattern = Pattern.compile(reg, Pattern.CASE_INSENSITIVE); diff --git a/src/main/resources/config/crm9-config.txt b/src/main/resources/config/crm9-config.txt index f571755..4c70008 100644 --- a/src/main/resources/config/crm9-config.txt +++ b/src/main/resources/config/crm9-config.txt @@ -1,15 +1,5 @@ -#数据库链接 +#database mysql.jdbcUrl = jdbc:mysql://127.0.0.1:3306/crm9?characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false mysql.user = root mysql.password = 123456 jfinal.devMode = false -jfinal.redis=MainRedis -#--------------------------------------------------------- -MainRedis.open = true -MainRedis.host=127.0.0.1 -MainRedis.port=6379 -MainRedis.timeout=20000 -#没有密码直接留空或者将此行删除 -MainRedis.password=123456 -MainRedis.cacheName = 72crm -MainRedis.database = 0 diff --git a/src/main/resources/config/redis.json b/src/main/resources/config/redis.json new file mode 100644 index 0000000..2b0ef5c --- /dev/null +++ b/src/main/resources/config/redis.json @@ -0,0 +1,10 @@ +{ + "type":1, + "remarks":"1为单机版,2为cluster集群,3为sentinel集群", + "cacheName":"master", + "host":[ + "127.0.0.1:6379" + ], + "password":"123456", + "database":0 +} diff --git a/src/main/resources/template/admin/adminField.sql b/src/main/resources/template/admin/adminField.sql index d415003..1dee1a7 100644 --- a/src/main/resources/template/admin/adminField.sql +++ b/src/main/resources/template/admin/adminField.sql @@ -41,7 +41,22 @@ and examine_category_id=#para(categoryId) #end #end - + #sql("deleteByFieldValue") + DELETE FROM 72crm_admin_fieldv WHERE field_id in + ( + SELECT field_id FROM 72crm_admin_field WHERE field_id not in + ( + #for(i:ids) + #(for.index > 0 ? "," : "") #para(i) + #end + ) + and (operating = '0' or operating = '2') + and label=#para(label) + #if(label==10) + and examine_category_id=#para(categoryId) + #end + ) + #end #sql ("updateFieldByParentId") update 72crm_admin_field set @@ -93,19 +108,12 @@ #end #sql("list") - SELECT field_id,field_name,name,type,label,remark,input_tips,max_length,default_value,is_unique,is_null,options,operating,update_time,examine_category_id,field_type FROM 72crm_admin_field WHERE label=#para(label) + SELECT field_id,field_name,name,type,label,remark,input_tips,max_length,default_value,is_unique,is_null,options,operating,update_time,examine_category_id,field_type,relevant FROM 72crm_admin_field WHERE label=#para(label) #if(categoryId) and examine_category_id=#para(categoryId) #end ORDER BY sorting asc #end - #sql("list1") - SELECT field_id,field_name,name,type,label,remark,input_tips,max_length,default_value,is_unique,is_null,options,operating,update_time,examine_category_id,field_type FROM 72crm_admin_field WHERE label=#para(label) - #if(categoryId) - and examine_category_id=#para(categoryId) - #end - ORDER BY sorting asc - #end #sql("queryFieldsByBatchId") SELECT a.`name` as fieldName,a.`name`,a.type,a.label,a.remark,a.input_tips,a.max_length,a.default_value,a.is_unique as isUnique,a.is_null as isNull,a.sorting,a.`options`,b.`value`,a.operating FROM 72crm_admin_field as a left join 72crm_admin_fieldv as b on a.field_id = b.field_id @@ -209,4 +217,8 @@ #sql ("fieldreceivablesview") create or replace view fieldreceivablesview as select %s batch_id as field_batch_id from 72crm_admin_fieldv as a inner join 72crm_admin_field as d on `a`.`field_id` = `d`.`field_id` %s where d.label = %s and a.batch_id is not null and a.batch_id != '' and d.field_type = 0 group by a.batch_id #end + + #sql ("queryCustomField") + select a.name,a.value,b.type from 72crm_admin_fieldv as a left join 72crm_admin_field as b on a.field_id = b.field_id where batch_id = ? + #end #end diff --git a/src/main/resources/template/admin/adminRole.sql b/src/main/resources/template/admin/adminRole.sql index d3fab4a..c3eb580 100644 --- a/src/main/resources/template/admin/adminRole.sql +++ b/src/main/resources/template/admin/adminRole.sql @@ -44,4 +44,36 @@ #sql("queryRoleIdsByUserId") SELECT role_id FROM 72crm_admin_user_role as a WHERE a.user_id=? #end + #sql("queryUserRoleListByUserId") + SELECT + k.data_type, + k.menu_id, + am.menu_name, + am.realm + FROM + ( + SELECT + t.*, arm.menu_id + FROM + ( + SELECT DISTINCT + a.data_type, + a.role_name, + a.role_id, + b.user_id + FROM + 72crm_admin_role AS a + LEFT JOIN 72crm_admin_user_role AS b ON a.role_id = b.role_id + ) t + LEFT JOIN 72crm_admin_role_menu arm ON t.role_id = arm.role_id + ) k + INNER JOIN 72crm_admin_menu am ON k.menu_id = am.menu_id + WHERE + k.user_id =#para(userId) + #if(realm) + and am.realm=#para(realm) + #end + ORDER BY + k.data_type DESC + #end #end diff --git a/src/main/resources/template/admin/adminUser.sql b/src/main/resources/template/admin/adminUser.sql index af19d89..9336159 100644 --- a/src/main/resources/template/admin/adminUser.sql +++ b/src/main/resources/template/admin/adminUser.sql @@ -4,7 +4,7 @@ #end #sql("queryUserList") select a.realname,a.username,a.user_id,a.sex,a.mobile,a.email,e.name as deptName,a.status,a.create_time,a.dept_id, - a.post,a.parent_id, + a.post,a.parent_id,a.img, (select b.realname from 72crm_admin_user b where b.user_id = a.parent_id) as parentName, (select group_concat(d.role_id) from 72crm_admin_user_role as c left join 72crm_admin_role as d on c.role_id = d.role_id where c.user_id = a.user_id) as roleId, (select group_concat(d.role_name) from 72crm_admin_user_role as c left join 72crm_admin_role as d on c.role_id = d.role_id where c.user_id = a.user_id) as roleName @@ -84,4 +84,13 @@ #sql("queryUserByDeptId") select user_id as id,realname from 72crm_admin_user where dept_id =? #end + + #sql ("updateScene") + delete from 72crm_admin_scene where user_id in ( + #for(i:ids) + #(for.index == 0 ? "" : ",") + #para(i) + #end + ) + #end #end diff --git a/src/main/resources/template/bi/biWork.sql b/src/main/resources/template/bi/biWork.sql new file mode 100644 index 0000000..d12a663 --- /dev/null +++ b/src/main/resources/template/bi/biWork.sql @@ -0,0 +1,32 @@ +#namespace("bi.work") + #sql ("queryLogByUser") + SELECT b.realname,b.username,b.img,b.user_id,(SELECT COUNT(1) FROM 72crm_task_comment WHERE type='1' and type_id=a.log_id) as sum,a.send_user_ids,a.read_user_ids + FROM 72crm_oa_log as a LEFT JOIN 72crm_admin_user as b on a.create_user_id=b.user_id + WHERE DATE_FORMAT(a.create_time,#para(sqlDateFormat)) between #para(beginTime) and #para(finalTime) and a.create_user_id =#para(userId) + #end + #sql ("queryExamineCategory") + SELECT category_id,title FROM 72crm_oa_examine_category WHERE 1=1 + #end + #sql ("queryExamineCount") + SELECT IFNULL(SUM(money), 0) as money,IFNULL(SUM(duration), 0) as duration + FROM 72crm_oa_examine as a LEFT JOIN 72crm_oa_examine_record as b on a.examine_id=b.examine_id and b.examine_status='1' + WHERE a.category_id = #para(categoryId) + and (a.create_time between #para(startTime) and #para(endTime)) + and a.create_user_id = #para(userId) + #end + #sql ("examineStatistics") + SELECT + a.user_id,a.username,a.realname,a.img + #for(x:categorys) ,COUNT(case when b.category_id=#para(x.category_id) then 1 end) as count_#(x.category_id) #end + FROM + 72crm_admin_user AS a + LEFT JOIN 72crm_oa_examine AS b ON a.user_id = b.create_user_id and (DATE_FORMAT(b.create_time,#para(sqlDateFormat)) between #para(beginTime) and #para(finalTime)) + where a.user_id in ( + #for(x:userList) + #(for.index == 0 ? "" : ",") + #para(x) + #end + ) + GROUP BY a.user_id + #end +#end diff --git a/src/main/resources/template/crm/Instrument.sql b/src/main/resources/template/crm/Instrument.sql index 4a4fd3c..be5a091 100644 --- a/src/main/resources/template/crm/Instrument.sql +++ b/src/main/resources/template/crm/Instrument.sql @@ -79,6 +79,14 @@ #end)) as recordStatusCount FROM 72crm_crm_customer #end + #sql("queryBulletinInfo") + select * from #(viewName) as a where 1=1 and (a.create_time between #para(beginDate) and #para(endDate)) + and create_user_id in ( #for(x:userIds) #(for.index == 0 ? "" : ",") #para(x) #end) + #if(tn) + and (SELECT COUNT(*) FROM 72crm_crm_business_change as b WHERE b.business_id = a.business_id and (b.create_time between #para(beginDate) and #para(endDate)))>0 + #end + order by #(sortField) #(orderType) + #end #sql("thisWeek") select distinct (SELECT COUNT(*) FROM 72crm_crm_business WHERE YEARWEEK(date_format(create_time,'%Y-%m-%d')) = YEARWEEK(now()) AND create_user_id in ( #for(x:userIds) diff --git a/src/main/resources/template/crm/backLog.sql b/src/main/resources/template/crm/backLog.sql index f122599..4ae1c35 100644 --- a/src/main/resources/template/crm/backLog.sql +++ b/src/main/resources/template/crm/backLog.sql @@ -37,14 +37,14 @@ select count(*) from 72crm_crm_contract as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id - where c.examine_user = ? and c.examine_status = 0 and ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and c.is_recheck != 1 + where c.examine_user = ? and a.check_status in (0,1) and ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and c.is_recheck != 1 #end #sql ("checkReceivablesNum") select count(*) from 72crm_crm_receivables as a inner join 72crm_admin_examine_record as b on a.examine_record_id = b.record_id left join 72crm_admin_examine_log as c on b.record_id = c.record_id - where c.examine_user = ? and c.examine_status = 0 and ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and c.is_recheck != 1 + where c.examine_user = ? and a.check_status in (0,1) and ifnull(b.examine_step_id, 1) = ifnull(c.examine_step_id, 1) and c.is_recheck != 1 #end #sql ("remindReceivablesPlanNum") diff --git a/src/main/resources/template/crm/business.sql b/src/main/resources/template/crm/business.sql index 7eefeab..5abcdf0 100644 --- a/src/main/resources/template/crm/business.sql +++ b/src/main/resources/template/crm/business.sql @@ -100,4 +100,12 @@ #end ) #end + + #sql ("unrelateContacts") + delete from 72crm_crm_contacts_business where business_id = #para(businessId) and contacts_id in ( + #for(i:ids) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + #end #end diff --git a/src/main/resources/template/crm/contact.sql b/src/main/resources/template/crm/contact.sql index 086f0cd..184d559 100644 --- a/src/main/resources/template/crm/contact.sql +++ b/src/main/resources/template/crm/contact.sql @@ -111,4 +111,12 @@ #end ) #end + + #sql ("unrelateBusiness") + delete from 72crm_crm_contacts_business where contacts_id = #para(contactsId) and business_id in ( + #for(i:ids) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + #end #end diff --git a/src/main/resources/template/crm/customer.sql b/src/main/resources/template/crm/customer.sql index 4d9e9fd..647492a 100644 --- a/src/main/resources/template/crm/customer.sql +++ b/src/main/resources/template/crm/customer.sql @@ -17,7 +17,7 @@ #end #sql("queryById") - select * from customerview + select *,(IF(owner_user_id is null,1,0)) as is_pool from customerview where customer_id = ? #end @@ -45,7 +45,10 @@ #end #sql("queryContacts") - select contacts_id,name,mobile,post,telephone,是否关键决策人 from contactsview where customer_id = ? + select contacts_id,name,mobile,post,telephone,是否关键决策人 from contactsview where customer_id = #para(customerId) + #if(contactsName) + and a.name like CONCAT('%',#para(contactsName),'%') + #end #end #sql ("queryContactsNumber") @@ -80,13 +83,19 @@ select a.contract_id,a.num,a.name as contract_name,b.customer_name,a.money,a.start_time,a.end_time, ifnull((select sum(c.money) from `72crm_crm_receivables` c where c.contract_id = a.contract_id and c.check_status = 2),0) as receivablesMoneyCount from 72crm_crm_contract as a inner join 72crm_crm_customer as b on a.customer_id = b.customer_id - where a.customer_id = ? + where a.customer_id = #para(customerId) + #if(contractName) + and a.name like CONCAT('%',#para(contractName),'%') + #end #end #sql ("queryPassContract") select a.contract_id,a.num,a.name as contract_name,b.customer_name,a.money,a.start_time,a.end_time from 72crm_crm_contract as a inner join 72crm_crm_customer as b on a.customer_id = b.customer_id - where a.customer_id = ? and a.check_status = ? + where a.customer_id = #para(customerId) and a.check_status = #para(checkStatus) + #if(contractName) + and a.name like CONCAT('%',#para(contractName),'%') + #end #end #sql ("getMembers") diff --git a/src/main/resources/template/oa/oaExamine.sql b/src/main/resources/template/oa/oaExamine.sql index 3e21d84..2e66fe7 100644 --- a/src/main/resources/template/oa/oaExamine.sql +++ b/src/main/resources/template/oa/oaExamine.sql @@ -15,7 +15,7 @@ group by a.examine_id,b.record_id order by a.create_time desc #end #sql("myOaExamine") - select a.*,b.examine_status,b.record_id,b.examine_step_id,c.category_id,c.title as categoryTitle from 72crm_oa_examine a left join 72crm_oa_examine_record b on a.examine_id = b.examine_id left join 72crm_oa_examine_category c on a.category_id = c.category_id left join 72crm_oa_examine_log d on d.record_id = b.record_id + select a.*,b.examine_status,b.record_id as examine_record_id,b.examine_step_id,c.category_id,c.title as categoryTitle from 72crm_oa_examine a left join 72crm_oa_examine_record b on a.examine_id = b.examine_id left join 72crm_oa_examine_category c on a.category_id = c.category_id left join 72crm_oa_examine_log d on d.record_id = b.record_id where 1 = 1 #if(categoryId!=null&&categoryId!="") and a.category_id = #para(categoryId) @@ -29,7 +29,14 @@ #if(startTime!=null && endTime!=null) and a.create_time between #para(startTime) and #para(endTime) #end - group by a.examine_id,b.examine_status,b.record_id order by a.create_time desc + group by a.examine_id,b.examine_status,b.record_id + #if(status==1) + order by a.create_time desc + #end + #if(status==2) + order by d.examine_time desc + #end + #end #sql("examineCheck") select * from 72crm_oa_examine_check where is_checked = 1 @@ -158,5 +165,13 @@ else is_deleted = 0 and status = 1 end #end - + #sql("queryExamineById") + select a.*,b.title as category,b.type,c.examine_status from 72crm_oa_examine as a left join 72crm_oa_examine_category b on a.category_id = b.category_id left join `72crm_oa_examine_record` c on a.examine_id = c.examine_id where a.examine_id = ? + #end + #sql("queryFieldByBatchId") + select a.field_id,a.field_name,a.name,a.type,a.input_tips,a.options,a.is_unique,a.is_null,b.value,a.field_type from 72crm_admin_field a left join `72crm_admin_fieldv` b on a.field_id = b.field_id where a.examine_category_id = ? and b.batch_id = ? order by sorting + #end + #sql("queryExamineCategoryByType") + SELECT * FROM 72crm_oa_examine_category WHERE type= ? limit 0,1 + #end #end diff --git a/src/main/resources/template/work/task.sql b/src/main/resources/template/work/task.sql index 0f4c6a6..075627a 100644 --- a/src/main/resources/template/work/task.sql +++ b/src/main/resources/template/work/task.sql @@ -34,6 +34,70 @@ (select count(*) from 72crm_task where pid = a.task_id and status = 5) as childWCCount, (select count(*) from 72crm_task where pid = a.task_id) as childAllCount, (select count(*) from 72crm_admin_file where batch_id = a.batch_id) as fileCount - from 72crm_task a where a.pid = 0 and a.ishidden = 0 + from 72crm_task a + where a.pid = 0 and a.ishidden = 0 + #if(type == null || type == 0) + and ( a.main_user_id in ( + #for(i : userIds) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + or a.create_user_id in ( + #for(i : userIds) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + or ( + #for(i : userIds) + #(for.index > 0 ? "or" : "") + a.owner_user_id like concat('%,', #para(i),',%') + #end + ) + ) + #end + #if(type == 1) + and a.main_user_id in ( + #for(i : userIds) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + #end + #if(type == 2) + and a.create_user_id in ( + #for(i : userIds) + #(for.index > 0 ? "," : "")#para(i) + #end + ) + #end + #if(type == 3) + and ( + #for(i : userIds) + #(for.index > 0 ? "or" : "") + a.owner_user_id like concat('%,', #para(i),',%') + #end + ) + #end + #if(status) + and a.status = #para(status) + #end + #if(priority) + and a.priority = #para(priority) + #end + #if(date == 1) + and TO_DAYS(a.stop_time) = TO_DAYS(now()) + #end + #if(date == 2) + and to_days(NOW()) - TO_DAYS(a.stop_time) = -1 + #end + #if(date == 3) + and to_days(NOW()) - TO_DAYS(a.stop_time) >= -7 and to_days(NOW()) - TO_DAYS(a.stop_time) <= 0 + #end + #if(date == 4) + and to_days(NOW()) - TO_DAYS(a.stop_time) >= -30 and to_days(NOW()) - TO_DAYS(a.stop_time) <= 0 + #end + #if(taskName) + and a.name like concat('%', #para(taskName),'%') + #end + order by a.create_time desc #end #end diff --git a/ux/config/prod.env.js b/ux/config/prod.env.js index 16a0c56..693868c 100644 --- a/ux/config/prod.env.js +++ b/ux/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '""', + BASE_API: '"/api/"', } diff --git a/ux/package.json b/ux/package.json index e9ed81b..a3dfc01 100644 --- a/ux/package.json +++ b/ux/package.json @@ -15,7 +15,7 @@ "axios": "0.18.0", "babel-polyfill": "^6.26.0", "echarts": "^4.2.0-rc.2", - "element-ui": "^2.8.2", + "element-ui": "2.8.2", "file-saver": "^2.0.1", "fullcalendar": "^3.9.0", "id-validator": "^1.3.0", diff --git a/ux/src/api/businessIntelligence/oa.js b/ux/src/api/businessIntelligence/oa.js new file mode 100644 index 0000000..0933399 --- /dev/null +++ b/ux/src/api/businessIntelligence/oa.js @@ -0,0 +1,65 @@ +import request from '@/utils/request' + +/** + * 日志统计 + * @param {*} data + */ +export function biLogStatisticsAPI(data) { + return request({ + url: 'biWork/logStatistics', + method: 'post', + data: data + }) +} + +/** + * 日志统计导出 + * @param {*} data + */ +export function biLogExcelExportAPI(data) { + return request({ + url: 'biWork/logStatisticsExport', + method: 'post', + data: data, + responseType: 'blob', + timeout: 600000 + }) +} + +/** + * 审批统计 + * @param {*} data + */ +export function biExamineStatisticsAPI(data) { + return request({ + url: 'biWork/examineStatistics', + method: 'post', + data: data + }) +} + +/** +* 审批统计详情列表 +* @param {*} data +*/ +export function biExamineIndexAPI(data) { + return request({ + url: 'biWork/examineInfo', + method: 'post', + data: data + }) +} + +/** + * 审批统计导出 + * @param {*} data + */ +export function biExamineExcelExportAPI(data) { + return request({ + url: 'biWork/examineStatisticsExport', + method: 'post', + data: data, + responseType: 'blob', + timeout: 600000 + }) +} diff --git a/ux/src/api/customermanagement/clue.js b/ux/src/api/customermanagement/clue.js index e77d5c0..7400a8e 100644 --- a/ux/src/api/customermanagement/clue.js +++ b/ux/src/api/customermanagement/clue.js @@ -124,6 +124,14 @@ export function crmLeadsExcelImport(data) { * */ export const crmLeadsExcelDownloadURL = process.env.BASE_API + 'CrmLeads/downloadExcel' +export function crmLeadsDownloadExcelAPI(data) { + return request({ + url: 'CrmLeads/downloadExcel', + method: 'post', + data: data, + responseType: 'blob' + }) +} /** * 跟进记录 diff --git a/ux/src/api/customermanagement/contacts.js b/ux/src/api/customermanagement/contacts.js index 2cb6d3a..0a12669 100644 --- a/ux/src/api/customermanagement/contacts.js +++ b/ux/src/api/customermanagement/contacts.js @@ -138,6 +138,14 @@ export function crmContactsExcelImport(data) { * */ export const crmContactsExcelDownloadURL = process.env.BASE_API + 'CrmContacts/downloadExcel' +export function crmContactsDownloadExcelAPI(data) { + return request({ + url: 'CrmContacts/downloadExcel', + method: 'post', + data: data, + responseType: 'blob' + }) +} /** * 查重 diff --git a/ux/src/api/customermanagement/customer.js b/ux/src/api/customermanagement/customer.js index 88fff2b..6cf5d2b 100644 --- a/ux/src/api/customermanagement/customer.js +++ b/ux/src/api/customermanagement/customer.js @@ -144,6 +144,14 @@ export function crmCustomerExcelImport(data) { * */ export const crmCustomerExcelDownloadURL = process.env.BASE_API + 'CrmCustomer/downloadExcel' +export function crmCustomerDownloadExcelAPI(data) { + return request({ + url: 'CrmCustomer/downloadExcel', + method: 'post', + data: data, + responseType: 'blob' + }) +} /** * 公海导出 diff --git a/ux/src/api/customermanagement/message.js b/ux/src/api/customermanagement/message.js index 7cf6543..3d6631c 100644 --- a/ux/src/api/customermanagement/message.js +++ b/ux/src/api/customermanagement/message.js @@ -69,7 +69,10 @@ export function crmMessageFollowCustomerAPI(data) { return request({ url: 'CrmBackLog/followCustomer', method: 'post', - data: data + data: data, + headers: { + 'Content-Type': 'application/json;charset=UTF-8' + } }) } @@ -96,7 +99,10 @@ export function crmMessagRemindreceivablesplanAPI(data) { return request({ url: 'CrmBackLog/remindReceivables', method: 'post', - data: data + data: data, + headers: { + 'Content-Type': 'application/json;charset=UTF-8' + } }) } diff --git a/ux/src/api/customermanagement/product.js b/ux/src/api/customermanagement/product.js index e9ac899..7938c9a 100644 --- a/ux/src/api/customermanagement/product.js +++ b/ux/src/api/customermanagement/product.js @@ -97,4 +97,12 @@ export function crmProductExcelImport(data) { * @param {*} data * */ -export const crmProductExcelDownloadURL = process.env.BASE_API + 'CrmProduct/downloadExcel' \ No newline at end of file +export const crmProductExcelDownloadURL = process.env.BASE_API + 'CrmProduct/downloadExcel' +export function crmProductDownloadExcelAPI(data) { + return request({ + url: 'CrmProduct/downloadExcel', + method: 'post', + data: data, + responseType: 'blob' + }) +} diff --git a/ux/src/api/customermanagement/workbench.js b/ux/src/api/customermanagement/workbench.js index 4f4b379..632006e 100644 --- a/ux/src/api/customermanagement/workbench.js +++ b/ux/src/api/customermanagement/workbench.js @@ -9,6 +9,17 @@ export function crmIndexIndex(data) { }) } +/** + * 销售简报列表 + */ +export function crmIndexIndexListAPI(data) { + return request({ + url: 'Crm/Instrument/queryBulletinInfo', + method: 'post', + data: data + }) +} + // 业绩指标 export function crmIndexAchievementData(data) { return request({ diff --git a/ux/src/assets/iconfont/iconfont.css b/ux/src/assets/iconfont/iconfont.css index b95ac17..e9ed551 100644 --- a/ux/src/assets/iconfont/iconfont.css +++ b/ux/src/assets/iconfont/iconfont.css @@ -1,10 +1,10 @@ @font-face {font-family: "wukong"; - src: url('iconfont.eot?t=1561099308221'); /* IE9 */ - src: url('iconfont.eot?t=1561099308221#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAADHAAAsAAAAAXJgAADFwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCMYgqBlnT1TwE2AiQDgkALgSIABCAFhFUHiS4bhUplBGwcAGjbvnoiKlbJKKo0dfb/H5MbY0CFpt0PG0Fp5K6mbg7qk4VNsTkQWU/YestDNfBMuUiOkUJPecfLsMc+jqRmzylVnv9a2tLGZ2l16QgjU4SX6YGLrf4Vf1HrHpIUTSJo6eYS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y1o/F+/O/NxBrsRrjJXuqrqjai+IF8Mi/BNLOGZrcSUxv1U5Ubshqt9fjYIUlzQpD7Dks17eJyoQzrT2m2MdDzyMeGoKqQRJMxUHNZdIjduYhXeJmdxjrYYFtxynDOKSXzT2YzXeT1BlMuk+23q+2hx0nXdI8FgighlgKf6/QhUjzrm8axT5LU7f7KP83GcOS4m5OzMVTXOkABc5Omqx0RiVTDe0kUNmUz6GO5vhvkNUyOLatHpUYB/wpKvOU92D1o87aHHuudrKUjrfTU3LGOH4obT+x670wxVCjgpHGnGceaC5QFyuy4vsIW7oT2zh7Sz+0qKgaLzD43CYeJwNFB/0eME6vVwouVM3YC+JqxqrStIV+eHK37oQ4WdCtziEm51tOZQLIuugbna2XzP2qr3+7F502XVmp506Jikv/Pq4+5LgRGITDXG795Hh6ee+LYluMtY9yyZZqM1A9K0szjpKnHYnEW+uSwrmNLSZJIRNmTdRMdlJ1DYjpzjWmwXJxnLHg==') format('woff2'), - url('iconfont.woff?t=1561099308221') format('woff'), - url('iconfont.ttf?t=1561099308221') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ - url('iconfont.svg?t=1561099308221#wukong') format('svg'); /* iOS 4.1- */ + src: url('iconfont.eot?t=1565078640369'); /* IE9 */ + src: url('iconfont.eot?t=1565078640369#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAADJoAAsAAAAAXbQAADIWAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCMcAqBmHT3DQE2AiQDgkQLgSQABCAFhFUHiTwbY0tlBGwcAGjbvoKiKImqGkXFppb9/9fk5HCF2uC/hwSOdMVcG2qjwSdWJOwjcCjn4yM+6YLV8EIlccvH1H1dFIjPSiWmaGIevJL6zGG2qESllo89YKIwk4Zxw33pP6JJjXtIUjSJiP347fuu0okMiZTxjNdIPgz+bdv7sLGBqJ52Q7JkzybP166d3geJtAAkoSTyO8YNgCFeN//eyNx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1Z66D65/iliIcsXJkaFnmVQ70/mzxkBHazl6OHh5PEAsp8akpJuTTI03IJPNpjqAJT65Gw231bs6HCexqeJS5Uo8avBrVV+TTYRG+Cbl9MVJCjOMuTLkau2GzT8k6QZIzithlmLN5E88i1YiXOtYrI+1PfYg4HRVSCCImyg7LOpLrV4ly75KzMAWbFXPuOE4J2Xx80dqM03o5QJTzpO1dappgYbL9skGEQRURyQAv5HsRqJ7WzP1lq8hLd/lkH+bDuHScTcjZpRvVOEFCMMzSssFAYiaY7+ishkQmfGgfbvr5A1MjC2rB6WmIf8YSbzgNo3a0eNFBD/TAjzkjrvdU3LD0NbLrLu59nC4SVKnFeeZYK84SZ8yPkNsVecZIuB/ZPnvQndmMpBgoOvvEqD2J3J721J/1LIIaPRlovlTXoRkjykrrCtLy8nDF932isAuBm13EnZbWHLJlsX3LPNrldN/aqA+7sW7VZqWKhrSrmaS59/rT4WuBEYifKsw/vA8Ozx3xXUPwkLHuWRLNBis6xOFgYdAycru6iHzhFhQMcS4SSQ/rs16C43wQKOxAzvGY7ZCk35CXTAfKFGcNugAAAA==') format('woff2'), + url('iconfont.woff?t=1565078640369') format('woff'), + url('iconfont.ttf?t=1565078640369') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + url('iconfont.svg?t=1565078640369#wukong') format('svg'); /* iOS 4.1- */ } .wukong { @@ -335,3 +335,7 @@ content: "\e703"; } +.wukong-oa_analysis:before { + content: "\e705"; +} + diff --git a/ux/src/assets/iconfont/iconfont.eot b/ux/src/assets/iconfont/iconfont.eot index 83e9d8a6698ef21d9829b22c7c45c8de50c3f084..0444485d67f0ad10526a5c72c84b9a1aa91fe0ca 100644 GIT binary patch delta 679 zcmY*VO=uHQ5T1Fv+5D_@cgZ#>O}93Q?s|x=t}&reTg7^)N@>J~7OZuxX(KjGpb=UT zQt+TBrEEb8{uJz`y+%YNXs;fMmr#(3cn|~+9t6Qd+jX|$!Fhbld*94_-+S-%8*J23 zxO^4h<>-Qt;v3ytzJ=5Gs;dBa7XWhOMXS7hR(KD#;rT;@d2{8N{fUnzEFy5O5q-KI|tGh8Ko%{tNPXxfn z(opGNc52QUewACNvk#cdQn+(j`z=~1*E-lDCiyVexAs=VVk^ZYq(9z=-3QOMGDIx(3_N83>qya!{Q?6}f{>8RPxniaK)#Zgg1;V4l` zC&r^OA*d&NQBU_^I28(qyy0}p45<AJ>Znqg==xi(X8#(@lXEMgj} zYE;e0_Qs($wx$_~Ze25$Wcd~bMNN`4QNi9>B@vaM1Y2cI%wAIx^QdRs){KrDs$oW0 zEHi-3y4kk#*;Ql{yOV#VaET0epG$|OLTfPK=XkFux16d-`xEkGg>gP{U{nUEb>;3b e%-U~27v&~a6fmYR@&M%|fP96##N5=|i=_@+V_*oKz`(#1 zT998{Qdcaqih&{g1p@=iy2&w&%Ju;aj6lUe{P_I^mUw=fuMFHQKmi7Zn?`fBVf6pa z{~cLYG9Li)IT)BgqCf!B7chArVi>B0~7_R z*8$R8U~v}4gvl?Ml^Izk^RTq@FJeG}lNYf}-fYe)!^n97s0joDHpj3fGfzIvnKW6O hYd+8ko6m5SdT(|NuV7*fn7k`;!RDB#SIl6S0|1$AV9)>n diff --git a/ux/src/assets/iconfont/iconfont.js b/ux/src/assets/iconfont/iconfont.js index c67f433..7da375f 100644 --- a/ux/src/assets/iconfont/iconfont.js +++ b/ux/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -!function(t){var c,h='',l=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(l&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var l=function(){document.removeEventListener("DOMContentLoaded",l,!1),c()};document.addEventListener("DOMContentLoaded",l,!1)}else document.attachEvent&&(a=c,s=t.document,o=!1,(v=function(){try{s.documentElement.doScroll("left")}catch(c){return void setTimeout(v,50)}h()})(),s.onreadystatechange=function(){"complete"==s.readyState&&(s.onreadystatechange=null,h())});function h(){o||(o=!0,a())}var a,s,o,v}(function(){var c,l;(c=document.createElement("div")).innerHTML=h,h=null,(l=c.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",function(c,l){l.firstChild?function(c,l){l.parentNode.insertBefore(c,l)}(c,l.firstChild):l.appendChild(c)}(l,document.body))})}(window); \ No newline at end of file +!function(t){var c,h='',l=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(l&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var l=function(){document.removeEventListener("DOMContentLoaded",l,!1),c()};document.addEventListener("DOMContentLoaded",l,!1)}else document.attachEvent&&(a=c,s=t.document,o=!1,(v=function(){try{s.documentElement.doScroll("left")}catch(c){return void setTimeout(v,50)}h()})(),s.onreadystatechange=function(){"complete"==s.readyState&&(s.onreadystatechange=null,h())});function h(){o||(o=!0,a())}var a,s,o,v}(function(){var c,l;(c=document.createElement("div")).innerHTML=h,h=null,(l=c.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",function(c,l){l.firstChild?function(c,l){l.parentNode.insertBefore(c,l)}(c,l.firstChild):l.appendChild(c)}(l,document.body))})}(window); \ No newline at end of file diff --git a/ux/src/assets/iconfont/iconfont.svg b/ux/src/assets/iconfont/iconfont.svg index aace9ee..25c2139 100644 --- a/ux/src/assets/iconfont/iconfont.svg +++ b/ux/src/assets/iconfont/iconfont.svg @@ -260,6 +260,9 @@ Created by iconfont + + + diff --git a/ux/src/assets/iconfont/iconfont.ttf b/ux/src/assets/iconfont/iconfont.ttf index 3daf0ee78129b6012067200f0cde2ebff738a00f..484ad9c32c7a671341f635f9341840cf75bec17b 100644 GIT binary patch delta 662 zcmY*VO=uHQ5T1Fv+5D_@cgZFxO}3gucRj?4YfK<&i&zguDUFa4L8)s^8!>4DjnImc z-1KBywx9*YLVIbiD}q?CR}aOD6pA9=1P>kr!9&}1w&KBge9U{_%zWQ_@7WuC^%m#T z?KJ>=005)ob*s61QFsr)bpr^^$=dA1yY_Y%Ad~^P(yCUh+tF)3K2z^kLas_g;4ELJ z{RZJ^wceT;in|M>_mMDIYm8ez=X_HD!N*izty?oqtl%N4kv<%mvg(yjD?OXrEI$}`9aqu&PU(~^d=xFws_D9_=H$*CPO)N!1H*^9^}&Kv#Z=AX%+rk z_C9Chh%?V?81%lxi=y+|H_ipg;hX0&Vn>4&`(f|}(+f@_bnkMTcU`x`U*b9-LK03v zk*?E+*<3!^i>ly1mg-|?lzz-7&0ZE!)Gn4rMUBRiL@9lkPNsygo*h6v-;c3eG#2&8 z@;NiAN+=kDeiHpc3KdP)HI~v0L)#lon0f?<3*70rX{f5vHsiZn#}jN_GZ4MHW-Q6_ zT?~twBx$0812ak{DL)VQ$eLKZsbo5+7rfSjj$5i>##yQ`j1k>T?0xYR*~I?jUnyK7 z!~K`i38~r>4h1>hFUsBLThif-{8V9FKpegy12}V~`wWYAsJzVZs^lG1Z3)7}~8+cGe4$uKZ@ zmt>?SriebM3jwNq0K{e)KmiVGmT(|@4-l(lC!>XxGz5fEZ{D(KGVwt>oI*SY==LMi95D3`3hc%gbvNmVZ*kgIx{)j`mtU diff --git a/ux/src/assets/iconfont/iconfont.woff b/ux/src/assets/iconfont/iconfont.woff index da7d4b18497bc538e2fff82b0f2b605e37826205..bcbf6ea3cbd3c1d1dc675e2b081d7f230646c23d 100644 GIT binary patch delta 14662 zcmV-MIl0Et<~biaSr6KG{&WB>p*bN~PVF#rGnHWpd#+-PWJVE_O& zr~m)}AOHXWBnUeMSZHl@cmM!4$N&HUNdN!=L`fU}k!){cVE_O(6aWAKqyPW_r1Fmi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q|{05I$WmWQt3Yh4M2#X0KR-P=Kufz diff --git a/ux/src/assets/iconfont/iconfont.woff2 b/ux/src/assets/iconfont/iconfont.woff2 index 95e839582ea5e34377e7488a271f5f994be460be..ec8fed162ddfbea250c9706f81c0e52ee8c1ee3f 100644 GIT binary patch literal 12904 zcmV-uGMCMFPew8T0RR9105WI*3jhEB09~{I05TQ;0RR9100000000000000000000 z0000SLIzdM4)`0e|y(uoX-l<|z$NIney zZQJ{>v4N?h-ou;@Cv}Eu{vfOGUxbilYm0b!*_CIx`o=Fn}E|z2!wHOsh$Cw?bMf*-)5dM77Ipp(HsXzGU8)C>IQU}{sh&Ch?vTs>)RBXXr*L>#y- zZ?9o&Yj*q`K#6&0WD2Npn^T;STHnIS`tR)7 z#tYBx#7j18+3}A0a8f`2H+hse6)tVsb?DTkTaR9S`VAN~WY~yNW5!LGG-cY1S##zs zShQr>idAdYZP>JB+m2m(_8mBMWW%u&r_P+aRO(g6H6eYj-MDk>UbWwYCp8w+YO^~u zQ&a%#zjdJW7ki$`G8-j`Ct6503Zw|Fq!?|a1nr~@9i$wcqyk-}65T|D9z5waGeWF5vx6UIq1CWsD`qy&r-lFe8nU05gG*dRUFB)!-oTd+;GVux(QF4>MfvIG014+mr? z4oN?b$iOT=yMSXdh!e6Kr(_S#$X=Y2eYhk;C`F98AU9BkJVZINfC}UZDv{TyLjJ=Q zd53HA9yi2>JAMP)@*BcEzhPA4H-blgqj=yq22cDZZXz^PE#iWzLn2W1NEE68iNmIo zVpJ2N!O?tc{>OL4%Z0Ab2HtN+$r|r+RWR!Y4=jV}5Q-zTds7^Y5QI}DoW_+^A*g#k}F|PhKSgWF+|HJ5n@Xu7@+O!GNm>}{ADJV zK_VF{l$swty2(NW(d3Fme+`!U&;|0~WZrK` zvLBrk@_w?NNjyY98GbZU>A0VK^ry`f+Xl$GaHuHY4}s}8KZ|Ut9t0)QVNw~>E6jlo zT;^Dr^yGvkJJ&tQo?!Zdvk%VSi#cd!JWViDb3&OJlc)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@g=D$V2{hx;jcEK|zdQ4B2D=fiGFQ5)>W!$r zAYTlN@J%e?nXSZ>#{E>~M(l>GeSS6wQe4oaKEsmDdw86vLpsyiZH#n0@-gA4Dx?u4 z%v2oKT_QJbVin#dXK{|U7#7@eoHL3^eAC&C*Lgibl*^?1ZR-1Iang0&Bf(&b2xWk$ z`uzx0k2>b@tW)H*JAbl|^KqOxE+*vc%vCkckN{ld>8i&>VpTBS(nSrKO!^q^Z-)5| zQzMIN(dkiuf5MWlIZt*ET0HHc$GYchDM;&mH8(6{hvJ6Q`yRW~3{?s^DI96Wapr>M z0dl)8FR+EXp*^#Qw6pt4ih-i@4~@cM;&3!jf6?Ov>h*A< { + item.has = false + return item + }) + let selectedRows = [] + this.otherItems = [] + this.list.forEach((item, index) => { selectedArray.forEach((selectedItem, selectedIndex) => { if (item[this.crmType + 'Id'] == selectedItem[this.crmType + 'Id']) { + selectedItem.has = true selectedRows.push(item) } }) }) + selectedArray.forEach((selectedItem, selectedIndex) => { + if (!selectedItem.has) { + this.otherItems.push(selectedItem) + } + }) + this.$nextTick(() => { this.$refs.relativeTable.clearSelection() selectedRows.forEach(row => { @@ -393,7 +407,7 @@ export default { this.selectedItem = val.length === 1 ? val : [val[val.length - 1]] } } else { - this.selectedItem = val + this.selectedItem = this.otherItems.concat(val) } this.$emit('changeCheckout', { data: this.selectedItem, diff --git a/ux/src/components/CreateCom/XhCustomerAddress.vue b/ux/src/components/CreateCom/XhCustomerAddress.vue index c734ca7..ef50d58 100644 --- a/ux/src/components/CreateCom/XhCustomerAddress.vue +++ b/ux/src/components/CreateCom/XhCustomerAddress.vue @@ -21,10 +21,12 @@
省/市/区
- + :area="addressSelect.area" + @province="selectProvince" + @city="selectCity" + @area="selectArea">
@@ -166,37 +168,18 @@ export default { this.map.addOverlay(new BMap.Marker(point)) }, /** 区域选择 */ - onAddressSelected(data) { - this.addressSelect.province = data.province.value - this.addressSelect.city = data.city.value - this.addressSelect.area = data.area.value + selectProvince(value) { + this.addressSelect.province = value.value + this.valueChange() + }, + selectCity(value) { + this.addressSelect.city = value.value + this.valueChange() + }, + selectArea(value) { + this.addressSelect.area = value.value this.valueChange() - // this.areaSelectMap(data) }, - // /** 区域选择地图 区域选择 不影响 定位 */ - // areaSelectMap(data) { - // if (this.canExecute) { - // this.canExecute = false - // this.searchInput = - // data.province.value + data.city.value + data.area.value - - // this.detailAddress = this.searchInput - // // 创建地址解析器实例 - // var myGeo = new BMap.Geocoder() - // // 将地址解析结果显示在地图上,并调整地图视野 - // var self = this - // myGeo.getPoint(this.searchInput, function(point) { - // if (point) { - // // self.map.centerAndZoom(point, 14) - // self.addMarkerLabel(point) - // } - // }) - - // setTimeout(() => { - // self.canExecute = true - // }, 500) - // } - // }, /** 地图选择区域 */ mapSelectArea(data) { if (this.canExecute) { diff --git a/ux/src/components/CreateCom/XhProduct.vue b/ux/src/components/CreateCom/XhProduct.vue index cf028da..e83e4e0 100644 --- a/ux/src/components/CreateCom/XhProduct.vue +++ b/ux/src/components/CreateCom/XhProduct.vue @@ -10,6 +10,8 @@ crm-type="product" v-if="showSelectView" :radio="false" + :show="showPopover" + :selectedData="selectedData" @close="showPopover=false" @changeCheckout="selectInfos"> { + let newSelects = [] + data.data.forEach(element => { + let obj = this.productList.find(item => { return item.productId == element.productId }) - if (!obj) { - self.productList.push(self.getShowItem(element)) + if (obj) { + newSelects.push(obj) + } else { + newSelects.push(this.getShowItem(element)) } }) + this.productList = newSelects + this.calculateToal() } }, getShowItem(data) { @@ -167,7 +177,8 @@ export default { discountChange(data) { this.verifyNumberValue(data, 'discount') let item = data.row - let salesPrice = (item.price * (100.0 - parseFloat(item.discount || 0))) / 100.0 + let salesPrice = + (item.price * (100.0 - parseFloat(item.discount || 0))) / 100.0 salesPrice = salesPrice.toFixed(2) if (item.salesPrice !== salesPrice) { item.salesPrice = salesPrice @@ -182,7 +193,8 @@ export default { // 计算总价 calculateToal() { let totalPrice = this.getProductTotal() - totalPrice = (totalPrice * (100.0 - parseFloat(this.discountRate || 0))) / 100.0 + totalPrice = + (totalPrice * (100.0 - parseFloat(this.discountRate || 0))) / 100.0 this.totalPrice = totalPrice.toFixed(2) this.updateValue() // 传递数据给父组件 }, diff --git a/ux/src/components/CreateCom/XhProuctCate.vue b/ux/src/components/CreateCom/XhProuctCate.vue index 410f049..0bbecd7 100644 --- a/ux/src/components/CreateCom/XhProuctCate.vue +++ b/ux/src/components/CreateCom/XhProuctCate.vue @@ -1,5 +1,6 @@ @@ -68,17 +48,11 @@ import { oaExamineDelete } from '@/api/oamanagement/examine' import { formatTimeToTimestamp } from '@/utils' -import ExamineCell from './examineCell' -import ExamineDetail from './examineDetail' -import CRMAllDetail from '@/views/customermanagement/components/CRMAllDetail' -import ExamineHandle from '@/components/Examine/ExamineHandle' // 审批操作理由 +import ExamineSection from './examineSection' export default { components: { - ExamineCell, - ExamineDetail, - CRMAllDetail, - ExamineHandle + ExamineSection }, data() { return { @@ -89,17 +63,7 @@ export default { list: [], // 判断是否发请求 isPost: false, - page: 1, - /** 控制详情展示 */ - rowID: '', // 行信息 - rowData: {}, // 行全部信息 - showDview: false, - // 相关详情的查看 - relatedID: '', - relatedCRMType: '', - showRelatedDetail: false, - // 撤回操作 - showExamineHandle: false + page: 1 } }, watch: { @@ -136,23 +100,17 @@ export default { }, mounted() { // 分批次加载 - let self = this - let item = document.getElementById('examine-list-box' + this.by) - item.onscroll = function() { - let scrollTop = item.scrollTop - let windowHeight = item.clientHeight - let scrollHeight = item.scrollHeight //滚动条到底部的条件 - - if ( - scrollTop + windowHeight == scrollHeight && - self.loadMoreLoading == true - ) { - if (!self.isPost) { - self.isPost = true - self.page++ - self.getList() + let dom = document.getElementById('examine-list-box' + this.by) + dom.onscroll = () => { + let scrollOff = dom.scrollTop + dom.clientHeight - dom.scrollHeight + //滚动条到底部的条件 + if (Math.abs(scrollOff) < 10 && this.loadMoreLoading == true) { + if (!this.isPost) { + this.isPost = true + this.page++ + this.getList() } else { - self.loadMoreLoading = false + this.loadMoreLoading = false } } } @@ -210,51 +168,6 @@ export default { this.checkStatus = 'all' this.betweenTime = [] this.$emit('reset') - }, - examineCellHandle(data) { - // 编辑 - if (data.type == 'edit') { - this.$emit('edit', data.data.item) - // 删除 - } else if (data.type == 'delete') { - this.$confirm('确定删除?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }) - .then(() => { - oaExamineDelete({ - examineId: data.data.item.examineId - }).then(res => { - this.searchBtn() - this.$message({ - type: 'success', - message: '删除成功!' - }) - }) - }) - .catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }) - }) - // 撤回 - } else if (data.type == 'withdraw') { - this.rowID = data.data.item.examineId - this.rowData = data.data.item - this.showExamineHandle = true - // 详情 - } else if (data.type == 'view') { - this.showRelatedDetail = false - this.rowID = data.data.item.examineId - this.showDview = true - } else if (data.type == 'related-detail') { - this.showDview = false - this.relatedID = data.data.item[data.data.type + 'Id'] - this.relatedCRMType = data.data.type - this.showRelatedDetail = true - } } } } @@ -303,12 +216,4 @@ export default { cursor: auto; } } - -.d-view { - position: fixed; - width: 926px; - top: 60px; - bottom: 0px; - right: 0px; -} diff --git a/ux/src/views/OAManagement/examine/components/examineCreateView.vue b/ux/src/views/OAManagement/examine/components/examineCreateView.vue index 6807c6e..22a1347 100644 --- a/ux/src/views/OAManagement/examine/components/examineCreateView.vue +++ b/ux/src/views/OAManagement/examine/components/examineCreateView.vue @@ -342,6 +342,7 @@ export default { // 进行编辑操作 if (this.action.type == 'update') { params.examineId = this.action.id + params.isDetail = 2 // 1详情 2 编辑 } let request = { diff --git a/ux/src/views/OAManagement/examine/components/examineDetail.vue b/ux/src/views/OAManagement/examine/components/examineDetail.vue index e8f9200..c14f5be 100644 --- a/ux/src/views/OAManagement/examine/components/examineDetail.vue +++ b/ux/src/views/OAManagement/examine/components/examineDetail.vue @@ -23,7 +23,7 @@ :key="index" v-if="item.formType !== 'examine_cause' && item.formType !== 'business_cause'" class="b-cell"> -
{{item.name}}
@@ -53,9 +53,9 @@
- + --> -
{{item.name}}
@@ -304,7 +304,8 @@ export default { getBaseInfo() { this.loading = true OaExamineGetField({ - examineId: this.id + examineId: this.id, + isDetail: 1 // 1详情 2 编辑 }) .then(res => { var self = this diff --git a/ux/src/views/OAManagement/examine/components/examineSection.vue b/ux/src/views/OAManagement/examine/components/examineSection.vue new file mode 100644 index 0000000..251da8f --- /dev/null +++ b/ux/src/views/OAManagement/examine/components/examineSection.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/ux/src/views/OAManagement/journal/index.vue b/ux/src/views/OAManagement/journal/index.vue index 5911178..36e0e21 100644 --- a/ux/src/views/OAManagement/journal/index.vue +++ b/ux/src/views/OAManagement/journal/index.vue @@ -133,22 +133,19 @@ export default { methods: { initControlPage() { // 分批次加载 - let _this = this - for (let item of document.getElementsByClassName('list-box')) { - item.onscroll = function(e) { - if (e && e.target.id == 'list-box' + _this.activeName) { - _this.$bus.emit('journal-list-box-scroll', e.target) - let doms = item - var scrollTop = doms.scrollTop - var windowHeight = doms.clientHeight - var scrollHeight = doms.scrollHeight //滚动条到底部的条件 - if (scrollTop + windowHeight == scrollHeight) { - _this.loadMoreLoading = true - if (_this.isPost) { - _this.pageNum++ - _this.getLogList() + for (let dom of document.getElementsByClassName('list-box')) { + dom.onscroll = e => { + if (e && e.target.id == 'list-box' + this.activeName) { + this.$bus.emit('journal-list-box-scroll', e.target) + let scrollOff = dom.scrollTop + dom.clientHeight - dom.scrollHeight + //滚动条到底部的条件 + if (Math.abs(scrollOff) < 10 && this.loadMoreLoading == true) { + if (!this.isPost) { + this.isPost = true + this.pageNum++ + this.getLogList() } else { - _this.loadMoreLoading = false + this.loadMoreLoading = false } } } @@ -174,11 +171,10 @@ export default { this.journalLoading = false if (res.data.lastPage === true) { this.loadText = '没有更多了' - this.isPost = false this.loadMoreLoading = false } else { this.loadText = '加载更多' - this.isPost = true + this.loadMoreLoading = true } for (let item of res.data.list) { item.showComment = false @@ -187,9 +183,11 @@ export default { this.journalData = this.journalData.concat(res.data.list) this.createInitAwaitMessage() this.loadMoreLoading = false + this.isPost = false }) .catch(err => { this.journalLoading = false + this.isPost = false }) }, createInitAwaitMessage() { diff --git a/ux/src/views/OAManagement/notice/edit.vue b/ux/src/views/OAManagement/notice/edit.vue index 1e7ce70..594cadc 100644 --- a/ux/src/views/OAManagement/notice/edit.vue +++ b/ux/src/views/OAManagement/notice/edit.vue @@ -49,11 +49,33 @@ diff --git a/ux/src/views/SystemManagement/RoleAuthorization.vue b/ux/src/views/SystemManagement/RoleAuthorization.vue index a3e064a..78218c2 100644 --- a/ux/src/views/SystemManagement/RoleAuthorization.vue +++ b/ux/src/views/SystemManagement/RoleAuthorization.vue @@ -101,9 +101,7 @@
{{scope.column.label}}
- + +
+ + +
+
{ - this.tableHeight = document.documentElement.clientHeight - 285 + this.tableHeight = document.documentElement.clientHeight - 319 } - /** 获取权限信息 */ this.getRulesList() }, @@ -547,20 +561,39 @@ export default { this.roleRulesEdit['bi_upload'] = role.rules['bi'] ? role.rules['bi'] : [] }, // 获取角色下员工列表 - getUserListWithRole(role) { + getUserListWithRole(role, noReset) { + if (!noReset) { + this.currentPage = 1 + } this.menuLoading = true usersList({ - roleId: role.id, - pageType: 0 // 1分页 0不分页 + page: this.currentPage, + limit: this.pageSize, + roleId: role.id }) .then(res => { - this.tableData = res.data + this.tableData = res.data.list + this.total = res.data.totalRow this.menuLoading = false }) .catch(err => { this.menuLoading = false }) }, + /** + * 更改每页展示数量 + */ + handleSizeChange(val) { + this.pageSize = val + this.getUserListWithRole(this.roleActive, true) + }, + /** + * 更改当前页数 + */ + handleCurrentChange(val) { + this.currentPage = val + this.getUserListWithRole(this.roleActive, true) + }, // 员工权限标记 getUserRulesWithRole(role) { // 默认勾选第一个 @@ -877,5 +910,16 @@ export default { right: 30px; } +/** 分页布局 */ +.p-contianer { + position: relative; + background-color: white; + height: 44px; + .p-bar { + float: right; + margin: 5px 100px 0 0; + font-size: 14px !important; + } +} @import './styles/table.scss'; diff --git a/ux/src/views/SystemManagement/SystemCustomer/HandleField.vue b/ux/src/views/SystemManagement/SystemCustomer/HandleField.vue index d38a52b..14d203d 100644 --- a/ux/src/views/SystemManagement/SystemCustomer/HandleField.vue +++ b/ux/src/views/SystemManagement/SystemCustomer/HandleField.vue @@ -59,7 +59,9 @@ width="310px">
字段属性
+ :field="form" + :canTransform="canTransform" + :transformData="transformData"> @@ -77,6 +79,7 @@ import { customFieldHandle, customFieldList } from '@/api/systemManagement/SystemCustomer' +import { filedGetField } from '@/api/customermanagement/common' import PreviewFieldView from '@/views/SystemManagement/components/previewFieldView' import { SingleLineText, @@ -105,7 +108,12 @@ export default { FieldInfo, PreviewFieldView }, - computed: {}, + computed: { + // 能转移 + canTransform() { + return this.$route.params.type == 'crm_leads' + } + }, data() { return { fieldList: FieldList, @@ -119,7 +127,9 @@ export default { // 展示表单预览 tablePreviewData: { types: '', id: '' }, showTablePreview: false, - contentHeight: document.documentElement.clientHeight - 100 + contentHeight: document.documentElement.clientHeight - 100, + // 转移匹配字段源 + transformData: null } }, filters: { @@ -174,6 +184,11 @@ export default { } // 获取当前模块的自定义数据 this.getCustomInfo() + + // 配置转移字段 + if (this.canTransform) { + this.getTransformField() + } }, methods: { // 获取当前模块的自定义数据 @@ -399,6 +414,44 @@ export default { } else { return '' } + }, + /** + * 获取添加字段 + */ + getTransformField() { + filedGetField({ + label: crmTypeModel['customer'] + }) + .then(res => { + let data = { + text: [], + textarea: [], + select: [], + checkbox: [], + number: [], + floatnumber: [], + mobile: [], + email: [], + date: [], + datetime: [], + user: [], + structure: [] + } + + for (let index = 0; index < res.data.length; index++) { + const element = res.data[index] + let array = data[element.formType] + if (array) { + array.push({ + label: element.name, + value: element.fieldId + }) + } + } + + this.transformData = data + }) + .catch(() => {}) } } } diff --git a/ux/src/views/SystemManagement/SystemCustomer/components/FieldInfo.vue b/ux/src/views/SystemManagement/SystemCustomer/components/FieldInfo.vue index 793a6ef..47ae909 100644 --- a/ux/src/views/SystemManagement/SystemCustomer/components/FieldInfo.vue +++ b/ux/src/views/SystemManagement/SystemCustomer/components/FieldInfo.vue @@ -64,7 +64,7 @@ @click.stop="handleCheckbox('remove', item, index)" class="el-icon-remove handle">
- + @@ -100,6 +100,22 @@
*上限为2000字
+
+
+ 转化客户字段 +
+ + + + +
+
设为必填 @@ -206,10 +222,14 @@ export default { maxLength: '', // textarea 多行文本有最大数量 defaultValue: '', // 默认值 setting: '', // 接口返回setting数据 - showSetting: '' // 单选选项 + showSetting: '', // 单选选项 + relevant: '' // 转移字段 } } - } + }, + // 是否开启转移 转移对应数据 + canTransform: Boolean, + transformData: Object }, mounted() { if (this.showSelect && this.field.showSetting.length == 0) { diff --git a/ux/src/views/SystemManagement/components/previewFieldView.vue b/ux/src/views/SystemManagement/components/previewFieldView.vue index cf36f2e..5cb717c 100644 --- a/ux/src/views/SystemManagement/components/previewFieldView.vue +++ b/ux/src/views/SystemManagement/components/previewFieldView.vue @@ -189,7 +189,7 @@ export default { var params = {} params.label = this.label if (this.types === 'oa_examine') { - params.examineId = this.typesId + params.categoryId = this.typesId } customFieldList(params) .then(res => { diff --git a/ux/src/views/businessIntelligence/components/filtrateHandleView.vue b/ux/src/views/businessIntelligence/components/filtrateHandleView.vue index 077fb2c..3c9acd2 100644 --- a/ux/src/views/businessIntelligence/components/filtrateHandleView.vue +++ b/ux/src/views/businessIntelligence/components/filtrateHandleView.vue @@ -66,11 +66,16 @@ 搜索 +
+ + diff --git a/ux/src/views/businessIntelligence/oa/examine.vue b/ux/src/views/businessIntelligence/oa/examine.vue new file mode 100644 index 0000000..8a0941b --- /dev/null +++ b/ux/src/views/businessIntelligence/oa/examine.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/ux/src/views/businessIntelligence/oa/log.vue b/ux/src/views/businessIntelligence/oa/log.vue new file mode 100644 index 0000000..19d2fc3 --- /dev/null +++ b/ux/src/views/businessIntelligence/oa/log.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/ux/src/views/businessIntelligence/product/ProductCategoryStatistics.vue b/ux/src/views/businessIntelligence/product/ProductCategoryStatistics.vue index 433641b..51daa7b 100644 --- a/ux/src/views/businessIntelligence/product/ProductCategoryStatistics.vue +++ b/ux/src/views/businessIntelligence/product/ProductCategoryStatistics.vue @@ -74,6 +74,7 @@ export default { }, legend: { orient: 'vertical', + type: 'scroll', x: 'left', data: [] }, diff --git a/ux/src/views/businessIntelligence/styles/detail.scss b/ux/src/views/businessIntelligence/styles/detail.scss index a827970..258ccc2 100644 --- a/ux/src/views/businessIntelligence/styles/detail.scss +++ b/ux/src/views/businessIntelligence/styles/detail.scss @@ -42,3 +42,8 @@ .table-content { padding: 0 60px 20px 60px; } + +.export-button { + float: right; + margin-right: 22px; +} diff --git a/ux/src/views/customermanagement/business/BusinessIndex.vue b/ux/src/views/customermanagement/business/BusinessIndex.vue index 1d77eea..592e43f 100644 --- a/ux/src/views/customermanagement/business/BusinessIndex.vue +++ b/ux/src/views/customermanagement/business/BusinessIndex.vue @@ -28,6 +28,7 @@ style="width: 100%" :cell-style="cellStyle" @row-click="handleRowClick" + @sort-change="sortChange" @header-dragend="handleHeaderDragend" @selection-change="handleSelectionChange"> { + var blob = new Blob([res.data], { + type: 'application/vnd.ms-excel;charset=utf-8' + }) + var downloadElement = document.createElement('a') + var href = window.URL.createObjectURL(blob) //创建下载的链接 + downloadElement.href = href + downloadElement.download = + decodeURI( + res.headers['content-disposition'].split('filename=')[1] + ) || '' //下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() //点击下载 + document.body.removeChild(downloadElement) //下载完成移除元素 + window.URL.revokeObjectURL(href) //释放掉blob对象 + }) + .catch(() => {}) }, // 选择文件 selectFile() { diff --git a/ux/src/views/customermanagement/components/filterForm/filterContent.vue b/ux/src/views/customermanagement/components/filterForm/filterContent.vue index 766d30b..541fcc6 100644 --- a/ux/src/views/customermanagement/components/filterForm/filterContent.vue +++ b/ux/src/views/customermanagement/components/filterForm/filterContent.vue @@ -7,8 +7,10 @@ {{item.name +' “' + item.value[0] + '-' + item.value[1] + '”'}} {{item.name +' “' + item.value[0] + '-' + item.value[1] + '”'}} {{item.name +' “' + getTypesName(item) + getStatusName(item) + '”'}} + {{`${item.name} ${item.address.state} ${item.address.city} ${item.address.area}`}} {{item.name +' “' + optionsNames[item.condition]+ '”'+' '+ getCheckName(item)}} {{item.name +' ' + optionsNames[item.condition] + '“' + item.value[0].realname + '”'}} + {{item.name +' “' + item.valueContent + '”'}} {{item.name + ' ' + optionsNames[item.condition] + '“' + item.value + '”' }} diff --git a/ux/src/views/customermanagement/components/filterForm/index.vue b/ux/src/views/customermanagement/components/filterForm/index.vue index 6078341..62bd207 100644 --- a/ux/src/views/customermanagement/components/filterForm/index.vue +++ b/ux/src/views/customermanagement/components/filterForm/index.vue @@ -2,9 +2,10 @@ + width="900px">
筛选条件
- +