diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml
index f759f036b9..8e526e2a73 100644
--- a/epmet-cloud-generator/src/main/resources/application.yml
+++ b/epmet-cloud-generator/src/main/resources/application.yml
@@ -9,7 +9,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置
driverClassName: com.mysql.jdbc.Driver
- url: jdbc:mysql://192.168.1.130:3306/epmet_user?useUnicode=true&characterEncoding=UTF-8&useSSL=false
+ url: jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: epmet_dba
password: EpmEt-dbA-UsEr
#oracle配置
diff --git a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java
index 1b9215e22a..1015ade75d 100644
--- a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java
+++ b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java
@@ -48,14 +48,11 @@ public class FieldMetaObjectHandler implements MetaObjectHandler {
public void insertFill(MetaObject metaObject) {
Date date = new Date();
if (metaObject.getOriginalObject() instanceof BaseEpmetEntity) {
- String loginUserId = loginUserUtil.getLoginUserId();
// epmet项目新增的
- loginUserId = StringUtils.isBlank(loginUserId) ? Constant.APP_USER_FLAG : loginUserId;
- //Long deptId = user == null ? null : user.getDeptId();
setFieldValByName(FieldConstant.CREATED_TIME_HUMP, date, metaObject);
- setFieldValByName(FieldConstant.CREATED_BY_HUMP, loginUserId, metaObject);
+ setFieldValByName(FieldConstant.CREATED_BY_HUMP, getCreatedByFieldValue(metaObject), metaObject);
setFieldValByName(FieldConstant.UPDATED_TIME_HUMP, date, metaObject);
- setFieldValByName(FieldConstant.UPDATED_BY_HUMP, loginUserId, metaObject);
+ setFieldValByName(FieldConstant.UPDATED_BY_HUMP, getUpdatedByFieldValue(metaObject), metaObject);
setFieldValByName(FieldConstant.REVISION_HUMP, NumConstant.ZERO, metaObject);
//删除标识
setFieldValByName(FieldConstant.DEL_FLAG_HUMP, EpmetDelFlagEnum.NORMAL.value(), metaObject);
@@ -82,6 +79,32 @@ public class FieldMetaObjectHandler implements MetaObjectHandler {
}
}
+ public Object getCreatedByFieldValue(MetaObject metaObject) {
+ Object value = loginUserUtil.getLoginUserId();
+ if (value == null) {
+ if (metaObject.hasGetter(FieldConstant.CREATED_BY_HUMP)) {
+ value = metaObject.getValue(FieldConstant.CREATED_BY_HUMP);
+ }
+ if (value == null) {
+ value = Constant.APP_USER_FLAG;
+ }
+ }
+ return value;
+ }
+
+ public Object getUpdatedByFieldValue(MetaObject metaObject) {
+ Object value = loginUserUtil.getLoginUserId();
+ if (value == null) {
+ if (metaObject.hasGetter(FieldConstant.UPDATED_BY_HUMP)) {
+ value = metaObject.getValue(FieldConstant.UPDATED_BY_HUMP);
+ }
+ if (value == null) {
+ value = Constant.APP_USER_FLAG;
+ }
+ }
+ return value;
+ }
+
@Override
public void updateFill(MetaObject metaObject) {
@@ -111,9 +134,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler {
//更新时间
setFieldValByName(UPDATE_DATE, new Date(), metaObject);
} else if (fillEsuaEntity) {
- String loginUserId = loginUserUtil.getLoginUserId();
- String userId = StringUtils.isBlank(loginUserId) ? Constant.APP_USER_FLAG : loginUserId;
- setFieldValByName(FieldConstant.UPDATED_BY_HUMP, userId, metaObject);
+ setFieldValByName(FieldConstant.UPDATED_BY_HUMP, getUpdatedByFieldValue(metaObject), metaObject);
setFieldValByName(FieldConstant.UPDATED_TIME_HUMP, new Date(), metaObject);
}
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
index 67a0f8ea1a..cf84ae177f 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
@@ -107,10 +107,15 @@ public interface ServiceConstant {
/**
* 政府端-党建声音
*/
- String GOV_VOICE_SERVER="gov-voice-server";
+ String GOV_VOICE_SERVER = "gov-voice-server";
/**
* 居民端-党建声音
*/
- String RESI_VOICE_SERVER="resi-voice-server";
+ String RESI_VOICE_SERVER = "resi-voice-server";
+
+ /**
+ * 数据统计
+ */
+ String DATA_STATISTICAL = "data_statistical";
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
index e4fcc31010..532420581a 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
@@ -1,8 +1,8 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
- *
+ *
* https://www.renren.io
- *
+ *
* 版权所有,侵权必究!
*/
@@ -16,7 +16,7 @@ import org.joda.time.format.DateTimeFormatter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.util.*;
/**
* 日期处理工具类
@@ -25,21 +25,37 @@ import java.util.Date;
* @since 1.0.0
*/
public class DateUtils {
- /** 时间格式(yyyy-MM-dd) */
- public final static String DATE_PATTERN = "yyyy-MM-dd";
- /** 时间格式(yyyy-MM-dd HH:mm:ss) */
- public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
+
+ /** 季度月份列表 */
+ public static final List Q1Months = Arrays.asList(1, 2, 3);
+ public static final List Q2Months = Arrays.asList(4, 5, 6);
+ public static final List Q3Months = Arrays.asList(7, 8, 9);
+ public static final List Q4Months = Arrays.asList(10, 11, 12);
+
+ /** 时间格式(yyyy-MM-dd) */
+ public final static String DATE_PATTERN = "yyyy-MM-dd";
+ /** 时间格式(yyyy-MM-dd HH:mm:ss) */
+ public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
/** 时间格式(yyyyMMddHHmmss) */
- public final static String DATE_TIME_NO_SPLIT = "yyyyMMddHHmmss";
+ public final static String DATE_TIME_NO_SPLIT = "yyyyMMddHHmmss";
/** 时间格式(yyyy-MM-dd HH:mm) */
public final static String DATE_TIME_PATTERN_END_WITH_MINUTE = "yyyy-MM-dd HH:mm";
+ public static final String DATE_PATTERN_YYYYMMDD = "yyyyMMdd";
+ public static final String DATE_NAME_PATTERN = "yyyy年MM月dd日";
+ public static final String MONTH_NAME_PATTERN = "yyyy年MM月";
+ public static final String DATE_PATTERN_YYYY = "yyyy";
+ public static final String DATE_PATTERN_YYYYMM = "yyyyMM";
+ public static final String DATE_PATTERN_YYYY_MM = "yyyy-MM";
+ public static final String WEEK_TYPE_ENGLISH = "english";
+ public static final String WEEK_TYPE_CHINESE = "chinese";
+
/**
* 日期格式化 日期格式为:yyyy-MM-dd
* @param date 日期
- * @return 返回yyyy-MM-dd格式日期
+ * @return 返回yyyy-MM-dd格式日期
*/
- public static String format(Date date) {
+ public static String format(Date date) {
return format(date, DATE_PATTERN);
}
@@ -47,10 +63,10 @@ public class DateUtils {
* 日期格式化 日期格式为:yyyy-MM-dd
* @param date 日期
* @param pattern 格式,如:DateUtils.DATE_TIME_PATTERN
- * @return 返回yyyy-MM-dd格式日期
+ * @return 返回yyyy-MM-dd格式日期
*/
public static String format(Date date, String pattern) {
- if(date != null){
+ if (date != null) {
SimpleDateFormat df = new SimpleDateFormat(pattern);
return df.format(date);
}
@@ -61,7 +77,7 @@ public class DateUtils {
* 日期解析
* @param date 日期
* @param pattern 格式,如:DateUtils.DATE_TIME_PATTERN
- * @return 返回Date
+ * @return 返回Date
*/
public static Date parse(String date, String pattern) {
try {
@@ -78,7 +94,7 @@ public class DateUtils {
* @param pattern 日期的格式,如:DateUtils.DATE_TIME_PATTERN
*/
public static Date stringToDate(String strDate, String pattern) {
- if (StringUtils.isBlank(strDate)){
+ if (StringUtils.isBlank(strDate)) {
return null;
}
@@ -89,7 +105,7 @@ public class DateUtils {
/**
* 根据周数,获取开始日期、结束日期
* @param week 周期 0本周,-1上周,-2上上周,1下周,2下下周
- * @return 返回date[0]开始日期、date[1]结束日期
+ * @return 返回date[0]开始日期、date[1]结束日期
*/
public static Date[] getWeekStartAndEnd(int week) {
DateTime dateTime = new DateTime();
@@ -101,6 +117,21 @@ public class DateUtils {
return new Date[]{beginDate, endDate};
}
+ /**
+ * 根据日期,获取周开始日期、结束日期
+ * @param date
+ * @return
+ */
+ public static Date[] getWeekStartAndEnd(Date date) {
+ DateTime dateTime = new DateTime(date);
+ LocalDate localDate = new LocalDate(dateTime);
+
+ localDate = localDate.dayOfWeek().withMinimumValue();
+ Date beginDate = localDate.toDate();
+ Date endDate = localDate.plusDays(6).toDate();
+ return new Date[]{beginDate, endDate};
+ }
+
/**
* 对日期的【秒】进行加/减
*
@@ -184,4 +215,260 @@ public class DateUtils {
DateTime dateTime = new DateTime(date);
return dateTime.plusYears(years).toDate();
}
+
+ /**
+ * 获取星期几,例如:星期一
+ * @param date
+ * @return
+ */
+ public static String getWeekNameOfWeek(Date date, String type) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
+ String[] chineseWeekDayName = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
+ String[] englishWeekDayName = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+
+ String weekDayName;
+ switch (type) {
+ case WEEK_TYPE_ENGLISH:
+ weekDayName = englishWeekDayName[dayOfWeek - 1];
+ break;
+ case WEEK_TYPE_CHINESE:
+ weekDayName = chineseWeekDayName[dayOfWeek - 1];
+ break;
+ default:
+ weekDayName = "";
+ }
+
+ return weekDayName;
+ }
+
+ //public static String getEnglishWeekName(Date date) {
+ // new SimpleDateFormat("E");
+ //}
+
+ /**
+ * 获取属于一年的第几周
+ * @param date
+ * @return
+ */
+ public static int getWeekOfYear(Date date) {
+ DateTime dateTime = new DateTime(date);
+ return dateTime.getWeekOfWeekyear();
+ }
+
+ /**
+ * 按照格式进行时间取整
+ * @param targetDate
+ * @param pattern
+ * @return
+ */
+ public static Date integrate(Date targetDate, String pattern) {
+ return DateUtils.parse(DateUtils.format(targetDate, pattern), pattern);
+ }
+
+ /**
+ * 查询指定日期是几月
+ * @param date
+ * @return
+ */
+ public static int getMonthOfYear(Date date) {
+ LocalDate localDate = new LocalDate(date);
+ return localDate.getMonthOfYear();
+ }
+
+ /**
+ * 获取季度
+ * @param date
+ * @return
+ */
+ public static int getQuarterIndex(Date date) {
+ LocalDate localDate = new LocalDate(date);
+ int monthOfYear = localDate.getMonthOfYear();
+ if (Q1Months.contains(monthOfYear)) {
+ return 1;
+ }
+ if (Q2Months.contains(monthOfYear)) {
+ return 2;
+ }
+ if (Q3Months.contains(monthOfYear)) {
+ return 3;
+ }
+ return 4;
+ }
+
+ /**
+ * 根据季度查询季度的月份列表
+ * @param quarterIndex
+ * @return
+ */
+ public static List getMonthsByQuarterIndex(Integer quarterIndex) {
+ switch (quarterIndex) {
+ case 1:
+ return Q1Months;
+ case 2:
+ return Q2Months;
+ case 3:
+ return Q3Months;
+ default:
+ return Q4Months;
+ }
+ }
+
+ /**
+ * 获取季度的开始date
+ * @param year
+ * @param quarterIndex
+ * @return
+ */
+ public static Date getQuarterStartDate(String year, Integer quarterIndex) {
+ List months = getMonthsByQuarterIndex(quarterIndex);
+ String yyyyMM = year.concat(String.format("%02d", months.get(0)));
+ return DateUtils.parse(yyyyMM, DateUtils.DATE_PATTERN_YYYYMM);
+ }
+
+ /**
+ * 获取季度的结束date
+ * @param year
+ * @param quarterIndex
+ * @return
+ */
+ public static Date getQuarterEndDate(String year, Integer quarterIndex) {
+ List months = getMonthsByQuarterIndex(quarterIndex);
+ String yyyyMM = year.concat(String.format("%02d", months.get(2)));
+ Date nextMonth = DateUtils.addDateMonths(DateUtils.parse(yyyyMM, DateUtils.DATE_PATTERN_YYYYMM), 1);
+ // 用下一个季度开头-1天就是上一个月季度最后一天
+ return DateUtils.addDateDays(nextMonth, -1);
+ }
+
+ public static void main(String[] args) {
+ //int weekOfYear = getWeekOfYear(new Date());
+ String format = String.format("%02d", 9);
+
+ System.out.println(666);
+ }
+
+ /**
+ * 获取日期前一天
+ * @author zhaoqifeng
+ * @date 2020/6/22 11:08
+ * @param date
+ * @return java.util.Date
+ */
+ public static Date getBeforeDay(Date date) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.add(Calendar.DATE, -1);
+ return calendar.getTime();
+ }
+
+ /**
+ * @return java.lang.String
+ * @param dateStr yyyyMMdd返回yyyy.MM.dd yyyyMM返回yyyy/MM
+ * @author yinzuomei
+ * @description 返回yyyy.MM.dd
+ * @Date 2020/6/22 18:38
+ **/
+ public static String getxAxisDatePattern(String dateStr,String character){
+ if(StringUtils.isNotBlank(dateStr)&&dateStr.length()==8){
+ return String.valueOf(new StringBuffer(dateStr).insert(4,character).insert(7,character));
+ }else if(StringUtils.isNotBlank(dateStr)&&dateStr.length()==6){
+ return String.valueOf(new StringBuffer(dateStr).insert(4,character));
+ }
+ return dateStr;
+ }
+
+ /**
+ * @return java.lang.String
+ * @param beforDay
+ * @author yinzuomei
+ * @description 获取当前日期的前n天 返回yyyyMMdd
+ * @Date 2020/6/23 1:50
+ **/
+ public static String getBeforeNDay(int beforDay){
+ Calendar c = Calendar.getInstance();
+ c.add(Calendar.DATE, - beforDay);
+ Date date = c.getTime();
+ return DateUtils.format(date,DateUtils.DATE_PATTERN_YYYYMMDD);
+ }
+
+ /**
+ * @return java.lang.String
+ * @param beforMonth
+ * @author yinzuomei
+ * @description 获取当前 月份的前n月 返回yyyyMM
+ * @Date 2020/6/23 1:50
+ **/
+ public static String getBeforeNMonth(int beforMonth){
+ Calendar c = Calendar.getInstance();
+ c.add(Calendar.MONTH, - beforMonth);
+ Date date = c.getTime();
+ return DateUtils.format(date,DateUtils.DATE_PATTERN_YYYYMM);
+ }
+
+ /**
+ * @return java.util.List 返回yyyyMMdd
+ * @param startTime yyyyMMdd
+ * @param endTime yyyyMMdd
+ * @author yinzuomei
+ * @description 获取两个日期之间所有的日期集合,包含开始结束
+ * @Date 2020/6/23 1:26
+ **/
+ public static List getDaysBetween(String startTime, String endTime){
+ // 返回的日期集合
+ List days = new ArrayList();
+ try{
+ Date start = DateUtils.parse(startTime,DateUtils.DATE_PATTERN_YYYYMMDD);
+ Date end = DateUtils.parse(endTime,DateUtils.DATE_PATTERN_YYYYMMDD);
+
+ Calendar tempStart = Calendar.getInstance();
+ tempStart.setTime(start);
+
+ Calendar tempEnd = Calendar.getInstance();
+ tempEnd.setTime(end);
+ // 日期加1(包含结束)
+ tempEnd.add(Calendar.DATE, +1);
+ while (tempStart.before(tempEnd)) {
+ days.add(DateUtils.format(tempStart.getTime(),DateUtils.DATE_PATTERN_YYYYMMDD));
+ tempStart.add(Calendar.DAY_OF_YEAR, 1);
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return days;
+ }
+
+ /**
+ * @return java.util.List
+ * @param minDate yyyMM
+ * @param maxDate yyyyMM
+ * @author yinzuomei
+ * @description 计算两个月份中间所有的月份包含起始
+ * @Date 2020/6/23 2:10
+ **/
+ public static List getMonthBetween(String minDate, String maxDate){
+ ArrayList result = new ArrayList();
+ try{
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");//格式化为年月
+
+ Calendar min = Calendar.getInstance();
+ Calendar max = Calendar.getInstance();
+
+ min.setTime(sdf.parse(minDate));
+ min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 1);
+
+ max.setTime(sdf.parse(maxDate));
+ max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 2);
+
+ Calendar curr = min;
+ while (curr.before(max)) {
+ result.add(sdf.format(curr.getTime()));
+ curr.add(Calendar.MONTH, 1);
+ }
+ min = null;max = null;curr = null;
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+ return result;
+ }
}
diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml
index a7c4228a85..354c47f3ea 100644
--- a/epmet-gateway/pom.xml
+++ b/epmet-gateway/pom.xml
@@ -175,6 +175,12 @@
lb://resi-voice-server
+
+ lb://data-report-server
+
+
+ lb://data-statistical-server
+
@@ -251,6 +257,10 @@
lb://gov-voice-server
lb://resi-voice-server
+
+ lb://data-report-server
+
+ lb://data-statistical-server
diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml
index 7ece7e0123..f67bd8fdec 100644
--- a/epmet-gateway/src/main/resources/bootstrap.yml
+++ b/epmet-gateway/src/main/resources/bootstrap.yml
@@ -259,6 +259,24 @@ spring:
filters:
- StripPrefix=1
- CpAuth=true
+ #政府端-数据首页
+ - id: data-report-server
+ uri: @gateway.routes.data-report-server.uri@
+ order: 28
+ predicates:
+ - Path=${server.servlet.context-path}/data/report/**
+ filters:
+ - StripPrefix=1
+ - CpAuth=true
+ #统计服务
+ - id: data-statistical-server
+ uri: @gateway.routes.data-statistical-server.uri@
+ order: 29
+ predicates:
+ - Path=${server.servlet.context-path}/data/stats/**
+ filters:
+ - StripPrefix=1
+ - CpAuth=true
nacos:
discovery:
server-addr: @nacos.server-addr@
diff --git a/epmet-module/data-report/data-report-client/pom.xml b/epmet-module/data-report/data-report-client/pom.xml
index f001810eaa..5bba5f2cb4 100644
--- a/epmet-module/data-report/data-report-client/pom.xml
+++ b/epmet-module/data-report/data-report-client/pom.xml
@@ -11,5 +11,13 @@
data-report-client
+
+
+ com.epmet
+ epmet-commons-tools
+ 2.0.0
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java
new file mode 100644
index 0000000000..f42d52fb72
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java
@@ -0,0 +1,40 @@
+package com.epmet.constant;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 16:35
+ */
+public interface UserAnalysisConstant {
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ String REG_FLAG="reg";
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ String PARTI_FLAG="parti";
+
+ String QUERY_USER_AGENCY_FAILED="查询用户所属机关信息失败";
+
+ /**
+ * 普通居民(已注册)
+ */
+ String REGISTERED_RESI= "居民";
+
+ /**
+ * 热心居民
+ */
+ String WARMHEARTED="热心居民";
+
+ /**
+ * 党员
+ */
+ String PARTYMEMBER="党员";
+
+ String DAY_TYPE="day";
+ String MONTH_TYPE="month";
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java
new file mode 100644
index 0000000000..243404052e
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java
@@ -0,0 +1,46 @@
+/**
+ * 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.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 机关维度
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Data
+public class DimAgencyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 组织IDAGENCY_ID
+ */
+ private String id;
+
+ /**
+ * 组织名称
+ */
+ private String agencyName;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java
new file mode 100644
index 0000000000..8487d6d220
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java
@@ -0,0 +1,45 @@
+/**
+ * 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.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 客户网格维度
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Data
+public class DimGridDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * GRID_ID
+ */
+ private String id;
+
+ /**
+ * 网格名称
+ */
+ private String gridName;
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java
new file mode 100644
index 0000000000..f4496d0199
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java
@@ -0,0 +1,27 @@
+package com.epmet.dto.form.user;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 按日、按月查询注册用户数(参与用户数)增量折线图 入参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:57
+ */
+@Data
+public class UserIncrTrendFormDTO implements Serializable {
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空")
+ private String regOrPartiFlag;
+
+ /**
+ * day:日维度 | month:月维度 | (周、季、年)…
+ */
+ @NotBlank(message = "type不能为空")
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java
new file mode 100644
index 0000000000..43d089e01a
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.form.user;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 各机关注册用户数入参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:47
+ */
+@Data
+public class UserSubAgencyFormDTO implements Serializable {
+ private static final long serialVersionUID = -4558978951554887536L;
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空")
+ private String regOrPartiFlag;
+
+ @NotBlank(message = "查询日期不能为空")
+ private String dateId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java
new file mode 100644
index 0000000000..c9bc20b734
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.form.user;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 直属网格注册用户数 入参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:52
+ */
+@Data
+public class UserSubGridFormDTO implements Serializable {
+ private static final long serialVersionUID = -1815903503939673149L;
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空")
+ private String regOrPartiFlag;
+
+ @NotBlank(message = "查询日期不能为空")
+ private String dateId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java
new file mode 100644
index 0000000000..9b8bed1c07
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java
@@ -0,0 +1,23 @@
+package com.epmet.dto.form.user;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 用户汇总信息 入参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:31
+ */
+@Data
+public class UserSummaryInfoFormDTO implements Serializable {
+ private static final long serialVersionUID = -1802471335671321322L;
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空")
+ private String regOrPartiFlag;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java
new file mode 100644
index 0000000000..a7f4e87dc5
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.result.user;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/23 9:13
+ */
+@Data
+public class UserIncrTrendResDTO implements Serializable {
+ private static final long serialVersionUID = 290620373673325352L;
+ private Integer regIncr;
+ private Integer warmIncr;
+ private Integer partymemberIncr;
+ private String dateIdOrMonthId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java
new file mode 100644
index 0000000000..bfd9b17535
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.result.user;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 按日、按月查询注册用户数(参与用户数)增量折线图 返参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 13:17
+ */
+@Data
+public class UserIncrTrendResultDTO implements Serializable {
+ /**
+ * 日期如果按日查询返回yyyy/MM/dd,如果按月返回yyyy/MM
+ */
+ private String date;
+
+ /**
+ * 居民、党员、热心居民返回中文描述
+ */
+ private String type;
+
+ /**
+ * 增量值
+ */
+ private Integer value;
+
+ // yyyyMMdd yyyyMM
+ @JsonIgnore
+ private String dateOrMonthId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java
new file mode 100644
index 0000000000..f01c273e2b
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java
@@ -0,0 +1,45 @@
+package com.epmet.dto.result.user;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 21:45
+ */
+@Data
+public class UserSubAgencyResDTO implements Serializable {
+ private static final long serialVersionUID = 5807572279154511198L;
+ /**
+ * 机关id
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String agencyName;
+
+ /**
+ * 截止到本日参与用户总数
+ */
+ private Integer regTotal;
+
+ /**
+ * 截止到本日(参与用户中)居民总数
+ */
+ private Integer resiTotal;
+
+ /**
+ * 截止到本日(参与用户中)热心居民总数
+ */
+ private Integer warmHeartedTotal;
+
+ /**
+ * 截止到本日(参与用户中)党员总数
+ */
+ private Integer partymemberTotal;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java
new file mode 100644
index 0000000000..107b189660
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java
@@ -0,0 +1,40 @@
+package com.epmet.dto.result.user;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 各机关注册用户数入参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:49
+ */
+@Data
+public class UserSubAgencyResultDTO implements Serializable {
+ private static final long serialVersionUID = 3038896791082755087L;
+ /**
+ * 辽阳路街道
+ */
+ private String name;
+
+ /**
+ * 数值
+ */
+ private Integer value;
+
+ /**
+ * 类型:居民、党员、热心居民
+ */
+ private String type;
+
+ /**
+ * 机关id
+ */
+ private String agencyId;
+
+ @JsonIgnore
+ private Integer total;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java
new file mode 100644
index 0000000000..e20c123147
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java
@@ -0,0 +1,21 @@
+package com.epmet.dto.result.user;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 直属网格注册用户数(参与用户、注册用户通用类)
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 23:57
+ */
+@Data
+public class UserSubGridResDTO implements Serializable {
+ private static final long serialVersionUID = 2203260762393704885L;
+ private String gridId;
+ private Integer regTotal;
+ private Integer resiTotal;
+ private Integer warmHeartedTotal;
+ private Integer partymemberTotal;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java
new file mode 100644
index 0000000000..5aa50aad9b
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java
@@ -0,0 +1,41 @@
+package com.epmet.dto.result.user;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 直属网格注册用户数 返参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:54
+ */
+@Data
+public class UserSubGridResultDTO implements Serializable {
+ private static final long serialVersionUID = -7432747804212305863L;
+
+ /**
+ * 网格名称:eg:第一网格
+ */
+ private String name;
+
+ /**
+ * 数值
+ */
+ private Integer value;
+
+ /**
+ * 类型:居民、党员、热心居民
+ */
+ private String type;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ @JsonIgnore
+ private Integer total;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..ccbcb009ed
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java
@@ -0,0 +1,77 @@
+package com.epmet.dto.result.user;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 用户汇总信息 返参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 12:34
+ */
+@Data
+public class UserSummaryInfoResultDTO implements Serializable {
+ private static final long serialVersionUID = -4270726421611289755L;
+ /**
+ * 数据更新至yyyy.MM.dd
+ */
+ private String currentDate;
+
+ /**
+ * 注册居民数
+ */
+ private Integer regTotal;
+
+ /**
+ * 参与用户数
+ */
+ private Integer partiTotal;
+
+ /**
+ * 党员数
+ */
+ private Integer partymemberTotal;
+
+ /**
+ * 党员占比
+ */
+ private String partymemberProportion;
+ /**
+ * 热心居民数
+ */
+ private Integer warmHeartedTotal;
+
+ /**
+ * 热心居民占比
+ */
+ private String warmHeartedProportion;
+
+ @JsonIgnore
+ private BigDecimal partymemberProportionValue;
+
+ @JsonIgnore
+ private BigDecimal warmHeartedProportionValue;
+
+ @JsonIgnore
+ private String id;
+
+ public UserSummaryInfoResultDTO(){
+ this.currentDate="";
+ this.regTotal=0;
+ this.partiTotal=0;
+ this.partymemberTotal=0;
+ this.partymemberProportion="0%";
+ this.warmHeartedTotal=0;
+ this.warmHeartedProportion="0%";
+ this.id="";
+ }
+
+ public static void main(String[] args) {
+ StringBuffer s=new StringBuffer("20190305").insert(4,".").insert(7,".");
+ System.out.println(s);
+
+ }
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java
new file mode 100644
index 0000000000..699090f931
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java
@@ -0,0 +1,12 @@
+package com.epmet.group.constant;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 15:24
+ */
+public interface GroupConstant {
+
+ String MONTH = "month";
+ String DATE = "date";
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java
new file mode 100644
index 0000000000..627b5504c4
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.group.dto.form;
+
+import lombok.Data;
+import lombok.NonNull;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 12:07
+ */
+@Data
+public class GroupIncrTrendFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1788937450915240575L;
+
+ public interface GroupJava {}
+
+ /**
+ * 类型 month:月 date:日
+ */
+ @NotBlank(message = "type不能为空", groups = {GroupJava.class})
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java
new file mode 100644
index 0000000000..d9840d841d
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 14:30
+ */
+@Data
+public class GridInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 5301902590768338888L;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 网格名称
+ */
+ private String gridName;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java
new file mode 100644
index 0000000000..50637d609d
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 12:03
+ */
+@Data
+public class GroupIncrTrendResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 5132636251609157706L;
+
+ /**
+ * 日期
+ */
+ private String date;
+
+ /**
+ * 值 【小组数量】
+ */
+ private Integer value;
+
+ /**
+ * 类型 【小组数量】
+ */
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java
new file mode 100644
index 0000000000..379f55cdf5
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java
@@ -0,0 +1,37 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 11:56
+ * 网格小组——下级机关小组数柱状图
+ */
+@Data
+public class GroupSubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8562403482616167221L;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 类型
+ */
+ private String type;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java
new file mode 100644
index 0000000000..af7e4e84fa
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java
@@ -0,0 +1,37 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 11:56
+ * 网格小组——下级机关小组数柱状图
+ */
+@Data
+public class GroupSubGridResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -3260124064513560994L;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 类型
+ */
+ private String type;
+
+ /**
+ * 机关ID
+ */
+ private String gridId;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..a3e72d6f3a
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java
@@ -0,0 +1,40 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 11:05
+ */
+@Data
+public class GroupSummaryInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 网格总数量
+ */
+ private Integer gridTotalCount;
+
+ /**
+ * 小组总数量
+ */
+ private Integer groupTotalCount;
+
+ /**
+ * 小组平均人数
+ */
+ private Integer groupPeopleAvg;
+
+ /**
+ * 小组人数中位数
+ */
+ private Integer groupPeopleMedian;
+
+ /**
+ * 数据更新至 时间
+ */
+ private String deadline;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java
new file mode 100644
index 0000000000..e4b182f09f
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.group.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 14:02
+ */
+@Data
+public class SubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 2276056225590553307L;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String agencyName;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java
new file mode 100644
index 0000000000..88d4f44c78
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java
@@ -0,0 +1,14 @@
+package com.epmet.issue.constant;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 14:07
+ */
+public interface IssueConstant {
+ String MONTH = "month";
+ String DATE = "date";
+ String VOTING_NAME = "表决中";
+ String SHIFT_NAME = "已转项目";
+ String CLOSED_NAME = "已关闭";
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java
new file mode 100644
index 0000000000..b4577b2811
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java
@@ -0,0 +1,19 @@
+package com.epmet.issue.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:32
+ */
+@Data
+public class IssueIncrtrendFormDTO implements Serializable {
+ private static final long serialVersionUID = 4408419854627376175L;
+ /**
+ * 类型,按日date 按月month
+ */
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java
new file mode 100644
index 0000000000..961727e31c
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java
@@ -0,0 +1,206 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 14:11
+ */
+@Data
+public class IssueDataDTO implements Serializable {
+
+ private static final long serialVersionUID = 9136989870868730175L;
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+
+ /**
+ * 组织名
+ */
+ private String agencyName;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 网格名
+ */
+ private String gridName;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 年度名
+ */
+ private String yearName;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 季度名
+ */
+ private String quarterName;
+
+ /**
+ * 月度ID
+ */
+ private String monthId;
+
+ /**
+ * 月度名
+ */
+ private String monthName;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 日期ID
+ */
+ private String dateId;
+
+ /**
+ * 日期名
+ */
+ private String dateName;
+
+ /**
+ * 当日议题增量
+ */
+ private Integer issueIncr;
+
+ /**
+ * 议题总数
+ */
+ private Integer issueTotal;
+
+ /**
+ * 当日已转项目的议题数增量
+ */
+ private Integer shiftProjectIncr;
+
+ /**
+ * 已转项目的议题总数
+ */
+ private Integer shiftProjectTotal;
+
+ /**
+ * 已转项目所占百分比
+ */
+ private BigDecimal shiftProjectPercent;
+
+ /**
+ * 当日表决中议题数增量
+ */
+ private Integer votingIncr;
+
+ /**
+ * 表决中议题总数
+ */
+ private Integer votingTotal;
+
+ /**
+ * 表决中议题所占百分比
+ */
+ private BigDecimal votingPercent;
+
+ /**
+ * 当日已关闭议题数增量
+ */
+ private Integer closedIncr;
+
+ /**
+ * 当日已关闭议题中已解决数量
+ */
+ private Integer closedResolvedIncr;
+
+ /**
+ * 当日已关闭议题中无需解决数量
+ */
+ private Integer closedUnresolvedIncr;
+
+ /**
+ * 已关闭议题总数
+ */
+ private Integer closedTotal;
+
+ /**
+ * 已关闭议题中已解决总数
+ */
+ private Integer closedResolvedTotal;
+
+ /**
+ * 已关闭议题中未解决总数
+ */
+ private Integer closedUnresolvedTotal;
+
+ /**
+ * 已关闭议题所占百分比
+ */
+ private BigDecimal closedPercent;
+
+ /**
+ * 已关闭议题中已解决百分比
+ */
+ private BigDecimal closedResolvedPercent;
+
+ /**
+ * 已关闭议题中未解决百分比
+ */
+ private BigDecimal closedUnresolvedPercent;
+
+ /**
+ * 当日已结案议题数
+ */
+ private Integer closedCaseIncr;
+
+ /**
+ * 当日已结案议题中已解决数
+ */
+ private Integer closedCaseResolvedIncr;
+
+ /**
+ * 当日已结案议题中未解决数
+ */
+ private Integer closedCaseUnresolvedIncr;
+
+ /**
+ * 已结案议题总数
+ */
+ private Integer closedCaseTotal;
+
+ /**
+ * 已结案议题中已解决总数
+ */
+ private Integer closedCaseResolvedTotal;
+
+ /**
+ * 已结案议题中未解决总数
+ */
+ private Integer closedCaseUnresolvedTotal;
+
+ /**
+ * 已结案议题中已解决百分比
+ */
+ private BigDecimal closedCaseResolvedPercent;
+
+ /**
+ * 已结案议题中未解决百分比
+ */
+ private BigDecimal closedCaseUnresolvedPercent;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java
new file mode 100644
index 0000000000..d63d332a9b
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:30
+ */
+@NoArgsConstructor
+@Data
+public class IssueIncrtrendResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 7762529188251385355L;
+ /**
+ * 日期
+ */
+ private String date;
+ /**
+ * 状态(表决中,已转项目,已关闭)
+ */
+ private String type;
+ /**
+ * 数量
+ */
+ private Integer value;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java
new file mode 100644
index 0000000000..c401d5ecc4
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:24
+ */
+@NoArgsConstructor
+@Data
+public class IssueSubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 2640337888693960513L;
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+ /**
+ * 组织名
+ */
+ private String name;
+ /**
+ * 类型 表决中,已转项目,已关闭
+ */
+ private String type;
+ /**
+ * 数量
+ */
+ private Integer value;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java
new file mode 100644
index 0000000000..3313f0a8e7
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java
@@ -0,0 +1,27 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:27
+ */
+@Data
+public class IssueSubGridResultDTO implements Serializable {
+ private static final long serialVersionUID = -3318384216762207856L;
+ /**
+ * 网格名
+ */
+ private String name;
+ /**
+ * 类型 表决中,已转项目,已关闭
+ */
+ private String type;
+ /**
+ * 数量
+ */
+ private Integer value;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..c53707c0a1
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java
@@ -0,0 +1,54 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:17
+ */
+@NoArgsConstructor
+@Data
+public class IssueSummaryInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -7959140755148294338L;
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+ /**
+ * 议题总数
+ */
+ private Integer issueTotal;
+ /**
+ * 表决中数量
+ */
+ private Integer votingTotal;
+ /**
+ * 已转项目数量
+ */
+ private Integer shiftProjectTotal;
+ /**
+ * 已关闭数量
+ */
+ private Integer closedTotal;
+ /**
+ * 表决中占比
+ */
+ private String votingRatio;
+ /**
+ * 已转项目占比
+ */
+ private String shiftProjectRatio;
+ /**
+ * 已关闭占比
+ */
+ private String closedRatio;
+ /**
+ * 更新至日期
+ */
+ private String dateName;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java
new file mode 100644
index 0000000000..f6940edeeb
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.issue.dto.result;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 16:21
+ */
+@NoArgsConstructor
+@Data
+public class IssueSummaryPieResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -971115426789868580L;
+ /**
+ * 名称 表决中,已转项目,已关闭
+ */
+ private String name;
+ /**
+ * 值
+ */
+ private Integer value;
+ /**
+ * 百分比
+ */
+ private String ratio;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
new file mode 100644
index 0000000000..d3c8d8bf1c
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
@@ -0,0 +1,21 @@
+package com.epmet.project.constant;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+public interface ProjectConstant {
+
+ String DATE = "date";
+ String MONTH = "month";
+
+ /**
+ * 根据Token获取组织信息失败
+ */
+ String GET_AGENCYID = "根据Token获取组织信息失败";
+ /**
+ * 参数异常
+ */
+ String TYPE_EXCEPTION = "必要参数为空或参数格式错误";
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java
new file mode 100644
index 0000000000..ab608a0184
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java
@@ -0,0 +1,182 @@
+/**
+ * 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.project.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据,每日定时执行,先删后增
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Data
+public class FactAgencyProjectDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 唯一标识
+ */
+ private String id;
+
+ /**
+ * 客户Id 【dim_customer.id】
+ */
+ private String customerId;
+
+ /**
+ * 机关Id 【dim_agency.id】
+ */
+ private String agencyId;
+
+ /**
+ * 上级组织Id【dim_agency.pid】
+ */
+ private String parentId;
+
+ /**
+ * 日维度Id 【dim_date.id】
+ */
+ private String dateId;
+
+ /**
+ * 周维度Id 【dim_week.id】
+ */
+ private String weekId;
+
+ /**
+ * 月维度Id 【dim_month.id】
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年维度Id 【dim_year.id】
+ */
+ private String yearId;
+
+ /**
+ * 截止当日项目总数 【当前组织及下级项目总数】
+ */
+ private Integer projectTotal;
+
+ /**
+ * 截止当日处理中项目数 【当前组织及下级所有未结案项目总数】
+ */
+ private Integer pendingTotal;
+
+ /**
+ * 截止当日处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】
+ */
+ private BigDecimal pendingRatio;
+
+ /**
+ * 截止当日已结案项目数 【当前组织及下级已结案项目总数】
+ */
+ private Integer closedTotal;
+
+ /**
+ * 截止当日已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】
+ */
+ private BigDecimal closedRatio;
+
+ /**
+ * 截止当日已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】
+ */
+ private Integer resolvedTotal;
+
+ /**
+ * 截止当日已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】
+ */
+ private BigDecimal resolvedRatio;
+
+ /**
+ * 截止当日已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】
+ */
+ private Integer unresolvedTotal;
+
+ /**
+ * 截止当日已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】
+ */
+ private BigDecimal unresolvedRatio;
+
+ /**
+ * 当日项目总数 【当前组织及下级项目总数】
+ */
+ private Integer projectIncr;
+
+ /**
+ * 当日处理中项目数 【当前组织及下级前一日新增处理中项目数】
+ */
+ private Integer pendingIncr;
+
+ /**
+ * 当日已结案项目数 【当前组织及下级前一日新增结案项目数】
+ */
+ private Integer closedIncr;
+
+ /**
+ * 当日已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】
+ */
+ private Integer resolvedIncr;
+
+ /**
+ * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】
+ */
+ private Integer unresolvedIncr;
+
+ /**
+ * 删除标识 【0.未删除 1.已删除】
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java
new file mode 100644
index 0000000000..a7364cfac9
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.project.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询-接口入参
+ */
+@Data
+public class ProjectIncrTrendFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -4929038359220814068L;
+
+ public interface ProjectIncr {
+ }
+
+ /**
+ * 类型 month:代表月 date:代表日
+ */
+ @NotBlank(message = "month / date 类型不能为空", groups = {ProjectIncr.class})
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java
new file mode 100644
index 0000000000..b53b2a9f14
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java
@@ -0,0 +1,31 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectIncrTrendResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 日期(2020/1/1;2020/1/2...)
+ */
+ private String date;
+
+ /**
+ * 类型对应数量
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java
new file mode 100644
index 0000000000..31d25fe6bb
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java
@@ -0,0 +1,36 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String name;
+
+ /**
+ * 不同类型对应数据
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java
new file mode 100644
index 0000000000..19f1632be0
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java
@@ -0,0 +1,36 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSubGridResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String name;
+
+ /**
+ * 不同类型对应数据
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..b2b5c7d39b
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java
@@ -0,0 +1,35 @@
+package com.epmet.project.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSummaryInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String name;
+
+ /**
+ * 类型对应数量
+ */
+ private Integer value;
+
+ /**
+ * 类型对应百分比(10% 10.1% 10.01%小数点后两位)
+ */
+ @JsonIgnore
+ private BigDecimal ratioInt;
+ private String ratio;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java
new file mode 100644
index 0000000000..220780be29
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java
@@ -0,0 +1,56 @@
+package com.epmet.project.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-汇总数据-接口返参
+ **/
+@Data
+public class ProjectSummaryResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 项目总数
+ */
+ private Integer projectTotal;
+
+ /**
+ * 更新日期
+ */
+ private String dateName;
+
+ /**
+ * 处理中总数
+ */
+ private Integer pendingTotal;
+
+ /**
+ * 处理中占比
+ */
+ @JsonIgnore
+ private BigDecimal pendingRatioInt;
+ private String pendingRatio;
+
+ /**
+ * 已结案总数
+ */
+ private Integer closedTotal;
+
+ /**
+ * 已结案占比
+ */
+ @JsonIgnore
+ private BigDecimal closedRatioInt;
+ private String closedRatio;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java
new file mode 100644
index 0000000000..8b52307d91
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java
@@ -0,0 +1,29 @@
+package com.epmet.publicity.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author jyy
+ * @CreateTime 2020/6/22 12:07
+ */
+@Data
+public class TagFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1788937450915240575L;
+
+ public interface GroupJava {}
+
+ /**
+ * 获取数据条数;默认为10
+ */
+ private Integer pageSize;
+
+ /**
+ * 时间查询维度;日:date;月:month;季:quarter;年:year
+ */
+ @NotBlank(message = "type不能为空", groups = {GroupJava.class})
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java
new file mode 100644
index 0000000000..9357d45f2d
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java
@@ -0,0 +1,61 @@
+/**
+ * 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.publicity.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 文章发表数量—下级机关统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Data
+public class FactPublishedAgencyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 机关名称
+ */
+ private String name;
+ /**
+ * 发文数量
+ */
+ private Integer value;
+
+ /**
+ * 固定值:文章数量
+ */
+ private String type="文章数量";
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 上级机关Id
+ */
+ private String pid;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java
new file mode 100644
index 0000000000..02eb3446a7
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java
@@ -0,0 +1,53 @@
+/**
+ * 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.publicity.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 文章发表数量—下级机关统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Data
+public class FactPublishedAgencyDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * 累计发文总数
+ */
+ private Integer publishedTotal;
+
+ /**
+ * 发布中的文章总数
+ */
+ private Integer publishingTotal;
+
+ /**
+ * 数据截止日期
+ */
+ private String dateName;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java
new file mode 100644
index 0000000000..11aa1e2cea
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java
@@ -0,0 +1,62 @@
+/**
+ * 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.publicity.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 文章发表数量—直属部门统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Data
+public class FactPublishedDepartmentDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 部门名称
+ */
+ private String name;
+
+ /**
+ * 发文数量
+ */
+ private Integer value;
+
+ /**
+ * 固定值:文章数量
+ */
+ private String type="文章数量";
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 部门Id
+ */
+ private String departmentId;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java
new file mode 100644
index 0000000000..909deb2ba4
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java
@@ -0,0 +1,62 @@
+/**
+ * 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.publicity.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 文章发表数量—直属部门统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Data
+public class FactPublishedGridDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 网格名称
+ */
+ private String name;
+
+ /**
+ * 发文数量
+ */
+ private Integer value;
+
+ /**
+ * 固定值:文章数量
+ */
+ private String type="文章数量";
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 网格Id
+ */
+ private String gridId;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java
new file mode 100644
index 0000000000..1d91a3287a
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java
@@ -0,0 +1,63 @@
+/**
+ * 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.publicity.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 文章引用标签阅读数量【机关】统计表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Data
+public class FactTagAgencyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 标签名称 标签名称
+ */
+ private String name;
+
+ /**
+ * 使用改标签的数量
+ */
+ private Integer value;
+
+ /**
+ * 固定值:文章数量
+ */
+ private String type="文章数量";
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 标签Id
+ */
+ private String tagId;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java
new file mode 100644
index 0000000000..62c27f4b55
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java
@@ -0,0 +1,30 @@
+package com.epmet.topic.constant;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 17:19
+ */
+public interface TopicConstant {
+
+ /**
+ * 讨论中
+ */
+ String DISCUSSING = "discussing";
+
+ /**
+ * 已屏蔽
+ */
+ String HIDDEN = "hidden";
+
+ /**
+ * 已关闭
+ */
+ String CLOSED = "closed";
+
+ String RATIO = "%";
+
+ String SHIFTED = "已转议题";
+
+ String MONTH = "month";
+ String DATE = "date";
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java
new file mode 100644
index 0000000000..2eecf2de34
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java
@@ -0,0 +1,24 @@
+package com.epmet.topic.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:24
+ */
+@Data
+public class TopicIncrTrendFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -4929038359220814068L;
+
+ public interface TopicIncr{}
+
+ /**
+ * 类型 month:代表月 date:代表日
+ */
+ @NotBlank(message = "month / date 类型不能为空",groups = {TopicIncr.class})
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java
new file mode 100644
index 0000000000..24e3eae7bc
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:09
+ */
+@Data
+public class TopicIncrTrendResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 6905657684644153197L;
+
+ /**
+ * 日期
+ */
+ private String date;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 类型
+ */
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java
new file mode 100644
index 0000000000..99b84d913f
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 17:32
+ */
+@Data
+public class TopicShiftedCountResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -7470748727678087785L;
+
+ /**
+ * 已转议题数量
+ */
+ private Integer shiftedIssueCount;
+
+ /**
+ * 数据更新至 时间
+ */
+ private String deadline;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java
new file mode 100644
index 0000000000..c22ebd7176
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 17:10
+ */
+@Data
+public class TopicStatusResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6461755954651271901L;
+
+ /**
+ * 话题数量
+ */
+ private Integer topicCount;
+
+ /**
+ * 话题状态 已关闭:closed、已屏蔽:hidden、 讨论中:discussing
+ */
+ private String topicStatus;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java
new file mode 100644
index 0000000000..87dd107010
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java
@@ -0,0 +1,35 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:13
+ */
+@Data
+public class TopicSubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 70586943923355457L;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 类型
+ */
+ private String type;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java
new file mode 100644
index 0000000000..64cad1615c
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java
@@ -0,0 +1,35 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:13
+ */
+@Data
+public class TopicSubGridResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -7251687622455341118L;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 类型
+ */
+ private String type;
+
+ /**
+ * 网格Id
+ */
+ private String gridId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..3112df3356
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:14
+ */
+@Data
+public class TopicSummaryInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1103298182001744033L;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 值
+ */
+ private Integer value;
+
+ /**
+ * 百分比
+ */
+ private String ratio;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java
new file mode 100644
index 0000000000..6f14a45fd5
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java
@@ -0,0 +1,45 @@
+package com.epmet.topic.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 16:04
+ */
+@Data
+public class TopicSummaryResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6051892596892952025L;
+
+ /**
+ * 话题总数
+ */
+ private Integer topicTotalCount;
+
+ /**
+ * 讨论中话题数量
+ */
+ private Integer talkingTotalCount;
+
+ /**
+ * 已关闭话题数量
+ */
+ private Integer closedTotalCount;
+
+ /**
+ * 已屏蔽话题数量
+ */
+ private Integer shieldedTotalCount;
+
+ /**
+ * 话题已转议题数量
+ */
+ private Integer shiftedTotalCount;
+
+ /**
+ * 数据更新至 时间
+ */
+ private String deadline;
+}
diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
index f2b8960a42..e2981ef533 100644
--- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
+++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
@@ -9,9 +9,9 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
- RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
+ RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
deploy:
resources:
limits:
cpus: '0.1'
- memory: 250M
\ No newline at end of file
+ memory: 300M
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
index 5181a184da..3c34b09319 100644
--- a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
+++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
@@ -1,7 +1,7 @@
version: "3.7"
services:
data-report-server:
- container_name: data-report-server-dev
+ container_name: data-report-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.1
ports:
- "8108:8108"
@@ -9,9 +9,9 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
- RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar"
+ RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
deploy:
resources:
limits:
cpus: '0.1'
- memory: 400M
\ No newline at end of file
+ memory: 300M
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml
index b8c65eda08..9ae8ec1dc4 100644
--- a/epmet-module/data-report/data-report-server/pom.xml
+++ b/epmet-module/data-report/data-report-server/pom.xml
@@ -24,6 +24,11 @@
epmet-commons-mybatis
2.0.0
+
+ com.epmet
+ epmet-user-client
+ 2.0.0
+
org.springframework.boot
spring-boot-starter-web
@@ -102,12 +107,12 @@
0
- 118.190.150.119
- 47379
+ 192.168.1.130
+ 6379
123456
- false
+ true
122.152.200.70:8848
fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
index dced5aa566..cee0ed9096 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
@@ -2,8 +2,14 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
+@EnableDiscoveryClient
+@EnableFeignClients
+@EnableAsync
public class DataReportApplication {
public static void main(String[] args) {
SpringApplication.run(DataReportApplication.class, args);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
new file mode 100644
index 0000000000..7d4ff2d7d4
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
@@ -0,0 +1,40 @@
+package com.epmet.aspect;
+
+import com.epmet.commons.tools.aspect.BaseRequestLogAspect;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。
+ */
+@Aspect
+@Component
+@Order(0)
+public class RequestLogAspect extends BaseRequestLogAspect {
+
+ @Override
+ @Around(value = "execution(* com.epmet.controller.*.*Controller*.*(..)) ")
+ public Object proceed(ProceedingJoinPoint point) throws Throwable {
+ return super.proceed(point, getRequest());
+ }
+
+ /**
+ * 获取Request对象
+ *
+ * @return
+ */
+ private HttpServletRequest getRequest() {
+ RequestAttributes ra = RequestContextHolder.getRequestAttributes();
+ ServletRequestAttributes sra = (ServletRequestAttributes) ra;
+ return sra.getRequest();
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java
new file mode 100644
index 0000000000..88dd3bb376
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java
@@ -0,0 +1,74 @@
+package com.epmet.module.group.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.group.dto.form.GroupIncrTrendFormDTO;
+import com.epmet.group.dto.result.GroupIncrTrendResultDTO;
+import com.epmet.group.dto.result.GroupSubAgencyResultDTO;
+import com.epmet.group.dto.result.GroupSubGridResultDTO;
+import com.epmet.group.dto.result.GroupSummaryInfoResultDTO;
+import com.epmet.service.group.GroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 10:54
+ */
+@RestController
+@RequestMapping("group")
+public class GroupController {
+
+ @Autowired
+ private GroupService groupService;
+
+ /**
+ * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("summaryinfo")
+ public Result summaryInfo(@LoginUser TokenDto tokenDto){
+ return new Result().ok(groupService.summaryInfo(tokenDto));
+ }
+
+ /**
+ * @Description 网格小组——下级机关小组数柱状图
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("subagency")
+ public Result> subAgency(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(groupService.subAgency(tokenDto));
+ }
+
+ /**
+ * @Description 网格小组——直属网格小组数
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("subgrid")
+ public Result> subGrid(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(groupService.subGrid(tokenDto));
+ }
+
+ /**
+ * @Description 网格小组——小组分析
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("incrtrend")
+ public Result> IncrTrend(@LoginUser TokenDto tokenDto, @RequestBody GroupIncrTrendFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, GroupIncrTrendFormDTO.GroupJava.class);
+ return new Result>().ok(groupService.IncrTrend(tokenDto,formDTO));
+ }
+
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java
new file mode 100644
index 0000000000..c9fad20ce2
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java
@@ -0,0 +1,95 @@
+package com.epmet.controller.issue;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.issue.dto.form.IssueIncrtrendFormDTO;
+import com.epmet.issue.dto.result.*;
+import com.epmet.service.issue.IssueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 13:47
+ */
+@RestController
+@RequestMapping("issue")
+public class IssueController {
+ @Autowired
+ private IssueService issueService;
+
+ /**
+ * 数据汇总
+ *
+ * @param tokenDto
+ * @return com.epmet.commons.tools.utils.Result
+ * @author zhaoqifeng
+ * @date 2020/6/22 17:31
+ */
+ @PostMapping("summaryinfo")
+ public Result getSummaryInfo(@LoginUser TokenDto tokenDto) {
+ return new Result().ok(issueService.getSummaryInfo(tokenDto));
+ }
+
+ /**
+ * 数据汇总饼状图
+ *
+ * @param tokenDto
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author zhaoqifeng
+ * @date 2020/6/22 17:31
+ */
+ @PostMapping("summarypie")
+ public Result> getSummaryPie(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(issueService.getSummaryPie(tokenDto));
+ }
+
+ /**
+ * 下级机关议题统计
+ *
+ * @param tokenDto
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author zhaoqifeng
+ * @date 2020/6/22 17:31
+ */
+ @PostMapping("subagency")
+ public Result> getSubAgency(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(issueService.getSubAgency(tokenDto));
+ }
+
+ /**
+ * 网格议题统计
+ *
+ * @param tokenDto
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author zhaoqifeng
+ * @date 2020/6/22 17:31
+ */
+ @PostMapping("subgrid")
+ public Result> getSubGrid(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(issueService.getSubGrid(tokenDto));
+ }
+
+ /**
+ * 议题分析
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author zhaoqifeng
+ * @date 2020/6/22 17:31
+ */
+ @PostMapping("incrtrend")
+ public Result> getIncrtrend(@LoginUser TokenDto tokenDto, @RequestBody IssueIncrtrendFormDTO formDTO) {
+ return new Result>().ok(issueService.getIncrtrend(tokenDto, formDTO));
+ }
+
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java
new file mode 100644
index 0000000000..5a96496ef6
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java
@@ -0,0 +1,81 @@
+package com.epmet.module.project.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.module.project.service.ProjectService;
+import com.epmet.project.constant.ProjectConstant;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@RestController
+@RequestMapping("project")
+public class ProjectController {
+
+ @Autowired
+ private ProjectService projectService;
+
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ @PostMapping("projectsummary")
+ public Result projectSummary(@LoginUser TokenDto tokenDto) {
+ return new Result().ok(projectService.getProjectSummary(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ @PostMapping("summaryinfo")
+ public Result> summaryInfo(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSummaryInfo(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ @PostMapping("subagency")
+ public Result> subAgency(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSubAgency(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ @PostMapping("subgrid")
+ public Result> subGrid(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSubGrid(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询
+ **/
+ @PostMapping("incrtrend")
+ public Result> incrTrend(@LoginUser TokenDto tokenDto, @RequestBody ProjectIncrTrendFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, ProjectIncrTrendFormDTO.ProjectIncr.class);
+ if (!ProjectConstant.DATE.equals(formDTO.getType()) && !ProjectConstant.MONTH.equals(formDTO.getType())) {
+ throw new RenException(ProjectConstant.TYPE_EXCEPTION);
+ }
+ return new Result>().ok(projectService.getProjectIncrTrend(tokenDto, formDTO));
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java
new file mode 100644
index 0000000000..56d31b9d17
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java
@@ -0,0 +1,132 @@
+/**
+ * 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.controller.publicity;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.publicity.dto.form.TagFormDTO;
+import com.epmet.publicity.dto.result.*;
+import com.epmet.service.publicity.PublicityService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 文章发布数量【机关】日统计表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@RestController
+@RequestMapping("publicity")
+public class PublicityController {
+
+
+ @Autowired
+ private PublicityService publicityService;//
+
+
+ /**
+ * @return
+ * @Author jyy
+ * @Description 宣传能力—工作端—当前机关累计发文和当前发文
+ **/
+ @PostMapping("summaryinfo")
+ public Result summaryInfo(@LoginUser TokenDto tokenDto) {
+ return new Result().ok(publicityService.summaryInfo(tokenDto));
+ }
+
+ /**
+ * @param tokenDto
+ * @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据
+ * @author jyy
+ */
+ @PostMapping("tagviewed")
+ public Result> tagviewed(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class);
+
+ Integer pageSize = formDTO.getPageSize();
+ if (pageSize == null) {
+ pageSize = NumConstant.TEN;
+ }
+ String type = formDTO.getType();
+ return new Result>().ok(publicityService.tagviewed(tokenDto, pageSize, type));
+ }
+
+ /**
+ * @param tokenDto
+ * @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据
+ * @author jyy
+ */
+ @PostMapping("tagused")
+ public Result> tagused(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class);
+
+ Integer pageSize = formDTO.getPageSize();
+ if (pageSize == null) {
+ pageSize = NumConstant.TEN;
+ }
+ String type = formDTO.getType();
+ return new Result>().ok(publicityService.tagused(tokenDto, pageSize, type));
+ }
+
+ /**
+ * @param tokenDto 登录者token
+ * @Description 获取下级机关发文数
+ * @author jyy
+ */
+ @PostMapping("subagency/publishedarticle")
+ public Result> subagencyPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class);
+ String type = formDTO.getType();
+ return new Result>().ok(publicityService.subagencyPublishedarticle(tokenDto, type));
+ }
+
+ /**
+ * @param tokenDto 登录者token
+ * @Description 获取直属部门发文数
+ * @author jyy
+ */
+ @PostMapping("department/publishedarticle")
+ public Result> departmentPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class);
+ String type = formDTO.getType();
+ return new Result>().ok(publicityService.departmentPublishedarticle(tokenDto, type));
+ }
+
+ /**
+ * @param tokenDto 登录者token
+ * @Description 获取指数网格发文数
+ * @author jyy
+ */
+ @PostMapping("subgrid/publishedarticle")
+ public Result> subgridPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class);
+ String type = formDTO.getType();
+ return new Result>().ok(publicityService.subgridPublishedarticle(tokenDto, type));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java
new file mode 100644
index 0000000000..233f31dc27
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java
@@ -0,0 +1,81 @@
+package com.epmet.controller.topic;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.service.topic.TopicService;
+import com.epmet.topic.dto.form.TopicIncrTrendFormDTO;
+import com.epmet.topic.dto.result.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 15:55
+ */
+@RestController
+@RequestMapping("topic")
+public class TopicController {
+
+ @Autowired
+ private TopicService topicService;
+
+ /**
+ * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("topicsummary")
+ public Result topicSummary(@LoginUser TokenDto tokenDto){
+ return new Result().ok(topicService.topicSummary(tokenDto));
+ }
+
+ /**
+ * @Description 话题——话题分析
+ * @param tokenDto
+ * @param formDTO
+ * @author zxc
+ */
+ @PostMapping("incrtrend")
+ public Result> topicIncrTrend(@LoginUser TokenDto tokenDto, @RequestBody TopicIncrTrendFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, TopicIncrTrendFormDTO.TopicIncr.class);
+ return new Result>().ok(topicService.topicIncrTrend(tokenDto,formDTO));
+ }
+
+ /**
+ * @Description 话题——直属网格话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("subgrid")
+ public Result> topicSubGrid(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(topicService.topicSubGrid(tokenDto));
+ }
+
+ /**
+ * @Description 话题——下级机关话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("subagency")
+ public Result> topicSubAgency(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(topicService.topicSubAgency(tokenDto));
+ }
+
+ /**
+ * @Description 话题——话题分析表
+ * @param tokenDto
+ * @author zxc
+ */
+ @PostMapping("summaryinfo")
+ public Result> topicSummaryInfo(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(topicService.topicSummaryInfo(tokenDto));
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java
new file mode 100644
index 0000000000..da00a281d0
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java
@@ -0,0 +1,90 @@
+package com.epmet.controller.user;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.form.user.UserIncrTrendFormDTO;
+import com.epmet.dto.form.user.UserSubAgencyFormDTO;
+import com.epmet.dto.form.user.UserSubGridFormDTO;
+import com.epmet.dto.form.user.UserSummaryInfoFormDTO;
+import com.epmet.dto.result.user.UserIncrTrendResultDTO;
+import com.epmet.dto.result.user.UserSubAgencyResultDTO;
+import com.epmet.dto.result.user.UserSubGridResultDTO;
+import com.epmet.dto.result.user.UserSummaryInfoResultDTO;
+import com.epmet.service.user.UserAnalysisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 组织能力用户相关接口入口
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 13:22
+ */
+@RestController
+@RequestMapping("user")
+public class UserAnalysisController {
+ @Autowired
+ private UserAnalysisService userService;
+
+ /**
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 用户汇总信息查询
+ * @Date 2020/6/22 13:27
+ **/
+ @PostMapping("summaryinfo")
+ public Result summaryInfo(@RequestBody UserSummaryInfoFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ UserSummaryInfoResultDTO userSummaryInfoResultDTO = userService.summaryInfo(formDTO);
+ return new Result().ok(userSummaryInfoResultDTO);
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 直属机关柱状图查询
+ * @Date 2020/6/22 13:30
+ **/
+ @PostMapping("subagency")
+ public Result> subAgency(@RequestBody UserSubAgencyFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ List userSubAgencyResultDTO = userService.subAgency(formDTO);
+ return new Result>().ok(userSubAgencyResultDTO);
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 直属网格柱状图查询
+ * @Date 2020/6/22 13:33
+ **/
+ @PostMapping("subgrid")
+ public Result> subGrid(@RequestBody UserSubGridFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ List userSubGridResultDTO = userService.subGrid(formDTO);
+ return new Result>().ok(userSubGridResultDTO);
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 按日、按月查询注册用户数(参与用户数)增量折线图
+ * @Date 2020/6/22 13:36
+ **/
+ @PostMapping("incrtrend")
+ public Result> incrTrend(@RequestBody UserIncrTrendFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ List userIncrTrendResultDTO = userService.incrTrend(formDTO);
+ return new Result>().ok(userIncrTrendResultDTO);
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java
new file mode 100644
index 0000000000..0f22c81d2b
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java
@@ -0,0 +1,58 @@
+package com.epmet.dao.group;
+
+import com.epmet.group.dto.result.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 10:55
+ */
+@Mapper
+public interface GroupDao {
+
+ /**
+ * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数
+ * @param
+ * @author zxc
+ */
+ GroupSummaryInfoResultDTO summaryInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 获取下级机关信息
+ * @param agencyId
+ * @author zxc
+ */
+ List getSubAgencyList(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 获取下级机关的小组数
+ * @param
+ * @author zxc
+ */
+ List getSubGroupCount();
+
+ /**
+ * @Description 获取直属网格下的小组数
+ * @param agencyId
+ * @author zxc
+ */
+ List getSubGridGroupCount(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 小组数量 日增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getIncrDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 小组数量 月增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getIncrMonthly(@Param("agencyId") String agencyId);
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java
new file mode 100644
index 0000000000..f8f3058673
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java
@@ -0,0 +1,60 @@
+package com.epmet.dao.issue;
+
+import com.epmet.issue.dto.result.IssueDataDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 13:48
+ */
+@Mapper
+public interface IssueDao {
+ /**
+ * 获取当前机关统计信息
+ * @author zhaoqifeng
+ * @date 2020/6/22 15:19
+ * @param agencyId
+ * @return com.epmet.issue.dto.result.IssueDataDTO
+ */
+ IssueDataDTO selectAgencyInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * 获取下级机关统计信息
+ * @author zhaoqifeng
+ * @date 2020/6/22 15:20
+ * @param agencyId
+ * @return java.util.List
+ */
+ List selectSubAgencyList(@Param("agencyId") String agencyId);
+
+ /**
+ * 获取机关下网格统计信息
+ * @author zhaoqifeng
+ * @date 2020/6/22 15:21
+ * @param agencyId
+ * @return java.util.List
+ */
+ List selectGridList(@Param("agencyId") String agencyId);
+
+ /**
+ * 获取当前机关日增量
+ * @author zhaoqifeng
+ * @date 2020/6/22 15:22
+ * @param agencyId
+ * @return java.util.List
+ */
+ List selectAgencyIncDailyList(@Param("agencyId") String agencyId);
+
+ /**
+ * 获取当前机关月增量
+ * @author zhaoqifeng
+ * @date 2020/6/22 15:23
+ * @param agencyId
+ * @return java.util.List
+ */
+ List selectAgencyIncMonthlyList(@Param("agencyId") String agencyId);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java
new file mode 100644
index 0000000000..3ae53720f7
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java
@@ -0,0 +1,58 @@
+package com.epmet.dao.project;
+
+import com.epmet.project.dto.FactAgencyProjectDailyDTO;
+import com.epmet.project.dto.result.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@Mapper
+public interface ProjectDao {
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ ProjectSummaryResultDTO selectProjectSummary(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ List selectSummaryInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 查询组织最近日期的日统计数据
+ **/
+ FactAgencyProjectDailyDTO selectAgencyProjectDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取最近日期下级组织柱状图数据(按项目总量降序)
+ **/
+ List selectSubAgency(FactAgencyProjectDailyDTO agencyProjectDailyDTO);
+
+ /**
+ * @Author sun
+ * @Description 查询机关下直属网格最近一天的日统计数据,按项目总数降序
+ **/
+ List selectSubGrid(FactAgencyProjectDailyDTO agencyProjectDailyDTO);
+
+ /**
+ * @Author sun
+ * @Description 查询机关日统计近九十天数据
+ **/
+ List selectIncrTrendDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 查询机关月统计近十二个月数据
+ **/
+ List selectIncrTrendMonthly(@Param("agencyId") String agencyId);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java
new file mode 100644
index 0000000000..33801156b9
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java
@@ -0,0 +1,145 @@
+/**
+ * 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.dao.publicity;
+
+import com.epmet.publicity.dto.result.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 文章发布数量【机关】日统计表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Mapper
+public interface PublicityDao {
+
+ /**
+ * @Description 宣传能力—工作端—当前机关累计发文和当前发文
+ * @param agencyId 机关id
+ * @author jyy
+ */
+ FactPublishedAgencyDailyDTO summaryInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 当月———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个
+ * @param agencyId,monthId,pageSize 机关id,月,展示数量
+ * @author zxc
+ */
+ List getViewedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当季———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个
+ * @param agencyId,quarterId,pageSize 机关id,季,展示数量
+ * @author zxc
+ */
+ List getViewedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当年———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个
+ * @param agencyId,yearId,pageSize 机关id,年,展示数量
+ * @author zxc
+ */
+ List getViewedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当月———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个
+ * @param agencyId,monthId,pageSize 机关id,月,展示数量
+ * @author zxc
+ */
+ List getUsedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当季———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个
+ * @param agencyId,quarterId,pageSize 机关id,季,展示数量
+ * @author zxc
+ */
+ List getUsedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当年———获取机关下,每个标签发文数量,按照数量降序,取前pagesize个
+ * @param agencyId,yearId,pageSize 机关id,年,展示数量
+ * @author zxc
+ */
+ List getUsedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize);
+
+ /**
+ * @Description 当月———下级机发文数
+ * @param agencyId,monthId 机关id,月
+ * @author zxc
+ */
+ List getSubAgencyPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
+
+ /**
+ * @Description 当季———下级机发文数
+ * @param agencyId,quarterId 机关id,季度
+ * @author zxc
+ */
+ List getSubAgencyPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId);
+ /**
+ * @Description 当年———下级机发文数
+ * @param agencyId,yearId 机关id,年
+ * @author zxc
+ */
+ List getSubAgencyPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId);
+
+ /**
+ * @Description 当月———下级部门文数
+ * @param agencyId,monthId 机关id,月
+ * @author zxc
+ */
+ List getSubDepartPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
+
+ /**
+ * @Description 当季———下级部门文数
+ * @param agencyId,quarterId 机关id,季度
+ * @author zxc
+ */
+ List getSubDepartPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId);
+ /**
+ * @Description 当年———下级部门文数
+ * @param agencyId,yearId 机关id,年
+ * @author zxc
+ */
+ List getSubDepartPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId);
+
+ /**
+ * @Description 当月———下级网格文数
+ * @param agencyId,monthId 机关id,月
+ * @author zxc
+ */
+ List getSubGridPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
+
+ /**
+ * @Description 当季———下级网格文数
+ * @param agencyId,quarterId 机关id,季度
+ * @author zxc
+ */
+ List getSubGridPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId);
+ /**
+ * @Description 当年———下级网格文数
+ * @param agencyId,yearId 机关id,年
+ * @author zxc
+ */
+ List getSubGridPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId);
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java
new file mode 100644
index 0000000000..e45798d750
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java
@@ -0,0 +1,108 @@
+package com.epmet.dao.topic;
+
+import com.epmet.group.dto.result.GroupIncrTrendResultDTO;
+import com.epmet.topic.dto.result.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 15:55
+ */
+@Mapper
+public interface TopicDao {
+
+ /**
+ * @Description 获取话题数量及状态
+ * @param agencyId
+ * @author zxc
+ */
+ List getTopicStatus(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 获取机关下已转议题数量
+ * @param agencyId
+ * @author zxc
+ */
+ TopicShiftedCountResultDTO getShiftedCount(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 获取话题信息(状态,数量,百分比)
+ * @param agencyId
+ * @author zxc
+ */
+ List topicSummaryInfo(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 根据当前机关判断是否有下级机关
+ * @param agencyId
+ * @author zxc
+ */
+ List getSubAgencyIdList(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 获取最后一天的所有话题数据 【fact_topic_status_agency_daily】
+ * @param
+ * @author zxc
+ */
+ List getAllTopicInfoLastDay();
+
+ /**
+ * @Description 获取最后一天的所有话题已转议题数据
+ * @param
+ * @author zxc
+ */
+ List getAllTopicShiftedInfoLastDay();
+
+ /**
+ * @Description 校验机关下是否存在直属网格
+ * @param agencyId
+ * @author zxc
+ */
+ List getSubGridIdList(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 获取最后一天的所有话题数据 【fact_topic_status_grid_daily】【grid】
+ * @param
+ * @author zxc
+ */
+ List getGridAllTopicInfoLastDay();
+
+ /**
+ * @Description 获取最后一天的所有话题已转议题数据【grid】
+ * @param
+ * @author zxc
+ */
+ List getGridAllTopicShiftedInfoLastDay();
+
+ /**
+ * @Description 话题日增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getTopicIncrDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 话题转议题日增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getTopicShiftedIncrDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 话题月增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getTopicIncrMonthly(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 话题转议题月增长
+ * @param agencyId
+ * @author zxc
+ */
+ List getTopicShiftedIncrMonthly(@Param("agencyId") String agencyId);
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java
new file mode 100644
index 0000000000..feba486e41
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java
@@ -0,0 +1,135 @@
+package com.epmet.dao.user;
+
+
+import com.epmet.dto.DimAgencyDTO;
+import com.epmet.dto.DimGridDTO;
+import com.epmet.dto.result.user.UserIncrTrendResDTO;
+import com.epmet.dto.result.user.UserSubAgencyResDTO;
+import com.epmet.dto.result.user.UserSubGridResDTO;
+import com.epmet.dto.result.user.UserSummaryInfoResultDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 16:33
+ */
+@Mapper
+public interface UserAnalysisDao {
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description 根据机关id,查询它下一级机关列表
+ * @Date 2020/6/22 22:42
+ **/
+ List selectSubAgencyList(String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description 根据机关id,查询它下面的直属网格列表
+ * @Date 2020/6/22 23:51
+ **/
+ List selectSubGridList(String myAgencyId);
+
+ /**
+ * @param myAgencyId
+ * @return com.epmet.user.result.UserSummaryInfoResultDTO
+ * @author yinzuomei
+ * @description 查询注册用户汇总信息
+ * @Date 2020/6/22 16:52
+ **/
+ UserSummaryInfoResultDTO selectRegUserSummaryInfo(String myAgencyId);
+
+ /**
+ * @param myAgencyId
+ * @return com.epmet.user.result.UserSummaryInfoResultDTO
+ * @author yinzuomei
+ * @description 查询注册用户的汇总信息
+ * @Date 2020/6/22 16:52
+ **/
+ UserSummaryInfoResultDTO selectParticipationUserSummaryInfo(String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param dateId 20200618日期
+ * @param agencyId 用户所属机关
+ * @author yinzuomei
+ * @description 参与用户:子级机关用户分析,按日(date_id)查询
+ * @Date 2020/6/22 21:51
+ **/
+ List selectParticipationSubAgencyRes(@Param("dateId") String dateId ,@Param("agencyId")String agencyId);
+
+ /**
+ * @param dateId
+ * @param dateId 20200618日期
+ * @param agencyId 用户所属机关id
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 注册用户:子级机关用户分析,按日(date_id)查询
+ * @Date 2020/6/22 22:38
+ **/
+ List selectRegSubAgencyRes(@Param("dateId") String dateId ,@Param("agencyId")String agencyId);
+
+ /**
+ * @param dateId 20200618日期
+ * @param agencyId 用户所属机关id
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 参与用户:机关下,直属网格用户分析
+ * @Date 2020/6/23 0:18
+ **/
+ List selectParticipationSubGridRes(@Param("dateId") String dateId, @Param("agencyId") String agencyId);
+
+ /**
+ * @param dateId 20200618日期
+ * @param agencyId 用户所属机关id
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 注册用户:机关下,直属网格用户分析
+ * @Date 2020/6/23 0:18
+ **/
+ List selectRegSubGridRes(@Param("dateId")String dateId, @Param("agencyId") String agencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description
+ * @Date 2020/6/23 11:24
+ **/
+ List selectRegDayIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description
+ * @Date 2020/6/23 11:24
+ **/
+ List selectRegMonthIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description
+ * @Date 2020/6/23 11:24
+ **/
+ List selectParticipationUserDayIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description
+ * @Date 2020/6/23 11:24
+ **/
+ List selectParticipationUserMonthIncr(@Param("agencyId") String myAgencyId);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java
new file mode 100644
index 0000000000..d644029bcf
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java
@@ -0,0 +1,45 @@
+package com.epmet.service.group;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.group.dto.form.GroupIncrTrendFormDTO;
+import com.epmet.group.dto.result.GroupIncrTrendResultDTO;
+import com.epmet.group.dto.result.GroupSubAgencyResultDTO;
+import com.epmet.group.dto.result.GroupSubGridResultDTO;
+import com.epmet.group.dto.result.GroupSummaryInfoResultDTO;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 10:55
+ */
+public interface GroupService {
+
+ /**
+ * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数
+ * @param tokenDto
+ * @author zxc
+ */
+ GroupSummaryInfoResultDTO summaryInfo(TokenDto tokenDto);
+
+ /**
+ * @Description 网格小组——下级机关小组数柱状图
+ * @param tokenDto
+ * @author zxc
+ */
+ List subAgency(TokenDto tokenDto);
+
+ /**
+ * @Description 网格小组——直属网格小组数
+ * @param tokenDto
+ * @author zxc
+ */
+ List subGrid(TokenDto tokenDto);
+
+ /**
+ * @Description 网格小组——小组分析
+ * @param tokenDto
+ * @author zxc
+ */
+ List IncrTrend(TokenDto tokenDto, GroupIncrTrendFormDTO formDTO);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java
new file mode 100644
index 0000000000..80a5624e3b
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java
@@ -0,0 +1,107 @@
+package com.epmet.service.group.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dao.group.GroupDao;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.group.constant.GroupConstant;
+import com.epmet.group.dto.form.GroupIncrTrendFormDTO;
+import com.epmet.group.dto.result.*;
+import com.epmet.service.group.GroupService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 10:56
+ */
+@Service
+public class GroupServiceImpl implements GroupService {
+
+ @Autowired
+ private GroupDao groupDao;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public GroupSummaryInfoResultDTO summaryInfo(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ return groupDao.summaryInfo(agencyId);
+ }
+
+ /**
+ * @Description 网格小组——下级机关小组数柱状图
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List subAgency(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List result = new ArrayList<>();
+ List subAgencyList = groupDao.getSubAgencyList(agencyId);
+ List subGroupCount = groupDao.getSubGroupCount();
+ if (subAgencyList.size()!= NumConstant.ZERO){
+ subGroupCount.forEach(group -> {
+ subAgencyList.forEach(subAgency -> {
+ if (subAgency.getAgencyId().equals(group.getAgencyId())){
+ group.setName(subAgency.getAgencyName());
+ result.add(group);
+ }
+ });
+ });
+ return result;
+ }
+ return new ArrayList<>();
+ }
+
+ /**
+ * @Description 网格小组——直属网格小组数
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List subGrid(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ return groupDao.getSubGridGroupCount(agencyId);
+ }
+
+ /**
+ * @Description 网格小组——小组分析
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List IncrTrend(TokenDto tokenDto, GroupIncrTrendFormDTO formDTO) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List result = new ArrayList<>();
+ if (formDTO.getType().equals(GroupConstant.DATE)){
+ result = groupDao.getIncrDaily(agencyId);
+ }else {
+ result = groupDao.getIncrMonthly(agencyId);
+ }
+ return result;
+ }
+
+ /**
+ * @Description 获取机关ID
+ * @param tokenDto
+ * @author zxc
+ */
+ public String getLoginUserDetails(TokenDto tokenDto){
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ BeanUtils.copyProperties(tokenDto,dto);
+ LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();
+ return data.getAgencyId();
+ }
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java
new file mode 100644
index 0000000000..c0d33b2a3b
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java
@@ -0,0 +1,65 @@
+package com.epmet.service.issue;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.issue.dto.form.IssueIncrtrendFormDTO;
+import com.epmet.issue.dto.result.*;
+
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 13:48
+ */
+public interface IssueService {
+ /**
+ * 议题汇总
+ *
+ * @param tokenDto
+ * @return com.epmet.issue.dto.result.IssueSummaryInfoResultDTO
+ * @author zhaoqifeng
+ * @date 2020/6/22 16:40
+ */
+ IssueSummaryInfoResultDTO getSummaryInfo(TokenDto tokenDto);
+
+ /**
+ * 议题汇总饼状图
+ *
+ * @param tokenDto
+ * @return com.epmet.issue.dto.result.IssueSummaryPieResultDTO
+ * @author zhaoqifeng
+ * @date 2020/6/22 16:40
+ */
+ List getSummaryPie(TokenDto tokenDto);
+
+ /**
+ * 下级机关
+ *
+ * @param tokenDto
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2020/6/22 16:40
+ */
+ List getSubAgency(TokenDto tokenDto);
+
+ /**
+ * 网格
+ *
+ * @param tokenDto
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2020/6/22 16:41
+ */
+ List getSubGrid(TokenDto tokenDto);
+
+ /**
+ * 议题分析
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2020/6/22 16:41
+ */
+ List getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java
new file mode 100644
index 0000000000..4271cbe29e
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java
@@ -0,0 +1,176 @@
+package com.epmet.service.issue.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dao.issue.IssueDao;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.issue.constant.IssueConstant;
+import com.epmet.issue.dto.form.IssueIncrtrendFormDTO;
+import com.epmet.issue.dto.result.*;
+import com.epmet.service.issue.IssueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/6/22 13:49
+ */
+@Service
+public class IssueServiceImpl implements IssueService {
+ @Autowired
+ private IssueDao issueDao;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Override
+ public IssueSummaryInfoResultDTO getSummaryInfo(TokenDto tokenDto) {
+ IssueSummaryInfoResultDTO result = new IssueSummaryInfoResultDTO();
+ String agencyId = getAgencyId(tokenDto);
+ IssueDataDTO data = issueDao.selectAgencyInfo(agencyId);
+ result.setAgencyId(agencyId);
+ result.setDateName(data.getDateName());
+ result.setIssueTotal(data.getIssueTotal());
+ result.setVotingTotal(data.getVotingTotal());
+ result.setShiftProjectTotal(data.getShiftProjectTotal());
+ result.setClosedTotal(data.getClosedTotal());
+ result.setVotingRatio(toRatio(data.getVotingPercent()));
+ result.setShiftProjectRatio(toRatio(data.getShiftProjectPercent()));
+ result.setClosedRatio(toRatio(data.getClosedPercent()));
+ return result;
+ }
+
+ @Override
+ public List getSummaryPie(TokenDto tokenDto) {
+ List list = new ArrayList<>();
+ String agencyId = getAgencyId(tokenDto);
+ IssueDataDTO data = issueDao.selectAgencyInfo(agencyId);
+ IssueSummaryPieResultDTO voting = new IssueSummaryPieResultDTO();
+ voting.setName(IssueConstant.VOTING_NAME);
+ voting.setValue(data.getVotingTotal());
+ voting.setRatio(toRatio(data.getVotingPercent()));
+ list.add(voting);
+ IssueSummaryPieResultDTO shift = new IssueSummaryPieResultDTO();
+ shift.setName(IssueConstant.SHIFT_NAME);
+ shift.setValue(data.getShiftProjectTotal());
+ shift.setRatio(toRatio(data.getShiftProjectPercent()));
+ list.add(shift);
+ IssueSummaryPieResultDTO closed = new IssueSummaryPieResultDTO();
+ closed.setName(IssueConstant.CLOSED_NAME);
+ closed.setValue(data.getClosedTotal());
+ closed.setRatio(toRatio(data.getClosedPercent()));
+ list.add(closed);
+ return list;
+ }
+
+ @Override
+ public List getSubAgency(TokenDto tokenDto) {
+ List list = new ArrayList<>();
+ String agencyId = getAgencyId(tokenDto);
+ List dataList = issueDao.selectSubAgencyList(agencyId);
+ if(null != dataList) {
+ dataList.forEach(data -> {
+ IssueSubAgencyResultDTO voting = new IssueSubAgencyResultDTO();
+ voting.setAgencyId(data.getAgencyId());
+ voting.setName(data.getAgencyName());
+ voting.setType(IssueConstant.VOTING_NAME);
+ voting.setValue(data.getVotingTotal());
+ list.add(voting);
+ IssueSubAgencyResultDTO shift = new IssueSubAgencyResultDTO();
+ shift.setAgencyId(data.getAgencyId());
+ shift.setName(data.getAgencyName());
+ shift.setType(IssueConstant.SHIFT_NAME);
+ shift.setValue(data.getShiftProjectTotal());
+ list.add(shift);
+ IssueSubAgencyResultDTO closed = new IssueSubAgencyResultDTO();
+ closed.setAgencyId(data.getAgencyId());
+ closed.setName(data.getAgencyName());
+ closed.setType(IssueConstant.CLOSED_NAME);
+ closed.setValue(data.getClosedTotal());
+ list.add(closed);
+ });
+ }
+ return list;
+ }
+
+ @Override
+ public List getSubGrid(TokenDto tokenDto) {
+ List list = new ArrayList<>();
+ String agencyId = getAgencyId(tokenDto);
+ List dataList = issueDao.selectGridList(agencyId);
+ if(null != dataList) {
+ dataList.forEach(data -> {
+ IssueSubGridResultDTO voting = new IssueSubGridResultDTO();
+ voting.setName(data.getGridName());
+ voting.setType(IssueConstant.VOTING_NAME);
+ voting.setValue(data.getVotingTotal());
+ list.add(voting);
+ IssueSubGridResultDTO shift = new IssueSubGridResultDTO();
+ shift.setName(data.getGridName());
+ shift.setType(IssueConstant.SHIFT_NAME);
+ shift.setValue(data.getShiftProjectTotal());
+ list.add(shift);
+ IssueSubGridResultDTO closed = new IssueSubGridResultDTO();
+ closed.setName(data.getGridName());
+ closed.setType(IssueConstant.CLOSED_NAME);
+ closed.setValue(data.getClosedTotal());
+ list.add(closed);
+ });
+ }
+ return list;
+ }
+
+ @Override
+ public List getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO) {
+ List list = new ArrayList<>();
+ String agencyId = getAgencyId(tokenDto);
+ List dataList;
+ if (IssueConstant.DATE.equals(formDTO.getType())) {
+ dataList = issueDao.selectAgencyIncDailyList(agencyId);
+ } else {
+ dataList = issueDao.selectAgencyIncMonthlyList(agencyId);
+ }
+ if (null != dataList) {
+ dataList.forEach(data -> {
+ IssueIncrtrendResultDTO voting = new IssueIncrtrendResultDTO();
+ voting.setDate(data.getDateName());
+ voting.setType(IssueConstant.VOTING_NAME);
+ voting.setValue(data.getVotingIncr());
+ list.add(voting);
+ IssueIncrtrendResultDTO shift = new IssueIncrtrendResultDTO();
+ shift.setDate(data.getDateName());
+ shift.setType(IssueConstant.SHIFT_NAME);
+ shift.setValue(data.getShiftProjectIncr());
+ list.add(shift);
+ IssueIncrtrendResultDTO closed = new IssueIncrtrendResultDTO();
+ closed.setDate(data.getDateName());
+ closed.setType(IssueConstant.CLOSED_NAME);
+ closed.setValue(data.getClosedIncr());
+ list.add(closed);
+ });
+ }
+ return list;
+ }
+
+ private String getAgencyId(TokenDto tokenDto) {
+ LoginUserDetailsFormDTO loginUserDetailsFormDTO = new LoginUserDetailsFormDTO();
+ loginUserDetailsFormDTO.setApp(tokenDto.getApp());
+ loginUserDetailsFormDTO.setClient(tokenDto.getClient());
+ loginUserDetailsFormDTO.setUserId(tokenDto.getUserId());
+ LoginUserDetailsResultDTO userInfo = epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO).getData();
+ String[] orgIdPath = userInfo.getOrgIdPath().split(":");
+ return orgIdPath[orgIdPath.length - 1];
+ }
+
+ private String toRatio(BigDecimal data) {
+ BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED);
+ return data.multiply(hundred).setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString().concat("%");
+ }
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java
new file mode 100644
index 0000000000..baa6e664e0
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java
@@ -0,0 +1,44 @@
+package com.epmet.module.project.service;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+public interface ProjectService {
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ List getSummaryInfo(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ List getSubAgency(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ List getSubGrid(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询
+ **/
+ List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
new file mode 100644
index 0000000000..1d8871803d
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
@@ -0,0 +1,163 @@
+package com.epmet.service.project.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dao.project.ProjectDao;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.module.project.service.ProjectService;
+import com.epmet.project.constant.ProjectConstant;
+import com.epmet.project.dto.FactAgencyProjectDailyDTO;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@Service
+public class ProjectServiceImpl implements ProjectService {
+
+ @Autowired
+ private ProjectDao projectDao;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ @Override
+ public ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto) {
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据agencyId查询项目统计数据
+ ProjectSummaryResultDTO resultDTO = projectDao.selectProjectSummary(agencyId);
+ if (null != resultDTO) {
+ //将结果转成百分比
+ NumberFormat percent = NumberFormat.getPercentInstance();
+ percent.setMaximumFractionDigits(2);
+ //四舍五入保留小数点后四位
+ BigDecimal pendingRatio = resultDTO.getPendingRatioInt().setScale(4, RoundingMode.HALF_UP);
+ //将小数转成百分比
+ resultDTO.setPendingRatio(percent.format(pendingRatio.doubleValue()));
+ resultDTO.setClosedRatio(percent.format(resultDTO.getClosedRatioInt().setScale(4, RoundingMode.HALF_UP).doubleValue()));
+ }
+ return resultDTO;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ @Override
+ public List getSummaryInfo(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据agencyId查询各状态统计数据
+ resultList = projectDao.selectSummaryInfo(agencyId);
+ if (null != resultList && resultList.size() > NumConstant.ZERO) {
+ //将结果转成百分比
+ NumberFormat percent = NumberFormat.getPercentInstance();
+ percent.setMaximumFractionDigits(2);
+ resultList.forEach(sum -> {
+ //先四舍五入保留四位小数再把小数转成百分比
+ sum.setRatio(percent.format(sum.getRatioInt().setScale(4, RoundingMode.HALF_UP).doubleValue()));
+ });
+ }
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ @Override
+ public List getSubAgency(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据机关Id查询最近日期的日统计数据
+ FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId);
+ if (null == agencyProjectDailyDTO) {
+ return resultList;
+ }
+ //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序
+ resultList = projectDao.selectSubAgency(agencyProjectDailyDTO);
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ @Override
+ public List getSubGrid(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据机关Id查询最近日期的日统计数据
+ FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId);
+ if (null == agencyProjectDailyDTO) {
+ return resultList;
+ }
+ //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序
+ resultList = projectDao.selectSubGrid(agencyProjectDailyDTO);
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询(日查询进九十天数据,月查询进十二个月数据)
+ **/
+ @Override
+ public List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:查询机关过去九十天日统计数据(sql降序取前九十条)
+ if (ProjectConstant.DATE.equals(formDTO.getType())) {
+ resultList = projectDao.selectIncrTrendDaily(agencyId);
+ }
+
+ //3:查询机关过去十二个月月统计数据
+ if (ProjectConstant.MONTH.equals(formDTO.getType())) {
+ resultList = projectDao.selectIncrTrendMonthly(agencyId);
+ }
+
+ return resultList;
+ }
+
+ /**
+ * @author sun
+ * @Description 获取机关ID
+ */
+ private String getLoginUserDetails(TokenDto tokenDto) {
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ BeanUtils.copyProperties(tokenDto, dto);
+ LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();
+ String agencyId = data.getAgencyId();
+ if (null == agencyId || "".equals(agencyId)) {
+ throw new RenException(ProjectConstant.GET_AGENCYID);
+ }
+ return agencyId;
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java
new file mode 100644
index 0000000000..9eccb5b29f
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java
@@ -0,0 +1,78 @@
+/**
+ * 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.service.publicity;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.publicity.dto.result.*;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 文章引用标签阅读数量【机关】月统计表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+public interface PublicityService {
+
+ /**
+ * @Description 宣传能力—工作端—当前机关累计发文和当前发文
+ * @param tokenDto
+ * @author jyy
+ */
+ FactPublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto);
+
+ /**
+ * @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据
+ * @param tokenDto,formDTO
+ * @author jyy
+ */
+ public List tagviewed(TokenDto tokenDto, Integer pageSize, String type) ;
+
+ /**
+ * @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据
+ * @param tokenDto,pageSize,type
+ * @author jyy
+ */
+ public List tagused(TokenDto tokenDto, Integer pageSize, String type) ;
+
+ /**
+ * @param tokenDto type
+ * @Description 获取下级机关发文数
+ * @author jyy
+ */
+ public List subagencyPublishedarticle(TokenDto tokenDto, String type) ;
+ /**
+ * @param tokenDto type
+ * @Description 获取直属部门发文数
+ * @author jyy
+ */
+ public List departmentPublishedarticle(TokenDto tokenDto, String type);
+
+ /**
+ * @param tokenDto type
+ * @Description 获取指数网格发文数
+ * @author jyy
+ */
+ public List subgridPublishedarticle(TokenDto tokenDto, String type);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java
new file mode 100644
index 0000000000..10f19b3ea0
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java
@@ -0,0 +1,219 @@
+/**
+ * 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.service.publicity.impl;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dao.publicity.PublicityDao;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.publicity.dto.result.*;
+import com.epmet.service.publicity.PublicityService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 文章引用标签阅读数量【机关】月统计表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-19
+ */
+@Service
+public class PublicityServiceImpl implements PublicityService {
+ @Autowired
+ private PublicityDao publicityDao;//机关每日发文
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @param tokenDto
+ * @Description 宣传能力—工作端—当前机关累计发文和当前发文
+ * @author jyy
+ */
+ @Override
+ public FactPublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ agencyId="b9e295f8c1906a0d1c5e0b313afcda3f";
+ return publicityDao.summaryInfo(agencyId);
+ }
+
+
+ /**
+ * @param tokenDto,formDTO
+ * @Description 宣传能力—工作端-获取阅读最多的分类数据
+ * @author jyy
+ */
+ @Override
+ public List tagviewed(TokenDto tokenDto, Integer pageSize, String type) {
+// String agencyId = this.getLoginUserDetails(tokenDto);
+ String agencyId = "0d2ffe9fce682b602b9d451226d08fae";
+ Date date = new Date();
+ String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN);
+ String yearId = strDate.substring(0, 4);
+
+ if (StringUtils.equals("month", type)) {//当月
+ String monthId = strDate.substring(0, 4) + strDate.substring(5, 7);
+ return publicityDao.getViewedMonthlyCountByTag(agencyId, monthId, pageSize);
+
+ } else if (StringUtils.equals("quarter", type)) {//当季
+ String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date);
+ return publicityDao.getViewedQuarterlyCountByTag(agencyId, quarterId, pageSize);
+
+ } else if (StringUtils.equals("year", type)) {//当年
+ return publicityDao.getViewedYearlyCountByTag(agencyId, yearId, pageSize);
+
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @param tokenDto pageSize type
+ * @Description 宣传能力—工作端-获取发表最多的分类数据
+ * @author jyy
+ */
+ @Override
+ public List tagused(TokenDto tokenDto, Integer pageSize, String type) {
+// String agencyId = this.getLoginUserDetails(tokenDto);
+ String agencyId = "0d2ffe9fce682b602b9d451226d08fae";
+ Date date = new Date();
+ String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN);
+ String yearId = strDate.substring(0, 4);
+
+ if (StringUtils.equals("month", type)) {//当月
+ String monthId = strDate.substring(0, 4) + strDate.substring(5, 7);
+ return publicityDao.getUsedMonthlyCountByTag(agencyId, monthId, pageSize);
+
+ } else if (StringUtils.equals("quarter", type)) {//当季
+ String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date);
+ return publicityDao.getUsedQuarterlyCountByTag(agencyId, quarterId, pageSize);
+
+ } else if (StringUtils.equals("year", type)) {//当年
+ return publicityDao.getUsedYearlyCountByTag(agencyId, yearId, pageSize);
+
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @param tokenDto type
+ * @Description 获取下级机关发文数
+ * @author jyy
+ */
+ @Override
+ public List subagencyPublishedarticle(TokenDto tokenDto, String type) {
+// String agencyId = this.getLoginUserDetails(tokenDto);
+ String agencyId = "1041fe5e8499dbd8add314291d2f6da4";
+ Date date = new Date();
+ String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD);
+ String yearId = strDate.substring(0, 4);
+ String monthId = strDate.substring(0, 6);
+
+ if (StringUtils.equals("month", type)) {//当月
+ return publicityDao.getSubAgencyPublishedMonth(agencyId, monthId);
+
+ } else if (StringUtils.equals("quarter", type)) {//当季
+ String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date);
+ return publicityDao.getSubAgencyPublishedQuarter(agencyId, quarterId);
+
+ } else if (StringUtils.equals("year", type)) {//当年
+ return publicityDao.getSubAgencyPublishedYear(agencyId, yearId);
+
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @param tokenDto type
+ * @Description 获取直属部门发文数
+ * @author jyy
+ */
+ @Override
+ public List departmentPublishedarticle(TokenDto tokenDto, String type) {
+// String agencyId = this.getLoginUserDetails(tokenDto);
+ String agencyId = "0d2ffe9fce682b602b9d451226d08fae";
+ Date date = new Date();
+ String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD);
+ String yearId = strDate.substring(0, 4);
+ String monthId = strDate.substring(0, 6);
+
+ if (StringUtils.equals("month", type)) {//当月
+ return publicityDao.getSubDepartPublishedMonth(agencyId, monthId);
+
+ } else if (StringUtils.equals("quarter", type)) {//当季
+ String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date);
+ return publicityDao.getSubDepartPublishedQuarter(agencyId, quarterId);
+
+ } else if (StringUtils.equals("year", type)) {//当年
+ return publicityDao.getSubDepartPublishedYear(agencyId, yearId);
+
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @param tokenDto type
+ * @Description 获取指数网格发文数
+ * @author jyy
+ */
+ @Override
+ public List subgridPublishedarticle(TokenDto tokenDto, String type) {
+// String agencyId = this.getLoginUserDetails(tokenDto);
+ String agencyId = "0d2ffe9fce682b602b9d451226d08fae";
+ Date date = new Date();
+ String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD);
+ String yearId = strDate.substring(0, 4);
+ String monthId = strDate.substring(0, 6);
+
+ if (StringUtils.equals("month", type)) {//当月
+ return publicityDao.getSubGridPublishedMonth(agencyId, monthId);
+
+ } else if (StringUtils.equals("quarter", type)) {//当季
+ String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date);
+ return publicityDao.getSubGridPublishedQuarter(agencyId, quarterId);
+
+ } else if (StringUtils.equals("year", type)) {//当年
+ return publicityDao.getSubGridPublishedYear(agencyId, yearId);
+
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @param tokenDto
+ * @Description 获取机关ID
+ * @author zxc
+ */
+ public String getLoginUserDetails(TokenDto tokenDto) {
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ BeanUtils.copyProperties(tokenDto, dto);
+ LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();
+ return data.getAgencyId();
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java
new file mode 100644
index 0000000000..584ac1b1dc
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java
@@ -0,0 +1,51 @@
+package com.epmet.service.topic;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.topic.dto.form.TopicIncrTrendFormDTO;
+import com.epmet.topic.dto.result.*;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 15:58
+ */
+public interface TopicService {
+
+ /**
+ * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17
+ * @param tokenDto
+ * @author zxc
+ */
+ TopicSummaryResultDTO topicSummary(TokenDto tokenDto);
+
+ /**
+ * @Description 话题——话题分析
+ * @param tokenDto
+ * @param formDTO
+ * @author zxc
+ */
+ List topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO);
+
+ /**
+ * @Description 话题——直属网格话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ List topicSubGrid( TokenDto tokenDto);
+
+ /**
+ * @Description 话题——下级机关话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ List topicSubAgency(TokenDto tokenDto);
+
+ /**
+ * @Description 话题——话题分析表
+ * @param tokenDto
+ * @author zxc
+ */
+ List topicSummaryInfo(TokenDto tokenDto);
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
new file mode 100644
index 0000000000..9b8dace788
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
@@ -0,0 +1,182 @@
+package com.epmet.service.topic.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dao.topic.TopicDao;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.service.topic.TopicService;
+import com.epmet.topic.constant.TopicConstant;
+import com.epmet.topic.dto.form.TopicIncrTrendFormDTO;
+import com.epmet.topic.dto.result.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @Author zxc
+ * @CreateTime 2020/6/20 15:58
+ */
+@Service
+public class TopicServiceImpl implements TopicService {
+
+ @Autowired
+ private TopicDao topicDao;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public TopicSummaryResultDTO topicSummary(TokenDto tokenDto) {
+ TopicSummaryResultDTO result = new TopicSummaryResultDTO();
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List topicStatus = topicDao.getTopicStatus(agencyId);
+ if (topicStatus.size() != NumConstant.ZERO){
+ topicStatus.forEach(topic -> {
+ if (topic.getTopicStatus().equals(TopicConstant.DISCUSSING)){
+ result.setTalkingTotalCount(topic.getTopicCount());
+ }else if (topic.getTopicStatus().equals(TopicConstant.CLOSED)){
+ result.setClosedTotalCount(topic.getTopicCount());
+ }else {
+ result.setShieldedTotalCount(topic.getTopicCount());
+ }
+ });
+ result.setTopicTotalCount(topicStatus.stream().collect(Collectors.summingInt(TopicStatusResultDTO::getTopicCount)));
+ }
+ TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId);
+ if (shiftedCount != null){
+ result.setShiftedTotalCount(shiftedCount.getShiftedIssueCount());
+ result.setDeadline(shiftedCount.getDeadline());
+ }
+ return result;
+ }
+
+ /**
+ * @Description 话题——话题分析
+ * @param tokenDto
+ * @param formDTO
+ * @author zxc
+ */
+ @Override
+ public List topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List result = new ArrayList<>();
+ if (formDTO.getType().equals(TopicConstant.DATE)){
+ List topicIncrDaily = topicDao.getTopicIncrDaily(agencyId);
+ List topicShiftedIncrDaily = topicDao.getTopicShiftedIncrDaily(agencyId);
+ topicIncrDaily.addAll(topicShiftedIncrDaily);
+ result = topicIncrDaily.stream().sorted(Comparator.comparing(TopicIncrTrendResultDTO::getDate).reversed()).collect(Collectors.toList());
+ }else {
+ List topicIncrMonthly = topicDao.getTopicIncrMonthly(agencyId);
+ List topicShiftedIncrMonthly = topicDao.getTopicShiftedIncrMonthly(agencyId);
+ topicIncrMonthly.addAll(topicShiftedIncrMonthly);
+ result = topicIncrMonthly.stream().sorted(Comparator.comparing(TopicIncrTrendResultDTO::getDate).reversed()).collect(Collectors.toList());
+ }
+ return result;
+ }
+
+ /**
+ * @Description 话题——直属网格话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List topicSubGrid(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List result = new ArrayList<>();
+ List subGridIdList = topicDao.getSubGridIdList(agencyId);
+ if (subGridIdList.size() != NumConstant.ZERO){
+ List gridAllTopicInfoLastDay = topicDao.getGridAllTopicInfoLastDay();
+ List gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay();
+ subGridIdList.forEach(gridId -> {
+ gridAllTopicInfoLastDay.forEach(gridTopic -> {
+ if (gridId.equals(gridTopic.getGridId())){
+ result.add(gridTopic);
+ }
+ });
+ gridAllTopicShiftedInfoLastDay.forEach(gridShift -> {
+ if (gridId.equals(gridShift.getGridId())){
+ result.add(gridShift);
+ }
+ });
+ });
+ return result;
+ }
+ return new ArrayList<>();
+ }
+
+ /**
+ * @Description 话题——下级机关话题数
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List topicSubAgency(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List result = new ArrayList<>();
+ List subAgencyIdList = topicDao.getSubAgencyIdList(agencyId);
+ //存在下级机关
+ if (subAgencyIdList.size() != NumConstant.ZERO){
+ List allTopicInfoLastDay = topicDao.getAllTopicInfoLastDay();
+ List allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay();
+ //话题状态为 已关闭、讨论中、已屏蔽
+ subAgencyIdList.forEach(agencyIdOne -> {
+ allTopicInfoLastDay.forEach(agency -> {
+ if (agencyIdOne.equals(agency.getAgencyId())){
+ result.add(agency);
+ }
+ });
+ allTopicShiftedInfoLastDay.forEach(shiftTopic -> {
+ if (agencyIdOne.equals(shiftTopic.getAgencyId())){
+ result.add(shiftTopic);
+ }
+ });
+ });
+ return result;
+ }
+ //不存在
+ return new ArrayList<>();
+ }
+
+ /**
+ * @Description 话题——话题分析表
+ * @param tokenDto
+ * @author zxc
+ */
+ @Override
+ public List topicSummaryInfo(TokenDto tokenDto) {
+ String agencyId = this.getLoginUserDetails(tokenDto);
+ List topicSummaryInfo = topicDao.topicSummaryInfo(agencyId);
+ TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId);
+ int i = (shiftedCount.getShiftedIssueCount() / topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue))) * NumConstant.ONE_HUNDRED;
+ String ratio = String.valueOf(i) + TopicConstant.RATIO;
+ TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO();
+ result.setName(TopicConstant.SHIFTED);
+ result.setRatio(ratio);
+ result.setValue(shiftedCount.getShiftedIssueCount());
+ topicSummaryInfo.add(result);
+ return topicSummaryInfo;
+ }
+
+ /**
+ * @Description 获取机关ID
+ * @param tokenDto
+ * @author zxc
+ */
+ public String getLoginUserDetails(TokenDto tokenDto){
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ BeanUtils.copyProperties(tokenDto,dto);
+ LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();
+ return data.getAgencyId();
+ }
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java
new file mode 100644
index 0000000000..cdb05ec73b
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java
@@ -0,0 +1,57 @@
+package com.epmet.service.user;
+
+
+import com.epmet.dto.form.user.UserIncrTrendFormDTO;
+import com.epmet.dto.form.user.UserSubAgencyFormDTO;
+import com.epmet.dto.form.user.UserSubGridFormDTO;
+import com.epmet.dto.form.user.UserSummaryInfoFormDTO;
+import com.epmet.dto.result.user.UserIncrTrendResultDTO;
+import com.epmet.dto.result.user.UserSubAgencyResultDTO;
+import com.epmet.dto.result.user.UserSubGridResultDTO;
+import com.epmet.dto.result.user.UserSummaryInfoResultDTO;
+
+import java.util.List;
+
+/**
+ * 组织能力用户相关接口
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 13:23
+ */
+public interface UserAnalysisService {
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSummaryInfoResultDTO
+ * @author yinzuomei
+ * @description 用户汇总信息查询
+ * @Date 2020/6/22 13:41
+ **/
+ UserSummaryInfoResultDTO summaryInfo(UserSummaryInfoFormDTO formDTO);
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSubAgencyResultDTO
+ * @author yinzuomei
+ * @description 直属机关柱状图查询
+ * @Date 2020/6/22 13:42
+ **/
+ List subAgency(UserSubAgencyFormDTO formDTO);
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSubGridResultDTO
+ * @author yinzuomei
+ * @description 直属网格柱状图查询
+ * @Date 2020/6/22 13:42
+ **/
+ List subGrid(UserSubGridFormDTO formDTO);
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserIncrTrendResultDTO
+ * @author yinzuomei
+ * @description 按日、按月查询注册用户数(参与用户数)增量折线图
+ * @Date 2020/6/22 13:42
+ **/
+ List incrTrend(UserIncrTrendFormDTO formDTO);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java
new file mode 100644
index 0000000000..655b6febae
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java
@@ -0,0 +1,425 @@
+package com.epmet.service.user.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.constant.UserAnalysisConstant;
+import com.epmet.dao.user.UserAnalysisDao;
+import com.epmet.dto.DimAgencyDTO;
+import com.epmet.dto.DimGridDTO;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.form.user.UserIncrTrendFormDTO;
+import com.epmet.dto.form.user.UserSubAgencyFormDTO;
+import com.epmet.dto.form.user.UserSubGridFormDTO;
+import com.epmet.dto.form.user.UserSummaryInfoFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.dto.result.user.*;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.service.user.UserAnalysisService;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 组织能力用户相关接口
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/22 13:23
+ */
+@Service
+public class UserAnalysisServiceImpl implements UserAnalysisService {
+ private static final Logger logger = LoggerFactory.getLogger(UserAnalysisServiceImpl.class);
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Autowired
+ private UserAnalysisDao userAnalysisDao;
+
+ /**
+ * @return java.lang.String
+ * @param
+ * @author yinzuomei
+ * @description 查询当前用户直属机关单位id
+ * @Date 2020/6/22 14:19
+ **/
+ public String getMyAgency(){
+ LoginUserDetailsFormDTO loginUserDetailsFormDTO=new LoginUserDetailsFormDTO();
+ loginUserDetailsFormDTO.setApp(loginUserUtil.getLoginUserApp());
+ loginUserDetailsFormDTO.setClient(loginUserUtil.getLoginUserClient());
+ loginUserDetailsFormDTO.setUserId(loginUserUtil.getLoginUserId());
+ Result result=epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO);
+ if(!result.success()){
+ throw new RenException(UserAnalysisConstant.QUERY_USER_AGENCY_FAILED);
+ }
+ if(result.success()){
+ if (null == result.getData() || StringUtils.isBlank(result.getData().getAgencyId())) {
+ throw new RenException(UserAnalysisConstant.QUERY_USER_AGENCY_FAILED);
+ }
+ }
+ return result.getData().getAgencyId();
+ }
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSummaryInfoResultDTO
+ * @author yinzuomei
+ * @description 用户汇总信息查询
+ * @Date 2020/6/22 13:41
+ **/
+ @Override
+ public UserSummaryInfoResultDTO summaryInfo(UserSummaryInfoFormDTO formDTO) {
+ UserSummaryInfoResultDTO userSummaryInfoResultDTO=new UserSummaryInfoResultDTO();
+ String myAgencyId=this.getMyAgency();
+ if(UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())){
+ //参与用户
+ userSummaryInfoResultDTO=userAnalysisDao.selectParticipationUserSummaryInfo(myAgencyId);
+ }else{
+ //注册用户
+ userSummaryInfoResultDTO=userAnalysisDao.selectRegUserSummaryInfo(myAgencyId);
+ }
+ if(null!=userSummaryInfoResultDTO){
+ userSummaryInfoResultDTO.setCurrentDate(DateUtils.getxAxisDatePattern(userSummaryInfoResultDTO.getCurrentDate(),"."));
+ //提取出工具类
+ userSummaryInfoResultDTO.setPartymemberProportion(userSummaryInfoResultDTO.getPartymemberProportionValue().stripTrailingZeros().toPlainString());
+ userSummaryInfoResultDTO.setWarmHeartedProportion(userSummaryInfoResultDTO.getWarmHeartedProportionValue().stripTrailingZeros().toPlainString());
+ }
+ logger.info(String.format("查询用户汇总信息返参%s",JSON.toJSONString(userSummaryInfoResultDTO)));
+ return userSummaryInfoResultDTO;
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSubAgencyResultDTO
+ * @author yinzuomei
+ * @description 直属机关柱状图查询
+ * @Date 2020/6/22 13:42
+ **/
+ @Override
+ public List subAgency(UserSubAgencyFormDTO formDTO) {
+ //获取用户所属机关id
+ String myAgencyId = this.getMyAgency();
+ //初始化横坐标(用户所机关的下级机关列表)
+ List dimList = this.initUserSubAgencyResultDTO(myAgencyId);
+ if(CollectionUtils.isEmpty(dimList)){
+ logger.info(String.format("当前机关(agencyId=%s)下没有下级机关",myAgencyId));
+ return new ArrayList<>();
+ }
+ //根据入参,查询注册用户或者参与用户的(机关、按日的查询结果)
+ List userSubAgencyResDTOList=new ArrayList<>();
+ if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())) {
+ //参与用户
+ userSubAgencyResDTOList = userAnalysisDao.selectParticipationSubAgencyRes(formDTO.getDateId(),
+ myAgencyId);
+ } else {
+ //注册用户
+ userSubAgencyResDTOList = userAnalysisDao.selectRegSubAgencyRes(formDTO.getDateId(),
+ myAgencyId);
+ }
+ //根据维度表进行对比
+ for(UserSubAgencyResultDTO dimInitResultDto:dimList){
+ boolean flag=false;
+ for(UserSubAgencyResDTO userSubAgencyResDTO:userSubAgencyResDTOList){
+ if(dimInitResultDto.getAgencyId().equals(userSubAgencyResDTO.getAgencyId())){
+ flag=true;
+ //居民、热心居民、党员总数,用于排序
+ dimInitResultDto.setTotal(userSubAgencyResDTO.getPartymemberTotal()
+ +userSubAgencyResDTO.getWarmHeartedTotal()
+ +userSubAgencyResDTO.getResiTotal());
+ switch(dimInitResultDto.getType()){
+ case UserAnalysisConstant.REGISTERED_RESI:
+ dimInitResultDto.setValue(userSubAgencyResDTO.getResiTotal());
+ break;
+ case UserAnalysisConstant.WARMHEARTED:
+ dimInitResultDto.setValue(userSubAgencyResDTO.getWarmHeartedTotal());
+ break;
+ case UserAnalysisConstant.PARTYMEMBER:
+ dimInitResultDto.setValue(userSubAgencyResDTO.getPartymemberTotal());
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ if(!flag){
+ logger.error(String.format("各机关注册用户数缺少记录:date_id=%s,agencyId=%s",formDTO.getDateId(),dimInitResultDto.getAgencyId()));
+ }
+ }
+ //返回集合按照total降序排序
+ List returnList = dimList.stream().sorted(Comparator.comparing(UserSubAgencyResultDTO::getTotal))
+ .collect(Collectors.toList());
+ return returnList;
+ }
+
+ private List initUserSubAgencyResultDTO(String myAgencyId) {
+ List list=new ArrayList<>();
+ List dimAgencyDTOS=userAnalysisDao.selectSubAgencyList(myAgencyId);
+ for(DimAgencyDTO agencyDTO:dimAgencyDTOS){
+ //居民
+ UserSubAgencyResultDTO resi=new UserSubAgencyResultDTO();
+ resi.setAgencyId(agencyDTO.getId());
+ resi.setName(agencyDTO.getAgencyName());
+ resi.setValue(NumConstant.ZERO);
+ resi.setType(UserAnalysisConstant.REGISTERED_RESI);
+ resi.setTotal(NumConstant.ZERO);
+ list.add(resi);
+ //热心居民
+ UserSubAgencyResultDTO warm=new UserSubAgencyResultDTO();
+ warm.setAgencyId(agencyDTO.getId());
+ warm.setName(agencyDTO.getAgencyName());
+ warm.setValue(NumConstant.ZERO);
+ warm.setType(UserAnalysisConstant.WARMHEARTED);
+ warm.setTotal(NumConstant.ZERO);
+ list.add(warm);
+ //党员
+ UserSubAgencyResultDTO party=new UserSubAgencyResultDTO();
+ party.setAgencyId(agencyDTO.getId());
+ party.setName(agencyDTO.getAgencyName());
+ party.setValue(NumConstant.ZERO);
+ party.setType(UserAnalysisConstant.PARTYMEMBER);
+ party.setTotal(NumConstant.ZERO);
+ list.add(party);
+ }
+ return list;
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserSubGridResultDTO
+ * @author yinzuomei
+ * @description 直属网格柱状图查询
+ * @Date 2020/6/22 13:42
+ **/
+ @Override
+ public List subGrid(UserSubGridFormDTO formDTO) {
+ //获取用户所属机关id
+ String myAgencyId = this.getMyAgency();
+ //初始化横坐标(用户所机关的直属网格)
+ List dimList = this.initUserSubGridResultDTO(myAgencyId);
+ if(CollectionUtils.isEmpty(dimList)){
+ logger.info(String.format("当前机关(agencyId=%s)下没有网格",myAgencyId));
+ return new ArrayList<>();
+ }
+ //根据入参,查询注册用户或者参与用户的(机关、按日的查询结果)
+ List userSubGridResDTOS=new ArrayList<>();
+ if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())) {
+ //参与用户
+ userSubGridResDTOS=userAnalysisDao.selectParticipationSubGridRes(formDTO.getDateId(),myAgencyId);
+ } else {
+ //注册用户
+ userSubGridResDTOS=userAnalysisDao.selectRegSubGridRes(formDTO.getDateId(),myAgencyId);
+ }
+ //根据维度表进行对比
+ for(UserSubGridResultDTO dimInitResultDto:dimList){
+ boolean flag=false;
+ for(UserSubGridResDTO userSubGridResDTO:userSubGridResDTOS){
+ if(dimInitResultDto.getGridId().equals(userSubGridResDTO.getGridId())){
+ flag=true;
+ //居民、热心居民、党员总数,用于排序
+ dimInitResultDto.setTotal(userSubGridResDTO.getPartymemberTotal()
+ +userSubGridResDTO.getWarmHeartedTotal()
+ +userSubGridResDTO.getResiTotal());
+ switch(dimInitResultDto.getType()){
+ case UserAnalysisConstant.REGISTERED_RESI:
+ dimInitResultDto.setValue(userSubGridResDTO.getResiTotal());
+ break;
+ case UserAnalysisConstant.WARMHEARTED:
+ dimInitResultDto.setValue(userSubGridResDTO.getWarmHeartedTotal());
+ break;
+ case UserAnalysisConstant.PARTYMEMBER:
+ dimInitResultDto.setValue(userSubGridResDTO.getPartymemberTotal());
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ if(!flag){
+ logger.error(String.format("直属网格注册用户数缺少记录:date_id=%s,gridId=%s",formDTO.getDateId(),dimInitResultDto.getGridId()));
+ }
+ }
+ //返回集合按照total降序排序
+ List returnList = dimList.stream().sorted(Comparator.comparing(UserSubGridResultDTO::getTotal))
+ .collect(Collectors.toList());
+ return returnList;
+ }
+
+ private List initUserSubGridResultDTO(String myAgencyId) {
+ List list=new ArrayList<>();
+ List gridList=userAnalysisDao.selectSubGridList(myAgencyId);
+ for(DimGridDTO grid:gridList){
+ //居民
+ UserSubGridResultDTO resi=new UserSubGridResultDTO();
+ resi.setGridId(grid.getId());
+ resi.setName(grid.getGridName());
+ resi.setValue(NumConstant.ZERO);
+ resi.setType(UserAnalysisConstant.REGISTERED_RESI);
+ resi.setTotal(NumConstant.ZERO);
+ list.add(resi);
+ //热心居民
+ UserSubGridResultDTO warm=new UserSubGridResultDTO();
+ warm.setGridId(grid.getId());
+ warm.setName(grid.getGridName());
+ warm.setValue(NumConstant.ZERO);
+ warm.setType(UserAnalysisConstant.WARMHEARTED);
+ warm.setTotal(NumConstant.ZERO);
+ list.add(warm);
+ //党员
+ UserSubGridResultDTO party=new UserSubGridResultDTO();
+ party.setGridId(grid.getId());
+ party.setName(grid.getGridName());
+ party.setValue(NumConstant.ZERO);
+ party.setType(UserAnalysisConstant.PARTYMEMBER);
+ party.setTotal(NumConstant.ZERO);
+ list.add(party);
+ }
+ return list;
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.user.result.UserIncrTrendResultDTO
+ * @author yinzuomei
+ * @description 按日、按月查询注册用户数(参与用户数)增量折线图
+ * @Date 2020/6/22 13:42
+ **/
+ @Override
+ public List incrTrend(UserIncrTrendFormDTO formDTO) {
+ //获取用户所属机关id
+ String myAgencyId = this.getMyAgency();
+ List dimList = this.initUserIncrTrendResultDTO(formDTO.getType());
+ if(CollectionUtils.isEmpty(dimList)){
+ logger.error("横坐标初始失败");
+ return new ArrayList<>();
+ }
+ List list=new ArrayList<>();
+ if (UserAnalysisConstant.REG_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.DAY_TYPE.equals(formDTO.getType())) {
+ //注册用户数、日
+ list=userAnalysisDao.selectRegDayIncr(myAgencyId);
+ } else if (UserAnalysisConstant.REG_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.MONTH_TYPE.equals(formDTO.getType())) {
+ //注册用户数、月
+ list=userAnalysisDao.selectRegMonthIncr(myAgencyId);
+ } else if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.DAY_TYPE.equals(formDTO.getType())) {
+ //参与用户数、日
+ list=userAnalysisDao.selectParticipationUserDayIncr(myAgencyId);
+ } else if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.MONTH_TYPE.equals(formDTO.getType())) {
+ //参与用户数、月
+ list=userAnalysisDao.selectParticipationUserMonthIncr(myAgencyId);
+ } else {
+ logger.error("参数错误");
+ return new ArrayList<>();
+ }
+ for(UserIncrTrendResultDTO dim:dimList){
+ boolean flag=false;
+ for(UserIncrTrendResDTO userIncrTrendResDTO:list){
+ if(dim.getDateOrMonthId().equals(userIncrTrendResDTO.getDateIdOrMonthId())){
+ flag=true;
+ //居民、热心居民、党员总数,用于排序
+ switch(dim.getType()){
+ case UserAnalysisConstant.REGISTERED_RESI:
+ dim.setValue(userIncrTrendResDTO.getRegIncr());
+ break;
+ case UserAnalysisConstant.WARMHEARTED:
+ dim.setValue(userIncrTrendResDTO.getWarmIncr());
+ break;
+ case UserAnalysisConstant.PARTYMEMBER:
+ dim.setValue(userIncrTrendResDTO.getPartymemberIncr());
+ break;
+ default:
+ break;
+ }
+
+ }
+ }
+ if(!flag){
+ logger.error(String.format("机关id%s缺少记录dateOrMonthId=%s",myAgencyId,dim.getDateOrMonthId()));
+ }
+ }
+ return dimList;
+ }
+
+ private List initUserIncrTrendResultDTO(String type) {
+ List list=new ArrayList<>();
+ if(UserAnalysisConstant.DAY_TYPE.equals(type)){
+ List