roleList;
+
+ @Data
+ public static class Role {
+
+ private String id;
+ private String roleKey;
+ private String roleName;
+
+ public Role() {
+ }
+ }
@Override
public String toString() {
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java
index 642bad2941..6db5a629cd 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java
@@ -40,6 +40,11 @@ public class TokenDto extends BaseTokenDto implements Serializable {
*/
private long updateTime;
+ /**
+ * 当前工作人员进入的客户id
+ */
+ private String customerId;
+
@Override
public String toString() {
return JSON.toJSONString(this);
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java
index ec70df9403..57a537d027 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java
@@ -10,6 +10,7 @@ package com.epmet.commons.tools.security.resolver;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
@@ -77,10 +78,12 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu
// String client=keyArray[1];
// String userId=keyArray[2];
// TokenDto tokenDto = cpUserDetailRedis.get(app,client,userId);
+
TokenDto tokenDto = new TokenDto();
- tokenDto.setUserId(request.getHeader("userId"));
- tokenDto.setApp(request.getHeader("app"));
- tokenDto.setClient(request.getHeader("client"));
+ tokenDto.setUserId(request.getHeader(AppClientConstant.USER_ID));
+ tokenDto.setApp(request.getHeader(AppClientConstant.APP));
+ tokenDto.setClient(request.getHeader(AppClientConstant.CLIENT));
+ tokenDto.setCustomerId(request.getHeader(AppClientConstant.CUSTOMER_ID));
logger.info("resolveArgument TokenDto:"+ JSON.toJSONString(tokenDto));
logger.info("CURRENT-REDIS-DATABASE---------!!!!!!:"+redisDb);
return tokenDto;
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-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
new file mode 100644
index 0000000000..2cfaed7588
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
@@ -0,0 +1,221 @@
+package com.epmet.commons.tools.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.epmet.commons.tools.dto.form.DingTalkTextMsg;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.scan.param.TextScanParamDTO;
+import com.epmet.commons.tools.scan.param.TextTaskDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import org.springframework.util.CollectionUtils;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * desc: http 工具类
+ * date: 2020/6/4 22:27
+ *
+ * @author: jianjun liu
+ */
+@Slf4j
+public class HttpClientManager {
+ private static int connectionTimeout = 3000;// 连接超时时间,毫秒
+ private static int soTimeout = 10000;// 读取数据超时时间,毫秒
+ /**
+ * HttpClient对象
+ */
+ private static CloseableHttpClient httpclient = HttpClients.custom().disableAutomaticRetries().build();
+
+ /*** 超时设置 ****/
+ private static RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(soTimeout)
+ .setConnectTimeout(connectionTimeout)
+ .build();//设置请求和传输超时时间
+
+ public static HttpClientManager getInstance() {
+ return SingleClass.instance;
+ }
+
+ private static class SingleClass {
+ private final static HttpClientManager instance = new HttpClientManager();
+ }
+
+ /**
+ * desc: 发送json post 请求
+ * param: url,jsonStrParam
+ * return: CallResult
+ * date: 2019/2/21 9:12
+ *
+ * @author: jianjun liu
+ */
+ public Result sendPost(String url, Map paramsMap) {
+
+ try {
+ HttpPost httppost = new HttpPost(url);
+ httppost.setConfig(requestConfig);
+ httppost.addHeader("Content-Type", "application/x-www-form-urlencoded charset=utf-8");
+
+ List list = new ArrayList();
+ for (String key : paramsMap.keySet()) {
+ list.add(new BasicNameValuePair(key, String.valueOf(paramsMap.get(key))));
+ }
+ UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, "utf-8");
+ httppost.setEntity(urlEncodedFormEntity);
+
+ return execute(httppost);
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.error("send exception", e);
+ return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
+ }
+
+ }
+
+ /**
+ * desc: 发送json post 请求
+ * param: url,jsonStrParam
+ * return: Result
+ * date: 2019/2/21 9:12
+ *
+ * @author: jianjun liu
+ */
+ public Result sendPostByJSON(String url, String jsonStrParam) {
+
+ try {
+ HttpPost httppost = new HttpPost(url);
+ httppost.setConfig(requestConfig);
+ httppost.addHeader("Content-Type", "application/json; charset=utf-8");
+ if (StringUtils.isNotEmpty(jsonStrParam)) {
+ StringEntity se = new StringEntity(jsonStrParam, "utf-8");
+ httppost.setEntity(se);
+ }
+ return execute(httppost);
+ } catch (Exception e) {
+ log.error("send exception", e);
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
+ }
+
+ }
+
+ /**
+ * desc: 发送钉钉群消息 简版
+ * param: url,jsonStrParam
+ * return: Result
+ *
+ * @author: jianjun liu
+ */
+ public Result sendAlarmMsg(String content) {
+ Long timestamp = System.currentTimeMillis();
+ String url = "https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c";
+ String secret = "SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19";
+
+ try {
+ String stringToSign = timestamp + "\n" + secret;
+ Mac mac = Mac.getInstance("HmacSHA256");
+ mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
+ byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
+ String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)),"UTF-8");
+ DingTalkTextMsg msg = new DingTalkTextMsg();
+ msg.setContent(content);
+ url = url.concat("×tamp="+timestamp+"&sign="+sign);
+ String jsonStrParam = msg.getMsgContent();
+ return sendPostByJSON(url, jsonStrParam);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return new Result().error();
+ }
+
+ /**
+ * desc: 发送get请求
+ * param:url, params
+ * return: CallResult
+ * date: 2019/2/21 9:16
+ *
+ * @author: jianjun liu
+ */
+ public Result sendGet(String url, Map params) {
+
+ try {
+ URIBuilder builder = new URIBuilder(url);
+ if (!CollectionUtils.isEmpty(params)) {
+ Set set = params.keySet();
+ for (String key : set) {
+ builder.setParameter(key, params.get(key) == null ? "" : String.valueOf(params.get(key)));
+ }
+ }
+ HttpGet httpGet = new HttpGet(builder.build());
+ httpGet.setConfig(requestConfig);
+ return execute(httpGet);
+ } catch (Exception e) {
+ log.error("sendGet exception", e);
+ return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
+ }
+ }
+
+ private Result execute(HttpRequestBase httpMethod) {
+ CloseableHttpResponse response = null;
+ try {
+ response = httpclient.execute(httpMethod);
+ log.debug("http send response:{}", JSON.toJSONString(response));
+ if (response != null && response.getStatusLine() != null) {
+ if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+ String result = EntityUtils.toString(response.getEntity());
+ return new Result().ok(result);
+ } else {
+ log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode());
+ }
+ }
+ } catch (Exception e) {
+ log.error("execute exception", e);
+ return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
+ } finally {
+ httpMethod.releaseConnection();
+ try {
+ if (response != null) {
+ response.close();
+ }
+ } catch (IOException e) {
+ }
+ }
+ return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
+ }
+
+ public static void main(String[] args) {
+ String url = "http://localhost:8107/epmetscan/api/textSyncScan";
+ TextTaskDTO p = new TextTaskDTO();
+ p.setDataId("1");
+ p.setContent("neirong1");
+ List list = new ArrayList<>();
+ list.add(p);
+ TextScanParamDTO param = new TextScanParamDTO();
+ param.setTasks(list);
+ Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param));
+ System.out.println(JSON.toJSONString(result));
+ }
+}
+
+
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
new file mode 100644
index 0000000000..a39a45309e
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
@@ -0,0 +1,101 @@
+package com.epmet.commons.tools.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
+import com.epmet.commons.tools.scan.param.TextScanParamDTO;
+import com.epmet.commons.tools.scan.param.TextTaskDTO;
+import com.epmet.commons.tools.scan.result.SyncScanResult;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 扫描内容工具类
+ *
+ * @author jianjun liu
+ * @email liujianjun@yunzongnet.com
+ * @date 2020-06-08 8:28
+ **/
+@Slf4j
+public class ScanContentUtils {
+ /**
+ * desc:图片同步扫描
+ *
+ * @return
+ */
+ public static Result imgSyncScan(String url, ImgScanParamDTO param) {
+ log.debug("imgSyncScan param:{}", JSON.toJSONString(param));
+ if (StringUtils.isBlank(url) || param == null) {
+ throw new RenException("参数错误");
+ }
+ try {
+ Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param));
+ log.debug("imgSyncScan result:{}", JSON.toJSONString(param));
+ if (result.success()) {
+ return JSON.parseObject(result.getData(),new TypeReference>(){});
+ }
+ Result resultResult = new Result<>();
+ resultResult.error(result.getCode(),result.getMsg());
+ resultResult.setInternalMsg(result.getInternalMsg());
+ return resultResult;
+ } catch (Exception e) {
+ log.debug("imgSyncScan param:{}", JSON.toJSONString(param));
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
+ }
+ }
+
+ /**
+ * desc:文字同步扫描
+ *
+ * @return
+ */
+ public static Result textSyncScan(String url, TextScanParamDTO param) {
+ log.debug("textSyncScan param:{}", JSON.toJSONString(param));
+ if (StringUtils.isBlank(url) || param == null) {
+ throw new RenException("参数错误");
+ }
+ try {
+ Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param));
+ log.debug("textSyncScan result:{}", JSON.toJSONString(result));
+ if (result.success()) {
+ //return JSON.parseObject(result.getData(),Result.class);
+ return JSON.parseObject(result.getData(),new TypeReference>(){});
+ }
+ Result resultResult = new Result<>();
+ resultResult.error(result.getCode(),result.getMsg());
+ resultResult.setInternalMsg(result.getInternalMsg());
+ return resultResult;
+ } catch (Exception e) {
+ log.error("textSyncScan exception:", e);
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
+ }
+ }
+
+ public static void main(String[] args) {
+ String url = "http://localhost:8107/epmetscan/api/textSyncScan";
+ TextTaskDTO p = new TextTaskDTO();
+ p.setDataId("1");
+ p.setContent("neirong1");
+ List list = new ArrayList<>();
+ list.add(p);
+ TextScanParamDTO param = new TextScanParamDTO();
+ param.setTasks(list);
+ Result imgSyncScanResult = ScanContentUtils.textSyncScan(url, param);
+ System.out.println(JSON.toJSONString(imgSyncScanResult));
+ SyncScanResult result = new SyncScanResult();
+ if (imgSyncScanResult != null){
+ SyncScanResult imgSyncScanResultData = imgSyncScanResult.getData();
+ if (imgSyncScanResult.success()&&imgSyncScanResultData.isAllPass()) {
+ result.setAllPass(imgSyncScanResultData.isAllPass());
+ result.getSuccessDataIds().addAll(imgSyncScanResultData.getSuccessDataIds());
+ result.getFailDataIds().addAll(imgSyncScanResultData.getFailDataIds());
+ System.out.println("================"+JSON.toJSONString(result));
+ }
+ }
+ }
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java
new file mode 100644
index 0000000000..08a96295ac
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java
@@ -0,0 +1,212 @@
+package com.epmet.commons.tools.validator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Hashtable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static java.util.regex.Pattern.*;
+
+/**
+ * 身份证号校验
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/6/18 9:59
+ */
+public class IdCardNoValidatorUtils {
+
+ private static Logger logger = LoggerFactory.getLogger(IdCardNoValidatorUtils.class);
+
+ /**
+ * 身份证验证
+ *
+ * @param idCardNo
+ * @return 校验信息,correct为成功,失败会返回对应的失败原因
+ */
+ public static boolean checkIsIdCardNo(String idCardNo) {
+ String[] wf = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"};
+ String[] checkCode = {"7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"};
+ String iDCardNo = "";
+ try {
+ //判断号码的长度 15位或18位
+ if (idCardNo.length() != 15 && idCardNo.length() != 18) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证号码长度应该为15位或18位"));
+ return false;
+ }
+ if (idCardNo.length() == 18) {
+ String lastStr = idCardNo.substring(idCardNo.length() - 1);
+ if (!Character.isDigit(lastStr.charAt(0))) {
+ if (Character.isLowerCase(lastStr.charAt(0))) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "18身份证号最后一位字母需要大写"));
+ return false;
+ }
+ } else {
+ logger.info(String.format("身份证号%s最后一位为数字",idCardNo));
+ }
+ }
+ if (idCardNo.length() == 18) {
+ iDCardNo = idCardNo.substring(0, 17);
+ } else if (idCardNo.length() == 15) {
+ iDCardNo = idCardNo.substring(0, 6) + "19" + idCardNo.substring(6, 15);
+ }
+ if (isStrNum(iDCardNo) == false) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字"));
+ return false;
+ }
+ //判断出生年月
+ String strYear = iDCardNo.substring(6, 10);// 年份
+ String strMonth = iDCardNo.substring(10, 12);// 月份
+ String strDay = iDCardNo.substring(12, 14);// 月份
+ if (isStrDate(strYear + "-" + strMonth + "-" + strDay) == false) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证生日无效"));
+ return false;
+ }
+ GregorianCalendar gc = new GregorianCalendar();
+ SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
+ if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150 || (gc.getTime().getTime() - s.parse(strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证生日不在有效范围"));
+ return false;
+ }
+ if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证月份无效"));
+ return false;
+ }
+ if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证日期无效"));
+ return false;
+ }
+ //判断地区码
+ Hashtable h = GetAreaCode();
+ if (h.get(iDCardNo.substring(0, 2)) == null) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证地区编码错误"));
+ return false;
+ }
+ //判断最后一位
+ int theLastOne = 0;
+ for (int i = 0; i < 17; i++) {
+ theLastOne = theLastOne + Integer.parseInt(String.valueOf(iDCardNo.charAt(i))) * Integer.parseInt(checkCode[i]);
+ }
+ int modValue = theLastOne % 11;
+ String strVerifyCode = wf[modValue];
+ iDCardNo = iDCardNo + strVerifyCode;
+
+ if (idCardNo.length() == 18 && !iDCardNo.equals(idCardNo)) {
+ logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证无效,不是合法的身份证号码"));
+ return false;
+ }
+
+ } catch (Exception e) {
+ logger.error(String.format("校验身份证号方法异常"));
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ /**
+ * 地区代码
+ *
+ * @return Hashtable
+ */
+ private static Hashtable GetAreaCode() {
+ Hashtable hashtable = new Hashtable();
+ hashtable.put("11", "北京");
+ hashtable.put("12", "天津");
+ hashtable.put("13", "河北");
+ hashtable.put("14", "山西");
+ hashtable.put("15", "内蒙古");
+ hashtable.put("21", "辽宁");
+ hashtable.put("22", "吉林");
+ hashtable.put("23", "黑龙江");
+ hashtable.put("31", "上海");
+ hashtable.put("32", "江苏");
+ hashtable.put("33", "浙江");
+ hashtable.put("34", "安徽");
+ hashtable.put("35", "福建");
+ hashtable.put("36", "江西");
+ hashtable.put("37", "山东");
+ hashtable.put("41", "河南");
+ hashtable.put("42", "湖北");
+ hashtable.put("43", "湖南");
+ hashtable.put("44", "广东");
+ hashtable.put("45", "广西");
+ hashtable.put("46", "海南");
+ hashtable.put("50", "重庆");
+ hashtable.put("51", "四川");
+ hashtable.put("52", "贵州");
+ hashtable.put("53", "云南");
+ hashtable.put("54", "西藏");
+ hashtable.put("61", "陕西");
+ hashtable.put("62", "甘肃");
+ hashtable.put("63", "青海");
+ hashtable.put("64", "宁夏");
+ hashtable.put("65", "新疆");
+ hashtable.put("71", "台湾");
+ hashtable.put("81", "香港");
+ hashtable.put("82", "澳门");
+ hashtable.put("91", "国外");
+ return hashtable;
+ }
+
+ /**
+ * 判断字符串是否为数字
+ *
+ * @param str
+ * @return
+ */
+ private static boolean isStrNum(String str) {
+ Pattern pattern = compile("[0-9]*");
+ Matcher isNum = pattern.matcher(str);
+ if (isNum.matches()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * 判断字符串是否为日期格式
+ *
+ * @param strDate
+ * @return
+ */
+ public static boolean isStrDate(String strDate) {
+ Pattern pattern = compile("^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$");
+ Matcher m = pattern.matcher(strDate);
+ if (m.matches()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ //根据身份证号判断性别 1男2女0未知
+ public static String getGender(String idCard) {
+ String gender = "0";
+ if (!IdCardNoValidatorUtils.checkIsIdCardNo(idCard)) {
+ return gender;
+ }
+ if (idCard.length() == 18) {
+ if (Integer.parseInt(idCard.substring(16).substring(0, 1)) % 2 == 0) {
+ gender = "2";
+ } else {
+ gender = "1";
+ }
+ } else if (idCard.length() == 15) {
+ String usex = idCard.substring(14, 15);
+ if (Integer.parseInt(usex) % 2 == 0) {
+ gender = "2";
+ } else {
+ gender = "1";
+ }
+ }
+ return gender;
+ }
+
+}
+
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java
index c5ae8767a2..e98cc09fe7 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java
@@ -50,7 +50,10 @@ public class ValidatorUtils {
List> customerShowGroups = new ArrayList<>();
List> internalGroups = new ArrayList<>();
-
+ if (groups == null || groups.length ==0){
+ validate(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR ,object,groups);
+ return;
+ }
Arrays.asList(groups).forEach(g -> {
if (CustomerClientShowGroup.class.isAssignableFrom(g)) {
//如果派生自客户端显示分组,那么会优先校验,并且将错误提示给客户端,返回客户端可见的错误码
diff --git a/epmet-gateway/deploy/docker-compose-dev.yml b/epmet-gateway/deploy/docker-compose-dev.yml
index d6e496766a..393d9ab000 100644
--- a/epmet-gateway/deploy/docker-compose-dev.yml
+++ b/epmet-gateway/deploy/docker-compose-dev.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-gateway-server:
container_name: epmet-gateway-server-dev
- image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.13
+ image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.18
ports:
- "8080:8080"
network_mode: host # 使用现有网络
diff --git a/epmet-gateway/deploy/docker-compose-test.yml b/epmet-gateway/deploy/docker-compose-test.yml
index 6a3c273155..9ceffc1c63 100644
--- a/epmet-gateway/deploy/docker-compose-test.yml
+++ b/epmet-gateway/deploy/docker-compose-test.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-gateway-server:
container_name: epmet-gateway-server-test
- image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-gateway:0.3.12
+ image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-gateway:0.3.18
ports:
- "8080:8080"
network_mode: host # 使用现有网络
diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml
index 52fe2026f8..354c47f3ea 100644
--- a/epmet-gateway/pom.xml
+++ b/epmet-gateway/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.13
+ 0.3.18
com.epmet
epmet-cloud
@@ -169,6 +169,18 @@
lb://resi-home-server
+
+ lb://gov-voice-server
+
+
+ lb://resi-voice-server
+
+
+ lb://data-report-server
+
+
+ lb://data-statistical-server
+
@@ -241,6 +253,14 @@
lb://common-service-server
lb://resi-home-server
+
+ lb://gov-voice-server
+
+ lb://resi-voice-server
+
+ lb://data-report-server
+
+ lb://data-statistical-server
diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
index acb3d166b5..75cb2d2151 100644
--- a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
+++ b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
@@ -70,58 +70,98 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory().error(EpmetErrorCode.ERR10005.getCode(),EpmetErrorCode.ERR10005.getMsg()));
+ String token = getTokenFromRequest(request);
+ //BaseTokenDto baseTokenDto = StringUtils.isNotBlank(token) ? getBaseTokenDto(token, jwtTokenUtils) : null;
+ BaseTokenDto baseTokenDto;
+ if(StringUtils.isNotBlank(token)){
+ try{
+ baseTokenDto = getBaseTokenDto(token, jwtTokenUtils);
+ }catch(RenException e){
+ return response(exchange,new Result<>().error(e.getCode(),e.getMsg()));
+ }
+ }else{
+ baseTokenDto = null;
}
- try {
- BaseTokenDto baseTokenDto = getBaseTokenDto(token, jwtTokenUtils);
+
+ String customerId = "";
+
+ if (baseTokenDto != null) {
if (AppClientConstant.APP_RESI.equals(baseTokenDto.getApp())) {
// 居民端
TokenDto resiTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, cpUserDetailRedis, TokenDto.class);
- validateTokenDto(resiTokenDto, token);
+ if (resiTokenDto != null) {
+ customerId = resiTokenDto.getCustomerId();
+ baseTokenDto = resiTokenDto;
+ }
} else if (AppClientConstant.APP_GOV.equals(baseTokenDto.getApp())) {
// 政府端
GovTokenDto govTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, cpUserDetailRedis, GovTokenDto.class);
- validateTokenDto(govTokenDto, token);
+ if (govTokenDto != null) {
+ customerId = govTokenDto.getCustomerId();
+ baseTokenDto = govTokenDto;
+ }
} else if(AppClientConstant.APP_OPER.equals(baseTokenDto.getApp())){
//运营端
TokenDto resiTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, cpUserDetailRedis, TokenDto.class);
- validateTokenDto(resiTokenDto, token);
+ if (resiTokenDto != null) {
+ customerId = resiTokenDto.getCustomerId();
+ baseTokenDto = resiTokenDto;
+ }
}
+ }
- //当前登录用户userId,添加到header中
+ //需要认证
+ if (needAuth(requestUri)) {
+ if (StringUtils.isBlank(token)) {
+ return response(exchange,new Result<>().error(EpmetErrorCode.ERR10005.getCode(),EpmetErrorCode.ERR10005.getMsg()));
+ }
+ // 校验token
+ try {
+ validateTokenDto(baseTokenDto, token);
+ } catch (RenException e) {
+ return response(exchange,new Result<>().error(e.getCode(),e.getMsg()));
+ }
+ }
+
+ if (baseTokenDto != null) {
String redisKey = baseTokenDto.getApp() + "-" + baseTokenDto.getClient() + "-" + baseTokenDto.getUserId();
logger.info("redisKey=" + redisKey);
- ServerHttpRequest build = exchange.getRequest().mutate()
+ exchange.getRequest().mutate()
.header(Constant.APP_USER_KEY, redisKey)
.header(AppClientConstant.APP,baseTokenDto.getApp())
.header(AppClientConstant.CLIENT,baseTokenDto.getClient())
.header(AppClientConstant.USER_ID,baseTokenDto.getUserId())
- .build();
+ .header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()})
+ ;
+ if(StringUtils.equals(baseTokenDto.getApp(),"gov")){
+ exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID,customerId);
+ }
+ ServerHttpRequest build = exchange.getRequest().mutate().build();
return chain.filter(exchange.mutate().request(build).build());
- }catch(RenException e){
- return response(exchange,new Result<>().error(e.getCode(),e.getMsg()));
}
+
+ return chain.filter(exchange);
};
}
+ /**
+ * 获取事务流水号
+ * @return
+ */
+ public static String getTransactionSerial() {
+ String[] letterPool = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"
+ , "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
+
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < 2; i++) {
+ sb.append(letterPool[(int) (Math.random() * 25)]);
+ }
+
+ sb.append(System.currentTimeMillis());
+ return sb.toString();
+ }
+
//public TokenDto getLoginUserInfo(String token) {
// //是否过期
// Claims claims = jwtTokenUtils.getClaimByToken(token);
@@ -160,7 +200,12 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory filter(ServerWebExchange exchange, GatewayFilterChain chain) {
- ServerHttpRequest request = exchange.getRequest();
- HttpHeaders headers = request.getHeaders();
- String token = headers.getFirst(Constant.AUTHORIZATION_HEADER);
- if (StringUtils.isBlank(token)) {
- token = headers.getFirst(Constant.TOKEN_HEADER);
- logger.info("token=" + token);
- } else {
- logger.info("authorization=" + token);
- }
- if (StringUtils.isBlank(token)) {
- token = request.getQueryParams().getFirst(Constant.AUTHORIZATION_HEADER);
- logger.info("params token:" + token);
- }
-
- if (StringUtils.isBlank(token)) {
- return chain.filter(exchange);
- }
-
- BaseTokenDto baseTokenDto = getBaseTokenDto(token, jwtTokenUtils);
-
- if (baseTokenDto != null) {
- ServerHttpRequest build = exchange.getRequest().mutate()
- .header(AppClientConstant.USER_ID, new String[]{baseTokenDto.getUserId()})
- .header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()})
- .build();
- return chain.filter(exchange.mutate().request(build).build());
- }
-
- return chain.filter(exchange);
- }
-
- /**
- * 获取事务流水号
- * @return
- */
- public static String getTransactionSerial() {
- String[] letterPool = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"
- , "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
-
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < 2; i++) {
- sb.append(letterPool[(int) (Math.random() * 25)]);
- }
-
- sb.append(System.currentTimeMillis());
- return sb.toString();
- }
-}
+//package com.epmet.filter;
+//
+//import com.epmet.commons.tools.constant.AppClientConstant;
+//import com.epmet.commons.tools.constant.Constant;
+//import com.epmet.commons.tools.security.dto.BaseTokenDto;
+//import com.epmet.commons.tools.utils.CpUserDetailRedis;
+//import com.epmet.jwt.JwtTokenUtils;
+//import org.apache.commons.lang3.StringUtils;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.cloud.gateway.filter.GatewayFilterChain;
+//import org.springframework.cloud.gateway.filter.GlobalFilter;
+//import org.springframework.http.HttpHeaders;
+//import org.springframework.http.server.reactive.ServerHttpRequest;
+//import org.springframework.stereotype.Component;
+//import org.springframework.web.server.ServerWebExchange;
+//import reactor.core.publisher.Mono;
+//
+///**
+// * Feign调用发送请求的Filter
+// * 目前用于封装用户相关信息到request,供上游微服务使用
+// * 已过时,功能移入CpAuthGatewayFilterFacotry
+// */
+//@Component
+//@Deprecated
+//public class FeignRequestFilter implements GlobalFilter, UserTokenFilter {
+//
+// private Logger logger = LoggerFactory.getLogger(getClass());
+//
+// @Autowired
+// private JwtTokenUtils jwtTokenUtils;
+// @Autowired
+// private CpUserDetailRedis cpUserDetailRedis;
+//
+// @Override
+// public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) {
+// ServerHttpRequest request = exchange.getRequest();
+// HttpHeaders headers = request.getHeaders();
+// String token = headers.getFirst(Constant.AUTHORIZATION_HEADER);
+// if (StringUtils.isBlank(token)) {
+// token = headers.getFirst(Constant.TOKEN_HEADER);
+// logger.info("token=" + token);
+// } else {
+// logger.info("authorization=" + token);
+// }
+// if (StringUtils.isBlank(token)) {
+// token = request.getQueryParams().getFirst(Constant.AUTHORIZATION_HEADER);
+// logger.info("params token:" + token);
+// }
+//
+// if (StringUtils.isBlank(token)) {
+// return chain.filter(exchange);
+// }
+//
+// BaseTokenDto baseTokenDto = getBaseTokenDto(token, jwtTokenUtils);
+//
+// if (baseTokenDto != null) {
+// ServerHttpRequest build = exchange.getRequest().mutate()
+// .header(AppClientConstant.USER_ID, new String[]{baseTokenDto.getUserId()})
+// .header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()})
+// .build();
+// return chain.filter(exchange.mutate().request(build).build());
+// }
+//
+// return chain.filter(exchange);
+// }
+//
+// /**
+// * 获取事务流水号
+// * @return
+// */
+// public static String getTransactionSerial() {
+// String[] letterPool = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"
+// , "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
+//
+// StringBuilder sb = new StringBuilder();
+// for (int i = 0; i < 2; i++) {
+// sb.append(letterPool[(int) (Math.random() * 25)]);
+// }
+//
+// sb.append(System.currentTimeMillis());
+// return sb.toString();
+// }
+//}
diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml
index ba74ff4bfd..f67bd8fdec 100644
--- a/epmet-gateway/src/main/resources/bootstrap.yml
+++ b/epmet-gateway/src/main/resources/bootstrap.yml
@@ -241,6 +241,42 @@ spring:
filters:
- StripPrefix=1
- CpAuth=true
+ #政府端-党建声音
+ - id: gov-voice-server
+ uri: @gateway.routes.gov-voice-server.uri@
+ order: 26
+ predicates:
+ - Path=${server.servlet.context-path}/gov/voice/**
+ filters:
+ - StripPrefix=1
+ - CpAuth=true
+ #居民端-党建声音
+ - id: resi-voice-server
+ uri: @gateway.routes.resi-voice-server.uri@
+ order: 27
+ predicates:
+ - Path=${server.servlet.context-path}/resi/voice/**
+ 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
new file mode 100644
index 0000000000..5bba5f2cb4
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/pom.xml
@@ -0,0 +1,23 @@
+
+
+
+ data-report
+ com.epmet
+ 2.0.0
+
+ 4.0.0
+
+ 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..7f888a0b0d
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java
@@ -0,0 +1,30 @@
+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 {
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPatiFlag不能为空", groups = {AddUserInternalGroup.class})
+ private String regOrPatiFlag;
+
+ /**
+ * day:日维度 | month:月维度 | (周、季、年)…
+ */
+ @NotBlank(message = "type不能为空", groups = {AddUserInternalGroup.class})
+ 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..0532ac521a
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java
@@ -0,0 +1,28 @@
+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;
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空",groups = {AddUserInternalGroup.class})
+ private String regOrPartiFlag;
+
+ @NotBlank(message = "查询日期不能为空",groups = {AddUserInternalGroup.class})
+ 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..f0f8303642
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java
@@ -0,0 +1,29 @@
+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;
+
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空", groups = {AddUserInternalGroup.class})
+ private String regOrPartiFlag;
+
+ @NotBlank(message = "查询日期不能为空", groups = {AddUserInternalGroup.class})
+ 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..047d909ee2
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java
@@ -0,0 +1,24 @@
+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;
+ public interface AddUserInternalGroup {
+ }
+ /**
+ * reg:注册居民 parti:参与用户,如果值为null,默认为reg
+ */
+ @NotBlank(message = "regOrPartiFlag不能为空",groups = {AddUserInternalGroup.class})
+ 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..a72096446c
--- /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 String dateId;
+ /**
+ * 注册居民数
+ */
+ 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..cfc64da174
--- /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 = "day";
+
+}
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..42489e9b4a
--- /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 = "day";
+ 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..a23dfa1a62
--- /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 DAY = "day";
+ 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..46259526ce
--- /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 = "day";
+}
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/Dockerfile b/epmet-module/data-report/data-report-server/Dockerfile
new file mode 100644
index 0000000000..1f773a109f
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/Dockerfile
@@ -0,0 +1,11 @@
+FROM java:8
+
+RUN export LANG="zh_CN.UTF-8"
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
+RUN echo 'Asia/Shanghai' > /etc/timezone
+
+COPY ./target/*.jar ./app.jar
+
+EXPOSE 8109
+
+ENTRYPOINT ["sh", "-c", "$RUN_INSTRUCT"]
\ No newline at end of file
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
new file mode 100644
index 0000000000..2258dd43cf
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
@@ -0,0 +1,17 @@
+version: "3.7"
+services:
+ data-report-server:
+ container_name: data-report-server-dev
+ image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.8
+ ports:
+ - "8109:8109"
+ network_mode: host # 使用现有网络
+ volumes:
+ - "/opt/epmet-cloud-logs/dev:/logs"
+ environment:
+ RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
+ deploy:
+ resources:
+ limits:
+ cpus: '0.1'
+ 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
new file mode 100644
index 0000000000..3c34b09319
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
@@ -0,0 +1,17 @@
+version: "3.7"
+services:
+ data-report-server:
+ 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"
+ network_mode: host # 使用现有网络
+ volumes:
+ - "/opt/epmet-cloud-logs/test:/logs"
+ environment:
+ RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
+ deploy:
+ resources:
+ limits:
+ cpus: '0.1'
+ 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
new file mode 100644
index 0000000000..a03e16e222
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/pom.xml
@@ -0,0 +1,164 @@
+
+
+
+ 0.3.8
+ data-report-server
+
+
+ data-report
+ com.epmet
+ 2.0.0
+
+ 4.0.0
+
+
+
+ com.epmet
+ data-report-client
+ 2.0.0
+
+
+ com.epmet
+ epmet-commons-mybatis
+ 2.0.0
+
+
+ com.epmet
+ epmet-user-client
+ 2.0.0
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework
+ spring-context-support
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ de.codecentric
+ spring-boot-admin-starter-client
+ ${spring.boot.admin.version}
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.epmet
+ epmet-commons-service-call
+ 0.3.1
+
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+ ${project.basedir}/src/main/java
+
+
+ true
+ ${basedir}/src/main/resources
+
+
+
+
+
+
+ dev
+
+ true
+
+
+ 8109
+ dev
+
+
+
+
+
+ epmet_data_statistical_user
+ EpmEt-db-UsEr
+
+
+ 0
+ 192.168.1.130
+ 6379
+ 123456
+
+
+ true
+ 122.152.200.70:8848
+ fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b
+
+
+ false
+
+
+
+ false
+
+
+
+ test
+
+
+ 8109
+ test
+
+
+
+
+
+ epmet
+ elink@833066
+
+
+ 0
+ r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com
+ 6379
+ EpmEtrEdIs!q@w
+
+
+ true
+ 192.168.10.150:8848
+ 67e3c350-533e-4d7c-9f8f-faf1b4aa82ae
+
+
+ false
+
+
+
+ true
+
+
+
+
+
\ No newline at end of file
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
new file mode 100644
index 0000000000..cee0ed9096
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
@@ -0,0 +1,17 @@
+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/config/ModuleConfigImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
new file mode 100644
index 0000000000..c52ec15b50
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2018 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+package com.epmet.config;
+
+import com.epmet.commons.tools.config.ModuleConfig;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author Mark sunlightcs@gmail.com
+ * @since 1.0.0
+ */
+@Service
+public class ModuleConfigImpl implements ModuleConfig {
+ @Override
+ public String getName() {
+ return "data-report";
+ }
+}
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..47a4765288
--- /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.DAY.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..5f3cfaa290
--- /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,UserSummaryInfoFormDTO.AddUserInternalGroup.class);
+ 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,UserSubAgencyFormDTO.AddUserInternalGroup.class);
+ 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, UserSubGridFormDTO.AddUserInternalGroup.class);
+ 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, UserIncrTrendFormDTO.AddUserInternalGroup.class);
+ List userIncrTrendResultDTO = userService.incrTrendV2(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..7b72652ea8
--- /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 注册用户:机关、日增量折现图 近90天
+ * @Date 2020/6/23 11:24
+ **/
+ List selectRegDayIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description 注册用户:机关、月增量折线图 近12个月包含当前月
+ * @Date 2020/6/23 11:24
+ **/
+ List selectRegMonthIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description 参与用户:机关、日增量折线图 近90天
+ * @Date 2020/6/23 11:24
+ **/
+ List selectParticipationUserDayIncr(@Param("agencyId")String myAgencyId);
+
+ /**
+ * @return java.util.List
+ * @param myAgencyId
+ * @author yinzuomei
+ * @description 参与用户:机关、月增量插线图 近12个月 包含当前月
+ * @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