listAllEntities();
+
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java
new file mode 100644
index 0000000000..296988e8c3
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 机关单位信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-20
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("customer_agency")
+public class CustomerAgencyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 上级组织机构ID
+ */
+ private String pid;
+
+ /**
+ * 所有上级组织机构ID(以英文:隔开)
+ */
+ private String pids;
+
+ /**
+ * 所有上级名称,以-连接
+ */
+ private String allParentName;
+
+ /**
+ * 组织名称
+ */
+ private String organizationName;
+
+ /**
+ * 机关级别(社区级:community,
+乡(镇、街道)级:street,
+区县级: district,
+市级: city
+省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)
+ */
+ private String level;
+
+ /**
+ * 地区编码
+ */
+ private String areaCode;
+
+ /**
+ * 总人数
+ */
+ private Integer totalUser;
+
+ /**
+ * 省份
+ */
+ private String province;
+
+ /**
+ * 城市
+ */
+ private String city;
+
+ /**
+ * 区县
+ */
+ private String district;
+
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/IssueEntity.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/IssueEntity.java
new file mode 100644
index 0000000000..0fadf1f454
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/entity/IssueEntity.java
@@ -0,0 +1,115 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 议题详情 关联话题,转议题时间必须要和话题转议题时间一致、关闭时间必须要和操作记录表的关闭记录时间一致、转项目时间必须要和项目记录生成时间一致,注意服务间调用的时间一致性。每个议题最后总会被关闭。
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-05-11
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("issue")
+public class IssueEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 议题状态 表决中:voting 已转项目:shift_project 已关闭:closed
+ */
+ private String issueStatus;
+
+ /**
+ * 来源类型 eg:resi_topic
+ */
+ private String sourceType;
+
+ /**
+ * 来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID)
+ */
+ private String sourceId;
+
+ /**
+ * 关闭理由 【未关闭时可以为空】关闭话题时必填的理由,转项目后而且已经结案,这个字段不回写
+ */
+ private String closeReason;
+
+ /**
+ * 解决类型 【未关闭时可以为空】已解决resloved、未解决unresloved,对应在关闭议题时所选的checkbox,转项目后而且已经结案,这个字段不回写
+ */
+ private String resolveType;
+
+ /**
+ * 议题名称 最多20字
+ */
+ private String issueTitle;
+
+ /**
+ * 建议 建议
+ */
+ private String suggestion;
+
+ /**
+ * 客户ID 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID 居民端议题对应一个网格iId
+ */
+ private String gridId;
+
+ /**
+ * 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制
+ */
+ private String orgIdPath;
+
+ /**
+ * 组织ID 【数据权限-非必填】agencyId
+ */
+ private String orgId;
+
+ /**
+ * 表决截止日期 表决截止日期
+ */
+ private Date votingDeadline;
+
+ /**
+ * 表决发起日期(转议题日期) 表决发起日期(转议题日期)
+ */
+ private Date decidedTime;
+
+ /**
+ * 转项目日期 转项目日期(服务间调用日期一致性)
+ */
+ private Date shiftedTime;
+
+ /**
+ * 关闭日期 关闭日期
+ */
+ private Date closedTime;
+
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java
new file mode 100644
index 0000000000..3863947029
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java
@@ -0,0 +1,11 @@
+package com.epmet.service.Issue;
+
+import com.epmet.entity.IssueEntity;
+
+import java.util.List;
+
+public interface DemoIssueService {
+
+ List listAllEntities();
+
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java
new file mode 100644
index 0000000000..494cd26351
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java
@@ -0,0 +1,23 @@
+package com.epmet.service.Issue.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.dao.issue.StatsIssueDao;
+import com.epmet.entity.IssueEntity;
+import com.epmet.service.Issue.DemoIssueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+@DataSource("govIssue")
+public class DemoIssueServiceImpl implements DemoIssueService {
+
+ @Autowired
+ private StatsIssueDao statsIssueDao;
+
+ @Override
+ public List listAllEntities() {
+ return statsIssueDao.listAllEntities();
+ }
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java
new file mode 100644
index 0000000000..628809bb77
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java
@@ -0,0 +1,9 @@
+package com.epmet.service.org;
+
+import com.epmet.entity.CustomerAgencyEntity;
+
+import java.util.List;
+
+public interface DemoGovOrgService {
+ List listAllEntities();
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java
new file mode 100644
index 0000000000..8d26d7a4b7
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java
@@ -0,0 +1,22 @@
+package com.epmet.service.org.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.dao.org.StatsCustomerAgencyDao;
+import com.epmet.entity.CustomerAgencyEntity;
+import com.epmet.service.org.DemoGovOrgService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+@DataSource("govOrg")
+public class DemoGovOrgServiceImpl implements DemoGovOrgService {
+ @Autowired
+ private StatsCustomerAgencyDao govOrgDao;
+
+ @Override
+ public List listAllEntities() {
+ return govOrgDao.listAllEntities();
+ }
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/StatsDemoService.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/StatsDemoService.java
new file mode 100644
index 0000000000..0ec0a634a0
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/StatsDemoService.java
@@ -0,0 +1,5 @@
+package com.epmet.service.stats;
+
+public interface StatsDemoService {
+ void demo();
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/impl/StatsDemoServiceImpl.java b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/impl/StatsDemoServiceImpl.java
new file mode 100644
index 0000000000..d80c8b30b7
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/java/com/epmet/service/stats/impl/StatsDemoServiceImpl.java
@@ -0,0 +1,31 @@
+package com.epmet.service.stats.impl;
+
+import com.epmet.entity.CustomerAgencyEntity;
+import com.epmet.entity.IssueEntity;
+import com.epmet.service.Issue.DemoIssueService;
+import com.epmet.service.org.DemoGovOrgService;
+import com.epmet.service.stats.StatsDemoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 综合业务的service,不指定数据源,不加事务,因为不支持。。。
+ */
+@Service
+public class StatsDemoServiceImpl implements StatsDemoService {
+
+ @Autowired
+ private DemoGovOrgService demoGovOrgService;
+
+ @Autowired
+ private DemoIssueService demoIssueService;
+
+ public void demo() {
+ List agencies = demoGovOrgService.listAllEntities();
+ List issues = demoIssueService.listAllEntities();
+ System.out.println(666);
+ }
+
+}
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistician/data-statistician-server/src/main/resources/bootstrap.yml
index bf29c4cfbe..38d72902a7 100644
--- a/epmet-module/data-statistician/data-statistician-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/resources/bootstrap.yml
@@ -24,9 +24,9 @@ spring:
druid:
#MySQL
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.1.130:3306/epmet_gov_access?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
- username: epmet_gov_access_user
- password: EpmEt-db-UsEr
+ url: jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: epmet_dba
+ password: EpmEt-dbA-UsEr
cloud:
nacos:
discovery:
@@ -55,24 +55,24 @@ spring:
flyway:
enabled: false
locations: classpath:db/migration
- url: jdbc:mysql://192.168.1.130:3306/epmet_gov_access?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
- user: epmet_gov_access_user
- password: EpmEt-db-UsEr
+ url: jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ user: epmet_dba
+ password: EpmEt-dbA-UsEr
baseline-on-migrate: true
baseline-version: 0
-stats:
- datasources:
- - name: statsDatasource
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: @datasource.druid.stats.url@
- username: @datasource.druid.stats.username@
- password: @datasource.druid.stats.password@
- - name: orgDatasource
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: @datasource.druid.org.url@
- username: @datasource.druid.org.username@
- password: @datasource.druid.org.password@
+#stats:
+# datasources:
+# - name: statsDatasource
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: @datasource.druid.stats.url@
+# username: @datasource.druid.stats.username@
+# password: @datasource.druid.stats.password@
+# - name: orgDatasource
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: @datasource.druid.org.url@
+# username: @datasource.druid.org.username@
+# password: @datasource.druid.org.password@
management:
endpoints:
@@ -83,26 +83,26 @@ management:
health:
show-details: ALWAYS
-#mybatis-plus:
-# mapper-locations: classpath:/mapper/**/*.xml
-# #实体扫描,多个package用逗号或者分号分隔
-# typeAliasesPackage: com.epmet.entity
-# global-config:
-# #数据库相关配置
-# db-config:
-# #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
-# id-type: ID_WORKER
-# #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
-# field-strategy: NOT_NULL
-# #驼峰下划线转换
-# column-underline: true
-# banner: false
-# #原生配置
-# configuration:
-# map-underscore-to-camel-case: true
-# cache-enabled: false
-# call-setters-on-nulls: true
-# jdbc-type-for-null: 'null'
+mybatis-plus:
+ mapper-locations: classpath:/mapper/**/*.xml
+ #实体扫描,多个package用逗号或者分号分隔
+ typeAliasesPackage: com.epmet.entity
+ global-config:
+ #数据库相关配置
+ db-config:
+ #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
+ id-type: ID_WORKER
+ #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
+ field-strategy: NOT_NULL
+ #驼峰下划线转换
+ column-underline: true
+ banner: false
+ #原生配置
+ configuration:
+ map-underscore-to-camel-case: true
+ cache-enabled: false
+ call-setters-on-nulls: true
+ jdbc-type-for-null: 'null'
feign:
hystrix:
@@ -131,3 +131,20 @@ pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
+dynamic:
+ datasource:
+# stats:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: @datasource.druid.stats.url@
+# username: @datasource.druid.stats.username@
+# password: @datasource.druid.stats.password@
+ govOrg:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://192.168.1.130:3306/epmet_gov_org?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: epmet_gov_org_user
+ password: EpmEt-db-UsEr
+ govIssue:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://192.168.1.130:3306/epmet_gov_issue?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: epmet_gov_issue_user
+ password: EpmEt-db-UsEr
\ No newline at end of file
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsCustomerAgencyDao.xml b/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsCustomerAgencyDao.xml
new file mode 100644
index 0000000000..0cb802030a
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsCustomerAgencyDao.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+ select * from customer_agency
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsIssueDao.xml b/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsIssueDao.xml
new file mode 100644
index 0000000000..ff33872b14
--- /dev/null
+++ b/epmet-module/data-statistician/data-statistician-server/src/main/resources/mapper/StatsIssueDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ select * from issue
+
+
\ No newline at end of file