diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index f759f036b9..8e526e2a73 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://192.168.1.130:3306/epmet_user?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: epmet_dba password: EpmEt-dbA-UsEr #oracle配置 diff --git a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java index 1b9215e22a..1015ade75d 100644 --- a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java +++ b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java @@ -48,14 +48,11 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { public void insertFill(MetaObject metaObject) { Date date = new Date(); if (metaObject.getOriginalObject() instanceof BaseEpmetEntity) { - String loginUserId = loginUserUtil.getLoginUserId(); // epmet项目新增的 - loginUserId = StringUtils.isBlank(loginUserId) ? Constant.APP_USER_FLAG : loginUserId; - //Long deptId = user == null ? null : user.getDeptId(); setFieldValByName(FieldConstant.CREATED_TIME_HUMP, date, metaObject); - setFieldValByName(FieldConstant.CREATED_BY_HUMP, loginUserId, metaObject); + setFieldValByName(FieldConstant.CREATED_BY_HUMP, getCreatedByFieldValue(metaObject), metaObject); setFieldValByName(FieldConstant.UPDATED_TIME_HUMP, date, metaObject); - setFieldValByName(FieldConstant.UPDATED_BY_HUMP, loginUserId, metaObject); + setFieldValByName(FieldConstant.UPDATED_BY_HUMP, getUpdatedByFieldValue(metaObject), metaObject); setFieldValByName(FieldConstant.REVISION_HUMP, NumConstant.ZERO, metaObject); //删除标识 setFieldValByName(FieldConstant.DEL_FLAG_HUMP, EpmetDelFlagEnum.NORMAL.value(), metaObject); @@ -82,6 +79,32 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { } } + public Object getCreatedByFieldValue(MetaObject metaObject) { + Object value = loginUserUtil.getLoginUserId(); + if (value == null) { + if (metaObject.hasGetter(FieldConstant.CREATED_BY_HUMP)) { + value = metaObject.getValue(FieldConstant.CREATED_BY_HUMP); + } + if (value == null) { + value = Constant.APP_USER_FLAG; + } + } + return value; + } + + public Object getUpdatedByFieldValue(MetaObject metaObject) { + Object value = loginUserUtil.getLoginUserId(); + if (value == null) { + if (metaObject.hasGetter(FieldConstant.UPDATED_BY_HUMP)) { + value = metaObject.getValue(FieldConstant.UPDATED_BY_HUMP); + } + if (value == null) { + value = Constant.APP_USER_FLAG; + } + } + return value; + } + @Override public void updateFill(MetaObject metaObject) { @@ -111,9 +134,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { //更新时间 setFieldValByName(UPDATE_DATE, new Date(), metaObject); } else if (fillEsuaEntity) { - String loginUserId = loginUserUtil.getLoginUserId(); - String userId = StringUtils.isBlank(loginUserId) ? Constant.APP_USER_FLAG : loginUserId; - setFieldValByName(FieldConstant.UPDATED_BY_HUMP, userId, metaObject); + setFieldValByName(FieldConstant.UPDATED_BY_HUMP, getUpdatedByFieldValue(metaObject), metaObject); setFieldValByName(FieldConstant.UPDATED_TIME_HUMP, new Date(), metaObject); } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java index 67a0f8ea1a..cf84ae177f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java @@ -107,10 +107,15 @@ public interface ServiceConstant { /** * 政府端-党建声音 */ - String GOV_VOICE_SERVER="gov-voice-server"; + String GOV_VOICE_SERVER = "gov-voice-server"; /** * 居民端-党建声音 */ - String RESI_VOICE_SERVER="resi-voice-server"; + String RESI_VOICE_SERVER = "resi-voice-server"; + + /** + * 数据统计 + */ + String DATA_STATISTICAL = "data_statistical"; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index e4fcc31010..532420581a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -1,8 +1,8 @@ /** * Copyright (c) 2018 人人开源 All rights reserved. - * + *

* https://www.renren.io - * + *

* 版权所有,侵权必究! */ @@ -16,7 +16,7 @@ import org.joda.time.format.DateTimeFormatter; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.Date; +import java.util.*; /** * 日期处理工具类 @@ -25,21 +25,37 @@ import java.util.Date; * @since 1.0.0 */ public class DateUtils { - /** 时间格式(yyyy-MM-dd) */ - public final static String DATE_PATTERN = "yyyy-MM-dd"; - /** 时间格式(yyyy-MM-dd HH:mm:ss) */ - public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; + + /** 季度月份列表 */ + public static final List Q1Months = Arrays.asList(1, 2, 3); + public static final List Q2Months = Arrays.asList(4, 5, 6); + public static final List Q3Months = Arrays.asList(7, 8, 9); + public static final List Q4Months = Arrays.asList(10, 11, 12); + + /** 时间格式(yyyy-MM-dd) */ + public final static String DATE_PATTERN = "yyyy-MM-dd"; + /** 时间格式(yyyy-MM-dd HH:mm:ss) */ + public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; /** 时间格式(yyyyMMddHHmmss) */ - public final static String DATE_TIME_NO_SPLIT = "yyyyMMddHHmmss"; + public final static String DATE_TIME_NO_SPLIT = "yyyyMMddHHmmss"; /** 时间格式(yyyy-MM-dd HH:mm) */ public final static String DATE_TIME_PATTERN_END_WITH_MINUTE = "yyyy-MM-dd HH:mm"; + public static final String DATE_PATTERN_YYYYMMDD = "yyyyMMdd"; + public static final String DATE_NAME_PATTERN = "yyyy年MM月dd日"; + public static final String MONTH_NAME_PATTERN = "yyyy年MM月"; + public static final String DATE_PATTERN_YYYY = "yyyy"; + public static final String DATE_PATTERN_YYYYMM = "yyyyMM"; + public static final String DATE_PATTERN_YYYY_MM = "yyyy-MM"; + public static final String WEEK_TYPE_ENGLISH = "english"; + public static final String WEEK_TYPE_CHINESE = "chinese"; + /** * 日期格式化 日期格式为:yyyy-MM-dd * @param date 日期 - * @return 返回yyyy-MM-dd格式日期 + * @return 返回yyyy-MM-dd格式日期 */ - public static String format(Date date) { + public static String format(Date date) { return format(date, DATE_PATTERN); } @@ -47,10 +63,10 @@ public class DateUtils { * 日期格式化 日期格式为:yyyy-MM-dd * @param date 日期 * @param pattern 格式,如:DateUtils.DATE_TIME_PATTERN - * @return 返回yyyy-MM-dd格式日期 + * @return 返回yyyy-MM-dd格式日期 */ public static String format(Date date, String pattern) { - if(date != null){ + if (date != null) { SimpleDateFormat df = new SimpleDateFormat(pattern); return df.format(date); } @@ -61,7 +77,7 @@ public class DateUtils { * 日期解析 * @param date 日期 * @param pattern 格式,如:DateUtils.DATE_TIME_PATTERN - * @return 返回Date + * @return 返回Date */ public static Date parse(String date, String pattern) { try { @@ -78,7 +94,7 @@ public class DateUtils { * @param pattern 日期的格式,如:DateUtils.DATE_TIME_PATTERN */ public static Date stringToDate(String strDate, String pattern) { - if (StringUtils.isBlank(strDate)){ + if (StringUtils.isBlank(strDate)) { return null; } @@ -89,7 +105,7 @@ public class DateUtils { /** * 根据周数,获取开始日期、结束日期 * @param week 周期 0本周,-1上周,-2上上周,1下周,2下下周 - * @return 返回date[0]开始日期、date[1]结束日期 + * @return 返回date[0]开始日期、date[1]结束日期 */ public static Date[] getWeekStartAndEnd(int week) { DateTime dateTime = new DateTime(); @@ -101,6 +117,21 @@ public class DateUtils { return new Date[]{beginDate, endDate}; } + /** + * 根据日期,获取周开始日期、结束日期 + * @param date + * @return + */ + public static Date[] getWeekStartAndEnd(Date date) { + DateTime dateTime = new DateTime(date); + LocalDate localDate = new LocalDate(dateTime); + + localDate = localDate.dayOfWeek().withMinimumValue(); + Date beginDate = localDate.toDate(); + Date endDate = localDate.plusDays(6).toDate(); + return new Date[]{beginDate, endDate}; + } + /** * 对日期的【秒】进行加/减 * @@ -184,4 +215,260 @@ public class DateUtils { DateTime dateTime = new DateTime(date); return dateTime.plusYears(years).toDate(); } + + /** + * 获取星期几,例如:星期一 + * @param date + * @return + */ + public static String getWeekNameOfWeek(Date date, String type) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); + String[] chineseWeekDayName = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; + String[] englishWeekDayName = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; + + String weekDayName; + switch (type) { + case WEEK_TYPE_ENGLISH: + weekDayName = englishWeekDayName[dayOfWeek - 1]; + break; + case WEEK_TYPE_CHINESE: + weekDayName = chineseWeekDayName[dayOfWeek - 1]; + break; + default: + weekDayName = ""; + } + + return weekDayName; + } + + //public static String getEnglishWeekName(Date date) { + // new SimpleDateFormat("E"); + //} + + /** + * 获取属于一年的第几周 + * @param date + * @return + */ + public static int getWeekOfYear(Date date) { + DateTime dateTime = new DateTime(date); + return dateTime.getWeekOfWeekyear(); + } + + /** + * 按照格式进行时间取整 + * @param targetDate + * @param pattern + * @return + */ + public static Date integrate(Date targetDate, String pattern) { + return DateUtils.parse(DateUtils.format(targetDate, pattern), pattern); + } + + /** + * 查询指定日期是几月 + * @param date + * @return + */ + public static int getMonthOfYear(Date date) { + LocalDate localDate = new LocalDate(date); + return localDate.getMonthOfYear(); + } + + /** + * 获取季度 + * @param date + * @return + */ + public static int getQuarterIndex(Date date) { + LocalDate localDate = new LocalDate(date); + int monthOfYear = localDate.getMonthOfYear(); + if (Q1Months.contains(monthOfYear)) { + return 1; + } + if (Q2Months.contains(monthOfYear)) { + return 2; + } + if (Q3Months.contains(monthOfYear)) { + return 3; + } + return 4; + } + + /** + * 根据季度查询季度的月份列表 + * @param quarterIndex + * @return + */ + public static List getMonthsByQuarterIndex(Integer quarterIndex) { + switch (quarterIndex) { + case 1: + return Q1Months; + case 2: + return Q2Months; + case 3: + return Q3Months; + default: + return Q4Months; + } + } + + /** + * 获取季度的开始date + * @param year + * @param quarterIndex + * @return + */ + public static Date getQuarterStartDate(String year, Integer quarterIndex) { + List months = getMonthsByQuarterIndex(quarterIndex); + String yyyyMM = year.concat(String.format("%02d", months.get(0))); + return DateUtils.parse(yyyyMM, DateUtils.DATE_PATTERN_YYYYMM); + } + + /** + * 获取季度的结束date + * @param year + * @param quarterIndex + * @return + */ + public static Date getQuarterEndDate(String year, Integer quarterIndex) { + List months = getMonthsByQuarterIndex(quarterIndex); + String yyyyMM = year.concat(String.format("%02d", months.get(2))); + Date nextMonth = DateUtils.addDateMonths(DateUtils.parse(yyyyMM, DateUtils.DATE_PATTERN_YYYYMM), 1); + // 用下一个季度开头-1天就是上一个月季度最后一天 + return DateUtils.addDateDays(nextMonth, -1); + } + + public static void main(String[] args) { + //int weekOfYear = getWeekOfYear(new Date()); + String format = String.format("%02d", 9); + + System.out.println(666); + } + + /** + * 获取日期前一天 + * @author zhaoqifeng + * @date 2020/6/22 11:08 + * @param date + * @return java.util.Date + */ + public static Date getBeforeDay(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DATE, -1); + return calendar.getTime(); + } + + /** + * @return java.lang.String + * @param dateStr yyyyMMdd返回yyyy.MM.dd yyyyMM返回yyyy/MM + * @author yinzuomei + * @description 返回yyyy.MM.dd + * @Date 2020/6/22 18:38 + **/ + public static String getxAxisDatePattern(String dateStr,String character){ + if(StringUtils.isNotBlank(dateStr)&&dateStr.length()==8){ + return String.valueOf(new StringBuffer(dateStr).insert(4,character).insert(7,character)); + }else if(StringUtils.isNotBlank(dateStr)&&dateStr.length()==6){ + return String.valueOf(new StringBuffer(dateStr).insert(4,character)); + } + return dateStr; + } + + /** + * @return java.lang.String + * @param beforDay + * @author yinzuomei + * @description 获取当前日期的前n天 返回yyyyMMdd + * @Date 2020/6/23 1:50 + **/ + public static String getBeforeNDay(int beforDay){ + Calendar c = Calendar.getInstance(); + c.add(Calendar.DATE, - beforDay); + Date date = c.getTime(); + return DateUtils.format(date,DateUtils.DATE_PATTERN_YYYYMMDD); + } + + /** + * @return java.lang.String + * @param beforMonth + * @author yinzuomei + * @description 获取当前 月份的前n月 返回yyyyMM + * @Date 2020/6/23 1:50 + **/ + public static String getBeforeNMonth(int beforMonth){ + Calendar c = Calendar.getInstance(); + c.add(Calendar.MONTH, - beforMonth); + Date date = c.getTime(); + return DateUtils.format(date,DateUtils.DATE_PATTERN_YYYYMM); + } + + /** + * @return java.util.List 返回yyyyMMdd + * @param startTime yyyyMMdd + * @param endTime yyyyMMdd + * @author yinzuomei + * @description 获取两个日期之间所有的日期集合,包含开始结束 + * @Date 2020/6/23 1:26 + **/ + public static List getDaysBetween(String startTime, String endTime){ + // 返回的日期集合 + List days = new ArrayList(); + try{ + Date start = DateUtils.parse(startTime,DateUtils.DATE_PATTERN_YYYYMMDD); + Date end = DateUtils.parse(endTime,DateUtils.DATE_PATTERN_YYYYMMDD); + + Calendar tempStart = Calendar.getInstance(); + tempStart.setTime(start); + + Calendar tempEnd = Calendar.getInstance(); + tempEnd.setTime(end); + // 日期加1(包含结束) + tempEnd.add(Calendar.DATE, +1); + while (tempStart.before(tempEnd)) { + days.add(DateUtils.format(tempStart.getTime(),DateUtils.DATE_PATTERN_YYYYMMDD)); + tempStart.add(Calendar.DAY_OF_YEAR, 1); + } + }catch (Exception e){ + e.printStackTrace(); + } + return days; + } + + /** + * @return java.util.List + * @param minDate yyyMM + * @param maxDate yyyyMM + * @author yinzuomei + * @description 计算两个月份中间所有的月份包含起始 + * @Date 2020/6/23 2:10 + **/ + public static List getMonthBetween(String minDate, String maxDate){ + ArrayList result = new ArrayList(); + try{ + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");//格式化为年月 + + Calendar min = Calendar.getInstance(); + Calendar max = Calendar.getInstance(); + + min.setTime(sdf.parse(minDate)); + min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 1); + + max.setTime(sdf.parse(maxDate)); + max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 2); + + Calendar curr = min; + while (curr.before(max)) { + result.add(sdf.format(curr.getTime())); + curr.add(Calendar.MONTH, 1); + } + min = null;max = null;curr = null; + }catch(Exception e){ + e.printStackTrace(); + } + return result; + } } diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index a7c4228a85..354c47f3ea 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -175,6 +175,12 @@ lb://resi-voice-server + + lb://data-report-server + + + lb://data-statistical-server + @@ -251,6 +257,10 @@ lb://gov-voice-server lb://resi-voice-server + + lb://data-report-server + + lb://data-statistical-server diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 7ece7e0123..f67bd8fdec 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -259,6 +259,24 @@ spring: filters: - StripPrefix=1 - CpAuth=true + #政府端-数据首页 + - id: data-report-server + uri: @gateway.routes.data-report-server.uri@ + order: 28 + predicates: + - Path=${server.servlet.context-path}/data/report/** + filters: + - StripPrefix=1 + - CpAuth=true + #统计服务 + - id: data-statistical-server + uri: @gateway.routes.data-statistical-server.uri@ + order: 29 + predicates: + - Path=${server.servlet.context-path}/data/stats/** + filters: + - StripPrefix=1 + - CpAuth=true nacos: discovery: server-addr: @nacos.server-addr@ diff --git a/epmet-module/data-report/data-report-client/pom.xml b/epmet-module/data-report/data-report-client/pom.xml index f001810eaa..5bba5f2cb4 100644 --- a/epmet-module/data-report/data-report-client/pom.xml +++ b/epmet-module/data-report/data-report-client/pom.xml @@ -11,5 +11,13 @@ data-report-client + + + com.epmet + epmet-commons-tools + 2.0.0 + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java new file mode 100644 index 0000000000..f42d52fb72 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/UserAnalysisConstant.java @@ -0,0 +1,40 @@ +package com.epmet.constant; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 16:35 + */ +public interface UserAnalysisConstant { + + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + String REG_FLAG="reg"; + + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + String PARTI_FLAG="parti"; + + String QUERY_USER_AGENCY_FAILED="查询用户所属机关信息失败"; + + /** + * 普通居民(已注册) + */ + String REGISTERED_RESI= "居民"; + + /** + * 热心居民 + */ + String WARMHEARTED="热心居民"; + + /** + * 党员 + */ + String PARTYMEMBER="党员"; + + String DAY_TYPE="day"; + String MONTH_TYPE="month"; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java new file mode 100644 index 0000000000..243404052e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimAgencyDTO.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 机关维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织IDAGENCY_ID + */ + private String id; + + /** + * 组织名称 + */ + private String agencyName; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java new file mode 100644 index 0000000000..8487d6d220 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/DimGridDTO.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 客户网格维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * GRID_ID + */ + private String id; + + /** + * 网格名称 + */ + private String gridName; +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java new file mode 100644 index 0000000000..f4496d0199 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserIncrTrendFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form.user; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 按日、按月查询注册用户数(参与用户数)增量折线图 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:57 + */ +@Data +public class UserIncrTrendFormDTO implements Serializable { + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + @NotBlank(message = "regOrPartiFlag不能为空") + private String regOrPartiFlag; + + /** + * day:日维度 | month:月维度 | (周、季、年)… + */ + @NotBlank(message = "type不能为空") + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java new file mode 100644 index 0000000000..43d089e01a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubAgencyFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form.user; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 各机关注册用户数入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:47 + */ +@Data +public class UserSubAgencyFormDTO implements Serializable { + private static final long serialVersionUID = -4558978951554887536L; + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + @NotBlank(message = "regOrPartiFlag不能为空") + private String regOrPartiFlag; + + @NotBlank(message = "查询日期不能为空") + private String dateId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java new file mode 100644 index 0000000000..c9bc20b734 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSubGridFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form.user; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 直属网格注册用户数 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:52 + */ +@Data +public class UserSubGridFormDTO implements Serializable { + private static final long serialVersionUID = -1815903503939673149L; + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + @NotBlank(message = "regOrPartiFlag不能为空") + private String regOrPartiFlag; + + @NotBlank(message = "查询日期不能为空") + private String dateId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java new file mode 100644 index 0000000000..9b8bed1c07 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/user/UserSummaryInfoFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form.user; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 用户汇总信息 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:31 + */ +@Data +public class UserSummaryInfoFormDTO implements Serializable { + private static final long serialVersionUID = -1802471335671321322L; + + /** + * reg:注册居民 parti:参与用户,如果值为null,默认为reg + */ + @NotBlank(message = "regOrPartiFlag不能为空") + private String regOrPartiFlag; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java new file mode 100644 index 0000000000..a7f4e87dc5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/23 9:13 + */ +@Data +public class UserIncrTrendResDTO implements Serializable { + private static final long serialVersionUID = 290620373673325352L; + private Integer regIncr; + private Integer warmIncr; + private Integer partymemberIncr; + private String dateIdOrMonthId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java new file mode 100644 index 0000000000..bfd9b17535 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserIncrTrendResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.result.user; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 按日、按月查询注册用户数(参与用户数)增量折线图 返参 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 13:17 + */ +@Data +public class UserIncrTrendResultDTO implements Serializable { + /** + * 日期如果按日查询返回yyyy/MM/dd,如果按月返回yyyy/MM + */ + private String date; + + /** + * 居民、党员、热心居民返回中文描述 + */ + private String type; + + /** + * 增量值 + */ + private Integer value; + + // yyyyMMdd yyyyMM + @JsonIgnore + private String dateOrMonthId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java new file mode 100644 index 0000000000..f01c273e2b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 21:45 + */ +@Data +public class UserSubAgencyResDTO implements Serializable { + private static final long serialVersionUID = 5807572279154511198L; + /** + * 机关id + */ + private String agencyId; + + /** + * 机关名称 + */ + private String agencyName; + + /** + * 截止到本日参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日(参与用户中)居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日(参与用户中)热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日(参与用户中)党员总数 + */ + private Integer partymemberTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java new file mode 100644 index 0000000000..107b189660 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubAgencyResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result.user; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 各机关注册用户数入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:49 + */ +@Data +public class UserSubAgencyResultDTO implements Serializable { + private static final long serialVersionUID = 3038896791082755087L; + /** + * 辽阳路街道 + */ + private String name; + + /** + * 数值 + */ + private Integer value; + + /** + * 类型:居民、党员、热心居民 + */ + private String type; + + /** + * 机关id + */ + private String agencyId; + + @JsonIgnore + private Integer total; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java new file mode 100644 index 0000000000..e20c123147 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 直属网格注册用户数(参与用户、注册用户通用类) + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 23:57 + */ +@Data +public class UserSubGridResDTO implements Serializable { + private static final long serialVersionUID = 2203260762393704885L; + private String gridId; + private Integer regTotal; + private Integer resiTotal; + private Integer warmHeartedTotal; + private Integer partymemberTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java new file mode 100644 index 0000000000..5aa50aad9b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSubGridResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result.user; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 直属网格注册用户数 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:54 + */ +@Data +public class UserSubGridResultDTO implements Serializable { + private static final long serialVersionUID = -7432747804212305863L; + + /** + * 网格名称:eg:第一网格 + */ + private String name; + + /** + * 数值 + */ + private Integer value; + + /** + * 类型:居民、党员、热心居民 + */ + private String type; + + /** + * 网格id + */ + private String gridId; + + @JsonIgnore + private Integer total; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java new file mode 100644 index 0000000000..ccbcb009ed --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/UserSummaryInfoResultDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.result.user; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 用户汇总信息 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 12:34 + */ +@Data +public class UserSummaryInfoResultDTO implements Serializable { + private static final long serialVersionUID = -4270726421611289755L; + /** + * 数据更新至yyyy.MM.dd + */ + private String currentDate; + + /** + * 注册居民数 + */ + private Integer regTotal; + + /** + * 参与用户数 + */ + private Integer partiTotal; + + /** + * 党员数 + */ + private Integer partymemberTotal; + + /** + * 党员占比 + */ + private String partymemberProportion; + /** + * 热心居民数 + */ + private Integer warmHeartedTotal; + + /** + * 热心居民占比 + */ + private String warmHeartedProportion; + + @JsonIgnore + private BigDecimal partymemberProportionValue; + + @JsonIgnore + private BigDecimal warmHeartedProportionValue; + + @JsonIgnore + private String id; + + public UserSummaryInfoResultDTO(){ + this.currentDate=""; + this.regTotal=0; + this.partiTotal=0; + this.partymemberTotal=0; + this.partymemberProportion="0%"; + this.warmHeartedTotal=0; + this.warmHeartedProportion="0%"; + this.id=""; + } + + public static void main(String[] args) { + StringBuffer s=new StringBuffer("20190305").insert(4,".").insert(7,"."); + System.out.println(s); + + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java new file mode 100644 index 0000000000..699090f931 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/constant/GroupConstant.java @@ -0,0 +1,12 @@ +package com.epmet.group.constant; + +/** + * @Author zxc + * @CreateTime 2020/6/20 15:24 + */ +public interface GroupConstant { + + String MONTH = "month"; + String DATE = "date"; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java new file mode 100644 index 0000000000..627b5504c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/form/GroupIncrTrendFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.group.dto.form; + +import lombok.Data; +import lombok.NonNull; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 12:07 + */ +@Data +public class GroupIncrTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1788937450915240575L; + + public interface GroupJava {} + + /** + * 类型 month:月 date:日 + */ + @NotBlank(message = "type不能为空", groups = {GroupJava.class}) + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java new file mode 100644 index 0000000000..d9840d841d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GridInfoResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 14:30 + */ +@Data +public class GridInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 5301902590768338888L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java new file mode 100644 index 0000000000..50637d609d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupIncrTrendResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 12:03 + */ +@Data +public class GroupIncrTrendResultDTO implements Serializable { + + private static final long serialVersionUID = 5132636251609157706L; + + /** + * 日期 + */ + private String date; + + /** + * 值 【小组数量】 + */ + private Integer value; + + /** + * 类型 【小组数量】 + */ + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java new file mode 100644 index 0000000000..379f55cdf5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubAgencyResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 11:56 + * 网格小组——下级机关小组数柱状图 + */ +@Data +public class GroupSubAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = 8562403482616167221L; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + /** + * 类型 + */ + private String type; + + /** + * 机关ID + */ + private String agencyId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java new file mode 100644 index 0000000000..af7e4e84fa --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSubGridResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 11:56 + * 网格小组——下级机关小组数柱状图 + */ +@Data +public class GroupSubGridResultDTO implements Serializable { + + private static final long serialVersionUID = -3260124064513560994L; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + /** + * 类型 + */ + private String type; + + /** + * 机关ID + */ + private String gridId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java new file mode 100644 index 0000000000..a3e72d6f3a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/GroupSummaryInfoResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 11:05 + */ +@Data +public class GroupSummaryInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 网格总数量 + */ + private Integer gridTotalCount; + + /** + * 小组总数量 + */ + private Integer groupTotalCount; + + /** + * 小组平均人数 + */ + private Integer groupPeopleAvg; + + /** + * 小组人数中位数 + */ + private Integer groupPeopleMedian; + + /** + * 数据更新至 时间 + */ + private String deadline; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java new file mode 100644 index 0000000000..e4b182f09f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/group/dto/result/SubAgencyResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.group.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 14:02 + */ +@Data +public class SubAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = 2276056225590553307L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 机关名称 + */ + private String agencyName; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java new file mode 100644 index 0000000000..88d4f44c78 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/constant/IssueConstant.java @@ -0,0 +1,14 @@ +package com.epmet.issue.constant; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 14:07 + */ +public interface IssueConstant { + String MONTH = "month"; + String DATE = "date"; + String VOTING_NAME = "表决中"; + String SHIFT_NAME = "已转项目"; + String CLOSED_NAME = "已关闭"; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java new file mode 100644 index 0000000000..b4577b2811 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/form/IssueIncrtrendFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.issue.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:32 + */ +@Data +public class IssueIncrtrendFormDTO implements Serializable { + private static final long serialVersionUID = 4408419854627376175L; + /** + * 类型,按日date 按月month + */ + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java new file mode 100644 index 0000000000..961727e31c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueDataDTO.java @@ -0,0 +1,206 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 14:11 + */ +@Data +public class IssueDataDTO implements Serializable { + + private static final long serialVersionUID = 9136989870868730175L; + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织名 + */ + private String agencyName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格名 + */ + private String gridName; + + /** + * 年度ID + */ + private String yearId; + + /** + * 年度名 + */ + private String yearName; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 季度名 + */ + private String quarterName; + + /** + * 月度ID + */ + private String monthId; + + /** + * 月度名 + */ + private String monthName; + + /** + * 周ID + */ + private String weekId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 日期名 + */ + private String dateName; + + /** + * 当日议题增量 + */ + private Integer issueIncr; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 当日已转项目的议题数增量 + */ + private Integer shiftProjectIncr; + + /** + * 已转项目的议题总数 + */ + private Integer shiftProjectTotal; + + /** + * 已转项目所占百分比 + */ + private BigDecimal shiftProjectPercent; + + /** + * 当日表决中议题数增量 + */ + private Integer votingIncr; + + /** + * 表决中议题总数 + */ + private Integer votingTotal; + + /** + * 表决中议题所占百分比 + */ + private BigDecimal votingPercent; + + /** + * 当日已关闭议题数增量 + */ + private Integer closedIncr; + + /** + * 当日已关闭议题中已解决数量 + */ + private Integer closedResolvedIncr; + + /** + * 当日已关闭议题中无需解决数量 + */ + private Integer closedUnresolvedIncr; + + /** + * 已关闭议题总数 + */ + private Integer closedTotal; + + /** + * 已关闭议题中已解决总数 + */ + private Integer closedResolvedTotal; + + /** + * 已关闭议题中未解决总数 + */ + private Integer closedUnresolvedTotal; + + /** + * 已关闭议题所占百分比 + */ + private BigDecimal closedPercent; + + /** + * 已关闭议题中已解决百分比 + */ + private BigDecimal closedResolvedPercent; + + /** + * 已关闭议题中未解决百分比 + */ + private BigDecimal closedUnresolvedPercent; + + /** + * 当日已结案议题数 + */ + private Integer closedCaseIncr; + + /** + * 当日已结案议题中已解决数 + */ + private Integer closedCaseResolvedIncr; + + /** + * 当日已结案议题中未解决数 + */ + private Integer closedCaseUnresolvedIncr; + + /** + * 已结案议题总数 + */ + private Integer closedCaseTotal; + + /** + * 已结案议题中已解决总数 + */ + private Integer closedCaseResolvedTotal; + + /** + * 已结案议题中未解决总数 + */ + private Integer closedCaseUnresolvedTotal; + + /** + * 已结案议题中已解决百分比 + */ + private BigDecimal closedCaseResolvedPercent; + + /** + * 已结案议题中未解决百分比 + */ + private BigDecimal closedCaseUnresolvedPercent; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java new file mode 100644 index 0000000000..d63d332a9b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueIncrtrendResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:30 + */ +@NoArgsConstructor +@Data +public class IssueIncrtrendResultDTO implements Serializable { + + private static final long serialVersionUID = 7762529188251385355L; + /** + * 日期 + */ + private String date; + /** + * 状态(表决中,已转项目,已关闭) + */ + private String type; + /** + * 数量 + */ + private Integer value; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java new file mode 100644 index 0000000000..c401d5ecc4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubAgencyResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:24 + */ +@NoArgsConstructor +@Data +public class IssueSubAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = 2640337888693960513L; + /** + * 组织ID + */ + private String agencyId; + /** + * 组织名 + */ + private String name; + /** + * 类型 表决中,已转项目,已关闭 + */ + private String type; + /** + * 数量 + */ + private Integer value; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java new file mode 100644 index 0000000000..3313f0a8e7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSubGridResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:27 + */ +@Data +public class IssueSubGridResultDTO implements Serializable { + private static final long serialVersionUID = -3318384216762207856L; + /** + * 网格名 + */ + private String name; + /** + * 类型 表决中,已转项目,已关闭 + */ + private String type; + /** + * 数量 + */ + private Integer value; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java new file mode 100644 index 0000000000..c53707c0a1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryInfoResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:17 + */ +@NoArgsConstructor +@Data +public class IssueSummaryInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -7959140755148294338L; + /** + * 机关ID + */ + private String agencyId; + /** + * 议题总数 + */ + private Integer issueTotal; + /** + * 表决中数量 + */ + private Integer votingTotal; + /** + * 已转项目数量 + */ + private Integer shiftProjectTotal; + /** + * 已关闭数量 + */ + private Integer closedTotal; + /** + * 表决中占比 + */ + private String votingRatio; + /** + * 已转项目占比 + */ + private String shiftProjectRatio; + /** + * 已关闭占比 + */ + private String closedRatio; + /** + * 更新至日期 + */ + private String dateName; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java new file mode 100644 index 0000000000..f6940edeeb --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/issue/dto/result/IssueSummaryPieResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.issue.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 16:21 + */ +@NoArgsConstructor +@Data +public class IssueSummaryPieResultDTO implements Serializable { + + private static final long serialVersionUID = -971115426789868580L; + /** + * 名称 表决中,已转项目,已关闭 + */ + private String name; + /** + * 值 + */ + private Integer value; + /** + * 百分比 + */ + private String ratio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java new file mode 100644 index 0000000000..d3c8d8bf1c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java @@ -0,0 +1,21 @@ +package com.epmet.project.constant; + +/** + * @Author sun + * @Description 数据-项目 + **/ +public interface ProjectConstant { + + String DATE = "date"; + String MONTH = "month"; + + /** + * 根据Token获取组织信息失败 + */ + String GET_AGENCYID = "根据Token获取组织信息失败"; + /** + * 参数异常 + */ + String TYPE_EXCEPTION = "必要参数为空或参数格式错误"; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java new file mode 100644 index 0000000000..ab608a0184 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java @@ -0,0 +1,182 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.project.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据,每日定时执行,先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactAgencyProjectDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id 【dim_customer.id】 + */ + private String customerId; + + /** + * 机关Id 【dim_agency.id】 + */ + private String agencyId; + + /** + * 上级组织Id【dim_agency.pid】 + */ + private String parentId; + + /** + * 日维度Id 【dim_date.id】 + */ + private String dateId; + + /** + * 周维度Id 【dim_week.id】 + */ + private String weekId; + + /** + * 月维度Id 【dim_month.id】 + */ + private String monthId; + + /** + * 季ID + */ + private String quarterId; + + /** + * 年维度Id 【dim_year.id】 + */ + private String yearId; + + /** + * 截止当日项目总数 【当前组织及下级项目总数】 + */ + private Integer projectTotal; + + /** + * 截止当日处理中项目数 【当前组织及下级所有未结案项目总数】 + */ + private Integer pendingTotal; + + /** + * 截止当日处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】 + */ + private BigDecimal pendingRatio; + + /** + * 截止当日已结案项目数 【当前组织及下级已结案项目总数】 + */ + private Integer closedTotal; + + /** + * 截止当日已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】 + */ + private BigDecimal closedRatio; + + /** + * 截止当日已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】 + */ + private Integer resolvedTotal; + + /** + * 截止当日已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】 + */ + private BigDecimal resolvedRatio; + + /** + * 截止当日已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】 + */ + private Integer unresolvedTotal; + + /** + * 截止当日已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】 + */ + private BigDecimal unresolvedRatio; + + /** + * 当日项目总数 【当前组织及下级项目总数】 + */ + private Integer projectIncr; + + /** + * 当日处理中项目数 【当前组织及下级前一日新增处理中项目数】 + */ + private Integer pendingIncr; + + /** + * 当日已结案项目数 【当前组织及下级前一日新增结案项目数】 + */ + private Integer closedIncr; + + /** + * 当日已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】 + */ + private Integer resolvedIncr; + + /** + * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 + */ + private Integer unresolvedIncr; + + /** + * 删除标识 【0.未删除 1.已删除】 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java new file mode 100644 index 0000000000..a7364cfac9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.project.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 数据-项目-日/月数据查询-接口入参 + */ +@Data +public class ProjectIncrTrendFormDTO implements Serializable { + + private static final long serialVersionUID = -4929038359220814068L; + + public interface ProjectIncr { + } + + /** + * 类型 month:代表月 date:代表日 + */ + @NotBlank(message = "month / date 类型不能为空", groups = {ProjectIncr.class}) + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java new file mode 100644 index 0000000000..b53b2a9f14 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.project.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据-接口返参 + **/ +@Data +public class ProjectIncrTrendResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 日期(2020/1/1;2020/1/2...) + */ + private String date; + + /** + * 类型对应数量 + */ + private Integer value; + + /** + * 类型名称(处理中;已结案) + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java new file mode 100644 index 0000000000..31d25fe6bb --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.project.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据-接口返参 + **/ +@Data +public class ProjectSubAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 机关名称 + */ + private String name; + + /** + * 不同类型对应数据 + */ + private Integer value; + + /** + * 类型名称(处理中;已结案) + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java new file mode 100644 index 0000000000..19f1632be0 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.project.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据-接口返参 + **/ +@Data +public class ProjectSubGridResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 机关名称 + */ + private String name; + + /** + * 不同类型对应数据 + */ + private Integer value; + + /** + * 类型名称(处理中;已结案) + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java new file mode 100644 index 0000000000..b2b5c7d39b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.project.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据-接口返参 + **/ +@Data +public class ProjectSummaryInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 类型名称(处理中;已结案) + */ + private String name; + + /** + * 类型对应数量 + */ + private Integer value; + + /** + * 类型对应百分比(10% 10.1% 10.01%小数点后两位) + */ + @JsonIgnore + private BigDecimal ratioInt; + private String ratio; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java new file mode 100644 index 0000000000..220780be29 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java @@ -0,0 +1,56 @@ +package com.epmet.project.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author sun + * @Description 数据-项目-汇总数据-接口返参 + **/ +@Data +public class ProjectSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 更新日期 + */ + private String dateName; + + /** + * 处理中总数 + */ + private Integer pendingTotal; + + /** + * 处理中占比 + */ + @JsonIgnore + private BigDecimal pendingRatioInt; + private String pendingRatio; + + /** + * 已结案总数 + */ + private Integer closedTotal; + + /** + * 已结案占比 + */ + @JsonIgnore + private BigDecimal closedRatioInt; + private String closedRatio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java new file mode 100644 index 0000000000..8b52307d91 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/form/TagFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.publicity.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author jyy + * @CreateTime 2020/6/22 12:07 + */ +@Data +public class TagFormDTO implements Serializable { + + private static final long serialVersionUID = 1788937450915240575L; + + public interface GroupJava {} + + /** + * 获取数据条数;默认为10 + */ + private Integer pageSize; + + /** + * 时间查询维度;日:date;月:month;季:quarter;年:year + */ + @NotBlank(message = "type不能为空", groups = {GroupJava.class}) + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java new file mode 100644 index 0000000000..9357d45f2d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDTO.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.publicity.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 文章发表数量—下级机关统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Data +public class FactPublishedAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关名称 + */ + private String name; + /** + * 发文数量 + */ + private Integer value; + + /** + * 固定值:文章数量 + */ + private String type="文章数量"; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级机关Id + */ + private String pid; + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java new file mode 100644 index 0000000000..02eb3446a7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedAgencyDailyDTO.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.publicity.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 文章发表数量—下级机关统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Data +public class FactPublishedAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 累计发文总数 + */ + private Integer publishedTotal; + + /** + * 发布中的文章总数 + */ + private Integer publishingTotal; + + /** + * 数据截止日期 + */ + private String dateName; + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java new file mode 100644 index 0000000000..11aa1e2cea --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedDepartmentDTO.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.publicity.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 文章发表数量—直属部门统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Data +public class FactPublishedDepartmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 部门名称 + */ + private String name; + + /** + * 发文数量 + */ + private Integer value; + + /** + * 固定值:文章数量 + */ + private String type="文章数量"; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 部门Id + */ + private String departmentId; + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java new file mode 100644 index 0000000000..909deb2ba4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactPublishedGridDTO.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.publicity.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 文章发表数量—直属部门统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Data +public class FactPublishedGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格名称 + */ + private String name; + + /** + * 发文数量 + */ + private Integer value; + + /** + * 固定值:文章数量 + */ + private String type="文章数量"; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java new file mode 100644 index 0000000000..1d91a3287a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/publicity/dto/result/FactTagAgencyDTO.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.publicity.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【机关】统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Data +public class FactTagAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 标签名称 标签名称 + */ + private String name; + + /** + * 使用改标签的数量 + */ + private Integer value; + + /** + * 固定值:文章数量 + */ + private String type="文章数量"; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 标签Id + */ + private String tagId; + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java new file mode 100644 index 0000000000..62c27f4b55 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/constant/TopicConstant.java @@ -0,0 +1,30 @@ +package com.epmet.topic.constant; + +/** + * @Author zxc + * @CreateTime 2020/6/20 17:19 + */ +public interface TopicConstant { + + /** + * 讨论中 + */ + String DISCUSSING = "discussing"; + + /** + * 已屏蔽 + */ + String HIDDEN = "hidden"; + + /** + * 已关闭 + */ + String CLOSED = "closed"; + + String RATIO = "%"; + + String SHIFTED = "已转议题"; + + String MONTH = "month"; + String DATE = "date"; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java new file mode 100644 index 0000000000..2eecf2de34 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/form/TopicIncrTrendFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.topic.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:24 + */ +@Data +public class TopicIncrTrendFormDTO implements Serializable { + + private static final long serialVersionUID = -4929038359220814068L; + + public interface TopicIncr{} + + /** + * 类型 month:代表月 date:代表日 + */ + @NotBlank(message = "month / date 类型不能为空",groups = {TopicIncr.class}) + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java new file mode 100644 index 0000000000..24e3eae7bc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicIncrTrendResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:09 + */ +@Data +public class TopicIncrTrendResultDTO implements Serializable { + + private static final long serialVersionUID = 6905657684644153197L; + + /** + * 日期 + */ + private String date; + + /** + * 值 + */ + private Integer value; + + /** + * 类型 + */ + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java new file mode 100644 index 0000000000..99b84d913f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicShiftedCountResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 17:32 + */ +@Data +public class TopicShiftedCountResultDTO implements Serializable { + + private static final long serialVersionUID = -7470748727678087785L; + + /** + * 已转议题数量 + */ + private Integer shiftedIssueCount; + + /** + * 数据更新至 时间 + */ + private String deadline; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java new file mode 100644 index 0000000000..c22ebd7176 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicStatusResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 17:10 + */ +@Data +public class TopicStatusResultDTO implements Serializable { + + private static final long serialVersionUID = -6461755954651271901L; + + /** + * 话题数量 + */ + private Integer topicCount; + + /** + * 话题状态 已关闭:closed、已屏蔽:hidden、 讨论中:discussing + */ + private String topicStatus; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java new file mode 100644 index 0000000000..87dd107010 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubAgencyResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:13 + */ +@Data +public class TopicSubAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = 70586943923355457L; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + /** + * 类型 + */ + private String type; + + /** + * 机关Id + */ + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java new file mode 100644 index 0000000000..64cad1615c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSubGridResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:13 + */ +@Data +public class TopicSubGridResultDTO implements Serializable { + + private static final long serialVersionUID = -7251687622455341118L; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + /** + * 类型 + */ + private String type; + + /** + * 网格Id + */ + private String gridId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java new file mode 100644 index 0000000000..3112df3356 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryInfoResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:14 + */ +@Data +public class TopicSummaryInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 1103298182001744033L; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + /** + * 百分比 + */ + private String ratio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java new file mode 100644 index 0000000000..6f14a45fd5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/topic/dto/result/TopicSummaryResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.topic.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/20 16:04 + */ +@Data +public class TopicSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = -6051892596892952025L; + + /** + * 话题总数 + */ + private Integer topicTotalCount; + + /** + * 讨论中话题数量 + */ + private Integer talkingTotalCount; + + /** + * 已关闭话题数量 + */ + private Integer closedTotalCount; + + /** + * 已屏蔽话题数量 + */ + private Integer shieldedTotalCount; + + /** + * 话题已转议题数量 + */ + private Integer shiftedTotalCount; + + /** + * 数据更新至 时间 + */ + private String deadline; +} diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index f2b8960a42..e2981ef533 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -9,9 +9,9 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 300M \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml index 5181a184da..3c34b09319 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml @@ -1,7 +1,7 @@ version: "3.7" services: data-report-server: - container_name: data-report-server-dev + container_name: data-report-server-test image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.1 ports: - "8108:8108" @@ -9,9 +9,9 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 400M \ No newline at end of file + memory: 300M \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index b8c65eda08..9ae8ec1dc4 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -24,6 +24,11 @@ epmet-commons-mybatis 2.0.0 + + com.epmet + epmet-user-client + 2.0.0 + org.springframework.boot spring-boot-starter-web @@ -102,12 +107,12 @@ 0 - 118.190.150.119 - 47379 + 192.168.1.130 + 6379 123456 - false + true 122.152.200.70:8848 fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java index dced5aa566..cee0ed9096 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java @@ -2,8 +2,14 @@ package com.epmet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +@EnableAsync public class DataReportApplication { public static void main(String[] args) { SpringApplication.run(DataReportApplication.class, args); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java new file mode 100644 index 0000000000..7d4ff2d7d4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java @@ -0,0 +1,40 @@ +package com.epmet.aspect; + +import com.epmet.commons.tools.aspect.BaseRequestLogAspect; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; + +/** + * 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。 + */ +@Aspect +@Component +@Order(0) +public class RequestLogAspect extends BaseRequestLogAspect { + + @Override + @Around(value = "execution(* com.epmet.controller.*.*Controller*.*(..)) ") + public Object proceed(ProceedingJoinPoint point) throws Throwable { + return super.proceed(point, getRequest()); + } + + /** + * 获取Request对象 + * + * @return + */ + private HttpServletRequest getRequest() { + RequestAttributes ra = RequestContextHolder.getRequestAttributes(); + ServletRequestAttributes sra = (ServletRequestAttributes) ra; + return sra.getRequest(); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java new file mode 100644 index 0000000000..88dd3bb376 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java @@ -0,0 +1,74 @@ +package com.epmet.module.group.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.group.dto.form.GroupIncrTrendFormDTO; +import com.epmet.group.dto.result.GroupIncrTrendResultDTO; +import com.epmet.group.dto.result.GroupSubAgencyResultDTO; +import com.epmet.group.dto.result.GroupSubGridResultDTO; +import com.epmet.group.dto.result.GroupSummaryInfoResultDTO; +import com.epmet.service.group.GroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 10:54 + */ +@RestController +@RequestMapping("group") +public class GroupController { + + @Autowired + private GroupService groupService; + + /** + * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数 + * @param tokenDto + * @author zxc + */ + @PostMapping("summaryinfo") + public Result summaryInfo(@LoginUser TokenDto tokenDto){ + return new Result().ok(groupService.summaryInfo(tokenDto)); + } + + /** + * @Description 网格小组——下级机关小组数柱状图 + * @param tokenDto + * @author zxc + */ + @PostMapping("subagency") + public Result> subAgency(@LoginUser TokenDto tokenDto){ + return new Result>().ok(groupService.subAgency(tokenDto)); + } + + /** + * @Description 网格小组——直属网格小组数 + * @param tokenDto + * @author zxc + */ + @PostMapping("subgrid") + public Result> subGrid(@LoginUser TokenDto tokenDto){ + return new Result>().ok(groupService.subGrid(tokenDto)); + } + + /** + * @Description 网格小组——小组分析 + * @param tokenDto + * @author zxc + */ + @PostMapping("incrtrend") + public Result> IncrTrend(@LoginUser TokenDto tokenDto, @RequestBody GroupIncrTrendFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupIncrTrendFormDTO.GroupJava.class); + return new Result>().ok(groupService.IncrTrend(tokenDto,formDTO)); + } + + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java new file mode 100644 index 0000000000..c9fad20ce2 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java @@ -0,0 +1,95 @@ +package com.epmet.controller.issue; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; +import com.epmet.issue.dto.result.*; +import com.epmet.service.issue.IssueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 13:47 + */ +@RestController +@RequestMapping("issue") +public class IssueController { + @Autowired + private IssueService issueService; + + /** + * 数据汇总 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * @date 2020/6/22 17:31 + */ + @PostMapping("summaryinfo") + public Result getSummaryInfo(@LoginUser TokenDto tokenDto) { + return new Result().ok(issueService.getSummaryInfo(tokenDto)); + } + + /** + * 数据汇总饼状图 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/6/22 17:31 + */ + @PostMapping("summarypie") + public Result> getSummaryPie(@LoginUser TokenDto tokenDto) { + return new Result>().ok(issueService.getSummaryPie(tokenDto)); + } + + /** + * 下级机关议题统计 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/6/22 17:31 + */ + @PostMapping("subagency") + public Result> getSubAgency(@LoginUser TokenDto tokenDto) { + return new Result>().ok(issueService.getSubAgency(tokenDto)); + } + + /** + * 网格议题统计 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/6/22 17:31 + */ + @PostMapping("subgrid") + public Result> getSubGrid(@LoginUser TokenDto tokenDto) { + return new Result>().ok(issueService.getSubGrid(tokenDto)); + } + + /** + * 议题分析 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/6/22 17:31 + */ + @PostMapping("incrtrend") + public Result> getIncrtrend(@LoginUser TokenDto tokenDto, @RequestBody IssueIncrtrendFormDTO formDTO) { + return new Result>().ok(issueService.getIncrtrend(tokenDto, formDTO)); + } + + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java new file mode 100644 index 0000000000..5a96496ef6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java @@ -0,0 +1,81 @@ +package com.epmet.module.project.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.module.project.service.ProjectService; +import com.epmet.project.constant.ProjectConstant; +import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; +import com.epmet.project.dto.result.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @Author sun + * @Description 数据-项目 + **/ +@RestController +@RequestMapping("project") +public class ProjectController { + + @Autowired + private ProjectService projectService; + + + /** + * @Author sun + * @Description 数据-项目-获取汇总数据 + **/ + @PostMapping("projectsummary") + public Result projectSummary(@LoginUser TokenDto tokenDto) { + return new Result().ok(projectService.getProjectSummary(tokenDto)); + } + + /** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据 + **/ + @PostMapping("summaryinfo") + public Result> summaryInfo(@LoginUser TokenDto tokenDto) { + return new Result>().ok(projectService.getSummaryInfo(tokenDto)); + } + + /** + * @Author sun + * @Description 数据-项目-获取下级组织柱状图数据 + **/ + @PostMapping("subagency") + public Result> subAgency(@LoginUser TokenDto tokenDto) { + return new Result>().ok(projectService.getSubAgency(tokenDto)); + } + + /** + * @Author sun + * @Description 数据-项目-获取机关直属网格项目数据 + **/ + @PostMapping("subgrid") + public Result> subGrid(@LoginUser TokenDto tokenDto) { + return new Result>().ok(projectService.getSubGrid(tokenDto)); + } + + /** + * @Author sun + * @Description 数据-项目-日/月数据查询 + **/ + @PostMapping("incrtrend") + public Result> incrTrend(@LoginUser TokenDto tokenDto, @RequestBody ProjectIncrTrendFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ProjectIncrTrendFormDTO.ProjectIncr.class); + if (!ProjectConstant.DATE.equals(formDTO.getType()) && !ProjectConstant.MONTH.equals(formDTO.getType())) { + throw new RenException(ProjectConstant.TYPE_EXCEPTION); + } + return new Result>().ok(projectService.getProjectIncrTrend(tokenDto, formDTO)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java new file mode 100644 index 0000000000..56d31b9d17 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java @@ -0,0 +1,132 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller.publicity; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.publicity.dto.form.TagFormDTO; +import com.epmet.publicity.dto.result.*; +import com.epmet.service.publicity.PublicityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@RestController +@RequestMapping("publicity") +public class PublicityController { + + + @Autowired + private PublicityService publicityService;// + + + /** + * @return + * @Author jyy + * @Description 宣传能力—工作端—当前机关累计发文和当前发文 + **/ + @PostMapping("summaryinfo") + public Result summaryInfo(@LoginUser TokenDto tokenDto) { + return new Result().ok(publicityService.summaryInfo(tokenDto)); + } + + /** + * @param tokenDto + * @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据 + * @author jyy + */ + @PostMapping("tagviewed") + public Result> tagviewed(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class); + + Integer pageSize = formDTO.getPageSize(); + if (pageSize == null) { + pageSize = NumConstant.TEN; + } + String type = formDTO.getType(); + return new Result>().ok(publicityService.tagviewed(tokenDto, pageSize, type)); + } + + /** + * @param tokenDto + * @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据 + * @author jyy + */ + @PostMapping("tagused") + public Result> tagused(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class); + + Integer pageSize = formDTO.getPageSize(); + if (pageSize == null) { + pageSize = NumConstant.TEN; + } + String type = formDTO.getType(); + return new Result>().ok(publicityService.tagused(tokenDto, pageSize, type)); + } + + /** + * @param tokenDto 登录者token + * @Description 获取下级机关发文数 + * @author jyy + */ + @PostMapping("subagency/publishedarticle") + public Result> subagencyPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class); + String type = formDTO.getType(); + return new Result>().ok(publicityService.subagencyPublishedarticle(tokenDto, type)); + } + + /** + * @param tokenDto 登录者token + * @Description 获取直属部门发文数 + * @author jyy + */ + @PostMapping("department/publishedarticle") + public Result> departmentPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class); + String type = formDTO.getType(); + return new Result>().ok(publicityService.departmentPublishedarticle(tokenDto, type)); + } + + /** + * @param tokenDto 登录者token + * @Description 获取指数网格发文数 + * @author jyy + */ + @PostMapping("subgrid/publishedarticle") + public Result> subgridPublishedarticle(@LoginUser TokenDto tokenDto, @RequestBody TagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, TagFormDTO.GroupJava.class); + String type = formDTO.getType(); + return new Result>().ok(publicityService.subgridPublishedarticle(tokenDto, type)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java new file mode 100644 index 0000000000..233f31dc27 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java @@ -0,0 +1,81 @@ +package com.epmet.controller.topic; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.service.topic.TopicService; +import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; +import com.epmet.topic.dto.result.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 15:55 + */ +@RestController +@RequestMapping("topic") +public class TopicController { + + @Autowired + private TopicService topicService; + + /** + * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17 + * @param tokenDto + * @author zxc + */ + @PostMapping("topicsummary") + public Result topicSummary(@LoginUser TokenDto tokenDto){ + return new Result().ok(topicService.topicSummary(tokenDto)); + } + + /** + * @Description 话题——话题分析 + * @param tokenDto + * @param formDTO + * @author zxc + */ + @PostMapping("incrtrend") + public Result> topicIncrTrend(@LoginUser TokenDto tokenDto, @RequestBody TopicIncrTrendFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, TopicIncrTrendFormDTO.TopicIncr.class); + return new Result>().ok(topicService.topicIncrTrend(tokenDto,formDTO)); + } + + /** + * @Description 话题——直属网格话题数 + * @param tokenDto + * @author zxc + */ + @PostMapping("subgrid") + public Result> topicSubGrid(@LoginUser TokenDto tokenDto){ + return new Result>().ok(topicService.topicSubGrid(tokenDto)); + } + + /** + * @Description 话题——下级机关话题数 + * @param tokenDto + * @author zxc + */ + @PostMapping("subagency") + public Result> topicSubAgency(@LoginUser TokenDto tokenDto){ + return new Result>().ok(topicService.topicSubAgency(tokenDto)); + } + + /** + * @Description 话题——话题分析表 + * @param tokenDto + * @author zxc + */ + @PostMapping("summaryinfo") + public Result> topicSummaryInfo(@LoginUser TokenDto tokenDto){ + return new Result>().ok(topicService.topicSummaryInfo(tokenDto)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java new file mode 100644 index 0000000000..da00a281d0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java @@ -0,0 +1,90 @@ +package com.epmet.controller.user; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.user.UserIncrTrendFormDTO; +import com.epmet.dto.form.user.UserSubAgencyFormDTO; +import com.epmet.dto.form.user.UserSubGridFormDTO; +import com.epmet.dto.form.user.UserSummaryInfoFormDTO; +import com.epmet.dto.result.user.UserIncrTrendResultDTO; +import com.epmet.dto.result.user.UserSubAgencyResultDTO; +import com.epmet.dto.result.user.UserSubGridResultDTO; +import com.epmet.dto.result.user.UserSummaryInfoResultDTO; +import com.epmet.service.user.UserAnalysisService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 组织能力用户相关接口入口 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 13:22 + */ +@RestController +@RequestMapping("user") +public class UserAnalysisController { + @Autowired + private UserAnalysisService userService; + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 用户汇总信息查询 + * @Date 2020/6/22 13:27 + **/ + @PostMapping("summaryinfo") + public Result summaryInfo(@RequestBody UserSummaryInfoFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + UserSummaryInfoResultDTO userSummaryInfoResultDTO = userService.summaryInfo(formDTO); + return new Result().ok(userSummaryInfoResultDTO); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 直属机关柱状图查询 + * @Date 2020/6/22 13:30 + **/ + @PostMapping("subagency") + public Result> subAgency(@RequestBody UserSubAgencyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List userSubAgencyResultDTO = userService.subAgency(formDTO); + return new Result>().ok(userSubAgencyResultDTO); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 直属网格柱状图查询 + * @Date 2020/6/22 13:33 + **/ + @PostMapping("subgrid") + public Result> subGrid(@RequestBody UserSubGridFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List userSubGridResultDTO = userService.subGrid(formDTO); + return new Result>().ok(userSubGridResultDTO); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 按日、按月查询注册用户数(参与用户数)增量折线图 + * @Date 2020/6/22 13:36 + **/ + @PostMapping("incrtrend") + public Result> incrTrend(@RequestBody UserIncrTrendFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List userIncrTrendResultDTO = userService.incrTrend(formDTO); + return new Result>().ok(userIncrTrendResultDTO); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java new file mode 100644 index 0000000000..0f22c81d2b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java @@ -0,0 +1,58 @@ +package com.epmet.dao.group; + +import com.epmet.group.dto.result.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 10:55 + */ +@Mapper +public interface GroupDao { + + /** + * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数 + * @param + * @author zxc + */ + GroupSummaryInfoResultDTO summaryInfo(@Param("agencyId") String agencyId); + + /** + * @Description 获取下级机关信息 + * @param agencyId + * @author zxc + */ + List getSubAgencyList(@Param("agencyId") String agencyId); + + /** + * @Description 获取下级机关的小组数 + * @param + * @author zxc + */ + List getSubGroupCount(); + + /** + * @Description 获取直属网格下的小组数 + * @param agencyId + * @author zxc + */ + List getSubGridGroupCount(@Param("agencyId") String agencyId); + + /** + * @Description 小组数量 日增长 + * @param agencyId + * @author zxc + */ + List getIncrDaily(@Param("agencyId") String agencyId); + + /** + * @Description 小组数量 月增长 + * @param agencyId + * @author zxc + */ + List getIncrMonthly(@Param("agencyId") String agencyId); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java new file mode 100644 index 0000000000..f8f3058673 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java @@ -0,0 +1,60 @@ +package com.epmet.dao.issue; + +import com.epmet.issue.dto.result.IssueDataDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 13:48 + */ +@Mapper +public interface IssueDao { + /** + * 获取当前机关统计信息 + * @author zhaoqifeng + * @date 2020/6/22 15:19 + * @param agencyId + * @return com.epmet.issue.dto.result.IssueDataDTO + */ + IssueDataDTO selectAgencyInfo(@Param("agencyId") String agencyId); + + /** + * 获取下级机关统计信息 + * @author zhaoqifeng + * @date 2020/6/22 15:20 + * @param agencyId + * @return java.util.List + */ + List selectSubAgencyList(@Param("agencyId") String agencyId); + + /** + * 获取机关下网格统计信息 + * @author zhaoqifeng + * @date 2020/6/22 15:21 + * @param agencyId + * @return java.util.List + */ + List selectGridList(@Param("agencyId") String agencyId); + + /** + * 获取当前机关日增量 + * @author zhaoqifeng + * @date 2020/6/22 15:22 + * @param agencyId + * @return java.util.List + */ + List selectAgencyIncDailyList(@Param("agencyId") String agencyId); + + /** + * 获取当前机关月增量 + * @author zhaoqifeng + * @date 2020/6/22 15:23 + * @param agencyId + * @return java.util.List + */ + List selectAgencyIncMonthlyList(@Param("agencyId") String agencyId); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java new file mode 100644 index 0000000000..3ae53720f7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -0,0 +1,58 @@ +package com.epmet.dao.project; + +import com.epmet.project.dto.FactAgencyProjectDailyDTO; +import com.epmet.project.dto.result.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author sun + * @Description 数据-项目 + **/ +@Mapper +public interface ProjectDao { + + /** + * @Author sun + * @Description 数据-项目-获取汇总数据 + **/ + ProjectSummaryResultDTO selectProjectSummary(@Param("agencyId") String agencyId); + + /** + * @Author sun + * @Description 数据-项目-获取汇总数据 + **/ + List selectSummaryInfo(@Param("agencyId") String agencyId); + + /** + * @Author sun + * @Description 查询组织最近日期的日统计数据 + **/ + FactAgencyProjectDailyDTO selectAgencyProjectDaily(@Param("agencyId") String agencyId); + + /** + * @Author sun + * @Description 数据-项目-获取最近日期下级组织柱状图数据(按项目总量降序) + **/ + List selectSubAgency(FactAgencyProjectDailyDTO agencyProjectDailyDTO); + + /** + * @Author sun + * @Description 查询机关下直属网格最近一天的日统计数据,按项目总数降序 + **/ + List selectSubGrid(FactAgencyProjectDailyDTO agencyProjectDailyDTO); + + /** + * @Author sun + * @Description 查询机关日统计近九十天数据 + **/ + List selectIncrTrendDaily(@Param("agencyId") String agencyId); + + /** + * @Author sun + * @Description 查询机关月统计近十二个月数据 + **/ + List selectIncrTrendMonthly(@Param("agencyId") String agencyId); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java new file mode 100644 index 0000000000..33801156b9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java @@ -0,0 +1,145 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.publicity; + +import com.epmet.publicity.dto.result.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Mapper +public interface PublicityDao { + + /** + * @Description 宣传能力—工作端—当前机关累计发文和当前发文 + * @param agencyId 机关id + * @author jyy + */ + FactPublishedAgencyDailyDTO summaryInfo(@Param("agencyId") String agencyId); + + /** + * @Description 当月———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 + * @param agencyId,monthId,pageSize 机关id,月,展示数量 + * @author zxc + */ + List getViewedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当季———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 + * @param agencyId,quarterId,pageSize 机关id,季,展示数量 + * @author zxc + */ + List getViewedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当年———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 + * @param agencyId,yearId,pageSize 机关id,年,展示数量 + * @author zxc + */ + List getViewedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当月———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个 + * @param agencyId,monthId,pageSize 机关id,月,展示数量 + * @author zxc + */ + List getUsedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当季———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个 + * @param agencyId,quarterId,pageSize 机关id,季,展示数量 + * @author zxc + */ + List getUsedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当年———获取机关下,每个标签发文数量,按照数量降序,取前pagesize个 + * @param agencyId,yearId,pageSize 机关id,年,展示数量 + * @author zxc + */ + List getUsedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); + + /** + * @Description 当月———下级机发文数 + * @param agencyId,monthId 机关id,月 + * @author zxc + */ + List getSubAgencyPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); + + /** + * @Description 当季———下级机发文数 + * @param agencyId,quarterId 机关id,季度 + * @author zxc + */ + List getSubAgencyPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); + /** + * @Description 当年———下级机发文数 + * @param agencyId,yearId 机关id,年 + * @author zxc + */ + List getSubAgencyPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId); + + /** + * @Description 当月———下级部门文数 + * @param agencyId,monthId 机关id,月 + * @author zxc + */ + List getSubDepartPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); + + /** + * @Description 当季———下级部门文数 + * @param agencyId,quarterId 机关id,季度 + * @author zxc + */ + List getSubDepartPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); + /** + * @Description 当年———下级部门文数 + * @param agencyId,yearId 机关id,年 + * @author zxc + */ + List getSubDepartPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId); + + /** + * @Description 当月———下级网格文数 + * @param agencyId,monthId 机关id,月 + * @author zxc + */ + List getSubGridPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); + + /** + * @Description 当季———下级网格文数 + * @param agencyId,quarterId 机关id,季度 + * @author zxc + */ + List getSubGridPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); + /** + * @Description 当年———下级网格文数 + * @param agencyId,yearId 机关id,年 + * @author zxc + */ + List getSubGridPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId); + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java new file mode 100644 index 0000000000..e45798d750 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java @@ -0,0 +1,108 @@ +package com.epmet.dao.topic; + +import com.epmet.group.dto.result.GroupIncrTrendResultDTO; +import com.epmet.topic.dto.result.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 15:55 + */ +@Mapper +public interface TopicDao { + + /** + * @Description 获取话题数量及状态 + * @param agencyId + * @author zxc + */ + List getTopicStatus(@Param("agencyId")String agencyId); + + /** + * @Description 获取机关下已转议题数量 + * @param agencyId + * @author zxc + */ + TopicShiftedCountResultDTO getShiftedCount(@Param("agencyId")String agencyId); + + /** + * @Description 获取话题信息(状态,数量,百分比) + * @param agencyId + * @author zxc + */ + List topicSummaryInfo(@Param("agencyId")String agencyId); + + /** + * @Description 根据当前机关判断是否有下级机关 + * @param agencyId + * @author zxc + */ + List getSubAgencyIdList(@Param("agencyId")String agencyId); + + /** + * @Description 获取最后一天的所有话题数据 【fact_topic_status_agency_daily】 + * @param + * @author zxc + */ + List getAllTopicInfoLastDay(); + + /** + * @Description 获取最后一天的所有话题已转议题数据 + * @param + * @author zxc + */ + List getAllTopicShiftedInfoLastDay(); + + /** + * @Description 校验机关下是否存在直属网格 + * @param agencyId + * @author zxc + */ + List getSubGridIdList(@Param("agencyId")String agencyId); + + /** + * @Description 获取最后一天的所有话题数据 【fact_topic_status_grid_daily】【grid】 + * @param + * @author zxc + */ + List getGridAllTopicInfoLastDay(); + + /** + * @Description 获取最后一天的所有话题已转议题数据【grid】 + * @param + * @author zxc + */ + List getGridAllTopicShiftedInfoLastDay(); + + /** + * @Description 话题日增长 + * @param agencyId + * @author zxc + */ + List getTopicIncrDaily(@Param("agencyId") String agencyId); + + /** + * @Description 话题转议题日增长 + * @param agencyId + * @author zxc + */ + List getTopicShiftedIncrDaily(@Param("agencyId") String agencyId); + + /** + * @Description 话题月增长 + * @param agencyId + * @author zxc + */ + List getTopicIncrMonthly(@Param("agencyId") String agencyId); + + /** + * @Description 话题转议题月增长 + * @param agencyId + * @author zxc + */ + List getTopicShiftedIncrMonthly(@Param("agencyId") String agencyId); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java new file mode 100644 index 0000000000..feba486e41 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java @@ -0,0 +1,135 @@ +package com.epmet.dao.user; + + +import com.epmet.dto.DimAgencyDTO; +import com.epmet.dto.DimGridDTO; +import com.epmet.dto.result.user.UserIncrTrendResDTO; +import com.epmet.dto.result.user.UserSubAgencyResDTO; +import com.epmet.dto.result.user.UserSubGridResDTO; +import com.epmet.dto.result.user.UserSummaryInfoResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 16:33 + */ +@Mapper +public interface UserAnalysisDao { + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description 根据机关id,查询它下一级机关列表 + * @Date 2020/6/22 22:42 + **/ + List selectSubAgencyList(String myAgencyId); + + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description 根据机关id,查询它下面的直属网格列表 + * @Date 2020/6/22 23:51 + **/ + List selectSubGridList(String myAgencyId); + + /** + * @param myAgencyId + * @return com.epmet.user.result.UserSummaryInfoResultDTO + * @author yinzuomei + * @description 查询注册用户汇总信息 + * @Date 2020/6/22 16:52 + **/ + UserSummaryInfoResultDTO selectRegUserSummaryInfo(String myAgencyId); + + /** + * @param myAgencyId + * @return com.epmet.user.result.UserSummaryInfoResultDTO + * @author yinzuomei + * @description 查询注册用户的汇总信息 + * @Date 2020/6/22 16:52 + **/ + UserSummaryInfoResultDTO selectParticipationUserSummaryInfo(String myAgencyId); + + /** + * @return java.util.List + * @param dateId 20200618日期 + * @param agencyId 用户所属机关 + * @author yinzuomei + * @description 参与用户:子级机关用户分析,按日(date_id)查询 + * @Date 2020/6/22 21:51 + **/ + List selectParticipationSubAgencyRes(@Param("dateId") String dateId ,@Param("agencyId")String agencyId); + + /** + * @param dateId + * @param dateId 20200618日期 + * @param agencyId 用户所属机关id + * @return java.util.List + * @author yinzuomei + * @description 注册用户:子级机关用户分析,按日(date_id)查询 + * @Date 2020/6/22 22:38 + **/ + List selectRegSubAgencyRes(@Param("dateId") String dateId ,@Param("agencyId")String agencyId); + + /** + * @param dateId 20200618日期 + * @param agencyId 用户所属机关id + * @return java.util.List + * @author yinzuomei + * @description 参与用户:机关下,直属网格用户分析 + * @Date 2020/6/23 0:18 + **/ + List selectParticipationSubGridRes(@Param("dateId") String dateId, @Param("agencyId") String agencyId); + + /** + * @param dateId 20200618日期 + * @param agencyId 用户所属机关id + * @return java.util.List + * @author yinzuomei + * @description 注册用户:机关下,直属网格用户分析 + * @Date 2020/6/23 0:18 + **/ + List selectRegSubGridRes(@Param("dateId")String dateId, @Param("agencyId") String agencyId); + + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description + * @Date 2020/6/23 11:24 + **/ + List selectRegDayIncr(@Param("agencyId")String myAgencyId); + + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description + * @Date 2020/6/23 11:24 + **/ + List selectRegMonthIncr(@Param("agencyId")String myAgencyId); + + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description + * @Date 2020/6/23 11:24 + **/ + List selectParticipationUserDayIncr(@Param("agencyId")String myAgencyId); + + /** + * @return java.util.List + * @param myAgencyId + * @author yinzuomei + * @description + * @Date 2020/6/23 11:24 + **/ + List selectParticipationUserMonthIncr(@Param("agencyId") String myAgencyId); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java new file mode 100644 index 0000000000..d644029bcf --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java @@ -0,0 +1,45 @@ +package com.epmet.service.group; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.group.dto.form.GroupIncrTrendFormDTO; +import com.epmet.group.dto.result.GroupIncrTrendResultDTO; +import com.epmet.group.dto.result.GroupSubAgencyResultDTO; +import com.epmet.group.dto.result.GroupSubGridResultDTO; +import com.epmet.group.dto.result.GroupSummaryInfoResultDTO; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 10:55 + */ +public interface GroupService { + + /** + * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数 + * @param tokenDto + * @author zxc + */ + GroupSummaryInfoResultDTO summaryInfo(TokenDto tokenDto); + + /** + * @Description 网格小组——下级机关小组数柱状图 + * @param tokenDto + * @author zxc + */ + List subAgency(TokenDto tokenDto); + + /** + * @Description 网格小组——直属网格小组数 + * @param tokenDto + * @author zxc + */ + List subGrid(TokenDto tokenDto); + + /** + * @Description 网格小组——小组分析 + * @param tokenDto + * @author zxc + */ + List IncrTrend(TokenDto tokenDto, GroupIncrTrendFormDTO formDTO); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java new file mode 100644 index 0000000000..80a5624e3b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java @@ -0,0 +1,107 @@ +package com.epmet.service.group.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dao.group.GroupDao; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.group.constant.GroupConstant; +import com.epmet.group.dto.form.GroupIncrTrendFormDTO; +import com.epmet.group.dto.result.*; +import com.epmet.service.group.GroupService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 10:56 + */ +@Service +public class GroupServiceImpl implements GroupService { + + @Autowired + private GroupDao groupDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + /** + * @Description 网格小组:网格总数、网格小组数、小组平均数、小组人数中位数 + * @param tokenDto + * @author zxc + */ + @Override + public GroupSummaryInfoResultDTO summaryInfo(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + return groupDao.summaryInfo(agencyId); + } + + /** + * @Description 网格小组——下级机关小组数柱状图 + * @param tokenDto + * @author zxc + */ + @Override + public List subAgency(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + List result = new ArrayList<>(); + List subAgencyList = groupDao.getSubAgencyList(agencyId); + List subGroupCount = groupDao.getSubGroupCount(); + if (subAgencyList.size()!= NumConstant.ZERO){ + subGroupCount.forEach(group -> { + subAgencyList.forEach(subAgency -> { + if (subAgency.getAgencyId().equals(group.getAgencyId())){ + group.setName(subAgency.getAgencyName()); + result.add(group); + } + }); + }); + return result; + } + return new ArrayList<>(); + } + + /** + * @Description 网格小组——直属网格小组数 + * @param tokenDto + * @author zxc + */ + @Override + public List subGrid(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + return groupDao.getSubGridGroupCount(agencyId); + } + + /** + * @Description 网格小组——小组分析 + * @param tokenDto + * @author zxc + */ + @Override + public List IncrTrend(TokenDto tokenDto, GroupIncrTrendFormDTO formDTO) { + String agencyId = this.getLoginUserDetails(tokenDto); + List result = new ArrayList<>(); + if (formDTO.getType().equals(GroupConstant.DATE)){ + result = groupDao.getIncrDaily(agencyId); + }else { + result = groupDao.getIncrMonthly(agencyId); + } + return result; + } + + /** + * @Description 获取机关ID + * @param tokenDto + * @author zxc + */ + public String getLoginUserDetails(TokenDto tokenDto){ + LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + BeanUtils.copyProperties(tokenDto,dto); + LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData(); + return data.getAgencyId(); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java new file mode 100644 index 0000000000..c0d33b2a3b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java @@ -0,0 +1,65 @@ +package com.epmet.service.issue; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; +import com.epmet.issue.dto.result.*; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 13:48 + */ +public interface IssueService { + /** + * 议题汇总 + * + * @param tokenDto + * @return com.epmet.issue.dto.result.IssueSummaryInfoResultDTO + * @author zhaoqifeng + * @date 2020/6/22 16:40 + */ + IssueSummaryInfoResultDTO getSummaryInfo(TokenDto tokenDto); + + /** + * 议题汇总饼状图 + * + * @param tokenDto + * @return com.epmet.issue.dto.result.IssueSummaryPieResultDTO + * @author zhaoqifeng + * @date 2020/6/22 16:40 + */ + List getSummaryPie(TokenDto tokenDto); + + /** + * 下级机关 + * + * @param tokenDto + * @return java.util.List + * @author zhaoqifeng + * @date 2020/6/22 16:40 + */ + List getSubAgency(TokenDto tokenDto); + + /** + * 网格 + * + * @param tokenDto + * @return java.util.List + * @author zhaoqifeng + * @date 2020/6/22 16:41 + */ + List getSubGrid(TokenDto tokenDto); + + /** + * 议题分析 + * + * @param tokenDto + * @param formDTO + * @return java.util.List + * @author zhaoqifeng + * @date 2020/6/22 16:41 + */ + List getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java new file mode 100644 index 0000000000..4271cbe29e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java @@ -0,0 +1,176 @@ +package com.epmet.service.issue.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dao.issue.IssueDao; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.issue.constant.IssueConstant; +import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; +import com.epmet.issue.dto.result.*; +import com.epmet.service.issue.IssueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 13:49 + */ +@Service +public class IssueServiceImpl implements IssueService { + @Autowired + private IssueDao issueDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Override + public IssueSummaryInfoResultDTO getSummaryInfo(TokenDto tokenDto) { + IssueSummaryInfoResultDTO result = new IssueSummaryInfoResultDTO(); + String agencyId = getAgencyId(tokenDto); + IssueDataDTO data = issueDao.selectAgencyInfo(agencyId); + result.setAgencyId(agencyId); + result.setDateName(data.getDateName()); + result.setIssueTotal(data.getIssueTotal()); + result.setVotingTotal(data.getVotingTotal()); + result.setShiftProjectTotal(data.getShiftProjectTotal()); + result.setClosedTotal(data.getClosedTotal()); + result.setVotingRatio(toRatio(data.getVotingPercent())); + result.setShiftProjectRatio(toRatio(data.getShiftProjectPercent())); + result.setClosedRatio(toRatio(data.getClosedPercent())); + return result; + } + + @Override + public List getSummaryPie(TokenDto tokenDto) { + List list = new ArrayList<>(); + String agencyId = getAgencyId(tokenDto); + IssueDataDTO data = issueDao.selectAgencyInfo(agencyId); + IssueSummaryPieResultDTO voting = new IssueSummaryPieResultDTO(); + voting.setName(IssueConstant.VOTING_NAME); + voting.setValue(data.getVotingTotal()); + voting.setRatio(toRatio(data.getVotingPercent())); + list.add(voting); + IssueSummaryPieResultDTO shift = new IssueSummaryPieResultDTO(); + shift.setName(IssueConstant.SHIFT_NAME); + shift.setValue(data.getShiftProjectTotal()); + shift.setRatio(toRatio(data.getShiftProjectPercent())); + list.add(shift); + IssueSummaryPieResultDTO closed = new IssueSummaryPieResultDTO(); + closed.setName(IssueConstant.CLOSED_NAME); + closed.setValue(data.getClosedTotal()); + closed.setRatio(toRatio(data.getClosedPercent())); + list.add(closed); + return list; + } + + @Override + public List getSubAgency(TokenDto tokenDto) { + List list = new ArrayList<>(); + String agencyId = getAgencyId(tokenDto); + List dataList = issueDao.selectSubAgencyList(agencyId); + if(null != dataList) { + dataList.forEach(data -> { + IssueSubAgencyResultDTO voting = new IssueSubAgencyResultDTO(); + voting.setAgencyId(data.getAgencyId()); + voting.setName(data.getAgencyName()); + voting.setType(IssueConstant.VOTING_NAME); + voting.setValue(data.getVotingTotal()); + list.add(voting); + IssueSubAgencyResultDTO shift = new IssueSubAgencyResultDTO(); + shift.setAgencyId(data.getAgencyId()); + shift.setName(data.getAgencyName()); + shift.setType(IssueConstant.SHIFT_NAME); + shift.setValue(data.getShiftProjectTotal()); + list.add(shift); + IssueSubAgencyResultDTO closed = new IssueSubAgencyResultDTO(); + closed.setAgencyId(data.getAgencyId()); + closed.setName(data.getAgencyName()); + closed.setType(IssueConstant.CLOSED_NAME); + closed.setValue(data.getClosedTotal()); + list.add(closed); + }); + } + return list; + } + + @Override + public List getSubGrid(TokenDto tokenDto) { + List list = new ArrayList<>(); + String agencyId = getAgencyId(tokenDto); + List dataList = issueDao.selectGridList(agencyId); + if(null != dataList) { + dataList.forEach(data -> { + IssueSubGridResultDTO voting = new IssueSubGridResultDTO(); + voting.setName(data.getGridName()); + voting.setType(IssueConstant.VOTING_NAME); + voting.setValue(data.getVotingTotal()); + list.add(voting); + IssueSubGridResultDTO shift = new IssueSubGridResultDTO(); + shift.setName(data.getGridName()); + shift.setType(IssueConstant.SHIFT_NAME); + shift.setValue(data.getShiftProjectTotal()); + list.add(shift); + IssueSubGridResultDTO closed = new IssueSubGridResultDTO(); + closed.setName(data.getGridName()); + closed.setType(IssueConstant.CLOSED_NAME); + closed.setValue(data.getClosedTotal()); + list.add(closed); + }); + } + return list; + } + + @Override + public List getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO) { + List list = new ArrayList<>(); + String agencyId = getAgencyId(tokenDto); + List dataList; + if (IssueConstant.DATE.equals(formDTO.getType())) { + dataList = issueDao.selectAgencyIncDailyList(agencyId); + } else { + dataList = issueDao.selectAgencyIncMonthlyList(agencyId); + } + if (null != dataList) { + dataList.forEach(data -> { + IssueIncrtrendResultDTO voting = new IssueIncrtrendResultDTO(); + voting.setDate(data.getDateName()); + voting.setType(IssueConstant.VOTING_NAME); + voting.setValue(data.getVotingIncr()); + list.add(voting); + IssueIncrtrendResultDTO shift = new IssueIncrtrendResultDTO(); + shift.setDate(data.getDateName()); + shift.setType(IssueConstant.SHIFT_NAME); + shift.setValue(data.getShiftProjectIncr()); + list.add(shift); + IssueIncrtrendResultDTO closed = new IssueIncrtrendResultDTO(); + closed.setDate(data.getDateName()); + closed.setType(IssueConstant.CLOSED_NAME); + closed.setValue(data.getClosedIncr()); + list.add(closed); + }); + } + return list; + } + + private String getAgencyId(TokenDto tokenDto) { + LoginUserDetailsFormDTO loginUserDetailsFormDTO = new LoginUserDetailsFormDTO(); + loginUserDetailsFormDTO.setApp(tokenDto.getApp()); + loginUserDetailsFormDTO.setClient(tokenDto.getClient()); + loginUserDetailsFormDTO.setUserId(tokenDto.getUserId()); + LoginUserDetailsResultDTO userInfo = epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO).getData(); + String[] orgIdPath = userInfo.getOrgIdPath().split(":"); + return orgIdPath[orgIdPath.length - 1]; + } + + private String toRatio(BigDecimal data) { + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); + return data.multiply(hundred).setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString().concat("%"); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java new file mode 100644 index 0000000000..baa6e664e0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -0,0 +1,44 @@ +package com.epmet.module.project.service; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; +import com.epmet.project.dto.result.*; + +import java.util.List; + +/** + * @Author sun + * @Description 数据-项目 + **/ +public interface ProjectService { + + /** + * @Author sun + * @Description 数据-项目-获取汇总数据 + **/ + ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto); + + /** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据 + **/ + List getSummaryInfo(TokenDto tokenDto); + + /** + * @Author sun + * @Description 数据-项目-获取下级组织柱状图数据 + **/ + List getSubAgency(TokenDto tokenDto); + + /** + * @Author sun + * @Description 数据-项目-获取机关直属网格项目数据 + **/ + List getSubGrid(TokenDto tokenDto); + + /** + * @Author sun + * @Description 数据-项目-日/月数据查询 + **/ + List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java new file mode 100644 index 0000000000..1d8871803d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -0,0 +1,163 @@ +package com.epmet.service.project.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dao.project.ProjectDao; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.module.project.service.ProjectService; +import com.epmet.project.constant.ProjectConstant; +import com.epmet.project.dto.FactAgencyProjectDailyDTO; +import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; +import com.epmet.project.dto.result.*; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author sun + * @Description 数据-项目 + **/ +@Service +public class ProjectServiceImpl implements ProjectService { + + @Autowired + private ProjectDao projectDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + /** + * @Author sun + * @Description 数据-项目-获取汇总数据 + **/ + @Override + public ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto) { + //1:根据token获取agencyId + String agencyId = getLoginUserDetails(tokenDto); + + //2:根据agencyId查询项目统计数据 + ProjectSummaryResultDTO resultDTO = projectDao.selectProjectSummary(agencyId); + if (null != resultDTO) { + //将结果转成百分比 + NumberFormat percent = NumberFormat.getPercentInstance(); + percent.setMaximumFractionDigits(2); + //四舍五入保留小数点后四位 + BigDecimal pendingRatio = resultDTO.getPendingRatioInt().setScale(4, RoundingMode.HALF_UP); + //将小数转成百分比 + resultDTO.setPendingRatio(percent.format(pendingRatio.doubleValue())); + resultDTO.setClosedRatio(percent.format(resultDTO.getClosedRatioInt().setScale(4, RoundingMode.HALF_UP).doubleValue())); + } + return resultDTO; + } + + /** + * @Author sun + * @Description 数据-项目-获取组织下饼图数据 + **/ + @Override + public List getSummaryInfo(TokenDto tokenDto) { + List resultList = new ArrayList<>(); + //1:根据token获取agencyId + String agencyId = getLoginUserDetails(tokenDto); + + //2:根据agencyId查询各状态统计数据 + resultList = projectDao.selectSummaryInfo(agencyId); + if (null != resultList && resultList.size() > NumConstant.ZERO) { + //将结果转成百分比 + NumberFormat percent = NumberFormat.getPercentInstance(); + percent.setMaximumFractionDigits(2); + resultList.forEach(sum -> { + //先四舍五入保留四位小数再把小数转成百分比 + sum.setRatio(percent.format(sum.getRatioInt().setScale(4, RoundingMode.HALF_UP).doubleValue())); + }); + } + return resultList; + } + + /** + * @Author sun + * @Description 数据-项目-获取下级组织柱状图数据 + **/ + @Override + public List getSubAgency(TokenDto tokenDto) { + List resultList = new ArrayList<>(); + //1:根据token获取agencyId + String agencyId = getLoginUserDetails(tokenDto); + + //2:根据机关Id查询最近日期的日统计数据 + FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId); + if (null == agencyProjectDailyDTO) { + return resultList; + } + //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序 + resultList = projectDao.selectSubAgency(agencyProjectDailyDTO); + return resultList; + } + + /** + * @Author sun + * @Description 数据-项目-获取机关直属网格项目数据 + **/ + @Override + public List getSubGrid(TokenDto tokenDto) { + List resultList = new ArrayList<>(); + //1:根据token获取agencyId + String agencyId = getLoginUserDetails(tokenDto); + + //2:根据机关Id查询最近日期的日统计数据 + FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId); + if (null == agencyProjectDailyDTO) { + return resultList; + } + //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序 + resultList = projectDao.selectSubGrid(agencyProjectDailyDTO); + return resultList; + } + + /** + * @Author sun + * @Description 数据-项目-日/月数据查询(日查询进九十天数据,月查询进十二个月数据) + **/ + @Override + public List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO) { + List resultList = new ArrayList<>(); + //1:根据token获取agencyId + String agencyId = getLoginUserDetails(tokenDto); + + //2:查询机关过去九十天日统计数据(sql降序取前九十条) + if (ProjectConstant.DATE.equals(formDTO.getType())) { + resultList = projectDao.selectIncrTrendDaily(agencyId); + } + + //3:查询机关过去十二个月月统计数据 + if (ProjectConstant.MONTH.equals(formDTO.getType())) { + resultList = projectDao.selectIncrTrendMonthly(agencyId); + } + + return resultList; + } + + /** + * @author sun + * @Description 获取机关ID + */ + private String getLoginUserDetails(TokenDto tokenDto) { + LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + BeanUtils.copyProperties(tokenDto, dto); + LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData(); + String agencyId = data.getAgencyId(); + if (null == agencyId || "".equals(agencyId)) { + throw new RenException(ProjectConstant.GET_AGENCYID); + } + return agencyId; + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java new file mode 100644 index 0000000000..9eccb5b29f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.publicity; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.publicity.dto.result.*; +import org.apache.commons.lang3.StringUtils; + +import java.util.Date; +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +public interface PublicityService { + + /** + * @Description 宣传能力—工作端—当前机关累计发文和当前发文 + * @param tokenDto + * @author jyy + */ + FactPublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto); + + /** + * @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据 + * @param tokenDto,formDTO + * @author jyy + */ + public List tagviewed(TokenDto tokenDto, Integer pageSize, String type) ; + + /** + * @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据 + * @param tokenDto,pageSize,type + * @author jyy + */ + public List tagused(TokenDto tokenDto, Integer pageSize, String type) ; + + /** + * @param tokenDto type + * @Description 获取下级机关发文数 + * @author jyy + */ + public List subagencyPublishedarticle(TokenDto tokenDto, String type) ; + /** + * @param tokenDto type + * @Description 获取直属部门发文数 + * @author jyy + */ + public List departmentPublishedarticle(TokenDto tokenDto, String type); + + /** + * @param tokenDto type + * @Description 获取指数网格发文数 + * @author jyy + */ + public List subgridPublishedarticle(TokenDto tokenDto, String type); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java new file mode 100644 index 0000000000..10f19b3ea0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java @@ -0,0 +1,219 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.publicity.impl; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dao.publicity.PublicityDao; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.publicity.dto.result.*; +import com.epmet.service.publicity.PublicityService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-19 + */ +@Service +public class PublicityServiceImpl implements PublicityService { + @Autowired + private PublicityDao publicityDao;//机关每日发文 + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + /** + * @param tokenDto + * @Description 宣传能力—工作端—当前机关累计发文和当前发文 + * @author jyy + */ + @Override + public FactPublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + agencyId="b9e295f8c1906a0d1c5e0b313afcda3f"; + return publicityDao.summaryInfo(agencyId); + } + + + /** + * @param tokenDto,formDTO + * @Description 宣传能力—工作端-获取阅读最多的分类数据 + * @author jyy + */ + @Override + public List tagviewed(TokenDto tokenDto, Integer pageSize, String type) { +// String agencyId = this.getLoginUserDetails(tokenDto); + String agencyId = "0d2ffe9fce682b602b9d451226d08fae"; + Date date = new Date(); + String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN); + String yearId = strDate.substring(0, 4); + + if (StringUtils.equals("month", type)) {//当月 + String monthId = strDate.substring(0, 4) + strDate.substring(5, 7); + return publicityDao.getViewedMonthlyCountByTag(agencyId, monthId, pageSize); + + } else if (StringUtils.equals("quarter", type)) {//当季 + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + return publicityDao.getViewedQuarterlyCountByTag(agencyId, quarterId, pageSize); + + } else if (StringUtils.equals("year", type)) {//当年 + return publicityDao.getViewedYearlyCountByTag(agencyId, yearId, pageSize); + + } else { + return null; + } + } + + /** + * @param tokenDto pageSize type + * @Description 宣传能力—工作端-获取发表最多的分类数据 + * @author jyy + */ + @Override + public List tagused(TokenDto tokenDto, Integer pageSize, String type) { +// String agencyId = this.getLoginUserDetails(tokenDto); + String agencyId = "0d2ffe9fce682b602b9d451226d08fae"; + Date date = new Date(); + String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN); + String yearId = strDate.substring(0, 4); + + if (StringUtils.equals("month", type)) {//当月 + String monthId = strDate.substring(0, 4) + strDate.substring(5, 7); + return publicityDao.getUsedMonthlyCountByTag(agencyId, monthId, pageSize); + + } else if (StringUtils.equals("quarter", type)) {//当季 + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + return publicityDao.getUsedQuarterlyCountByTag(agencyId, quarterId, pageSize); + + } else if (StringUtils.equals("year", type)) {//当年 + return publicityDao.getUsedYearlyCountByTag(agencyId, yearId, pageSize); + + } else { + return null; + } + } + + /** + * @param tokenDto type + * @Description 获取下级机关发文数 + * @author jyy + */ + @Override + public List subagencyPublishedarticle(TokenDto tokenDto, String type) { +// String agencyId = this.getLoginUserDetails(tokenDto); + String agencyId = "1041fe5e8499dbd8add314291d2f6da4"; + Date date = new Date(); + String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + String yearId = strDate.substring(0, 4); + String monthId = strDate.substring(0, 6); + + if (StringUtils.equals("month", type)) {//当月 + return publicityDao.getSubAgencyPublishedMonth(agencyId, monthId); + + } else if (StringUtils.equals("quarter", type)) {//当季 + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + return publicityDao.getSubAgencyPublishedQuarter(agencyId, quarterId); + + } else if (StringUtils.equals("year", type)) {//当年 + return publicityDao.getSubAgencyPublishedYear(agencyId, yearId); + + } else { + return null; + } + } + + /** + * @param tokenDto type + * @Description 获取直属部门发文数 + * @author jyy + */ + @Override + public List departmentPublishedarticle(TokenDto tokenDto, String type) { +// String agencyId = this.getLoginUserDetails(tokenDto); + String agencyId = "0d2ffe9fce682b602b9d451226d08fae"; + Date date = new Date(); + String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + String yearId = strDate.substring(0, 4); + String monthId = strDate.substring(0, 6); + + if (StringUtils.equals("month", type)) {//当月 + return publicityDao.getSubDepartPublishedMonth(agencyId, monthId); + + } else if (StringUtils.equals("quarter", type)) {//当季 + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + return publicityDao.getSubDepartPublishedQuarter(agencyId, quarterId); + + } else if (StringUtils.equals("year", type)) {//当年 + return publicityDao.getSubDepartPublishedYear(agencyId, yearId); + + } else { + return null; + } + } + + /** + * @param tokenDto type + * @Description 获取指数网格发文数 + * @author jyy + */ + @Override + public List subgridPublishedarticle(TokenDto tokenDto, String type) { +// String agencyId = this.getLoginUserDetails(tokenDto); + String agencyId = "0d2ffe9fce682b602b9d451226d08fae"; + Date date = new Date(); + String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + String yearId = strDate.substring(0, 4); + String monthId = strDate.substring(0, 6); + + if (StringUtils.equals("month", type)) {//当月 + return publicityDao.getSubGridPublishedMonth(agencyId, monthId); + + } else if (StringUtils.equals("quarter", type)) {//当季 + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + return publicityDao.getSubGridPublishedQuarter(agencyId, quarterId); + + } else if (StringUtils.equals("year", type)) {//当年 + return publicityDao.getSubGridPublishedYear(agencyId, yearId); + + } else { + return null; + } + } + + /** + * @param tokenDto + * @Description 获取机关ID + * @author zxc + */ + public String getLoginUserDetails(TokenDto tokenDto) { + LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + BeanUtils.copyProperties(tokenDto, dto); + LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData(); + return data.getAgencyId(); + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java new file mode 100644 index 0000000000..584ac1b1dc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java @@ -0,0 +1,51 @@ +package com.epmet.service.topic; + +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; +import com.epmet.topic.dto.result.*; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/20 15:58 + */ +public interface TopicService { + + /** + * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17 + * @param tokenDto + * @author zxc + */ + TopicSummaryResultDTO topicSummary(TokenDto tokenDto); + + /** + * @Description 话题——话题分析 + * @param tokenDto + * @param formDTO + * @author zxc + */ + List topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO); + + /** + * @Description 话题——直属网格话题数 + * @param tokenDto + * @author zxc + */ + List topicSubGrid( TokenDto tokenDto); + + /** + * @Description 话题——下级机关话题数 + * @param tokenDto + * @author zxc + */ + List topicSubAgency(TokenDto tokenDto); + + /** + * @Description 话题——话题分析表 + * @param tokenDto + * @author zxc + */ + List topicSummaryInfo(TokenDto tokenDto); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java new file mode 100644 index 0000000000..9b8dace788 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java @@ -0,0 +1,182 @@ +package com.epmet.service.topic.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dao.topic.TopicDao; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.topic.TopicService; +import com.epmet.topic.constant.TopicConstant; +import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; +import com.epmet.topic.dto.result.*; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @CreateTime 2020/6/20 15:58 + */ +@Service +public class TopicServiceImpl implements TopicService { + + @Autowired + private TopicDao topicDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + /** + * @Description 话题:话题总数、讨论中话题数量、已关闭话题数量、已屏蔽话题数量、话题已转议题数量、数据更新至2020-06-17 + * @param tokenDto + * @author zxc + */ + @Override + public TopicSummaryResultDTO topicSummary(TokenDto tokenDto) { + TopicSummaryResultDTO result = new TopicSummaryResultDTO(); + String agencyId = this.getLoginUserDetails(tokenDto); + List topicStatus = topicDao.getTopicStatus(agencyId); + if (topicStatus.size() != NumConstant.ZERO){ + topicStatus.forEach(topic -> { + if (topic.getTopicStatus().equals(TopicConstant.DISCUSSING)){ + result.setTalkingTotalCount(topic.getTopicCount()); + }else if (topic.getTopicStatus().equals(TopicConstant.CLOSED)){ + result.setClosedTotalCount(topic.getTopicCount()); + }else { + result.setShieldedTotalCount(topic.getTopicCount()); + } + }); + result.setTopicTotalCount(topicStatus.stream().collect(Collectors.summingInt(TopicStatusResultDTO::getTopicCount))); + } + TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId); + if (shiftedCount != null){ + result.setShiftedTotalCount(shiftedCount.getShiftedIssueCount()); + result.setDeadline(shiftedCount.getDeadline()); + } + return result; + } + + /** + * @Description 话题——话题分析 + * @param tokenDto + * @param formDTO + * @author zxc + */ + @Override + public List topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO) { + String agencyId = this.getLoginUserDetails(tokenDto); + List result = new ArrayList<>(); + if (formDTO.getType().equals(TopicConstant.DATE)){ + List topicIncrDaily = topicDao.getTopicIncrDaily(agencyId); + List topicShiftedIncrDaily = topicDao.getTopicShiftedIncrDaily(agencyId); + topicIncrDaily.addAll(topicShiftedIncrDaily); + result = topicIncrDaily.stream().sorted(Comparator.comparing(TopicIncrTrendResultDTO::getDate).reversed()).collect(Collectors.toList()); + }else { + List topicIncrMonthly = topicDao.getTopicIncrMonthly(agencyId); + List topicShiftedIncrMonthly = topicDao.getTopicShiftedIncrMonthly(agencyId); + topicIncrMonthly.addAll(topicShiftedIncrMonthly); + result = topicIncrMonthly.stream().sorted(Comparator.comparing(TopicIncrTrendResultDTO::getDate).reversed()).collect(Collectors.toList()); + } + return result; + } + + /** + * @Description 话题——直属网格话题数 + * @param tokenDto + * @author zxc + */ + @Override + public List topicSubGrid(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + List result = new ArrayList<>(); + List subGridIdList = topicDao.getSubGridIdList(agencyId); + if (subGridIdList.size() != NumConstant.ZERO){ + List gridAllTopicInfoLastDay = topicDao.getGridAllTopicInfoLastDay(); + List gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay(); + subGridIdList.forEach(gridId -> { + gridAllTopicInfoLastDay.forEach(gridTopic -> { + if (gridId.equals(gridTopic.getGridId())){ + result.add(gridTopic); + } + }); + gridAllTopicShiftedInfoLastDay.forEach(gridShift -> { + if (gridId.equals(gridShift.getGridId())){ + result.add(gridShift); + } + }); + }); + return result; + } + return new ArrayList<>(); + } + + /** + * @Description 话题——下级机关话题数 + * @param tokenDto + * @author zxc + */ + @Override + public List topicSubAgency(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + List result = new ArrayList<>(); + List subAgencyIdList = topicDao.getSubAgencyIdList(agencyId); + //存在下级机关 + if (subAgencyIdList.size() != NumConstant.ZERO){ + List allTopicInfoLastDay = topicDao.getAllTopicInfoLastDay(); + List allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay(); + //话题状态为 已关闭、讨论中、已屏蔽 + subAgencyIdList.forEach(agencyIdOne -> { + allTopicInfoLastDay.forEach(agency -> { + if (agencyIdOne.equals(agency.getAgencyId())){ + result.add(agency); + } + }); + allTopicShiftedInfoLastDay.forEach(shiftTopic -> { + if (agencyIdOne.equals(shiftTopic.getAgencyId())){ + result.add(shiftTopic); + } + }); + }); + return result; + } + //不存在 + return new ArrayList<>(); + } + + /** + * @Description 话题——话题分析表 + * @param tokenDto + * @author zxc + */ + @Override + public List topicSummaryInfo(TokenDto tokenDto) { + String agencyId = this.getLoginUserDetails(tokenDto); + List topicSummaryInfo = topicDao.topicSummaryInfo(agencyId); + TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId); + int i = (shiftedCount.getShiftedIssueCount() / topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue))) * NumConstant.ONE_HUNDRED; + String ratio = String.valueOf(i) + TopicConstant.RATIO; + TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO(); + result.setName(TopicConstant.SHIFTED); + result.setRatio(ratio); + result.setValue(shiftedCount.getShiftedIssueCount()); + topicSummaryInfo.add(result); + return topicSummaryInfo; + } + + /** + * @Description 获取机关ID + * @param tokenDto + * @author zxc + */ + public String getLoginUserDetails(TokenDto tokenDto){ + LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + BeanUtils.copyProperties(tokenDto,dto); + LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData(); + return data.getAgencyId(); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java new file mode 100644 index 0000000000..cdb05ec73b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java @@ -0,0 +1,57 @@ +package com.epmet.service.user; + + +import com.epmet.dto.form.user.UserIncrTrendFormDTO; +import com.epmet.dto.form.user.UserSubAgencyFormDTO; +import com.epmet.dto.form.user.UserSubGridFormDTO; +import com.epmet.dto.form.user.UserSummaryInfoFormDTO; +import com.epmet.dto.result.user.UserIncrTrendResultDTO; +import com.epmet.dto.result.user.UserSubAgencyResultDTO; +import com.epmet.dto.result.user.UserSubGridResultDTO; +import com.epmet.dto.result.user.UserSummaryInfoResultDTO; + +import java.util.List; + +/** + * 组织能力用户相关接口 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 13:23 + */ +public interface UserAnalysisService { + /** + * @param formDTO + * @return com.epmet.user.result.UserSummaryInfoResultDTO + * @author yinzuomei + * @description 用户汇总信息查询 + * @Date 2020/6/22 13:41 + **/ + UserSummaryInfoResultDTO summaryInfo(UserSummaryInfoFormDTO formDTO); + + /** + * @param formDTO + * @return com.epmet.user.result.UserSubAgencyResultDTO + * @author yinzuomei + * @description 直属机关柱状图查询 + * @Date 2020/6/22 13:42 + **/ + List subAgency(UserSubAgencyFormDTO formDTO); + + /** + * @param formDTO + * @return com.epmet.user.result.UserSubGridResultDTO + * @author yinzuomei + * @description 直属网格柱状图查询 + * @Date 2020/6/22 13:42 + **/ + List subGrid(UserSubGridFormDTO formDTO); + + /** + * @param formDTO + * @return com.epmet.user.result.UserIncrTrendResultDTO + * @author yinzuomei + * @description 按日、按月查询注册用户数(参与用户数)增量折线图 + * @Date 2020/6/22 13:42 + **/ + List incrTrend(UserIncrTrendFormDTO formDTO); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java new file mode 100644 index 0000000000..655b6febae --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java @@ -0,0 +1,425 @@ +package com.epmet.service.user.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserAnalysisConstant; +import com.epmet.dao.user.UserAnalysisDao; +import com.epmet.dto.DimAgencyDTO; +import com.epmet.dto.DimGridDTO; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.form.user.UserIncrTrendFormDTO; +import com.epmet.dto.form.user.UserSubAgencyFormDTO; +import com.epmet.dto.form.user.UserSubGridFormDTO; +import com.epmet.dto.form.user.UserSummaryInfoFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.user.*; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.user.UserAnalysisService; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 组织能力用户相关接口 + * + * @author yinzuomei@elink-cn.com + * @date 2020/6/22 13:23 + */ +@Service +public class UserAnalysisServiceImpl implements UserAnalysisService { + private static final Logger logger = LoggerFactory.getLogger(UserAnalysisServiceImpl.class); + @Autowired + private LoginUserUtil loginUserUtil; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + private UserAnalysisDao userAnalysisDao; + + /** + * @return java.lang.String + * @param + * @author yinzuomei + * @description 查询当前用户直属机关单位id + * @Date 2020/6/22 14:19 + **/ + public String getMyAgency(){ + LoginUserDetailsFormDTO loginUserDetailsFormDTO=new LoginUserDetailsFormDTO(); + loginUserDetailsFormDTO.setApp(loginUserUtil.getLoginUserApp()); + loginUserDetailsFormDTO.setClient(loginUserUtil.getLoginUserClient()); + loginUserDetailsFormDTO.setUserId(loginUserUtil.getLoginUserId()); + Result result=epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO); + if(!result.success()){ + throw new RenException(UserAnalysisConstant.QUERY_USER_AGENCY_FAILED); + } + if(result.success()){ + if (null == result.getData() || StringUtils.isBlank(result.getData().getAgencyId())) { + throw new RenException(UserAnalysisConstant.QUERY_USER_AGENCY_FAILED); + } + } + return result.getData().getAgencyId(); + } + /** + * @param formDTO + * @return com.epmet.user.result.UserSummaryInfoResultDTO + * @author yinzuomei + * @description 用户汇总信息查询 + * @Date 2020/6/22 13:41 + **/ + @Override + public UserSummaryInfoResultDTO summaryInfo(UserSummaryInfoFormDTO formDTO) { + UserSummaryInfoResultDTO userSummaryInfoResultDTO=new UserSummaryInfoResultDTO(); + String myAgencyId=this.getMyAgency(); + if(UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())){ + //参与用户 + userSummaryInfoResultDTO=userAnalysisDao.selectParticipationUserSummaryInfo(myAgencyId); + }else{ + //注册用户 + userSummaryInfoResultDTO=userAnalysisDao.selectRegUserSummaryInfo(myAgencyId); + } + if(null!=userSummaryInfoResultDTO){ + userSummaryInfoResultDTO.setCurrentDate(DateUtils.getxAxisDatePattern(userSummaryInfoResultDTO.getCurrentDate(),".")); + //提取出工具类 + userSummaryInfoResultDTO.setPartymemberProportion(userSummaryInfoResultDTO.getPartymemberProportionValue().stripTrailingZeros().toPlainString()); + userSummaryInfoResultDTO.setWarmHeartedProportion(userSummaryInfoResultDTO.getWarmHeartedProportionValue().stripTrailingZeros().toPlainString()); + } + logger.info(String.format("查询用户汇总信息返参%s",JSON.toJSONString(userSummaryInfoResultDTO))); + return userSummaryInfoResultDTO; + } + + /** + * @param formDTO + * @return com.epmet.user.result.UserSubAgencyResultDTO + * @author yinzuomei + * @description 直属机关柱状图查询 + * @Date 2020/6/22 13:42 + **/ + @Override + public List subAgency(UserSubAgencyFormDTO formDTO) { + //获取用户所属机关id + String myAgencyId = this.getMyAgency(); + //初始化横坐标(用户所机关的下级机关列表) + List dimList = this.initUserSubAgencyResultDTO(myAgencyId); + if(CollectionUtils.isEmpty(dimList)){ + logger.info(String.format("当前机关(agencyId=%s)下没有下级机关",myAgencyId)); + return new ArrayList<>(); + } + //根据入参,查询注册用户或者参与用户的(机关、按日的查询结果) + List userSubAgencyResDTOList=new ArrayList<>(); + if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())) { + //参与用户 + userSubAgencyResDTOList = userAnalysisDao.selectParticipationSubAgencyRes(formDTO.getDateId(), + myAgencyId); + } else { + //注册用户 + userSubAgencyResDTOList = userAnalysisDao.selectRegSubAgencyRes(formDTO.getDateId(), + myAgencyId); + } + //根据维度表进行对比 + for(UserSubAgencyResultDTO dimInitResultDto:dimList){ + boolean flag=false; + for(UserSubAgencyResDTO userSubAgencyResDTO:userSubAgencyResDTOList){ + if(dimInitResultDto.getAgencyId().equals(userSubAgencyResDTO.getAgencyId())){ + flag=true; + //居民、热心居民、党员总数,用于排序 + dimInitResultDto.setTotal(userSubAgencyResDTO.getPartymemberTotal() + +userSubAgencyResDTO.getWarmHeartedTotal() + +userSubAgencyResDTO.getResiTotal()); + switch(dimInitResultDto.getType()){ + case UserAnalysisConstant.REGISTERED_RESI: + dimInitResultDto.setValue(userSubAgencyResDTO.getResiTotal()); + break; + case UserAnalysisConstant.WARMHEARTED: + dimInitResultDto.setValue(userSubAgencyResDTO.getWarmHeartedTotal()); + break; + case UserAnalysisConstant.PARTYMEMBER: + dimInitResultDto.setValue(userSubAgencyResDTO.getPartymemberTotal()); + break; + default: + break; + } + } + } + if(!flag){ + logger.error(String.format("各机关注册用户数缺少记录:date_id=%s,agencyId=%s",formDTO.getDateId(),dimInitResultDto.getAgencyId())); + } + } + //返回集合按照total降序排序 + List returnList = dimList.stream().sorted(Comparator.comparing(UserSubAgencyResultDTO::getTotal)) + .collect(Collectors.toList()); + return returnList; + } + + private List initUserSubAgencyResultDTO(String myAgencyId) { + List list=new ArrayList<>(); + List dimAgencyDTOS=userAnalysisDao.selectSubAgencyList(myAgencyId); + for(DimAgencyDTO agencyDTO:dimAgencyDTOS){ + //居民 + UserSubAgencyResultDTO resi=new UserSubAgencyResultDTO(); + resi.setAgencyId(agencyDTO.getId()); + resi.setName(agencyDTO.getAgencyName()); + resi.setValue(NumConstant.ZERO); + resi.setType(UserAnalysisConstant.REGISTERED_RESI); + resi.setTotal(NumConstant.ZERO); + list.add(resi); + //热心居民 + UserSubAgencyResultDTO warm=new UserSubAgencyResultDTO(); + warm.setAgencyId(agencyDTO.getId()); + warm.setName(agencyDTO.getAgencyName()); + warm.setValue(NumConstant.ZERO); + warm.setType(UserAnalysisConstant.WARMHEARTED); + warm.setTotal(NumConstant.ZERO); + list.add(warm); + //党员 + UserSubAgencyResultDTO party=new UserSubAgencyResultDTO(); + party.setAgencyId(agencyDTO.getId()); + party.setName(agencyDTO.getAgencyName()); + party.setValue(NumConstant.ZERO); + party.setType(UserAnalysisConstant.PARTYMEMBER); + party.setTotal(NumConstant.ZERO); + list.add(party); + } + return list; + } + + /** + * @param formDTO + * @return com.epmet.user.result.UserSubGridResultDTO + * @author yinzuomei + * @description 直属网格柱状图查询 + * @Date 2020/6/22 13:42 + **/ + @Override + public List subGrid(UserSubGridFormDTO formDTO) { + //获取用户所属机关id + String myAgencyId = this.getMyAgency(); + //初始化横坐标(用户所机关的直属网格) + List dimList = this.initUserSubGridResultDTO(myAgencyId); + if(CollectionUtils.isEmpty(dimList)){ + logger.info(String.format("当前机关(agencyId=%s)下没有网格",myAgencyId)); + return new ArrayList<>(); + } + //根据入参,查询注册用户或者参与用户的(机关、按日的查询结果) + List userSubGridResDTOS=new ArrayList<>(); + if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag())) { + //参与用户 + userSubGridResDTOS=userAnalysisDao.selectParticipationSubGridRes(formDTO.getDateId(),myAgencyId); + } else { + //注册用户 + userSubGridResDTOS=userAnalysisDao.selectRegSubGridRes(formDTO.getDateId(),myAgencyId); + } + //根据维度表进行对比 + for(UserSubGridResultDTO dimInitResultDto:dimList){ + boolean flag=false; + for(UserSubGridResDTO userSubGridResDTO:userSubGridResDTOS){ + if(dimInitResultDto.getGridId().equals(userSubGridResDTO.getGridId())){ + flag=true; + //居民、热心居民、党员总数,用于排序 + dimInitResultDto.setTotal(userSubGridResDTO.getPartymemberTotal() + +userSubGridResDTO.getWarmHeartedTotal() + +userSubGridResDTO.getResiTotal()); + switch(dimInitResultDto.getType()){ + case UserAnalysisConstant.REGISTERED_RESI: + dimInitResultDto.setValue(userSubGridResDTO.getResiTotal()); + break; + case UserAnalysisConstant.WARMHEARTED: + dimInitResultDto.setValue(userSubGridResDTO.getWarmHeartedTotal()); + break; + case UserAnalysisConstant.PARTYMEMBER: + dimInitResultDto.setValue(userSubGridResDTO.getPartymemberTotal()); + break; + default: + break; + } + } + } + if(!flag){ + logger.error(String.format("直属网格注册用户数缺少记录:date_id=%s,gridId=%s",formDTO.getDateId(),dimInitResultDto.getGridId())); + } + } + //返回集合按照total降序排序 + List returnList = dimList.stream().sorted(Comparator.comparing(UserSubGridResultDTO::getTotal)) + .collect(Collectors.toList()); + return returnList; + } + + private List initUserSubGridResultDTO(String myAgencyId) { + List list=new ArrayList<>(); + List gridList=userAnalysisDao.selectSubGridList(myAgencyId); + for(DimGridDTO grid:gridList){ + //居民 + UserSubGridResultDTO resi=new UserSubGridResultDTO(); + resi.setGridId(grid.getId()); + resi.setName(grid.getGridName()); + resi.setValue(NumConstant.ZERO); + resi.setType(UserAnalysisConstant.REGISTERED_RESI); + resi.setTotal(NumConstant.ZERO); + list.add(resi); + //热心居民 + UserSubGridResultDTO warm=new UserSubGridResultDTO(); + warm.setGridId(grid.getId()); + warm.setName(grid.getGridName()); + warm.setValue(NumConstant.ZERO); + warm.setType(UserAnalysisConstant.WARMHEARTED); + warm.setTotal(NumConstant.ZERO); + list.add(warm); + //党员 + UserSubGridResultDTO party=new UserSubGridResultDTO(); + party.setGridId(grid.getId()); + party.setName(grid.getGridName()); + party.setValue(NumConstant.ZERO); + party.setType(UserAnalysisConstant.PARTYMEMBER); + party.setTotal(NumConstant.ZERO); + list.add(party); + } + return list; + } + + /** + * @param formDTO + * @return com.epmet.user.result.UserIncrTrendResultDTO + * @author yinzuomei + * @description 按日、按月查询注册用户数(参与用户数)增量折线图 + * @Date 2020/6/22 13:42 + **/ + @Override + public List incrTrend(UserIncrTrendFormDTO formDTO) { + //获取用户所属机关id + String myAgencyId = this.getMyAgency(); + List dimList = this.initUserIncrTrendResultDTO(formDTO.getType()); + if(CollectionUtils.isEmpty(dimList)){ + logger.error("横坐标初始失败"); + return new ArrayList<>(); + } + List list=new ArrayList<>(); + if (UserAnalysisConstant.REG_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.DAY_TYPE.equals(formDTO.getType())) { + //注册用户数、日 + list=userAnalysisDao.selectRegDayIncr(myAgencyId); + } else if (UserAnalysisConstant.REG_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.MONTH_TYPE.equals(formDTO.getType())) { + //注册用户数、月 + list=userAnalysisDao.selectRegMonthIncr(myAgencyId); + } else if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.DAY_TYPE.equals(formDTO.getType())) { + //参与用户数、日 + list=userAnalysisDao.selectParticipationUserDayIncr(myAgencyId); + } else if (UserAnalysisConstant.PARTI_FLAG.equals(formDTO.getRegOrPartiFlag()) && UserAnalysisConstant.MONTH_TYPE.equals(formDTO.getType())) { + //参与用户数、月 + list=userAnalysisDao.selectParticipationUserMonthIncr(myAgencyId); + } else { + logger.error("参数错误"); + return new ArrayList<>(); + } + for(UserIncrTrendResultDTO dim:dimList){ + boolean flag=false; + for(UserIncrTrendResDTO userIncrTrendResDTO:list){ + if(dim.getDateOrMonthId().equals(userIncrTrendResDTO.getDateIdOrMonthId())){ + flag=true; + //居民、热心居民、党员总数,用于排序 + switch(dim.getType()){ + case UserAnalysisConstant.REGISTERED_RESI: + dim.setValue(userIncrTrendResDTO.getRegIncr()); + break; + case UserAnalysisConstant.WARMHEARTED: + dim.setValue(userIncrTrendResDTO.getWarmIncr()); + break; + case UserAnalysisConstant.PARTYMEMBER: + dim.setValue(userIncrTrendResDTO.getPartymemberIncr()); + break; + default: + break; + } + + } + } + if(!flag){ + logger.error(String.format("机关id%s缺少记录dateOrMonthId=%s",myAgencyId,dim.getDateOrMonthId())); + } + } + return dimList; + } + + private List initUserIncrTrendResultDTO(String type) { + List list=new ArrayList<>(); + if(UserAnalysisConstant.DAY_TYPE.equals(type)){ + List dateIdList= DateUtils.getDaysBetween(DateUtils.getBeforeNDay(90), + DateUtils.getBeforeNDay(1)); + for(String dateId:dateIdList){ + String date=DateUtils.getxAxisDatePattern(dateId,"/"); + //居民 + UserIncrTrendResultDTO resi=new UserIncrTrendResultDTO(); + resi.setDate(date); + resi.setType(UserAnalysisConstant.REGISTERED_RESI); + resi.setValue(NumConstant.ZERO); + resi.setDateOrMonthId(dateId); + //热心居民 + UserIncrTrendResultDTO warm=new UserIncrTrendResultDTO(); + warm.setDate(date); + warm.setType(UserAnalysisConstant.WARMHEARTED); + warm.setValue(NumConstant.ZERO); + warm.setDateOrMonthId(dateId); + //党员 + UserIncrTrendResultDTO party=new UserIncrTrendResultDTO(); + party.setDate(date); + party.setType(UserAnalysisConstant.PARTYMEMBER); + party.setValue(NumConstant.ZERO); + party.setDateOrMonthId(dateId); + list.add(resi); + list.add(warm); + list.add(party); + } + }else if(UserAnalysisConstant.MONTH_TYPE.equals(type)){ + List monthList= DateUtils.getMonthBetween(DateUtils.getBeforeNMonth(12), + DateUtils.getBeforeNMonth(1)); + for(String monthId:monthList){ + String date=DateUtils.getxAxisDatePattern(monthId,"/"); + //居民 + UserIncrTrendResultDTO resi=new UserIncrTrendResultDTO(); + resi.setDate(date); + resi.setType(UserAnalysisConstant.REGISTERED_RESI); + resi.setValue(NumConstant.ZERO); + resi.setDateOrMonthId(monthId); + //热心居民 + UserIncrTrendResultDTO warm=new UserIncrTrendResultDTO(); + warm.setDate(date); + warm.setType(UserAnalysisConstant.WARMHEARTED); + warm.setValue(NumConstant.ZERO); + warm.setDateOrMonthId(monthId); + //党员 + UserIncrTrendResultDTO party=new UserIncrTrendResultDTO(); + party.setDate(date); + party.setType(UserAnalysisConstant.PARTYMEMBER); + party.setValue(NumConstant.ZERO); + party.setDateOrMonthId(monthId); + list.add(resi); + list.add(warm); + list.add(party); + } + } + return list; + } + + + /*public static void main(String[] args) { +// System.out.println("前一天"+DateUtils.getBeforeNDay(1)); +// System.out.println("前90天"+DateUtils.getBeforeNDay(90)); + List list= DateUtils.getDaysBetween("201912","202005"); + for(String m:list){ + System.out.println(m); + } +// System.out.println(list.size()); + System.out.println("上个月"+DateUtils.getBeforeNMonth(1)); + System.out.println("前8个月"+DateUtils.getBeforeNMonth(8)); + + }*/ + +} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..347c3c808c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml @@ -0,0 +1,164 @@ + + + + + + + + + + ${appname} + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + ${log.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/.gitignore b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml new file mode 100644 index 0000000000..e2d08c35a2 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/.gitignore b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml new file mode 100644 index 0000000000..19e81a0cb5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/.gitignore b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml new file mode 100644 index 0000000000..7d0105ae55 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml new file mode 100644 index 0000000000..ccd4fb657e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/.gitignore b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml new file mode 100644 index 0000000000..06e60565b6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/user/.gitignore b/epmet-module/data-report/data-report-server/src/main/resources/mapper/user/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml new file mode 100644 index 0000000000..408cf17e61 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java index 65b235f5e0..920fc14e14 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -5,5 +5,10 @@ public interface DataSourceConstant { String GOV_ORG = "govOrg"; String STATS = "stats"; String GOV_ISSUE = "govIssue"; + String GOV_PROJECT = "govProject"; + String GOV_VOICE = "govVoice"; + String OPER_CRM = "operCrm"; + String RESI_GROUP = "resiGroup"; + String EPMET_USER = "epmetuser"; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DimAgencyConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DimAgencyConstant.java new file mode 100644 index 0000000000..b447c1f2da --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DimAgencyConstant.java @@ -0,0 +1,10 @@ +package com.epmet.constant; + +public interface DimAgencyConstant { + + String TYPE_ALL = "all"; + String TYPE_SELF = "self"; + + String TYPE_SELF_ID_SUFFIX = "-self"; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/GroupConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/GroupConstant.java new file mode 100644 index 0000000000..f7eccf24b1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/GroupConstant.java @@ -0,0 +1,36 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:02 + */ +public interface GroupConstant { + + /** + * eg: 2020W10 = 2020年第10周 + */ + String W = "W"; + + /** + * eg: 2020Q01 = 2020年第一季度 + */ + String Q = "Q"; + + /** + * 机关级别(社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级: province + */ + String COMMUNITY = "community"; + String STREET = "street"; + String DISTRICT = "district"; + String CITY = "city"; + String PROVINCE = "province"; + + String ERRORGRIDDAILY = "groupGridDaily ==>【网格小组统计出错了... 维度:网格-日】customerId为:"; + + String ERRORAGENCYDAILY = "groupAgencyDaily ==>【网格小组统计出错了... 维度:机关-日】customerId为:"; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IssueConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IssueConstant.java new file mode 100644 index 0000000000..338b35e1a1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IssueConstant.java @@ -0,0 +1,29 @@ +package com.epmet.constant; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 17:23 + */ +public interface IssueConstant { + /** + *表决中 + */ + String VOTING = "voting"; + /** + *已转项目 + */ + String SHIFT_PROJECT = "shift_project"; + /** + *已关闭 + */ + String CLOSED = "closed"; + /** + *已解决 + */ + String RESLOVED = "resloved"; + /** + *未解决 + */ + String UNRESLOVED = "unresloved"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/RobotConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/RobotConstant.java new file mode 100644 index 0000000000..e548b35a1a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/RobotConstant.java @@ -0,0 +1,5 @@ +package com.epmet.constant; + +public interface RobotConstant { + String DIMENSION_ROBOT = "DimensionRobot"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsSubject.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsSubject.java new file mode 100644 index 0000000000..4573d9daf8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsSubject.java @@ -0,0 +1,66 @@ +package com.epmet.constant; + +public interface StatsSubject { + String DIM_AGENCY = "dim_agency"; + String DIM_CUSTOMER = "dim_customer"; + String DIM_DATE = "dim_date"; + String DIM_DEPARTMENT = "dim_department"; + String DIM_GRID = "dim_grid"; + String DIM_MONTH = "dim_month"; + String DIM_QUARTER = "dim_quarter"; + String DIM_TOPIC_STATUS = "dim_topic_status"; + String DIM_WEEK = "dim_week"; + String DIM_YEAR = "dim_year"; + String FACT_AGENCY_PROJECT_DAILY = "fact_agency_project_daily"; + String FACT_AGENCY_PROJECT_MONTHLY = "fact_agency_project_monthly"; + String FACT_ARTICLE_PUBLISHED_AGENCY_DAILY = "fact_article_published_agency_daily"; + String FACT_ARTICLE_PUBLISHED_DEPARTMENT_DAILY = "fact_article_published_department_daily"; + String FACT_ARTICLE_PUBLISHED_GRID_DAILY = "fact_article_published_grid_daily"; + String FACT_GRID_PROJECT_DAILY = "fact_grid_project_daily"; + String FACT_GRID_PROJECT_MONTHLY = "fact_grid_project_monthly"; + String FACT_GROUP_AGENCY_DAILY = "fact_group_agency_daily"; + String FACT_GROUP_AGENCY_MONTHLY = "fact_group_agency_monthly"; + String FACT_GROUP_GRID_DAILY = "fact_group_grid_daily"; + String FACT_ISSUE_AGENCY_DAILY = "fact_issue_agency_daily"; + String FACT_ISSUE_AGENCY_MONTHLY = "fact_issue_agency_monthly"; + String FACT_ISSUE_GRID_DAILY = "fact_issue_grid_daily"; + String FACT_ISSUE_GRID_MONTHLY = "fact_issue_grid_monthly"; + String FACT_PARTICIPATION_USER_AGENCY_DAILY = "fact_participation_user_agency_daily"; + String FACT_PARTICIPATION_USER_AGENCY_MONTHLY = "fact_participation_user_agency_monthly"; + String FACT_PARTICIPATION_USER_GRID_DAILY = "fact_participation_user_grid_daily"; + String FACT_PARTICIPATION_USER_GRID_MONTHLY = "fact_participation_user_grid_monthly"; + String FACT_REG_USER_AGENCY_DAILY = "fact_reg_user_agency_daily"; + String FACT_REG_USER_AGENCY_MONTHLY = "fact_reg_user_agency_monthly"; + String FACT_REG_USER_GRID_DAILY = "fact_reg_user_grid_daily"; + String FACT_REG_USER_GRID_MONTHLY = "fact_reg_user_grid_monthly"; + String FACT_TAG_USED_AGENCY_DAILY = "fact_tag_used_agency_daily"; + String FACT_TAG_USED_AGENCY_MONTHLY = "fact_tag_used_agency_monthly"; + String FACT_TAG_USED_AGENCY_QUARTERLY = "fact_tag_used_agency_quarterly"; + String FACT_TAG_USED_AGENCY_YEARLY = "fact_tag_used_agency_yearly"; + String FACT_TAG_USED_DEPARTMENT_DAILY = "fact_tag_used_department_daily"; + String FACT_TAG_USED_DEPARTMENT_MONTHLY = "fact_tag_used_department_monthly"; + String FACT_TAG_USED_DEPARTMENT_QUARTERLY = "fact_tag_used_department_quarterly"; + String FACT_TAG_USED_DEPARTMENT_YEARLY = "fact_tag_used_department_yearly"; + String FACT_TAG_USED_GRID_DAILY = "fact_tag_used_grid_daily"; + String FACT_TAG_USED_GRID_MONTHLY = "fact_tag_used_grid_monthly"; + String FACT_TAG_USED_GRID_QUARTERLY = "fact_tag_used_grid_quarterly"; + String FACT_TAG_USED_GRID_YEARLY = "fact_tag_used_grid_yearly"; + String FACT_TAG_VIEWED_AGENCY_DAILY = "fact_tag_viewed_agency_daily"; + String FACT_TAG_VIEWED_AGENCY_MONTHLY = "fact_tag_viewed_agency_monthly"; + String FACT_TAG_VIEWED_AGENCY_QUARTERLY = "fact_tag_viewed_agency_quarterly"; + String FACT_TAG_VIEWED_AGENCY_YEARLY = "fact_tag_viewed_agency_yearly"; + String FACT_TAG_VIEWED_GRID_DAILY = "fact_tag_viewed_grid_daily"; + String FACT_TAG_VIEWED_GRID_MONTHLY = "fact_tag_viewed_grid_monthly"; + String FACT_TAG_VIEWED_GRID_QUARTERLY = "fact_tag_viewed_grid_quarterly"; + String FACT_TAG_VIEWED_GRID_YEARLY = "fact_tag_viewed_grid_yearly"; + String FACT_TOPIC_ISSUE_AGENCY_DAILY = "fact_topic_issue_agency_daily"; + String FACT_TOPIC_ISSUE_AGENCY_MONTHLY = "fact_topic_issue_agency_monthly"; + String FACT_TOPIC_ISSUE_GRID_DAILY = "fact_topic_issue_grid_daily"; + String FACT_TOPIC_ISSUE_GRID_MONTHLY = "fact_topic_issue_grid_monthly"; + String FACT_TOPIC_STATUS_AGENCY_DAILY = "fact_topic_status_agency_daily"; + String FACT_TOPIC_STATUS_AGENCY_MONTHLY = "fact_topic_status_agency_monthly"; + String FACT_TOPIC_STATUS_GRID_DAILY = "fact_topic_status_grid_daily"; + String FACT_TOPIC_TOTAL_AGENCY_DAILY = "fact_topic_total_agency_daily"; + String FACT_TOPIC_TOTAL_GRID_DAILY = "fact_topic_total_grid_daily"; + String LAST_EXEC_RECORD = "last_exec_record"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubDeptTreeDto.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubDeptTreeDto.java new file mode 100644 index 0000000000..c854859bc6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubDeptTreeDto.java @@ -0,0 +1,61 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @ClassName AgencySubDeptTreeDto + * @Auth wangc + * @Date 2020-06-18 16:06 + */ +@Data +public class AgencySubDeptTreeDto implements Serializable { + private static final long serialVersionUID = -8179035699122094719L; + /** + * 机构Id + * */ + private String agencyId; + + /** + * 机构名称 + * */ + private String agencyName; + + /** + * 直属网格Id + * */ + List gridIds; + + /** + * 直属部门Id + * */ + List deptIds; + + /** + * 客户Id + * */ + String customerId; + + /** + * 父级机关Id,当为最顶层是pid为0 + * */ + String pid; + + /** + * 级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + * */ + String level; + + /** + * 下级机关集合 + * */ + List subAgencies; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubTreeDto.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubTreeDto.java new file mode 100644 index 0000000000..d582cdfccc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/AgencySubTreeDto.java @@ -0,0 +1,56 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @ClassName AgencySubTreeDto + * @Auth wangc + * @Date 2020-06-16 16:51 + */ +@Data +public class AgencySubTreeDto implements Serializable { + private static final long serialVersionUID = 312765293830315198L; + /** + * 机构Id + * */ + private String agencyId; + + /** + * 机构名称 + * */ + private String agencyName; + + /** + * 直属网格Id + * */ + List gridIds; + + /** + * 客户Id + * */ + String customerId; + + /** + * 父级机关Id,当为最顶层是pid为0 + * */ + String pid; + + /** + * 级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + * */ + String level; + + /** + * 下级机关集合 + * */ + List subAgencies; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/AgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/AgencyDTO.java new file mode 100644 index 0000000000..767adaad61 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/AgencyDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto.group; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 11:06 + */ +@Data +public class AgencyDTO implements Serializable { + + private static final long serialVersionUID = -1644032762160525169L; + + /** + * 组织ID AGENCY_ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织机构ID,根组织为0 + */ + private String pid; + + /** + * 所有上级组织机构ID(以英文:隔开) + */ + private String pids; + + /** + * 机关级别(社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province) + */ + private String level; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyGridTotalCountFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyGridTotalCountFormDTO.java new file mode 100644 index 0000000000..5990fd7de5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyGridTotalCountFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 14:39 + */ +@Data +public class AgencyGridTotalCountFormDTO implements Serializable { + + private static final long serialVersionUID = -4219157085337388583L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyMonthlyFormDTO.java new file mode 100644 index 0000000000..ec00bcc11f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/AgencyMonthlyFormDTO.java @@ -0,0 +1,121 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author zxc + * @CreateTime 2020/6/19 21:22 + */ +@Data +public class AgencyMonthlyFormDTO implements Serializable { + + private static final long serialVersionUID = -5920961528060576749L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计月份ID 关联月份dim表 + */ + private String monthId; + + /** + * 统计季度ID + */ + private String quarterId; + + /** + * 统计年份ID + */ + private String yearId; + + /** + * 网格数 截至到月末的机关下网格数 + */ + private Integer gridTotal = 0; + + /** + * 小组数 截止到月末的新增数(该月内所有的新增数字之和) + */ + private Integer groupTotal = 0; + + /** + * 机关下网格组内总人数 不去重 + */ + private Integer groupMemberTotal = 0; + + /** + * 小组平均人数 月末一天的平均数 + */ + private Integer groupMemberAvgCount = 0; + + /** + * 小组中位数 月末一天的中位数(人) + */ + private Integer groupMedian = 0; + + /** + * 小组增量 + */ + private Integer groupIncr = 0; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount = 0; + + /** + * 成员最多小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount = 0; + + /** + * 成员最少小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String delFlag = "0"; + + /** + * 乐观锁 + */ + private Integer revision = 0; + + /** + * 创建人 + */ + private String createdBy = "APP_USER"; + + /** + * 更新人 + */ + private String updatedBy = "APP_USER"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleFormDTO.java new file mode 100644 index 0000000000..a6c73d386f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:34 + */ +@Data +public class GridGroupPeopleFormDTO implements Serializable { + + private static final long serialVersionUID = -3634745091993094743L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 小组状态 + */ + private String state = "approved"; + + /** + * 人员状态 + */ + private String status = "removed"; + + /** + * dateID + */ + private String dateId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleTotalFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleTotalFormDTO.java new file mode 100644 index 0000000000..b36204f1b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupPeopleTotalFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:34 + */ +@Data +public class GridGroupPeopleTotalFormDTO implements Serializable { + + private static final long serialVersionUID = -6415141711878464704L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 小组状态 + */ + private String state = "approved"; + + /** + * 人员状态 + */ + private String status = "removed"; + + /** + * dateID + */ + private String dateId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupTotalFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupTotalFormDTO.java new file mode 100644 index 0000000000..f39002e5ad --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GridGroupTotalFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:34 + */ +@Data +public class GridGroupTotalFormDTO implements Serializable { + + private static final long serialVersionUID = 4605386326533905365L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 小组状态 + */ + private String state = "approved"; + + /** + * dateID + */ + private String dateId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GroupIncrFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GroupIncrFormDTO.java new file mode 100644 index 0000000000..79ac84ff44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GroupIncrFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/17 16:45 + */ +@Data +public class GroupIncrFormDTO implements Serializable { + + private static final long serialVersionUID = 4498126701378094617L; + + /** + * 小组状态 只算 state = “approved” + */ + private String state = "approved"; + + /** + * 客户ID + */ + private String customerId; + + /** + * dateID + */ + private String dateId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleResultDTO.java new file mode 100644 index 0000000000..9c96b40583 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:31 + */ +@Data +public class AgencyGridGroupPeopleResultDTO implements Serializable { + + private static final long serialVersionUID = 225708056690809761L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小组ID + */ + private String groupId; + + /** + * 网格下-每个小组内成员的数量【人员状态 不为 removed】 + */ + private Integer groupCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleTotalResultDTO.java new file mode 100644 index 0000000000..5d1b2f259e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridGroupPeopleTotalResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:31 + */ +@Data +public class AgencyGridGroupPeopleTotalResultDTO implements Serializable { + + private static final long serialVersionUID = -8693107487048855351L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格下的小组成员总数量 + */ + private Integer gridGroupPeopleTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridInfoResultDTO.java new file mode 100644 index 0000000000..ea51f65bf4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridInfoResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 14:35 + */ +@Data +public class AgencyGridInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -1979735889806617714L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridTotalCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridTotalCountResultDTO.java new file mode 100644 index 0000000000..73ccde44d3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGridTotalCountResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 14:35 + */ +@Data +public class AgencyGridTotalCountResultDTO implements Serializable { + + private static final long serialVersionUID = -3528033317344272299L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 机关下的网格数量 + */ + private Integer gridTotal; + + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupDailyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupDailyResultDTO.java new file mode 100644 index 0000000000..139917240b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupDailyResultDTO.java @@ -0,0 +1,131 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 10:09 + */ +@Data +public class AgencyGroupDailyResultDTO implements Serializable { + + private static final long serialVersionUID = 7862398525119326819L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机构ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月ID + */ + private String monthId; + + /** + * 季ID + */ + private String quarterId; + + /** + * 年ID + */ + private String yearId; + + /** + * 网格总数 截至统计日期 + */ + private Integer gridTotal = 0; + + /** + * 网格小组数(包含所有下级机关的网格小组) 截至统计日期 + */ + private Integer groupTotalCount = 0; + + /** + * 机关下网格小组人数总计 不去重 + */ + private Integer groupMemberTotalCount = 0; + + /** + * 小组平均人数 截至统计日期 + */ + private Integer groupMemberAvgCount = 0; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian = 0; + + /** + * 当天小组增量 + */ + private Integer groupIncr = 0; + + /** + * 小组最大成员数 + */ + private Integer groupMemberMaxCount = 0; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组最小成员数 + */ + private Integer groupMemberMinCount = 0; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String delFlag = "0"; + + /** + * 乐观锁 + */ + private Integer revision = 0; + + /** + * 创建人 + */ + private String createdBy = "APP_USER"; + + /** + * 更新人 + */ + private String updatedBy = "APP_USER"; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupIncrResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupIncrResultDTO.java new file mode 100644 index 0000000000..dcf9a9694c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupIncrResultDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/17 16:48 + */ +@Data +public class AgencyGroupIncrResultDTO implements Serializable { + + private static final long serialVersionUID = 8397311844636364561L; + /** + * 机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小组日增数 + */ + private Integer groupIncr = 0; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupMonthlyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupMonthlyResultDTO.java new file mode 100644 index 0000000000..354eb918e7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupMonthlyResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/19 22:12 + */ +@Data +public class AgencyGroupMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 8436524201080875660L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 小组月增长数量 + */ + private Integer monthGroupIncr; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupTotalCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupTotalCountResultDTO.java new file mode 100644 index 0000000000..069bddcfd1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/AgencyGroupTotalCountResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/18 17:35 + */ +@Data +public class AgencyGroupTotalCountResultDTO implements Serializable { + + private static final long serialVersionUID = 1166957004076377211L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 每个网格下的小组数 + */ + private Integer gridGroupCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/CustomerGridInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/CustomerGridInfoResultDTO.java new file mode 100644 index 0000000000..e81d03439f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/CustomerGridInfoResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 14:48 + */ +@Data +public class CustomerGridInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 6635092874863425910L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格所属机关ID + */ + private String agencyId; + + /** + * 客户ID + */ + private String customerId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/DimTimeResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/DimTimeResultDTO.java new file mode 100644 index 0000000000..e0bd6c6c6c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/DimTimeResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/17 19:16 + */ +@Data +public class DimTimeResultDTO implements Serializable { + + private static final long serialVersionUID = -2863598069938303232L; + + /** + * 日期ID + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月Id + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年ID + */ + private String yearId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleResultDTO.java new file mode 100644 index 0000000000..ce1667a123 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:31 + */ +@Data +public class GridGroupPeopleResultDTO implements Serializable { + + private static final long serialVersionUID = -7251423227553175946L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小组ID + */ + private String groupId; + + /** + * 网格下-每个小组内成员的数量【人员状态 不为 removed】 + */ + private Integer groupCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleTotalResultDTO.java new file mode 100644 index 0000000000..ae7bc8a19f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupPeopleTotalResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:31 + */ +@Data +public class GridGroupPeopleTotalResultDTO implements Serializable { + + private static final long serialVersionUID = -6131166787256682153L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格下的小组成员总数量 + */ + private Integer gridGroupPeopleTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupTotalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupTotalResultDTO.java new file mode 100644 index 0000000000..055fd3f947 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridGroupTotalResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 16:31 + */ +@Data +public class GridGroupTotalResultDTO implements Serializable { + + private static final long serialVersionUID = 1099735509481708988L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格下的小组数量 + */ + private Integer gridGroupTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridIdListByCustomerResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridIdListByCustomerResultDTO.java new file mode 100644 index 0000000000..4c2f1033c7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GridIdListByCustomerResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/23 13:54 + */ +@Data +public class GridIdListByCustomerResultDTO implements Serializable { + + private static final long serialVersionUID = -4170349451726088582L; + + /** + * 网格ID + */ + private String GridId; + + /** + * 机关ID + */ + private String agencyId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupGridDailyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupGridDailyResultDTO.java new file mode 100644 index 0000000000..b95bedeb9b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupGridDailyResultDTO.java @@ -0,0 +1,130 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/16 17:25 + */ +@Data +public class GroupGridDailyResultDTO implements Serializable { + + private static final long serialVersionUID = 3206418216410331158L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机构ID 关联机关dim表 + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 年ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 网格数 当前网格下的网格数 + */ + private Integer gridTotal = 0; + + /** + * 小组数 + */ + private Integer groupTotal = 0; + + /** + * 网格下所有组内总人数 不去重 + */ + private Integer groupMemberTotal = 0; + + /** + * 小组平均人数 + */ + private Integer groupMemberAvgCount = 0; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian = 0; + + /** + * 小组增量 + */ + private Integer groupIncr = 0; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount = 0; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount = 0; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String delFlag = "0"; + + /** + * 乐观锁 + */ + private Integer revision = 0; + + /** + * 创建人 + */ + private String createdBy = "APP_USER"; + + /** + * 更新人 + */ + private String updatedBy = "APP_USER"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupIncrResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupIncrResultDTO.java new file mode 100644 index 0000000000..df09ee4bf3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupIncrResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/17 16:48 + */ +@Data +public class GroupIncrResultDTO implements Serializable { + + private static final long serialVersionUID = 5536872354876581582L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小组日增数 + */ + private Integer groupIncr = 0; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupPeopleCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupPeopleCountResultDTO.java new file mode 100644 index 0000000000..6cfa4ed9f5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/GroupPeopleCountResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/19 15:43 + */ +@Data +public class GroupPeopleCountResultDTO implements Serializable { + + private static final long serialVersionUID = 7804052387414894768L; + + /** + * 小组ID + */ + private String groupId; + + /** + * 网格下-每个小组内成员的数量【人员状态 不为 removed】 + */ + private Integer groupCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/SubAgencyIdResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/SubAgencyIdResultDTO.java new file mode 100644 index 0000000000..8690179371 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/result/SubAgencyIdResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @CreateTime 2020/6/19 10:41 + */ +@Data +public class SubAgencyIdResultDTO implements Serializable { + + private static final long serialVersionUID = -5375229459340391098L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 下级机关ID + */ + private String subAgencyId; + + /** + * 网格数量 + */ + private Integer gridTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueAgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueAgencyDTO.java new file mode 100644 index 0000000000..065f10279f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueAgencyDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.issue; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 14:06 + */ +@Data +public class IssueAgencyDTO implements Serializable { + private static final long serialVersionUID = 8258586413692513595L; + /** + * 组织ID + */ + private String agencyId; + /** + * 上级ID + */ + private String pId; + /** + * 所有上级ID + */ + private String pIds; + /** + * 状态 + */ + private String status; + /** + * 数量 + */ + private Integer count; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueGridDTO.java new file mode 100644 index 0000000000..de7bacf7a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueGridDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.issue; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/19 13:56 + */ +@Data +public class IssueGridDTO implements Serializable { + private static final long serialVersionUID = 4681179503519406263L; + /** + * 组织ID + */ + private String agencyId; + /** + * 上级ID + */ + private String gridId; + /** + * 状态 + */ + private String status; + /** + * 数量 + */ + private Integer count; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectDTO.java new file mode 100644 index 0000000000..5381b77c8a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.issue; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/19 17:28 + */ +@Data +public class IssueProjectDTO implements Serializable { + private static final long serialVersionUID = -6457792985830058324L; + /** + * 议题ID + */ + private String issueId; + /** + * 项目ID + */ + private String projectId; + /** + * 网格ID + */ + private String gridId; + /** + * 状态 + */ + private String status; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectAgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectAgencyDTO.java new file mode 100644 index 0000000000..add4fd14ff --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectAgencyDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.project; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/18 16:48 + */ +@Data +public class ProjectAgencyDTO implements Serializable { + private static final long serialVersionUID = 4581232825130630169L; + /** + * 组织ID + */ + private String agencyId; + /** + * 所有上级ID + */ + private String pIds; + /** + * 状态 + */ + private String status; + /** + * 数量 + */ + private Integer count; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectGridDTO.java new file mode 100644 index 0000000000..982bce9a87 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectGridDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.project; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/19 16:58 + */ +@Data +public class ProjectGridDTO implements Serializable { + private static final long serialVersionUID = 7176541257563571224L; + /** + * 项目ID + */ + private String projectId; + /** + * 组织ID + */ + private String agencyId; + /** + * 议题ID + */ + private String issueId; + /** + * 状态 + */ + private String status; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/form/MonthProjectListFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/form/MonthProjectListFormDTO.java new file mode 100644 index 0000000000..b0ff888330 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/form/MonthProjectListFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.project.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author sun + * 查询项目机关过去一个月的日统计数据 + */ +@Data +public class MonthProjectListFormDTO implements Serializable { + + private static final long serialVersionUID = -3634745091993094743L; + + /** + * 客户Id + */ + private String customerId; + /** + * 月维度Id + */ + private String monthId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/.gitkeep b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimAgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimAgencyDTO.java new file mode 100644 index 0000000000..8a8204cc54 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimAgencyDTO.java @@ -0,0 +1,105 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 机关维度 + * + * @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; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织机构ID,根组织为0 + */ + private String pid; + + /** + * 所有上级组织机构ID(以英文:隔开) + */ + private String pids; + + /** + * 所有上级名称,以-连接 + */ + private String allParentName; + + /** + * 机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerDTO.java new file mode 100644 index 0000000000..86aff5d046 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerDTO.java @@ -0,0 +1,76 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimCustomerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * CUSTOMER_ID + */ + private String id; + + /** + * 客户名称 + */ + private String customerName; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDateDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDateDTO.java new file mode 100644 index 0000000000..e539cda274 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDateDTO.java @@ -0,0 +1,93 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 日期维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimDateDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 日期eg:20200101 + */ + private String id; + + /** + * eg: 2020年01月01日 + */ + private String dateName; + + /** + * 周几:Monday、Tuesday、Wednesday、Thursday、Friday、Saturday、Sunday + */ + private String dayOfWeek; + + /** + * 周几:星期一、星期二、星期三、星期四、星期五、星期六、星期日 + */ + private String dayOfWeekName; + + /** + * dim_week.week_id + */ + private String weekId; + + /** + * 删除标识0未删除1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private String monthId; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDepartmentDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDepartmentDTO.java new file mode 100644 index 0000000000..80e89b4784 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimDepartmentDTO.java @@ -0,0 +1,86 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户部门维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimDepartmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * DEPARTMENT_ID + */ + private String id; + + /** + * 部门名称 + */ + private String departmentName; + + /** + * 所属机关ID(customer_agency_dimension.id) + */ + private String agencyId; + + /** + * 来源于customer_dimension + */ + private String customerId; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimGridDTO.java new file mode 100644 index 0000000000..9b526935f0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimGridDTO.java @@ -0,0 +1,91 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户网格维度 + * + * @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; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织机构ID(customer_agency.id) + */ + private String agencyId; + + /** + * 所属地区码(所属组织地区码) + */ + private String areaCode; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimMonthDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimMonthDTO.java new file mode 100644 index 0000000000..40fa150485 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimMonthDTO.java @@ -0,0 +1,101 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 月份维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimMonthDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 月:yyyyMM eg:202001 + */ + private String id; + + /** + * eg: 2020年01月 + */ + private String monthName; + + /** + * 1-12 + */ + private Integer monthOrder; + + /** + * yyyy-MM-dd eg:2020-01-01 + */ + private Date startDate; + + /** + * yyyy-MM-dd eg:2020-01-31 + */ + private Date endDate; + + /** + * 来源于dim_quarter.id + */ + private String quarterId; + + /** + * 来源于dim_year.id + */ + private String yearId; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimQuarterDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimQuarterDTO.java new file mode 100644 index 0000000000..b681ef2c15 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimQuarterDTO.java @@ -0,0 +1,96 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 季度维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimQuarterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String id; + + /** + * eg: 2020年第一季度、2020年第二季度、2020 + */ + private String quarterName; + + /** + * 1、2、3、4 + */ + private Integer quarterOrder; + + /** + * yyyy-MM-dd + */ + private Date startDate; + + /** + * yyyy-MM-dd + */ + private Date endDate; + + /** + * 来源于dim_year.id + */ + private String yearId; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimTopicStatusDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimTopicStatusDTO.java new file mode 100644 index 0000000000..bfd5b3a79f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimTopicStatusDTO.java @@ -0,0 +1,76 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 话题状态维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimTopicStatusDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 话题状态ID"discussing"、"hidden"、"closed" + */ + private String id; + + /** + * 状态描述 讨论中 已屏蔽 已关闭 + */ + private String statusDesc; + + /** + * 删除标识 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimWeekDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimWeekDTO.java new file mode 100644 index 0000000000..630c9834f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimWeekDTO.java @@ -0,0 +1,96 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 周维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimWeekDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 2020W01 本年度的第几周 + */ + private String id; + + /** + * eg: 2020年第1周 + */ + private String weekName; + + /** + * 1-52 + */ + private Integer weekOrder; + + /** + * yyyy-MM-dd eg:2020-01-01 + */ + private Date startDate; + + /** + * yyyy-MM-dd eg:2020-01-05 + */ + private Date endDate; + + /** + * 来源于dim_year.id + */ + private String yearId; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimYearDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimYearDTO.java new file mode 100644 index 0000000000..5c3d213c6d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimYearDTO.java @@ -0,0 +1,76 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 年维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class DimYearDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * yyyy eg: 2019 + */ + private String id; + + /** + * 2019年 + */ + private String yearName; + + /** + * 删除标识0未删除1已删除 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyProjectDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyProjectDailyDTO.java new file mode 100644 index 0000000000..2a7e853f3a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/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.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据,每日定时执行,先删后增 + * + * @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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyProjectMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyProjectMonthlyDTO.java new file mode 100644 index 0000000000..3c56190036 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactAgencyProjectMonthlyDTO.java @@ -0,0 +1,172 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据,每月月初定时执行,先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactAgencyProjectMonthlyDTO 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_month.id】 + */ + private String monthId; + + /** + * 季维度Id 【dim_quarter.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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedAgencyDailyDTO.java new file mode 100644 index 0000000000..36f35bdc12 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedAgencyDailyDTO.java @@ -0,0 +1,122 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactArticlePublishedAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedDepartmentDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedDepartmentDailyDTO.java new file mode 100644 index 0000000000..622e88d01c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedDepartmentDailyDTO.java @@ -0,0 +1,122 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章发布数量【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactArticlePublishedDepartmentDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 发布文章单位所属机关ID 发布文章单位所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String depsartmentId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedGridDailyDTO.java new file mode 100644 index 0000000000..91f19b4517 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactArticlePublishedGridDailyDTO.java @@ -0,0 +1,122 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章发布数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactArticlePublishedGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 发布单位所属机关ID 发布单位所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectDailyDTO.java new file mode 100644 index 0000000000..e1962507f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectDailyDTO.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.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据,每日定时执行,先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactGridProjectDailyDTO 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_grid.id】 + */ + private String gridId; + + /** + * 日维度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 resolvedIncr; + + /** + * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 + */ + private Integer unresolvedIncr; + + /** + * 当日网格下项目总数 【该网格下项目总数】 + */ + private Integer projectIncr; + + /** + * 当日网格下处理中项目数 【该网格下未结案项目总数】 + */ + private Integer pendingIncr; + + /** + * 当日网格下已结案项目数 【该网格下已结案项目总数】 + */ + private Integer closedIncr; + + /** + * 删除标识 【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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectMonthlyDTO.java new file mode 100644 index 0000000000..277e87e27e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGridProjectMonthlyDTO.java @@ -0,0 +1,172 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据,每月月初定时执行,先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactGridProjectMonthlyDTO 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_grid.id】 + */ + private String gridId; + + /** + * 月维度Id 【dim_month.id】 + */ + private String monthId; + + /** + * 季维度Id 【dim_quarter.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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyDailyDTO.java new file mode 100644 index 0000000000..a33b74dac2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyDailyDTO.java @@ -0,0 +1,156 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 组-机关日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactGroupAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 机构ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月ID + */ + private String monthId; + + /** + * 季ID + */ + private String quarterId; + + /** + * 年ID + */ + private String yearId; + + /** + * 网格总数 截至统计日期 + */ + private Integer gridTotal; + + /** + * 网格小组数(包含所有下级机关的网格小组) 截至统计日期 + */ + private Integer groupTotalCount; + + /** + * 机关下网格小组人数总计 不去重 + */ + private Integer groupMemberTotalCount; + + /** + * 小组平均人数 截至统计日期 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian; + + /** + * 当天小组增量 + */ + private Integer groupIncr; + + /** + * 小组最大成员数 + */ + private String groupMemberMaxCount; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组最小成员数 + */ + private String groupMemberMinCount; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyMonthlyDTO.java new file mode 100644 index 0000000000..54b01164a4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupAgencyMonthlyDTO.java @@ -0,0 +1,146 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 组-机关月统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactGroupAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计月份ID 关联月份dim表 + */ + private String monthId; + + /** + * 统计季度ID + */ + private String quarterId; + + /** + * 统计年份ID + */ + private String yearId; + + /** + * 网格数 截至到月末的机关下网格数 + */ + private Integer gridTotal; + + /** + * 小组数 截止到月末的新增数(该月内所有的新增数字之和) + */ + private Integer groupTotal; + + /** + * 机关下网格组内总人数 不去重 + */ + private Integer groupMemberTotal; + + /** + * 小组平均人数 月末一天的平均数 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 月末一天的中位数(人) + */ + private Integer groupMedian; + + /** + * 小组增量 + */ + private Integer groupIncr; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount; + + /** + * 成员最多小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount; + + /** + * 成员最少小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupGridDailyDTO.java new file mode 100644 index 0000000000..48503b3623 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactGroupGridDailyDTO.java @@ -0,0 +1,156 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 组-网格日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +public class FactGroupGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 机构ID 关联机关dim表 + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 年ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 网格数 当前网格下的网格数 + */ + private Integer gridTotal; + + /** + * 小组数 + */ + private Integer groupTotal; + + /** + * 网格下所有组内总人数 不去重 + */ + private Integer groupMemberTotal; + + /** + * 小组平均人数 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian; + + /** + * 小组增量 + */ + private Integer groupIncr; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + + /** + * 删除标识 未删除:0,已删除:1 + */ + private String 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyDailyDTO.java new file mode 100644 index 0000000000..b32a9d9b87 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyDailyDTO.java @@ -0,0 +1,237 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactIssueAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String pid; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 周ID + */ + private String weekId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 当日议题增量 + */ + 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; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 是否删除 + */ + private String delFlag; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyMonthlyDTO.java new file mode 100644 index 0000000000..ea2b5cd11f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueAgencyMonthlyDTO.java @@ -0,0 +1,227 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 组织机关议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactIssueAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String pid; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 当月议题增量 + */ + 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; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 是否删除 + */ + private String delFlag; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridDailyDTO.java new file mode 100644 index 0000000000..c63ab13574 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridDailyDTO.java @@ -0,0 +1,237 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactIssueGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 周ID + */ + private String weekId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 当日议题增量 + */ + 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; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 是否删除 + */ + private String delFlag; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridMonthlyDTO.java new file mode 100644 index 0000000000..d79586998b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactIssueGridMonthlyDTO.java @@ -0,0 +1,227 @@ +/** + * 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.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactIssueGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 当月议题增量 + */ + 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; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 是否删除 + */ + private String delFlag; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyDailyDTO.java new file mode 100644 index 0000000000..7b5d06b166 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyDailyDTO.java @@ -0,0 +1,127 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyMonthlyDTO.java new file mode 100644 index 0000000000..6f6566c465 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyMonthlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyQuarterlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyQuarterlyDTO.java new file mode 100644 index 0000000000..c052c70b33 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyQuarterlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedAgencyQuarterlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyYearlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyYearlyDTO.java new file mode 100644 index 0000000000..568839ed7f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedAgencyYearlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedAgencyYearlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentDailyDTO.java new file mode 100644 index 0000000000..d0b4a2d7ef --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentDailyDTO.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.dto.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedDepartmentDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentMonthlyDTO.java new file mode 100644 index 0000000000..5acf3c7452 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentMonthlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【部门】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedDepartmentMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentQuarterlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentQuarterlyDTO.java new file mode 100644 index 0000000000..01c5a63353 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentQuarterlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【部门】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedDepartmentQuarterlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentYearlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentYearlyDTO.java new file mode 100644 index 0000000000..c4867a89b8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedDepartmentYearlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【部门】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedDepartmentYearlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridDailyDTO.java new file mode 100644 index 0000000000..f0fa8b8248 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridDailyDTO.java @@ -0,0 +1,127 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridMonthlyDTO.java new file mode 100644 index 0000000000..7d0915cd48 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridMonthlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridQuarterlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridQuarterlyDTO.java new file mode 100644 index 0000000000..9a3fda80f0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridQuarterlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedGridQuarterlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridYearlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridYearlyDTO.java new file mode 100644 index 0000000000..b68737c5e2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagUsedGridYearlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 标签【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagUsedGridYearlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyDailyDTO.java new file mode 100644 index 0000000000..24eaf450de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyDailyDTO.java @@ -0,0 +1,127 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyMonthlyDTO.java new file mode 100644 index 0000000000..34bd1bd0a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyMonthlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyQuarterlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyQuarterlyDTO.java new file mode 100644 index 0000000000..d8d0fd6e8b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyQuarterlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedAgencyQuarterlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyYearlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyYearlyDTO.java new file mode 100644 index 0000000000..5531dbf1b7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedAgencyYearlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedAgencyYearlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridDailyDTO.java new file mode 100644 index 0000000000..22bb0f0e76 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridDailyDTO.java @@ -0,0 +1,127 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridMonthlyDTO.java new file mode 100644 index 0000000000..1a9b7112d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridMonthlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridQuarterlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridQuarterlyDTO.java new file mode 100644 index 0000000000..f73e782445 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridQuarterlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedGridQuarterlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridYearlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridYearlyDTO.java new file mode 100644 index 0000000000..da404525e9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactTagViewedGridYearlyDTO.java @@ -0,0 +1,107 @@ +/** + * 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.stats; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 文章引用标签阅读数量【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +public class FactTagViewedGridYearlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID ID + */ + private String id; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + + /** + * 删除状态 + */ + 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyDailyDTO.java new file mode 100644 index 0000000000..19d6f97b07 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyDailyDTO.java @@ -0,0 +1,147 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactParticipationUserAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日(参与用户中)居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日(参与用户中)热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日(参与用户中)党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日(参与用户中)注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日(参与用户中)热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日(参与用户中)党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyMonthlyDTO.java new file mode 100644 index 0000000000..72f772c956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserAgencyMonthlyDTO.java @@ -0,0 +1,147 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关下(按月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactParticipationUserAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底(参与用户中)居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底(参与用户中)热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底(参与用户中)党员总数 + */ + private Integer partymemberTotal; + + /** + * 本月(参与用户中)注册居民月增量 + */ + private Integer regIncr; + + /** + * 本月(参与用户中)热心居民月增量 + */ + private Integer warmIncr; + + /** + * 本月(参与用户中)党员认证月增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridDailyDTO.java new file mode 100644 index 0000000000..63d34f3139 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridDailyDTO.java @@ -0,0 +1,152 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactParticipationUserGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridMonthlyDTO.java new file mode 100644 index 0000000000..15221181a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactParticipationUserGridMonthlyDTO.java @@ -0,0 +1,152 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格下(月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactParticipationUserGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底的参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底的居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底的热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底的党员总数 + */ + private Integer partymemberTotal; + + /** + * 注册居民本月增量 + */ + private Integer regIncr; + + /** + * 热心居民本月增量 + */ + private Integer warmIncr; + + /** + * 党员认证本月增量 + */ + private Integer partymemberIncr; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyDailyDTO.java new file mode 100644 index 0000000000..b5c7ef980c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyDailyDTO.java @@ -0,0 +1,147 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactRegUserAgencyDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日:居民总数=注册用户总数 + */ + private Integer resiTotal; + + /** + * 截止到本日:热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日:党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日:注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日:热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日:党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyMonthlyDTO.java new file mode 100644 index 0000000000..a97d7b4b7b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserAgencyMonthlyDTO.java @@ -0,0 +1,147 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 机关(按月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactRegUserAgencyMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底:注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底:居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底:热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底:党员总数 + */ + private Integer partymemberTotal; + + /** + * 本月:注册居民月增量 + */ + private Integer regIncr; + + /** + * 本月:热心居民月增量 + */ + private Integer warmIncr; + + /** + * 本月:党员认证月增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridDailyDTO.java new file mode 100644 index 0000000000..cf2d64b687 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridDailyDTO.java @@ -0,0 +1,152 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactRegUserGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridMonthlyDTO.java new file mode 100644 index 0000000000..51308b4d4c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/user/FactRegUserGridMonthlyDTO.java @@ -0,0 +1,152 @@ +/** + * 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.stats.user; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格(月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +public class FactRegUserGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底的注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底的居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底的热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底的党员总数 + */ + private Integer partymemberTotal; + + /** + * 注册居民本月增量 + */ + private Integer regIncr; + + /** + * 热心居民本月增量 + */ + private Integer warmIncr; + + /** + * 党员认证本月增量 + */ + private Integer partymemberIncr; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CommonTotalAndIncCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CommonTotalAndIncCountResultDTO.java new file mode 100644 index 0000000000..7296a1b236 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CommonTotalAndIncCountResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.user.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName CommonTotalAndIncCountResultDTO + * @Auth wangc + * @Date 2020-06-18 17:28 + */ +@Data +public class CommonTotalAndIncCountResultDTO implements Serializable { + private static final long serialVersionUID = -5215017168317858826L; + + private Integer total; + + private Integer incr; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleGridPublishedSummaryDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleGridPublishedSummaryDTO.java new file mode 100644 index 0000000000..ec57f7d823 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleGridPublishedSummaryDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.voice; +/** + * @author jianjun liu + * @email liujianjun@yunzongnet.com + * @date 2020-06-17 16:43 + **/ + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:文章总数 统计返回结果 dto + * + * @author liujianjun + * @date 2020/6/17 16:43 + */ +@Data +public class ArticleGridPublishedSummaryDTO implements Serializable { + private static final long serialVersionUID = 6755654148306711602L; + + /** + * 客户id + */ + private String customerId; + /** + * 上级机关id,顶级为"0" + */ + private String pid; + /** + * 机关id + */ + private String agencyId; + /** + * 网格Id + */ + private String gridId; + /** + * 发布者Id publish_type类型为 部门时 是部门id;类型为 机关时 是机关Id + */ + private String publisherId; + + /** + * 发布文章总数 + */ + private Integer articleTotalCount; + /** + * 状态为发布中的文章总数 + */ + private Integer articlePublishedCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleViewedSummaryDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleViewedSummaryDTO.java new file mode 100644 index 0000000000..6db2b70ef7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleViewedSummaryDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.voice; +/** + * @author jianjun liu + * @email liujianjun@yunzongnet.com + * @date 2020-06-17 16:43 + **/ + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:文章总数 统计返回结果 dto + * + * @author liujianjun + * @date 2020/6/17 16:43 + */ +@Data +public class ArticleViewedSummaryDTO implements Serializable { + + private static final long serialVersionUID = -6430902856772516776L; + /** + * 客户id + */ + private String customerId; + + /** + * 网格Id + */ + private String gridId; + /** + * 文章Id + */ + private String articleId; + + /** + * 该篇文章被阅读的次数和 + */ + private Integer viewedCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/PublisherPublishedCountDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/PublisherPublishedCountDTO.java new file mode 100644 index 0000000000..a7794e97e3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/PublisherPublishedCountDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto.voice; +/** + * @author jianjun liu + * @email liujianjun@yunzongnet.com + * @date 2020-06-17 16:43 + **/ + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:每个发布者发布的文章数 返回结果 dto + * + * @author liujianjun + * @date 2020/6/19 10:43 + */ +@Data +public class PublisherPublishedCountDTO implements Serializable { + private static final long serialVersionUID = 6755654148306711602L; + + /** + * 客户id + */ + private String customerId; + /** + * 机关id + */ + private String agencyId; + /** + * 网格Id + */ + private String gridId; + /** + * 发布者Id publish_type类型为 部门时 是部门id;类型为 机关时 是机关Id + */ + private String publisherId; + + /** + * 发布文章数 + */ + private Integer publishedCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/DataStatisticalOpenFeignClient.java new file mode 100644 index 0000000000..6cf5341890 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/DataStatisticalOpenFeignClient.java @@ -0,0 +1,131 @@ +package feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import feign.impl.DataStatisticalOpenFeignClientFallBack; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * desc: 数据统计 对外feign client + * + * @return: + * @date: 2020/6/22 17:39 + * @author: jianjun liu + */ +@FeignClient(name = ServiceConstant.DATA_STATISTICAL, fallback = DataStatisticalOpenFeignClientFallBack.class) +public interface DataStatisticalOpenFeignClient { + + /** + * desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/articleSummaryDailyStatsjob") + Result articleSummaryDailyStatsjob(); + + /** + * desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @return: + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagUsedDailyStatsjob") + Result tagUsedDailyStatsjob(); + + /** + * desc: 【月】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagUsedMonthlyStatsjob") + Result tagUsedMonthlyStatsjob(); + + /** + * desc: 【季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagUsedQuarterlyStatsjob") + Result tagUsedQuarterlyStatsjob(); + + /** + * desc: 【日】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagViewedDailyStatsjob") + Result tagViewedDailyStatsjob(); + + /** + * desc: 【月】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagViewedMonthlyStatsjob") + Result tagViewedMonthlyStatsjob(); + + /** + * desc: 【季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @PostMapping(value = "data/stats/statspublicity/tagViewedQuarterlyStatsjob") + Result tagViewedQuarterlyStatsjob(); + + /** + * @Description 统计 “网格小组”, dim:【网格-日】 + * @param + * @author zxc + */ + @PostMapping("/data/stats/statsgroup/groupgriddaily") + Result groupGridDaily(); + + /** + * @Description 统计 “网格小组”, dim:【机关-日】 + * @param + * @author zxc + */ + @PostMapping("/data/stats/statsgroup/groupagencydaily") + Result groupAgencyDaily(); + + /** + * @Description 统计 “网格小组”, dim:【机关-月】 + * @param + * @author zxc + */ + @PostMapping("/data/stats/statsgroup/groupagencymonthly") + Result groupAgencyMonthly(); + + /** + * 议题统计 + * @author zhaoqifeng + * @date 2020/6/23 14:34 + * @param + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("/data/stats/statsissue/issuestats") + Result agencyGridIssueStats(); + + /** + * @Description 数据统计-项目-机关日月统计 + * @Author sun + */ + @PostMapping("/data/stats/statsproject/agencyprojectstats") + Result agencyProjectStats(); + + /** + * @Description 数据统计-项目-网格日月统计 + * @Author sun + */ + @PostMapping("/data/stats/statsproject/gridprojectstats") + Result gridProjectStats(); + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/impl/DataStatisticalOpenFeignClientFallBack.java new file mode 100644 index 0000000000..cdaa4546ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -0,0 +1,135 @@ +package feign.impl; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import feign.DataStatisticalOpenFeignClient; +import org.springframework.stereotype.Component; + +/** + * desc: + * + * @return: + * @date: 2020/6/22 9:38 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ +@Component +public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOpenFeignClient { + + /** + * desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result articleSummaryDailyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "articleSummaryDailyStatsjob"); + } + + /** + * desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @return: + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedDailyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagUsedDailyStatsjob"); + } + + /** + * desc: 【月】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedMonthlyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagUsedMonthlyStatsjob"); + } + + /** + * desc: 【季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedQuarterlyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagUsedQuarterlyStatsjob"); + } + + /** + * desc: 【日】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedDailyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagViewedDailyStatsjob"); + } + + /** + * desc: 【月】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedMonthlyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagViewedMonthlyStatsjob"); + } + + /** + * desc: 【季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedQuarterlyStatsjob() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "tagViewedQuarterlyStatsjob"); + } + + @Override + public Result groupGridDaily() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "groupGridDaily"); + } + + @Override + public Result groupAgencyDaily() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "groupAgencyDaily"); + } + + @Override + public Result groupAgencyMonthly() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "groupAgencyMonthly"); + } + + @Override + public Result agencyGridIssueStats() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "agencyGridIssueStats"); + } + + /** + * @Description 数据统计-项目-机关日月统计 + * @Author sun + */ + @Override + public Result agencyProjectStats() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "agencyProjectStats"); + } + + /** + * @Description 数据统计-项目-网格日月统计 + * @Author sun + */ + @Override + public Result gridProjectStats() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL, "gridProjectStats"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index de1ff9baa5..9a3d12d95d 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -9,9 +9,9 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 300M \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml index 7d80790041..bbe6d5f891 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml @@ -1,7 +1,7 @@ version: "3.7" services: data-statistical-server: - container_name: data-statistical-server-dev + container_name: data-statistical-server-test image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-statistical-server:0.3.1 ports: - "8108:8108" @@ -9,9 +9,9 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 400M \ No newline at end of file + memory: 300M \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index f88c6d9031..8bd8f152a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -62,6 +62,12 @@ epmet-commons-dynamic-datasource 2.0.0 + + com.epmet + epmet-user-client + 2.0.0 + compile + @@ -117,13 +123,43 @@ epmet_gov_issue_user EpmEt-db-UsEr + + + + epmet_gov_project_user + EpmEt-db-UsEr + + + + + epmet_gov_voice_user + EpmEt-db-UsEr + + + + + epmet_oper_crm_user + EpmEt-db-UsEr + + + + + epmet_resi_group_user + EpmEt-db-UsEr + + + + + epmet_user_user + EpmEt-db-UsEr + 0 - 118.190.150.119 - 47379 + 192.168.1.130 + 6379 123456 - false + true 122.152.200.70:8848 fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b @@ -135,8 +171,8 @@ false - 10 - 20 + 5 + 8 10 30 @@ -169,6 +205,23 @@ epmet elink@833066 + + + + epmet_gov_project_user + EpmEt-db-UsEr + + + + + epmet + elink@8473066 + + + + + epmet + elink@8473066 0 @@ -188,8 +241,8 @@ true - 10 - 30 + 5 + 8 10 30 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/aspect/RequestLogAspect.java new file mode 100644 index 0000000000..49581cf63c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-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-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java new file mode 100644 index 0000000000..96461ec01a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -0,0 +1,46 @@ +package com.epmet.constant; + +/** + * @author sun + * @dscription 数据-项目-常量 + */ +public interface ProjectConstant { + + /** + * 状态-待处理 + */ + String PENDING = "pending"; + /** + * 状态-结案 + */ + String CLOSED = "closed"; + /** + * 结案状态-已解决 + */ + String RESOLVED = "resolved"; + /** + * 结案状态-未解决 + */ + String UNRESOLVED = "unresolved"; + /** + * 项目处理进展-创建项目 + */ + String CREATED = "created"; + /** + * 项目处理进展-结案 + */ + String CLOSE = "close"; + /** + * 发布单位类型 机关:agency + */ + String PUBLISHER_TYPE_AGENCY = "agency"; + /** + * 发布单位类型 部门:department + */ + String PUBLISHER_TYPE_DEPT = "department"; + /** + * 发布单位类型 网格:grid + */ + String PUBLISHER_TYPE_GRID = "grid"; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index ae5394b285..2f6e7ac226 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import com.epmet.dto.AgencySubTreeDto; import com.epmet.service.StatsDemoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -7,11 +8,12 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.time.LocalDateTime; -import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; +import java.util.List; + @RequestMapping("demo") @RestController public class DemoController { @@ -22,16 +24,14 @@ public class DemoController { @Autowired private ExecutorService executorService; - @GetMapping("testlist") - public void testList() { - demoService.testList(); - } - @GetMapping("testtx") public void testTx() { demoService.testTx(); } + /** + * 异步方式1,手动submit + */ @GetMapping("testthreadpool") public void testThreadPool() { System.out.println(LocalDateTime.now().getSecond());; @@ -43,10 +43,12 @@ public class DemoController { Future future3 = executorService.submit(() -> demoService.testThreadPool()); try { - + // 可以获取返回值,此处会阻塞 Boolean o1 = future1.get(); System.out.println(LocalDateTime.now().getSecond()); + + Boolean o2 = future2.get(); System.out.println(LocalDateTime.now().getSecond()); @@ -61,6 +63,9 @@ public class DemoController { } } + /** + * 异步方式2,service方法中加注解@Async + */ @GetMapping("testthreadpoolasyncs") public void testThreadPoolAsync() { System.out.println(LocalDateTime.now().getSecond()); @@ -72,4 +77,10 @@ public class DemoController { demoService.testThreadPoolAsync(); demoService.testThreadPoolAsync(); } + + @GetMapping("cascadegencyinfo") + public List selectAllAgency(){ + List result = demoService.getAllAgency(); + return result; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java new file mode 100644 index 0000000000..2d0cd77530 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java @@ -0,0 +1,266 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.AgencySubDeptTreeDto; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.service.StatsDimService; +import com.epmet.service.stats.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("dim") +public class DimController { + + Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private DimDateService dimDateService; + + @Autowired + private DimMonthService dimMonthService; + + @Autowired + private DimQuarterService quarterService; + + @Autowired + private DimYearService dimYearService; + + @Autowired + private DimWeekService dimWeekService; + + @Autowired + private StatsDimService statsDimService; + + @Autowired + private DimAgencyService dimAgencyService; + + /** + * 初始化所有维度 + * + * @return + */ + @PostMapping("/all/init") + public Result initAll() { + try { + dimDateService.initDimDate(); + logger.info("初始化按日维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化按日维度失败:%s", errorStackTrace)); + } + try { + statsDimService.initGridDim(); + logger.info("初始化网格维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化网格维度失败:%s", errorStackTrace)); + } + try { + statsDimService.initAgencyDim(); + logger.info("初始化机关维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化机关维度失败:%s", errorStackTrace)); + } + try { + statsDimService.initCustomerDim(); + logger.info("初始化客户维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化客户维度失败:%s", errorStackTrace)); + } + try { + statsDimService.initDepartmentDim(); + logger.info("初始化部门维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化部门维度失败:%s", errorStackTrace)); + } + try { + dimMonthService.initMonthDim(); + logger.info("初始化按月维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化按月维度失败:%s", errorStackTrace)); + } + try { + quarterService.initQuarterDim(); + logger.info("初始化季度维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化季度维度失败:%s", errorStackTrace)); + } + try { + dimYearService.initYearDim(); + logger.info("初始化年度维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化年度维度失败:%s", errorStackTrace)); + } + try { + dimWeekService.initWeekDim(); + logger.info("初始化按周维度成功"); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error(String.format("初始化按周维度失败:%s", errorStackTrace)); + } + return new Result(); + } + + /** + * 初始化按日维度 + * + * @return + */ + @PostMapping("/date/init") + public Result initDateDim() { + dimDateService.initDimDate(); + return new Result(); + } + + /** + * 初始化网格维度 + * + * @return + */ + @PostMapping("/grid/init") + public Result initGridDim() { + statsDimService.initGridDim(); + return new Result(); + } + + /** + * 初始化机关单位维度 + * + * @return + */ + @PostMapping("/agency/init") + public Result intiAgencyDim() { + statsDimService.initAgencyDim(); + return new Result(); + } + + /** + * 客户维度 + * + * @return + */ + @PostMapping("/customer/init") + public Result intiCustomerDim() { + statsDimService.initCustomerDim(); + return new Result(); + } + + /** + * 部门维度 + * + * @return + */ + @PostMapping("/department/init") + public Result intiDepartmentDim() { + statsDimService.initDepartmentDim(); + return new Result(); + } + + /** + * 月维度 + * + * @return + */ + @PostMapping("/month/init") + public Result initMonthDim() { + dimMonthService.initMonthDim(); + return new Result(); + } + + /** + * 季度维度 + * + * @return + */ + @PostMapping("/quarter/init") + public Result initQuarterDim() { + quarterService.initQuarterDim(); + return new Result(); + } + + /** + * 年度维度 + * + * @return + */ + @PostMapping("/year/init") + public Result initYearDim() { + dimYearService.initYearDim(); + return new Result(); + } + + /** + * 按周维度 + * + * @return + */ + @PostMapping("/week/init") + public Result initWeekDim() { + dimWeekService.initWeekDim(); + return new Result(); + } + + /** + * @param + * @return + * @Description 所有机构 + * @author wangc + * @date 2020.06.18 10:34 + **/ + @GetMapping("allagency") + public List allAgency() { + return dimAgencyService.getAllAgency(); + } + + /** + * @param + * @return + * @Description 顶级机构 + * @author wangc + * @date 2020.06.18 10:34 + **/ + @GetMapping("topagency") + public List topAgency() { + return dimAgencyService.getTopAgency(); + } + + /** + * @Description 所有机构 - 带部门 + * @param + * @return + * @author wangc + * @date 2020.06.18 10:34 + **/ + @GetMapping("allagencydept") + public List allAgencyDept(){ + return dimAgencyService.getAllAgencyWithDept(); + } + + /** + * @Description 顶级机构 - 带部门 + * @param + * @return + * @author wangc + * @date 2020.06.18 10:34 + **/ + @GetMapping("topagencydept") + public List topAgencyDept(){ + return dimAgencyService.getTopAgencyWithDept(); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsGroupController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsGroupController.java new file mode 100644 index 0000000000..b2f6f399f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsGroupController.java @@ -0,0 +1,59 @@ +package com.epmet.controller; + +import com.epmet.service.StatsGroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; + +/** + * @Author zxc + * @CreateTime 2020/6/16 13:21 + */ +@RestController +@RequestMapping("statsgroup") +public class StatsGroupController { + + @Autowired + private StatsGroupService statsGroupService; + + /** + * 网格数、小组数、网格下所有组内人数(不去重) + * 小组平均人数、小组人数中位数、小组增量 + * 小组成员最大数、最多成员小组ID + * 小组成员最小数、最少成员小组ID + */ + + /** + * @Description 统计 “网格小组”, dim:【网格-日】 + * @author zxc + */ + @PostMapping("groupgriddaily") + public void groupGridDaily(@RequestParam(value = "date",required = false)Date date){ + statsGroupService.groupGridDaily(date); + } + + /** + * @Description 统计 “网格小组”, dim:【机关-日】 + * @param + * @author zxc + */ + @PostMapping("groupagencydaily") + public void groupAgencyDaily(@RequestParam(value = "date",required = false)Date date){ + statsGroupService.groupAgencyDaily(date); + } + + /** + * @Description 统计 “网格小组”, dim:【机关-月】 + * @param + * @author zxc + */ + @PostMapping("groupagencymonthly") + public void groupAgencyMonthly(@RequestParam(value = "date",required = false)Date date){ + statsGroupService.groupAgencyMonthly(date); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsIssueController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsIssueController.java new file mode 100644 index 0000000000..850c3b7a75 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsIssueController.java @@ -0,0 +1,33 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsIssueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/22 14:26 + */ +@RequestMapping("statsissue") +@RestController +public class StatsIssueController { + @Autowired + private StatsIssueService statsIssueService; + + /** + * 议题统计 + * @author zhaoqifeng + * @date 2020/6/22 14:28 + * @param + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("issuestats") + public Result agencyGridIssueStats() { + statsIssueService.agencyGridIssueStats(); + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java new file mode 100644 index 0000000000..0b1bd0eb47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java @@ -0,0 +1,41 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsProjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 数据统计-项目 + * @author sun + */ +@RequestMapping("statsproject") +@RestController +public class StatsProjectController { + + @Autowired + private StatsProjectService statsProjectService; + + /** + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + @PostMapping("agencyprojectstats") + public Result agencyProjectStats() { + statsProjectService.agencyProjectStats(); + return new Result(); + } + + /** + * @Author sun + * @Description 数据-项目-网格日(月)统计 + **/ + @PostMapping("gridprojectstats") + public Result gridProjectStats() { + statsProjectService.gridProjectStats(); + return new Result(); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java new file mode 100644 index 0000000000..79ca1d0acf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java @@ -0,0 +1,102 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; +import java.util.concurrent.ExecutorService; + +/** + * desc:宣传能力controller + */ +@RequestMapping("statspublicity") +@RestController +public class StatsPublicityController { + + @Autowired + private StatsPublicityService statsPublicityService; + + @Autowired + private ExecutorService executorService; + + /** + * desc:【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "articleSummaryDailyStatsjob") + public Result articleSummaryDailyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.articleSummaryDailyStatsjob(statsDate)); + } + + /** + * desc:【日】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagUsedDailyStatsjob") + public Result tagUsedDailyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagUsedDailyStatsjob(statsDate)); + } + + /** + * desc:【月,季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagUsedMonthlyStatsjob") + public Result tagUsedMonthlyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagUsedMonthlyStatsjob(statsDate)); + } + + /** + * desc:【季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagUsedQuarterlyStatsjob") + public Result tagUsedQuarterlyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagUsedQuarterlyStatsjob(statsDate)); + } + + /** + * desc:【日】 统计阅读最多的标签 包含 机关 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagViewedDailyStatsjob") + public Result tagViewedDailyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagViewedDailyStatsjob(statsDate)); + } + + /** + * desc:【月】 统计阅读最多的标签 包含 机关 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagViewedMonthlyStatsjob") + public Result tagViewedMonthlyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagViewedMonthlyStatsjob(statsDate)); + } + + /** + * desc:【季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @param statsDate 默认:为T-1天,如果传 则统计的是【statsDate】的数据 + * @return + */ + @PostMapping(value = "tagViewedQuarterlyStatsjob") + public Result tagViewedQuarterlyStatsjob(Date statsDate) { + return new Result().ok(statsPublicityService.tagViewedQuarterlyStatsjob(statsDate)); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerDao.java new file mode 100644 index 0000000000..bfe699c25e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerDao.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.dao.crm; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.crm.CustomerEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 客户表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-11 + */ +@Mapper +public interface CustomerDao extends BaseDao { + + /** + * 根据创建时间起止查询有效客户列表 + * @param createTimeFrom + * @param createTimeTo + * @return + */ + List listValidCustomersByCreateTime( + @Param("createTimeFrom") Date createTimeFrom, + @Param("createTimeTo") Date createTimeTo); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java new file mode 100644 index 0000000000..28703e70e9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java @@ -0,0 +1,83 @@ +package com.epmet.dao.group; + +import com.epmet.dto.group.form.GridGroupPeopleFormDTO; +import com.epmet.dto.group.form.GridGroupPeopleTotalFormDTO; +import com.epmet.dto.group.form.GridGroupTotalFormDTO; +import com.epmet.dto.group.form.GroupIncrFormDTO; +import com.epmet.dto.group.result.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/16 13:22 + */ +@Mapper +public interface GroupDataDao { + + /** + * @Description 查询网格下的小组总数,状态为 “approved” + * @param formDTO + * @author zxc + */ + List selectGridGroupTotal(GridGroupTotalFormDTO formDTO); + + /** + * @Description 查询网格下的小组成员总数 , 人员状态不为 “removed” + * @param formDTO + * @author zxc + */ + List selectGridGroupPeopleTotal(GridGroupPeopleTotalFormDTO formDTO); + + /** + * @Description 查询每个小组的人数 + * @param formDTO + * @author zxc + */ + List selectEveryGroupPeopleCount(GridGroupPeopleFormDTO formDTO); + + /** + * @Description 查询网格下的小组日增数 + * @param formDTO + * @author zxc + */ + List selectGroupIncr(GroupIncrFormDTO formDTO); + + /** + * @Description 获取机关下网格下的小组数量 【待优化】 + * @param + * @author zxc + */ + List getAgencyGroupTotalCount(@Param("allGrid") List allGrid,@Param("dateId")String dateId); + + /** + * @Description 查询机关下网格内的小组人数 【待优化】 + * @param + * @author zxc + */ + List selectAgencyGridGroupPeopleTotal(@Param("allGrid") List allGrid,@Param("dateId")String dateId); + + /** + * @Description 查询机关下每个小组的人数 【待优化】 + * @param + * @author zxc + */ + List selectAgencyEveryGroupPeopleCount(@Param("allGrid") List allGrid,@Param("dateId")String dateId); + + /** + * @Description 查询机关下的小组日增数 【待优化】 + * @param + * @param dateId + * @author zxc + */ + List selectAgencyGroupIncr(@Param("allGrid") List allGrid,@Param("dateId")String dateId); + + /** + * @Description 查询机关下所有网格小组人数 + * @param gridIds + * @author zxc + */ + List getAgencyGrid(@Param("gridIds")List gridIds); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java index 6b44fc5c5e..98d2e0e96d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java @@ -1,14 +1,114 @@ package com.epmet.dao.issue; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueGridDTO; +import com.epmet.dto.issue.IssueProjectDTO; import com.epmet.entity.issue.IssueEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper public interface StatsIssueDao extends BaseDao { - List listAllEntities(); + + /** + * 获取当前日期组织下议题统计结果 + * + * @param customerId + * @return java.util.List + * @author zhaoqifeng + * @date 2020/6/17 14:13 + */ + List selectAgencyIssueTotal(@Param("customerId") String customerId); + + /** + * 获取当前日期组织下议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:55 + * @param customerId + * @param date + * @return java.util.List + */ + List selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 已关闭议题统计 + * @author zhaoqifeng + * @date 2020/6/18 14:41 + * @param customerId + * @param date + * @return java.util.List + */ + List selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 已关闭议题增量 + * @author zhaoqifeng + * @date 2020/6/18 14:41 + * @param customerId + * @param date + * @return java.util.List + */ + List selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date); + + /** + * @param customerId + * @return + * @Author sun + * @Description 根据客户Id查询议题库已转项目的网格项目关系数据 + **/ + List selectGridProjectList(@Param("customerId") String customerId); + /** + * 获取当前日期网格下议题统计结果 + * + * @param customerId + * @param date + * @return java.util.List + * @author zhaoqifeng + * @date 2020/6/17 14:13 + */ + List selectGridIssueTotal(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 获取当前日期网格下议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:55 + * @param customerId + * @param date + * @return java.util.List + */ + List selectGridIssueInc(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 网格已关闭议题统计 + * @author zhaoqifeng + * @date 2020/6/18 14:41 + * @param customerId + * @param date + * @return java.util.List + */ + List selectGridClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 网格已关闭议题增量 + * @author zhaoqifeng + * @date 2020/6/18 14:41 + * @param customerId + * @param date + * @return java.util.List + */ + List selectGridClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 查询客户下议题和项目关系 + * @author zhaoqifeng + * @date 2020/6/19 17:34 + * @param customerId + * @return java.util.List + */ + List selectIssueProjectList(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java new file mode 100644 index 0000000000..2b9b4705ab --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java @@ -0,0 +1,41 @@ +/** + * 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.org; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.org.CustomerDepartmentEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 客户部门表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-04-20 + */ +@Mapper +public interface CustomerDepartmentDao extends BaseDao { + + List listDepartmentsByCreatedTime( + @Param("createdTimeFrom") Date createdTimeFrom, + @Param("createdTimeTo") Date createdTimeTo); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java new file mode 100644 index 0000000000..faccf553a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.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.dao.org; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; +import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; +import com.epmet.entity.org.CustomerGridEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 客户网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Mapper +public interface CustomerGridDao extends BaseDao { + + /** + * 根据创建时间,截取时间段内的网格 + * @param start + * @param end + * @return + */ + List listGridsByCreateTime(@Param("start") Date start, @Param("end") Date end); + + /** + * @Description 查询机关下的网格总数 + * @param formDto + * @author zxc + */ + List selectAgencyGridTotalCount(@Param("formDto") List formDto, @Param("dateId")String dateId); + + /** + * @Description 获取客户下某个时间点以前的网格ID + * @param customerId + * @param dateId + * @author zxc + */ + List getCustomerGridIdList(@Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java index 8e6b2330bd..b3de9cfd02 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java @@ -1,9 +1,12 @@ package com.epmet.dao.org; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.AgencySubTreeDto; import com.epmet.entity.org.CustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Date; import java.util.List; @Mapper @@ -11,4 +14,10 @@ public interface StatsCustomerAgencyDao extends BaseDao { List listAllEntities(); + List listAgenciesByCreateTime( + @Param("statsStartTime") Date statsStartTime, + @Param("statsEndTime") Date statsEndTime); + List selectAllAgency(); + + List selectSubAgencyByPid(@Param("pid")String pid); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java new file mode 100644 index 0000000000..a50874c99e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -0,0 +1,85 @@ +/** + * 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.project; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.project.ProjectAgencyDTO; +import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.entity.project.ProjectEntity; +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-05-11 + */ +@Mapper +public interface ProjectDao extends BaseDao { + + /** + * @param projectEntity + * @Author sun + * @Description 根据客户Id查询客户项目业务表有效数据 + **/ + List selectProjectList(ProjectEntity projectEntity); + + /** + * 已结案项目统计 + * @author zhaoqifeng + * @date 2020/6/18 17:01 + * @param customerId + * @param date + * @return java.util.List + */ + List selectAgencyClosedProjectTotal(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 已结案项目增量 + * @author zhaoqifeng + * @date 2020/6/18 17:01 + * @param customerId + * @param date + * @return java.util.List + */ + List selectAgencyClosedProjectInc(@Param("customerId") String customerId, @Param("date") String date); + + + /** + * 已结案项目统计 + * @author zhaoqifeng + * @date 2020/6/18 17:01 + * @param customerId + * @param date + * @return java.util.List + */ + List selectGridClosedProjectTotal(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 已结案项目增量 + * @author zhaoqifeng + * @date 2020/6/18 17:01 + * @param customerId + * @param date + * @return java.util.List + */ + List selectGridClosedProjectInc(@Param("customerId") String customerId, @Param("date") String date); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java new file mode 100644 index 0000000000..ad0c1ca057 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -0,0 +1,44 @@ +/** + * 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.project; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.entity.project.ProjectProcessEntity; +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-05-11 + */ +@Mapper +public interface ProjectProcessDao extends BaseDao { + + /** + * @param projectEntity + * @Author sun + * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) + **/ + List selectProcessList(ProjectEntity projectEntity); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java new file mode 100644 index 0000000000..3c70225c26 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java @@ -0,0 +1,126 @@ +/** + * 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.stats; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.AgencySubDeptTreeDto; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.entity.stats.DimAgencyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 机关维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface DimAgencyDao extends BaseDao { + + int insertOne(DimAgencyEntity entity); + + /** + * @param dto + * @return + * @Author sun + * @Description 根据客户Id查询机关维度列表数据 + **/ + List selectDimAgencyList(DimAgencyDTO dto); + + /** + * @param + * @return List + * @Description 获取所有机关 + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectAllAgency(); + + /** + * @param pid + * @return List + * @Description 根据PID获取下级机关 + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectSubAgencyByPid(@Param("pid") String pid); + + /** + * @param + * @return List + * @Description 获取顶层级机关机关 + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectTopAgency(); + + /** + * desc:根据客户id 获取机关列表 + * @param customerId + * @return + */ + List getAgencyListByCustomerId(@Param("customerId") String customerId); + + + /** + * @Description 带部门 获取所有机关 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectAllAgencyWithDept(); + + /** + * @Description 带部门 根据PID获取下级机关 + * @param pid + * @return List + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectSubAgencyWithDeptByPid(@Param("pid")String pid); + + /** + * @Description 带部门 获取顶层级机关机关 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:26 + **/ + List selectTopAgencyWithDept(); + + /** + * @Description 查询所有客户的机关数据 + * @author zxc + */ + List selectDimAgencyByCustomerId(@Param("customerId")String customerId); + + /** + * @Description 根据机关Id获取上级机关ID + * @param agencyId + * @author zxc + */ + String getPidByAgencyId(@Param("agencyId") String agencyId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java new file mode 100644 index 0000000000..b20779cd4c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java @@ -0,0 +1,48 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.DimCustomerEntity; +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-16 + */ +@Mapper +public interface DimCustomerDao extends BaseDao { + + /** + * desc: 分页获取客户id + * + * @param pageSize + * @param offset return: List + * @date: 2020/6/17 16:33 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ + List selectCustomerIdPage(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); + + void insertOne(DimCustomerEntity dim); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java new file mode 100644 index 0000000000..1075290163 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.result.DimTimeResultDTO; +import com.epmet.dto.stats.DimDateDTO; +import com.epmet.entity.stats.DimDateEntity; +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-16 + */ +@Mapper +public interface DimDateDao extends BaseDao { + + /** + * 最新的按日维度 + */ + DimDateDTO getLatestDimDate(); + + int insertOne(DimDateEntity dimDateEntity); + + DimTimeResultDTO selectDimTime(@Param("dateId")String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java new file mode 100644 index 0000000000..c7848dffcb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDepartmentDao.java @@ -0,0 +1,43 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.DimDepartmentEntity; +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-16 + */ +@Mapper +public interface DimDepartmentDao extends BaseDao { + int insertOne(DimDepartmentEntity dim); + + /** + * desc:根据客户Id获取所有的部门信息 + * @param customerId + * @return + */ + List getDepartmentListByCustomerId(@Param("customerId") String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java new file mode 100644 index 0000000000..669e8a08a0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridInfoResultDTO; +import com.epmet.dto.group.result.SubAgencyIdResultDTO; +import com.epmet.entity.stats.DimGridEntity; +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-16 + */ +@Mapper +public interface DimGridDao extends BaseDao { + + DimGridEntity getLastCreatedGridDimEntity(); + + /** + * desc:根据客户Id获取 该客户下的网格数据 + * @param customerId + * @return + */ + List getGridListByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 查询机关下的网格 + * @param formDTO + * @author zxc + */ + List selectAgencyGridInfo(@Param("formDTO") List formDTO); + + /** + * @Description 根据当前机关ID查询下级机关ID + * @param formDTO + * @author zxc + */ + List selectSubAgencyId(@Param("formDTO")List formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimMonthDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimMonthDao.java new file mode 100644 index 0000000000..b12c76a4f5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimMonthDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.DimMonthEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 月份维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface DimMonthDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimQuarterDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimQuarterDao.java new file mode 100644 index 0000000000..f2ec40f5ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimQuarterDao.java @@ -0,0 +1,34 @@ +/** + * 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.stats; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.DimQuarterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 季度维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface DimQuarterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimTopicStatusDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimTopicStatusDao.java new file mode 100644 index 0000000000..cbc26f7a33 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimTopicStatusDao.java @@ -0,0 +1,34 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.entity.stats.DimTopicStatusEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 话题状态维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface DimTopicStatusDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimWeekDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimWeekDao.java new file mode 100644 index 0000000000..ffabc979d6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimWeekDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.DimWeekEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 周维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface DimWeekDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java new file mode 100644 index 0000000000..2fbabdec6c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java @@ -0,0 +1,49 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface FactAgencyProjectDailyDao extends BaseDao { + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月机关日统计数据,按时间倒序 + **/ + List selectMonthProjectList(MonthProjectListFormDTO formDTO); + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + void delDateProject(FactAgencyProjectDailyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java new file mode 100644 index 0000000000..e6fb0c37b7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java @@ -0,0 +1,40 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface FactAgencyProjectMonthlyDao extends BaseDao { + + /** + * @param delEntity + * @return + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除可能存在的历史数据 + **/ + void delMonthProject(FactAgencyProjectMonthlyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedAgencyDailyDao.java new file mode 100644 index 0000000000..5a7e9dbfc7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedAgencyDailyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactArticlePublishedAgencyDailyDao extends BaseDao { + /** + * desc:删除数据 + * + * @param customerId + * @param dateId + * @return + */ + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java new file mode 100644 index 0000000000..1cff4fa1a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedDepartmentDailyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章发布数量【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactArticlePublishedDepartmentDailyDao extends BaseDao { + + /** + * desc:根据客户id,日期 删除数据 + * @param customerId + * @param dateId + * @return + */ + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedGridDailyDao.java new file mode 100644 index 0000000000..24b8ca6115 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactArticlePublishedGridDailyDao.java @@ -0,0 +1,54 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; +import com.epmet.entity.stats.FactArticlePublishedGridDailyEntity; +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-18 + */ +@Mapper +public interface FactArticlePublishedGridDailyDao extends BaseDao { + + /** + * desc:获取客户 指定日期内的数据 + * + * @param customerId + * @param dateId + * @return + */ + List getByBeforeDay(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * desc:根据日期删除 数据 + * + * @param customerId + * @param dateId + * @return + */ + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java new file mode 100644 index 0000000000..eae7df214a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java @@ -0,0 +1,50 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; +import com.epmet.entity.stats.FactGridProjectDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface FactGridProjectDailyDao extends BaseDao { + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + void delDateProject(FactAgencyProjectDailyEntity delEntity); + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月网格日统计数据,按时间倒序 + **/ + List selectMonthProjectList(MonthProjectListFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java new file mode 100644 index 0000000000..e2ae56868e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java @@ -0,0 +1,39 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; +import com.epmet.entity.stats.FactGridProjectMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Mapper +public interface FactGridProjectMonthlyDao extends BaseDao { + + /** + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除一下可能存在的历史数据 + **/ + void delMonthProject(FactAgencyProjectMonthlyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyDailyDao.java new file mode 100644 index 0000000000..4a41fe25a9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyDailyDao.java @@ -0,0 +1,67 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.group.result.AgencyGroupDailyResultDTO; +import com.epmet.dto.group.result.AgencyGroupMonthlyResultDTO; +import com.epmet.entity.stats.FactGroupAgencyDailyEntity; +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-16 + */ +@Mapper +public interface FactGroupAgencyDailyDao extends BaseDao { + + /** + * @Description 插入网格小组数据 【机关-日】 + * @param agencyList + * @author zxc + */ + void insertGroupAgencyDaily(@Param("agencyList") List agencyList); + + /** + * @Description 获取 网格小组【机关-日统计】的最后一天数据 + * @param + * @author zxc + */ + List getLastDayAgency(@Param("monthId") String monthId); + + /** + * @Description 查询 月的小组增量 + * @param monthId + * @author zxc + */ + List getMonthGroupIncr(@Param("monthId")String monthId); + + /** + * @Description 删除当天已存在数据 + * @param dateId + * @author zxc + */ + void deleteInsertAgencyDailyByDateId(@Param("dateId")String dateId,@Param("customerId")String customerId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyMonthlyDao.java new file mode 100644 index 0000000000..cf43e681ca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupAgencyMonthlyDao.java @@ -0,0 +1,51 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.entity.stats.FactGroupAgencyMonthlyEntity; +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-16 + */ +@Mapper +public interface FactGroupAgencyMonthlyDao extends BaseDao { + + /** + * @Description 统计网格小组 【机关-月】 + * @param agencyMonth + * @author zxc + */ + void insertAgencyGroupMonthly(@Param("agencyMonth") List agencyMonth); + + /** + * @Description 删除已存在的月数据 + * @param monthId + * @author zxc + */ + void deleteInsertAgencyMonthlyByMonthId(@Param("monthId")String monthId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java new file mode 100644 index 0000000000..c97f5c8120 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java @@ -0,0 +1,51 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.group.result.GroupGridDailyResultDTO; +import com.epmet.entity.stats.FactGroupGridDailyEntity; +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-16 + */ +@Mapper +public interface FactGroupGridDailyDao extends BaseDao { + + /** + * @Description 插入小组【网格-日】 + * @param formDto + * @author zxc + */ + void insertGroupGridDaily(@Param("formDto") List formDto); + + /** + * @Description 删除已存在的数据【当天】防止当天数据多条 + * @param dateId + * @author zxc + */ + void deleteInsertDateId(@Param("dateId")String dateId,@Param("customerId")String customerId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyDailyDao.java new file mode 100644 index 0000000000..c6ee47eb10 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyDailyDao.java @@ -0,0 +1,43 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactIssueAgencyDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactIssueAgencyDailyDao extends BaseDao { + /** + * 删除 + * @author zhaoqifeng + * @date 2020/6/23 14:02 + * @param customerId + * @param dateId + * @return void + */ + void deleteByCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java new file mode 100644 index 0000000000..6f9933bf1a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java @@ -0,0 +1,55 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; +import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; +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-17 + */ +@Mapper +public interface FactIssueAgencyMonthlyDao extends BaseDao { + /** + * 统计机关议题各个指标月度增量 + * @author zhaoqifeng + * @date 2020/6/19 10:13 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectAgencyMonthlyInc(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * 删除 + * @author zhaoqifeng + * @date 2020/6/23 14:02 + * @param customerId + * @param monthId + * @return void + */ + void deleteByCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java new file mode 100644 index 0000000000..595131257d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java @@ -0,0 +1,43 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactIssueGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 网格议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactIssueGridDailyDao extends BaseDao { + /** + * 删除 + * @author zhaoqifeng + * @date 2020/6/23 14:02 + * @param customerId + * @param dateId + * @return void + */ + void deleteByCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridMonthlyDao.java new file mode 100644 index 0000000000..502363d1b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridMonthlyDao.java @@ -0,0 +1,55 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.FactIssueGridMonthlyDTO; +import com.epmet.entity.stats.FactIssueGridMonthlyEntity; +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-17 + */ +@Mapper +public interface FactIssueGridMonthlyDao extends BaseDao { + /** + * 统计网格议题各个指标月度增量 + * @author zhaoqifeng + * @date 2020/6/19 10:41 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectGridMonthlyInc(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 删除 + * @author zhaoqifeng + * @date 2020/6/23 14:02 + * @param customerId + * @param monthId + * @return void + */ + void deleteByCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyDailyDao.java new file mode 100644 index 0000000000..bb53792085 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyDailyDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedAgencyDailyDao extends BaseDao { + + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * desc:根据客户Id 和月份id 获取月的统计数 + * + * @param customerId + * @param monthId + * @return + */ + List getTagUsedCountByMonth(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyMonthlyDao.java new file mode 100644 index 0000000000..1bc98abe5f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedAgencyMonthlyDao extends BaseDao { + + List getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); + + List getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyQuarterlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyQuarterlyDao.java new file mode 100644 index 0000000000..9d51f34d49 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyQuarterlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedAgencyQuarterlyDao extends BaseDao { + + int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyYearlyDao.java new file mode 100644 index 0000000000..0d8c942e5a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyYearlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedAgencyYearlyDao extends BaseDao { + + int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentDailyDao.java new file mode 100644 index 0000000000..2c74977270 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentDailyDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedDepartmentDailyDao extends BaseDao { + + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * desc:获取部门月 统计数 + * @param customerId + * @param monthId + * @return + */ + List getTagUsedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentMonthlyDao.java new file mode 100644 index 0000000000..9b6a3b89cb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedDepartmentMonthlyDao extends BaseDao { + + List getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); + + List getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentQuarterlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentQuarterlyDao.java new file mode 100644 index 0000000000..6ac52ec583 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentQuarterlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【部门】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedDepartmentQuarterlyDao extends BaseDao { + + int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentYearlyDao.java new file mode 100644 index 0000000000..d6908b860e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentYearlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【部门】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedDepartmentYearlyDao extends BaseDao { + + int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridDailyDao.java new file mode 100644 index 0000000000..423d8baea0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridDailyDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedGridDailyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedGridDailyDao extends BaseDao { + + /** + * desc:根据dateId 删除数据 + * + * @param customerId + * @param dateId + * @return + */ + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + List getTagUsedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridMonthlyDao.java new file mode 100644 index 0000000000..b8eb0d9095 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; +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-18 + */ +@Mapper +public interface FactTagUsedGridMonthlyDao extends BaseDao { + + List getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); + + List getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridQuarterlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridQuarterlyDao.java new file mode 100644 index 0000000000..f23190191c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridQuarterlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedGridQuarterlyDao extends BaseDao { + + int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridYearlyDao.java new file mode 100644 index 0000000000..eb76936645 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridYearlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 标签【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagUsedGridYearlyDao extends BaseDao { + + int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyDailyDao.java new file mode 100644 index 0000000000..4a9a248298 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyDailyDao.java @@ -0,0 +1,39 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; +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-18 + */ +@Mapper +public interface FactTagViewedAgencyDailyDao extends BaseDao { + + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + List getTagViewedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyMonthlyDao.java new file mode 100644 index 0000000000..eea98354b6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; +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-18 + */ +@Mapper +public interface FactTagViewedAgencyMonthlyDao extends BaseDao { + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); + + List getTagViewedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); + + List getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyQuarterlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyQuarterlyDao.java new file mode 100644 index 0000000000..17c7c064a9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyQuarterlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章引用标签阅读数量【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagViewedAgencyQuarterlyDao extends BaseDao { + + int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyYearlyDao.java new file mode 100644 index 0000000000..54d0564f18 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedAgencyYearlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章引用标签阅读数量【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagViewedAgencyYearlyDao extends BaseDao { + + int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridDailyDao.java new file mode 100644 index 0000000000..8824b13ccc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridDailyDao.java @@ -0,0 +1,39 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedGridDailyEntity; +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-18 + */ +@Mapper +public interface FactTagViewedGridDailyDao extends BaseDao { + + int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId); + + List getTagViewedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridMonthlyDao.java new file mode 100644 index 0000000000..d504edb591 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridMonthlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; +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-18 + */ +@Mapper +public interface FactTagViewedGridMonthlyDao extends BaseDao { + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); + + List getTagViewCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); + + List getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridQuarterlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridQuarterlyDao.java new file mode 100644 index 0000000000..8e7318fba0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridQuarterlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章引用标签阅读数量【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagViewedGridQuarterlyDao extends BaseDao { + + int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridYearlyDao.java new file mode 100644 index 0000000000..a85ead0f93 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagViewedGridYearlyDao.java @@ -0,0 +1,35 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 文章引用标签阅读数量【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Mapper +public interface FactTagViewedGridYearlyDao extends BaseDao { + + int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.java new file mode 100755 index 0000000000..b6adba1ec7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.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.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.LastExecRecordEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; + +/** + * 最后一次执行记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface LastExecRecordDao extends BaseDao { + + LastExecRecordEntity getLastExecRecord(@Param("statsSubject") String statsSubject); + + /** + * 更新统计主体的执行时间 + * @param date + * @param subject + * @return + */ + int updateExecTimeBySubject(@Param("date") Date date, @Param("subject") String subject); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyDailyDao.java new file mode 100644 index 0000000000..463dbca50d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactParticipationUserAgencyDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机关下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactParticipationUserAgencyDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyMonthlyDao.java new file mode 100644 index 0000000000..d303685b38 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserAgencyMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactParticipationUserAgencyMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机关下(按月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactParticipationUserAgencyMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java new file mode 100644 index 0000000000..18593b3807 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactParticipationUserGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactParticipationUserGridDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridMonthlyDao.java new file mode 100644 index 0000000000..81fd930f20 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactParticipationUserGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格下(月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactParticipationUserGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyDailyDao.java new file mode 100644 index 0000000000..d4fb9b5fe5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactRegUserAgencyDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机关(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactRegUserAgencyDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java new file mode 100644 index 0000000000..4ed08b1f00 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机关(按月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactRegUserAgencyMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridDailyDao.java new file mode 100644 index 0000000000..944732d786 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactRegUserGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactRegUserGridDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java new file mode 100644 index 0000000000..df808eb3be --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.stats.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格(月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface FactRegUserGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java new file mode 100644 index 0000000000..d96d1787e1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java @@ -0,0 +1,100 @@ +package com.epmet.dao.user; + +import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; +import java.util.Set; + +/** + * 用户Dao EpmetUser + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Mapper +public interface UserDao { + + /** + * @Description 查询注册用户的总量与增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + CommonTotalAndIncCountResultDTO selectResiTotalAndIncrByLevel(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set gridIds, @Param("targetDate")Date targetDate); + + /** + * @Description 查询党员的总量与增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + CommonTotalAndIncCountResultDTO selectPartyTotalAndIncr(@Param("userIds") List userIds, @Param("incrUserIds") List incrUserIds, @Param("targetDate") Date targetDate); + + /** + * @Description 查询热心居民的总量与增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + CommonTotalAndIncCountResultDTO selectWarmTotalAndIncr(@Param("userIds") List userIds, @Param("incrUserIds") List incrUserIds, @Param("gridIds") Set gridIds, @Param("targetDate") Date targetDate); + + /** + * @Description 查询指定网格范围下单位时间内新增的注册用户Id + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + List selectIncrUserIds(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set gridIds, @Param("targetDate") Date targetDate); + + /** + * @Description 查询指定网格范围下截至指定位时间累计的注册用户Id + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + List selectTotalUserIds(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set gridIds, @Param("targetDate") Date targetDate); + + /** + * @Description 查询指定时间范围内网格新增的注册/参与用户Id + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + List selectIncrUserIdsWithinTimeRange(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set gridIds, @Param("startDate")Date startDate,@Param("endDate")Date endDate); + + /** + * @Description 查询指定时间范围内注册/参与用户增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + Integer selectResiIncrWithinTimeRange(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set gridIds, @Param("startDate")Date startDate,@Param("endDate")Date endDate); + + /** + * @Description 查询指定时间范围内党员的增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + Integer selectPartyIncrWithinTimeRange(@Param("incrUserIds")List incrUserIds,@Param("startDate")Date startDate,@Param("endDate")Date endDate); + + /** + * @Description 查询指定时间范围内热心居民的增量 + * @param + * @return + * @author wangc + * @date 2020.06.18 18:50 + **/ + Integer selectWarmIncrWithinTimeRange(@Param("incrUserIds")List incrUserIds,@Param("gridIds") Set gridIds,@Param("startDate")Date startDate,@Param("endDate")Date endDate); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java new file mode 100644 index 0000000000..df01214d40 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java @@ -0,0 +1,57 @@ +/** + * 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.voice; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticleEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 文章表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface ArticleDao extends BaseDao { + + /** + * desc:根据客户Id 和发布时间 获取文章总数 + * + * @param customerId + * @param publishDate + * @param publisherType + * @return + */ + List getAllPublishedCount(@Param("customerId") String customerId, @Param("publishDate") Date publishDate, @Param("publisherType") String publisherType); + + /** + * desc:根据客户Id 和发布时间 获取文章数据 + * + * @param customerId + * @param publishDate + * @param publisherType + * @return + */ + List getPublishedArticleByDay(@Param("customerId") String customerId, @Param("publishDate") Date publishDate, @Param("publisherType") String publisherType); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java new file mode 100644 index 0000000000..f8ff0e359b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java @@ -0,0 +1,56 @@ +/** + * 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.voice; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticlePublishRangeEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 文章发布范围表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface ArticlePublishRangeDao extends BaseDao { + + /** + * desc:查询网格发布文章总数及状态为发布中的文章总数 + * + * @param customerId + * @param createDate + * @return + */ + List getAllPublishedCount(@Param("customerId") String customerId, @Param("createDate") Date createDate); + + /** + * desc: 根据客户Id、创建日期查询某一天的 文章发布数据 + * + * @param customerId + * @param startDate + * @param endDate + * @return: List + */ + List getOneDayPublishedCount(@Param("customerId") String customerId, @Param("startDate") Date startDate, @Param("endDate") Date endDate); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleTagsDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleTagsDao.java new file mode 100644 index 0000000000..b25b86e2b7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleTagsDao.java @@ -0,0 +1,48 @@ +/** + * 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.voice; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.voice.ArticleTagsEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 文章标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface ArticleTagsDao extends BaseDao { + + /** + * desc:根据客户id 创建时间 获取文章标签数据 + * + * @param customerId + * @param startTime + * @param endTime + * @return + */ + List getArticleTagsByDay(@Param("customerId") String customerId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); + + List getArticleTagsByArticleId(@Param("customerId") String customerId, @Param("articleId") String articleId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleVisitRecordDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleVisitRecordDao.java new file mode 100644 index 0000000000..174ea937ef --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleVisitRecordDao.java @@ -0,0 +1,39 @@ +/** + * 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.voice; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.voice.ArticleViewedSummaryDTO; +import com.epmet.entity.voice.ArticleVisitRecordEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 文章访问记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Mapper +public interface ArticleVisitRecordDao extends BaseDao { + + List getArticleVisitByCreateTime(@Param("customerId") String customerId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java new file mode 100644 index 0000000000..a2fa408a43 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.crm; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer") +public class CustomerEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户名称 + */ + private String customerName; + + /** + * 产品标题 显示在产品顶端的标题 + */ + private String title; + + /** + * 组织机构代码 + */ + private String organizationNumber; + + /** + * 组织机构代码证图片 + */ + private String organizationImg; + + /** + * 有效期 + */ + private Date validityTime; + + /** + * 客户管理员 + */ + private String customerAdmin; + + /** + * 密码 加密存储 + */ + private String customerPassword; + + /** + * 客户组织级别:机关级别 + * (社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) + */ + private String organizationLevel; + + /** + * 客户logo + */ + private String logo; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueEntity.java index ffaba77c09..3982fb5798 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueEntity.java @@ -112,4 +112,9 @@ public class IssueEntity extends BaseEpmetEntity { */ private Date closedTime; + /** + * sun-项目id + */ + private String projectId; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerDepartmentEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerDepartmentEntity.java new file mode 100644 index 0000000000..0f46e25ffd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerDepartmentEntity.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.entity.org; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 客户部门表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-04-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_department") +public class CustomerDepartmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织机构ID(customer_agency.id) + */ + private String agencyId; + + /** + * 部门名称 + */ + private String departmentName; + + /** + * 部门职责 + */ + private String departmentDuty; + + /** + * 总人数 + */ + private Integer totalUser; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java new file mode 100644 index 0000000000..6c01df7df8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java @@ -0,0 +1,82 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.org; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 客户网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_grid") +public class CustomerGridEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 所属地区码(所属组织地区码) + */ + private String areaCode; + + /** + * 管辖区域 + */ + private String manageDistrict; + + /** + * 当前网格总人数 + */ + private Integer totalUser; + + /** + * 所属组织机构ID(customer_organization.id) + */ + private String pid; + + /** + * 所有上级组织ID + */ + private String pids; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectEntity.java new file mode 100644 index 0000000000..cd696e25c6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.project; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 项目表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project") +public class ProjectEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 来源:议题issue + */ + private String origin; + + /** + * 来源ID + */ + private String originId; + + /** + * 项目标题 + */ + private String title; + + /** + * 状态:待处理 pending,结案closed + */ + private String status; + + /** + * 结案状态:已解决 resolved,未解决 unresolved + */ + private String closedStatus; + + /** + * 所属机关 11:22:33(本机关以及上级所有机关ID) + */ + private String orgIdPath; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectProcessEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectProcessEntity.java new file mode 100644 index 0000000000..d6f4cd5467 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/project/ProjectProcessEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.project; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 项目处理进展表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project_process") +public class ProjectProcessEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目所属机关Id + */ + private String agencyId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 部门名 + */ + private String departmentName; + + /** + * 负负责人ID + */ + private String staffId; + + /** + * 处理:结案close,退回return,部门流转transfer,创建项目created + */ + private String operation; + + /** + * 处理名 + */ + private String operationName; + + /** + * 公开答复 + */ + private String publicReply; + + /** + * 内部备注 + */ + private String internalRemark; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 耗费天数 + */ + private String costWorkdays; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimAgencyEntity.java new file mode 100644 index 0000000000..28b471f0a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimAgencyEntity.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + + +/** + * 机关维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_agency") +public class DimAgencyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织机构ID,根组织为0 + */ + private String pid; + + /** + * 所有上级组织机构ID(以英文:隔开) + */ + private String pids; + + /** + * 机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等 + */ + private String agencyDimType; + + /** + * 所有上级名称,以-连接 + */ + private String allParentName; + + /** + * 机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.java new file mode 100644 index 0000000000..a287006414 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerEntity.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.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + + +/** + * 客户维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_customer") +public class DimCustomerEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户名称 + */ + private String customerName; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDateEntity.java new file mode 100644 index 0000000000..c6281eecca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDateEntity.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.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + + +/** + * 日期维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_date") +public class DimDateEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * eg: 2020年01月01日 + */ + private String dateName; + + /** + * 周几:Monday、Tuesday、Wednesday、Thursday、Friday、Saturday、Sunday + */ + private String dayOfWeek; + + /** + * 周几:星期一、星期二、星期三、星期四、星期五、星期六、星期日 + */ + private String dayOfWeekName; + + /** + * dim_week.week_id + */ + private String weekId; + + private String monthId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDepartmentEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDepartmentEntity.java new file mode 100644 index 0000000000..da22ff4fe7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimDepartmentEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + + +/** + * 客户部门维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_department") +public class DimDepartmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门名称 + */ + private String departmentName; + + /** + * 所属机关ID(customer_agency_dimension.id) + */ + private String agencyId; + + /** + * 来源于customer_dimension + */ + private String customerId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java new file mode 100644 index 0000000000..8c49f7f9d9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +/** + * 客户网格维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_grid") +public class DimGridEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织机构ID(customer_agency.id) + */ + private String agencyId; + + /** + * 所属地区码(所属组织地区码) + */ + private String areaCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimMonthEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimMonthEntity.java new file mode 100644 index 0000000000..d1d43f2b2c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimMonthEntity.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 月份维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_month") +public class DimMonthEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * eg: 2020年01月 + */ + private String monthName; + + /** + * 1-12 + */ + private Integer monthOrder; + + /** + * yyyy-MM-dd eg:2020-01-01 + */ + private Date startDate; + + /** + * yyyy-MM-dd eg:2020-01-31 + */ + private Date endDate; + + /** + * 来源于dim_quarter.id + */ + private String quarterId; + + /** + * 来源于dim_year.id + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimQuarterEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimQuarterEntity.java new file mode 100644 index 0000000000..b0a4ef21f5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimQuarterEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 季度维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_quarter") +public class DimQuarterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * eg: 2020年第一季度、2020年第二季度、2020 + */ + private String quarterName; + + /** + * 1、2、3、4 + */ + private Integer quarterOrder; + + /** + * yyyy-MM-dd + */ + private Date startDate; + + /** + * yyyy-MM-dd + */ + private Date endDate; + + /** + * 来源于dim_year.id + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimTopicStatusEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimTopicStatusEntity.java new file mode 100644 index 0000000000..4bce308c22 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimTopicStatusEntity.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.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + + +/** + * 话题状态维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_topic_status") +public class DimTopicStatusEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 状态描述 讨论中 已屏蔽 已关闭 + */ + private String statusDesc; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimWeekEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimWeekEntity.java new file mode 100644 index 0000000000..2069e37477 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimWeekEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 周维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("dim_week") +public class DimWeekEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * eg: 2020年第1周 + */ + private String weekName; + + /** + * 1-52 + */ + private Integer weekOrder; + + /** + * yyyy-MM-dd eg:2020-01-01 + */ + private Date startDate; + + /** + * yyyy-MM-dd eg:2020-01-05 + */ + private Date endDate; + + /** + * 来源于dim_year.id + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java new file mode 100644 index 0000000000..9f609723f4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectDailyEntity.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_agency_project_daily") +public class FactAgencyProjectDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户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; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java new file mode 100644 index 0000000000..8b147a3f18 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyProjectMonthlyEntity.java @@ -0,0 +1,142 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_agency_project_monthly") +public class FactAgencyProjectMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 【dim_customer.id】 + */ + private String customerId; + + /** + * 机关Id 【dim_agency.id】 + */ + private String agencyId; + + /** + * 上级组织Id【dim_agency.pid】 + */ + private String parentId; + + /** + * 月维度Id 【dim_month.id】 + */ + private String monthId; + + /** + * 季维度Id 【dim_quarter.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; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedAgencyDailyEntity.java new file mode 100644 index 0000000000..631f21fa49 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedAgencyDailyEntity.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_article_published_agency_daily") +public class FactArticlePublishedAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedDepartmentDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedDepartmentDailyEntity.java new file mode 100644 index 0000000000..96e8ae407f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedDepartmentDailyEntity.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章发布数量【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_article_published_department_daily") +public class FactArticlePublishedDepartmentDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 发布文章单位所属机关ID 发布文章单位所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedGridDailyEntity.java new file mode 100644 index 0000000000..94d209d414 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactArticlePublishedGridDailyEntity.java @@ -0,0 +1,88 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章发布数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_article_published_grid_daily") +public class FactArticlePublishedGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 发布单位所属机关ID 发布单位所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 文章累计发文数量 文章数量 + */ + private Integer articleTotalCount; + + /** + * 当前发文数量 当前未下线的文章数量 + */ + private Integer articlePublishedCount; + + /** + * 日期ID 日期ID + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java new file mode 100644 index 0000000000..93c1f71499 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectDailyEntity.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_grid_project_daily") +public class FactGridProjectDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 【dim_customer.id】 + */ + private String customerId; + + /** + * 机关Id 【dim_agency.id】 + */ + private String agencyId; + + /** + * 网格Id 【dim_grid.id】 + */ + private String gridId; + + /** + * 日维度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 resolvedIncr; + + /** + * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】 + */ + private Integer unresolvedIncr; + + /** + * 当日网格下项目总数 【该网格下项目总数】 + */ + private Integer projectIncr; + + /** + * 当日网格下处理中项目数 【该网格下未结案项目总数】 + */ + private Integer pendingIncr; + + /** + * 当日网格下已结案项目数 【该网格下已结案项目总数】 + */ + private Integer closedIncr; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java new file mode 100644 index 0000000000..dd79ecc9fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridProjectMonthlyEntity.java @@ -0,0 +1,142 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_grid_project_monthly") +public class FactGridProjectMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 【dim_customer.id】 + */ + private String customerId; + + /** + * 机关Id 【dim_agency.id】 + */ + private String agencyId; + + /** + * 网格Id 【dim_grid.id】 + */ + private String gridId; + + /** + * 月维度Id 【dim_month.id】 + */ + private String monthId; + + /** + * 季维度Id 【dim_quarter.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; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyDailyEntity.java new file mode 100644 index 0000000000..e3ee31e7ec --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyDailyEntity.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 组-机关日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_group_agency_daily") +public class FactGroupAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机构ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月ID + */ + private String monthId; + + /** + * 季ID + */ + private String quarterId; + + /** + * 年ID + */ + private String yearId; + + /** + * 网格总数 截至统计日期 + */ + private Integer gridTotal; + + /** + * 网格小组数(包含所有下级机关的网格小组) 截至统计日期 + */ + private Integer groupTotalCount; + + /** + * 机关下网格小组人数总计 不去重 + */ + private Integer groupMemberTotalCount; + + /** + * 小组平均人数 截至统计日期 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian; + + /** + * 当天小组增量 + */ + private Integer groupIncr; + + /** + * 小组最大成员数 + */ + private String groupMemberMaxCount; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组最小成员数 + */ + private String groupMemberMinCount; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyMonthlyEntity.java new file mode 100644 index 0000000000..b7902589c7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupAgencyMonthlyEntity.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 组-机关月统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_group_agency_monthly") +public class FactGroupAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 统计月份ID 关联月份dim表 + */ + private String monthId; + + /** + * 统计季度ID + */ + private String quarterId; + + /** + * 统计年份ID + */ + private String yearId; + + /** + * 网格数 截至到月末的机关下网格数 + */ + private Integer gridTotal; + + /** + * 小组数 截止到月末的新增数(该月内所有的新增数字之和) + */ + private Integer groupTotal; + + /** + * 机关下网格组内总人数 不去重 + */ + private Integer groupMemberTotal; + + /** + * 小组平均人数 月末一天的平均数 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 月末一天的中位数(人) + */ + private Integer groupMedian; + + /** + * 小组增量 + */ + private Integer groupIncr; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount; + + /** + * 成员最多小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount; + + /** + * 成员最少小组ID + */ + private String minMemberGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupGridDailyEntity.java new file mode 100644 index 0000000000..3c23206bc8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGroupGridDailyEntity.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 组-网格日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_group_grid_daily") +public class FactGroupGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机构ID 关联机关dim表 + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 统计日期 关联日期dim表 + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 年ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 网格数 当前网格下的网格数 + */ + private Integer gridTotal; + + /** + * 小组数 + */ + private Integer groupTotal; + + /** + * 网格下所有组内总人数 不去重 + */ + private Integer groupMemberTotal; + + /** + * 小组平均人数 + */ + private Integer groupMemberAvgCount; + + /** + * 小组中位数 截至统计日期,小组人数依次由小到大排开取中位数 + */ + private Integer groupMedian; + + /** + * 小组增量 + */ + private Integer groupIncr; + + /** + * 小组成员最大数 + */ + private Integer groupMemberMaxCount; + + /** + * 最多成员小组ID + */ + private String maxMemberGroupId; + + /** + * 小组成员最小数 + */ + private Integer groupMemberMinCount; + + /** + * 最少成员小组ID + */ + private String minMemberGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyDailyEntity.java new file mode 100644 index 0000000000..377757ab2a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyDailyEntity.java @@ -0,0 +1,207 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_issue_agency_daily") +public class FactIssueAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String pid; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 周ID + */ + private String weekId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 当日议题增量 + */ + 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-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyMonthlyEntity.java new file mode 100644 index 0000000000..a06e51b59d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueAgencyMonthlyEntity.java @@ -0,0 +1,197 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 组织机关议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_issue_agency_monthly") +public class FactIssueAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String pid; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 当月议题增量 + */ + 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-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridDailyEntity.java new file mode 100644 index 0000000000..50d7d2ddaf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridDailyEntity.java @@ -0,0 +1,207 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_issue_grid_daily") +public class FactIssueGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 周ID + */ + private String weekId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 当日议题增量 + */ + 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-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridMonthlyEntity.java new file mode 100644 index 0000000000..713d48f3f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactIssueGridMonthlyEntity.java @@ -0,0 +1,197 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_issue_grid_monthly") +public class FactIssueGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 当月议题增量 + */ + 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-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyDailyEntity.java new file mode 100644 index 0000000000..51b1c1cf47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyDailyEntity.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_agency_daily") +public class FactTagUsedAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyMonthlyEntity.java new file mode 100644 index 0000000000..992db40143 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyMonthlyEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_agency_monthly") +public class FactTagUsedAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyQuarterlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyQuarterlyEntity.java new file mode 100644 index 0000000000..60de929fde --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyQuarterlyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_agency_quarterly") +public class FactTagUsedAgencyQuarterlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyYearlyEntity.java new file mode 100644 index 0000000000..dcdc366f74 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyYearlyEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_agency_yearly") +public class FactTagUsedAgencyYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentDailyEntity.java new file mode 100644 index 0000000000..7087d8dd5f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentDailyEntity.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_department_daily") +public class FactTagUsedDepartmentDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentMonthlyEntity.java new file mode 100644 index 0000000000..d2309ee1fd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentMonthlyEntity.java @@ -0,0 +1,82 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【部门】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_department_monthly") +public class FactTagUsedDepartmentMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentQuarterlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentQuarterlyEntity.java new file mode 100644 index 0000000000..61050668a0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentQuarterlyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【部门】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_department_quarterly") +public class FactTagUsedDepartmentQuarterlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentYearlyEntity.java new file mode 100644 index 0000000000..62b2bb91c4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentYearlyEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【部门】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_department_yearly") +public class FactTagUsedDepartmentYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 部门ID + */ + private String departmentId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridDailyEntity.java new file mode 100644 index 0000000000..8dcdb3f73c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridDailyEntity.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_grid_daily") +public class FactTagUsedGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridMonthlyEntity.java new file mode 100644 index 0000000000..8315bfe68d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridMonthlyEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_grid_monthly") +public class FactTagUsedGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridQuarterlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridQuarterlyEntity.java new file mode 100644 index 0000000000..cf7f435b2d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridQuarterlyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_grid_quarterly") +public class FactTagUsedGridQuarterlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridYearlyEntity.java new file mode 100644 index 0000000000..b502950800 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridYearlyEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_used_grid_yearly") +public class FactTagUsedGridYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 标签使用次数 标签的使用次数 + */ + private Integer usedCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyDailyEntity.java new file mode 100644 index 0000000000..6df781bc22 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyDailyEntity.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_agency_daily") +public class FactTagViewedAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyMonthlyEntity.java new file mode 100644 index 0000000000..204cd7016a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyMonthlyEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_agency_monthly") +public class FactTagViewedAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyQuarterlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyQuarterlyEntity.java new file mode 100644 index 0000000000..089be76e1d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyQuarterlyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_agency_quarterly") +public class FactTagViewedAgencyQuarterlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyYearlyEntity.java new file mode 100644 index 0000000000..1850099d9d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyYearlyEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_agency_yearly") +public class FactTagViewedAgencyYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 上级机关ID 上级机关ID + */ + private String pid; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridDailyEntity.java new file mode 100644 index 0000000000..97457851dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridDailyEntity.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_grid_daily") +public class FactTagViewedGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日 + */ + private String dateId; + + /** + * 周ID 周ID eg:2020W01 = 2020年第一周 + */ + private String weekId; + + /** + * 月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridMonthlyEntity.java new file mode 100644 index 0000000000..949e60222a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridMonthlyEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_grid_monthly") +public class FactTagViewedGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月 + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridQuarterlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridQuarterlyEntity.java new file mode 100644 index 0000000000..b6b3c57a61 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridQuarterlyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_grid_quarterly") +public class FactTagViewedGridQuarterlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 + */ + private String quarterId; + + /** + * 年D + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridYearlyEntity.java new file mode 100644 index 0000000000..eaf149fc22 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridYearlyEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章引用标签阅读数量【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_tag_viewed_grid_yearly") +public class FactTagViewedGridYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID 客户ID + */ + private String customerId; + + /** + * 文章发布所属机关ID 文章发布所属机关ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 标签ID 标签ID + */ + private String tagId; + + /** + * 标签名称 标签名称 + */ + private String tagName; + + /** + * 文章引用标签阅读数 文章引用标签阅读数 + */ + private Integer tagReadCount; + + /** + * 年度ID 年度ID eg:2020 = 2020年、2021 = 2021年 + */ + private String yearId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/LastExecRecordEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/LastExecRecordEntity.java new file mode 100755 index 0000000000..833954276d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/LastExecRecordEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 最后一次执行记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("last_exec_record") +public class LastExecRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 执行主体,即每一个统计表 + */ + private String subject; + + /** + * 最后一次执行时间 + */ + private Date execTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyDailyEntity.java new file mode 100644 index 0000000000..512ff89b3e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyDailyEntity.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_participation_user_agency_daily") +public class FactParticipationUserAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日(参与用户中)居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日(参与用户中)热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日(参与用户中)党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日(参与用户中)注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日(参与用户中)热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日(参与用户中)党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyMonthlyEntity.java new file mode 100644 index 0000000000..7e261e70e0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserAgencyMonthlyEntity.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关下(按月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_participation_user_agency_monthly") +public class FactParticipationUserAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底(参与用户中)居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底(参与用户中)热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底(参与用户中)党员总数 + */ + private Integer partymemberTotal; + + /** + * 本月(参与用户中)注册居民月增量 + */ + private Integer regIncr; + + /** + * 本月(参与用户中)热心居民月增量 + */ + private Integer warmIncr; + + /** + * 本月(参与用户中)党员认证月增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridDailyEntity.java new file mode 100644 index 0000000000..18f6b295f6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridDailyEntity.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_participation_user_grid_daily") +public class FactParticipationUserGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridMonthlyEntity.java new file mode 100644 index 0000000000..8fc4d93d16 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactParticipationUserGridMonthlyEntity.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格下(月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_participation_user_grid_monthly") +public class FactParticipationUserGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底的参与用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底的居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底的热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底的党员总数 + */ + private Integer partymemberTotal; + + /** + * 注册居民本月增量 + */ + private Integer regIncr; + + /** + * 热心居民本月增量 + */ + private Integer warmIncr; + + /** + * 党员认证本月增量 + */ + private Integer partymemberIncr; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyDailyEntity.java new file mode 100644 index 0000000000..aeffaeb3c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyDailyEntity.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_reg_user_agency_daily") +public class FactRegUserAgencyDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日:居民总数=注册用户总数 + */ + private Integer resiTotal; + + /** + * 截止到本日:热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日:党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日:注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日:热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日:党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyMonthlyEntity.java new file mode 100644 index 0000000000..daa07e392d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserAgencyMonthlyEntity.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机关(按月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_reg_user_agency_monthly") +public class FactRegUserAgencyMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底:注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底:居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底:热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底:党员总数 + */ + private Integer partymemberTotal; + + /** + * 本月:注册居民月增量 + */ + private Integer regIncr; + + /** + * 本月:热心居民月增量 + */ + private Integer warmIncr; + + /** + * 本月:党员认证月增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridDailyEntity.java new file mode 100644 index 0000000000..17e41d1a65 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridDailyEntity.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_reg_user_grid_daily") +public class FactRegUserGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String dateId; + + /** + * + */ + private String weekId; + + /** + * + */ + private String yearId; + + /** + * 截止到本日注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本日居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本日热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本日党员总数 + */ + private Integer partymemberTotal; + + /** + * 本日注册居民日增量 + */ + private Integer regIncr; + + /** + * 本日热心居民日增量 + */ + private Integer warmIncr; + + /** + * 本日党员认证日增量 + */ + private Integer partymemberIncr; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridMonthlyEntity.java new file mode 100644 index 0000000000..9030105ef1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/user/FactRegUserGridMonthlyEntity.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.stats.user; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格(月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_reg_user_grid_monthly") +public class FactRegUserGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + + /** + * 机关id + */ + private String agencyId; + + /** + * + */ + private String monthId; + + /** + * + */ + private String quarterId; + + /** + * + */ + private String yearId; + + /** + * 截止到本月底的注册用户总数 + */ + private Integer regTotal; + + /** + * 截止到本月底的居民总数 + */ + private Integer resiTotal; + + /** + * 截止到本月底的热心居民总数 + */ + private Integer warmHeartedTotal; + + /** + * 截止到本月底的党员总数 + */ + private Integer partymemberTotal; + + /** + * 注册居民本月增量 + */ + private Integer regIncr; + + /** + * 热心居民本月增量 + */ + private Integer warmIncr; + + /** + * 党员认证本月增量 + */ + private Integer partymemberIncr; + + /** + * 热心居民占比 + */ + private BigDecimal warmHeartedProportion; + + /** + * 居民总数占比 + */ + private BigDecimal resiProportion; + + /** + * 党员总数占比 + */ + private BigDecimal partymemberProportion; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java new file mode 100644 index 0000000000..98d9beb507 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java @@ -0,0 +1,125 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.voice; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 文章表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("article") +public class ArticleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 草稿ID + */ + private String draftId; + + /** + * 文章标题 + */ + private String title; + + /** + * 文章内容 精简内容 + */ + private String previewContent; + + /** + * 是否置顶 1是;0否; + */ + private Integer isTop; + + /** + * 发布范围描述 所有发布范围集合,顿号隔开 + */ + private String publishRangeDesc; + + /** + * 发布单位ID + */ + private String publisherId; + + /** + * 发布单位名称 + */ + private String publisherName; + + /** + * 发布单位类型 机关:agency;部门:department;网格:grid + */ + private String publisherType; + + /** + * 发布时间 + */ + private Date publishDate; + + /** + * 发布状态 已发布:published;已下线:offline + */ + private String statusFlag; + + /** + * 下线时间 + */ + private Date offLineTime; + + /** + * 文章标签串 竖杠分割的标签名称 + */ + private String tags; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织ID路径 eg:字段为def:abc + */ + private String orgIdPath; + + /** + * 网格ID 数据权限使用 + */ + private String gridId; + + /** + * 部门ID 数据权限使用 + */ + private String departmentId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticlePublishRangeEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticlePublishRangeEntity.java new file mode 100644 index 0000000000..1aac103337 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticlePublishRangeEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.voice; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 文章发布范围表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("article_publish_range") +public class ArticlePublishRangeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 文章ID + */ + private String articleId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 组织-网格名称 + */ + private String agencyGridName; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 所有上级组织机构ID 以英文:隔开 + */ + private String pids; + + /** + * 所有上级名称 以横杠隔开 + */ + private String allParentName; + + /** + * 下线时间 + */ + private Date offLineTime; + + /** + * 发布状态 已发布:published;已下线:offline + */ + private String publishStatus; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleTagsEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleTagsEntity.java new file mode 100644 index 0000000000..be590e8b19 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleTagsEntity.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.voice; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("article_tags") +public class ArticleTagsEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 文章ID + */ + private String articleId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleVisitRecordEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleVisitRecordEntity.java new file mode 100644 index 0000000000..630b9e2685 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleVisitRecordEntity.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.voice; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文章访问记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("article_visit_record") +public class ArticleVisitRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 文章ID + */ + private String articleId; + + /** + * 用户ID + */ + private String userId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java deleted file mode 100644 index bf6e62fe3f..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/DemoIssueService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.epmet.service.Issue; - -import com.epmet.entity.issue.IssueEntity; - -import java.util.List; - -public interface DemoIssueService { - - List listAllEntities(); -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java new file mode 100644 index 0000000000..c6b8a8bee0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java @@ -0,0 +1,111 @@ +package com.epmet.service.Issue; + +import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueGridDTO; +import com.epmet.dto.issue.IssueProjectDTO; +import com.epmet.entity.issue.IssueEntity; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 16:01 + */ +public interface IssueService { + /** + * 获取以组织为单位议题统计结果 + * @author zhaoqifeng + * @date 2020/6/17 16:04 + * @param customerId + * @return java.util.List + */ + List getAgencyIssueTotal(String customerId); + + /** + * 获取当前日期组织下议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getAgencyIssueInc(String customerId, String date); + + /** + * 获取截止当前日期组织下已关闭议题统计 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getAgencyClosedIssueTotal(String customerId, String date); + + /** + * 获取当前日期组织下已关闭议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getAgencyClosedIssueInc(String customerId, String date); + + /** + * @param customerId + * @return + * @Author sun + * @Description 根据客户Id查询议题库已转项目的网格项目关系数据 + **/ + List getGridProjectList(String customerId); + + /** + * 获取以网格为单位议题统计结果 + * @author zhaoqifeng + * @date 2020/6/19 14:34 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridIssueTotal(String customerId, String date); + + /** + * 获取当前日期网格下议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridIssueInc(String customerId, String date); + + /** + * 获取截止当前日期网格下已关闭议题统计 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridClosedIssueTotal(String customerId, String date); + + /** + * 获取当前日期网格下已关闭议题增量 + * @author zhaoqifeng + * @date 2020/6/18 9:56 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridClosedIssueInc(String customerId, String date); + + /** + * 获取议题项目关系 + * @author zhaoqifeng + * @date 2020/6/19 17:40 + * @param customerId + * @return java.util.List + */ + List getIssueProjectList(String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java deleted file mode 100644 index 423e9fc91f..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/DemoIssueServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.epmet.service.Issue.impl; - -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.issue.StatsIssueDao; -import com.epmet.entity.issue.IssueEntity; -import com.epmet.service.Issue.DemoIssueService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -@Service -@DataSource(DataSourceConstant.GOV_ISSUE) -public class DemoIssueServiceImpl implements DemoIssueService { - - @Autowired - private StatsIssueDao statsIssueDao; - - @Override - public List listAllEntities() { - return statsIssueDao.listAllEntities(); - } -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java new file mode 100644 index 0000000000..9cef7c5340 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java @@ -0,0 +1,103 @@ +package com.epmet.service.Issue.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.issue.StatsIssueDao; +import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueGridDTO; +import com.epmet.dto.issue.IssueProjectDTO; +import com.epmet.entity.issue.IssueEntity; +import com.epmet.service.Issue.IssueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 16:02 + */ +@Service +@DataSource(DataSourceConstant.GOV_ISSUE) +public class IssueServiceImpl implements IssueService { + + @Autowired + private StatsIssueDao statsIssueDao; + + @Override + public List getAgencyIssueTotal(String customerId) { + List list = statsIssueDao.selectAgencyIssueTotal(customerId); + list.forEach(dto -> { + String[] pIds = dto.getPIds().split(":"); + dto.setPId(pIds[pIds.length - 2]); + }); + return list; + } + + @Override + public List getAgencyIssueInc(String customerId, String date) { + List list = statsIssueDao.selectAgencyIssueInc(customerId, date); + list.forEach(dto -> { + String[] pIds = dto.getPIds().split(":"); + dto.setPId(pIds[pIds.length - 2]); + }); + return list; + } + + @Override + public List getAgencyClosedIssueTotal(String customerId, String date) { + List list = statsIssueDao.selectAgencyClosedIssueTotal(customerId, date); + list.forEach(dto -> { + String[] pIds = dto.getPIds().split(":"); + dto.setPId(pIds[pIds.length - 2]); + }); + return list; + } + + @Override + public List getAgencyClosedIssueInc(String customerId, String date) { + List list = statsIssueDao.selectAgencyClosedIssueInc(customerId, date); + list.forEach(dto -> { + String[] pIds = dto.getPIds().split(":"); + dto.setPId(pIds[pIds.length - 2]); + }); + return list; + } + + /** + * @param customerId + * @return + * @Author sun + * @Description 根据客户Id查询议题库已转项目的网格项目关系数据 + **/ + @Override + public List getGridProjectList(String customerId) { + return statsIssueDao.selectGridProjectList(customerId); + } + + @Override + public List getGridIssueTotal(String customerId, String date) { + return statsIssueDao.selectGridIssueTotal(customerId, date); + } + + @Override + public List getGridIssueInc(String customerId, String date) { + return statsIssueDao.selectGridIssueInc(customerId, date); + } + + @Override + public List getGridClosedIssueTotal(String customerId, String date) { + return statsIssueDao.selectGridClosedIssueTotal(customerId, date); + } + + @Override + public List getGridClosedIssueInc(String customerId, String date) { + return statsIssueDao.selectGridClosedIssueInc(customerId, date); + } + + @Override + public List getIssueProjectList(String customerId) { + return statsIssueDao.selectIssueProjectList(customerId); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDemoService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDemoService.java index 5d3e2ce24b..e03d5844ab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDemoService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDemoService.java @@ -1,10 +1,14 @@ package com.epmet.service; +import com.epmet.dto.AgencySubTreeDto; + +import java.util.List; + public interface StatsDemoService { - void testList(); void testTx(); Boolean testThreadPool(); void testThreadPoolAsync(); + List getAllAgency(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java new file mode 100644 index 0000000000..1e2f05991b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java @@ -0,0 +1,13 @@ +package com.epmet.service; + + +public interface StatsDimService { + + void initGridDim(); + + void initAgencyDim(); + + void initCustomerDim(); + + void initDepartmentDim(); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsGroupService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsGroupService.java new file mode 100644 index 0000000000..b3444d34d4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsGroupService.java @@ -0,0 +1,29 @@ +package com.epmet.service; + +import java.util.Date; + +/** + * @Author zxc + * @CreateTime 2020/6/16 14:14 + */ +public interface StatsGroupService { + + /** + * @Description 统计 “小组” 有关数据, dim:【网格-日】 + * @author zxc + */ + void groupGridDaily(Date date); + + /** + * @Description 统计 “小组” 有关数据, dim:【机关-日】 + * @author zxc + */ + void groupAgencyDaily(Date date); + + /** + * @Description 统计 “小组” 有关数据, dim:【机关-月】 + * @author zxc + */ + void groupAgencyMonthly(Date date); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsIssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsIssueService.java new file mode 100644 index 0000000000..5d0e6b4292 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsIssueService.java @@ -0,0 +1,59 @@ +package com.epmet.service; + +import java.util.Date; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 16:51 + */ +public interface StatsIssueService { + /** + * 机关和网格议题统计 + * @author zhaoqifeng + * @date 2020/6/22 10:58 + * @param + * @return void + */ + void agencyGridIssueStats(); + + /** + * 机关下议题日统计 + * @author zhaoqifeng + * @date 2020/6/17 16:53 + * @param customerId + * @param date + * @return void + */ + void saveIssueAgencyDaily(String customerId, Date date); + + /** + * 机关下议题月统计 + * @author zhaoqifeng + * @date 2020/6/18 17:39 + * @param customerId + * @param date + * @return void + */ + void saveIssueAgencyMonthly(String customerId, Date date); + + /** + * 机关下网格议题日统计 + * @author zhaoqifeng + * @date 2020/6/19 13:53 + * @param customerId + * @param date + * @return void + */ + void saveIssueGridDaily(String customerId, Date date); + + /** + * 机关下网格议题月统计 + * @author zhaoqifeng + * @date 2020/6/19 13:53 + * @param customerId + * @param date + * @return void + */ + void saveIssueGridMonthly(String customerId, Date date); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java new file mode 100644 index 0000000000..739e69a780 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java @@ -0,0 +1,20 @@ +package com.epmet.service; + +/** + * 数据统计-项目 + * @author sun + */ +public interface StatsProjectService { + + /** + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + void agencyProjectStats(); + + /** + * @Author sun + * @Description 数据-项目-网格日(月)统计 + **/ + void gridProjectStats(); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java new file mode 100644 index 0000000000..772d48e788 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java @@ -0,0 +1,74 @@ +package com.epmet.service; + + +import java.util.Date; + +public interface StatsPublicityService { + /** + * desc: 统计宣传能力的汇总信息 + * + * @return: Boolean + * @date: 2020/6/17 16:11 + * @author: jianjun liu + */ + Boolean articleSummaryDailyStatsjob(Date statsDate); + + /** + * desc: 按日 统计每个标签被引用的使用文章数 + * + * @return: Boolean + * @date: 2020/6/17 16:11 + * @author: jianjun liu + */ + Boolean tagUsedDailyStatsjob(Date statsDate); + + /** + * desc: 按月 统计每个标签被引用的使用文章数 + * + * @param + * @return: + * @date: 2020/6/19 18:44 + * @author: jianjun liu + */ + Boolean tagUsedMonthlyStatsjob(Date statsDate); + + /** + * desc: 按季年统计标签被使用次数 + * + * @param statsDate + * @return: + * @date: 2020/6/20 10:44 + * @author: jianjun liu + */ + Boolean tagUsedQuarterlyStatsjob(Date statsDate); + + /** + * desc: 按日 统计每个标签的阅读数 + * + * @param statsDate + * @return: Boolean + * @date: 2020/6/20 8:40 + * @author: jianjun liu + */ + Boolean tagViewedDailyStatsjob(Date statsDate); + + /** + * desc: 按月统计标签被查看次数 + * + * @param statsDate + * @return: + * @date: 2020/6/20 10:44 + * @author: jianjun liu + */ + Boolean tagViewedMonthlyStatsjob(Date statsDate); + + /** + * desc: 按季年统计标签被查看次数 + * + * @param statsDate + * @return: + * @date: 2020/6/20 10:44 + * @author: jianjun liu + */ + Boolean tagViewedQuarterlyStatsjob(Date statsDate); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerService.java new file mode 100644 index 0000000000..e562a08365 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerService.java @@ -0,0 +1,12 @@ +package com.epmet.service.crm; + +import com.epmet.entity.crm.CustomerEntity; + +import java.util.Date; +import java.util.List; + +public interface CustomerService { + + List listValidCustomersByCreateTime(Date createTimeFrom, Date createTimeTo); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerServiceImpl.java new file mode 100644 index 0000000000..3db2f197bd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerServiceImpl.java @@ -0,0 +1,25 @@ +package com.epmet.service.crm.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.crm.CustomerDao; +import com.epmet.entity.crm.CustomerEntity; +import com.epmet.service.crm.CustomerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@DataSource(DataSourceConstant.OPER_CRM) +public class CustomerServiceImpl implements CustomerService { + + @Autowired + private CustomerDao customerDao; + + @Override + public List listValidCustomersByCreateTime(Date createTimeFrom, Date createTimeTo) { + return customerDao.listValidCustomersByCreateTime(createTimeFrom, createTimeTo); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java new file mode 100644 index 0000000000..a6d61a756e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java @@ -0,0 +1,58 @@ +package com.epmet.service.group; + +import com.epmet.dto.group.result.*; +import com.epmet.util.DimIdGenerator; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author zxc + * @CreateTime 2020/6/16 13:22 + */ +public interface GroupDataService { + + /** + * @Description 统计 “小组” 有关数据, dim:【网格-日】 + * @param customerId + * @author zxc + */ + List groupGridDaily(String customerId, DimIdGenerator.DimIdBean dimIdBean, List gridsInfo); + + /** + * @Description 获取同级机关下网格下的小组数量 + * @param allGrid + * @author zxc + */ + List getAgencyGroupTotalCount(List allGrid,String dateId); + + /** + * @Description 查询机关下网格内的小组人数 + * @param + * @author zxc + */ + List selectAgencyGridGroupPeopleTotal(List allGrid,String dateId); + + /** + * @Description 查询机关下每个小组的人数 + * @param + * @author zxc + */ + List selectAgencyEveryGroupPeopleCount(List allGrid,String dateId); + + /** + * @Description 查询机关下的小组日增数 + * @param + * @param yesterday + * @author zxc + */ + List selectAgencyGroupIncr(List allGrid,String yesterday); + + /** + * @Description 查询机关下所有网格小组人数 + * @param gridIds + * @author zxc + */ + List getAgencyGrid(@Param("gridIds") List gridIds); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java new file mode 100644 index 0000000000..1cdc3acdcf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java @@ -0,0 +1,195 @@ +package com.epmet.service.group.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.group.GroupDataDao; +import com.epmet.dto.group.form.GridGroupPeopleFormDTO; +import com.epmet.dto.group.form.GridGroupPeopleTotalFormDTO; +import com.epmet.dto.group.form.GridGroupTotalFormDTO; +import com.epmet.dto.group.form.GroupIncrFormDTO; +import com.epmet.dto.group.result.*; +import com.epmet.entity.stats.DimGridEntity; +import com.epmet.service.group.GroupDataService; +import com.epmet.util.DimIdGenerator; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @CreateTime 2020/6/16 13:23 + */ +@Service +@DataSource(DataSourceConstant.RESI_GROUP) +public class GroupDataServiceImpl implements GroupDataService { + + @Autowired + private GroupDataDao groupDataDao; + + /** + * @Description 统计 “小组” 有关数据, dim:【网格-日】 + * @param customerId + * @author zxc + */ + @Override + public List groupGridDaily(String customerId, DimIdGenerator.DimIdBean dimTime, List gridsInfo) { + List result = new ArrayList<>(); + if (gridsInfo.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + String dateId = dimTime.getDateId(); + gridsInfo.forEach(grid -> { + GroupGridDailyResultDTO dailyResult = new GroupGridDailyResultDTO(); + BeanUtils.copyProperties(dimTime,dailyResult); + dailyResult.setAgencyId(grid.getAgencyId()); + dailyResult.setGridId(grid.getGridId()); + dailyResult.setCustomerId(customerId); + result.add(dailyResult); + }); + + // 1. 网格下有多少小组,只算 state = ‘approved’ + GridGroupTotalFormDTO formDTO = new GridGroupTotalFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setDateId(dateId); + List gridGroupTotalResultDTOS = groupDataDao.selectGridGroupTotal(formDTO); + if (gridGroupTotalResultDTOS.size() == NumConstant.ZERO){ + result.forEach(grid -> { + grid.setGroupTotal(NumConstant.ZERO); + }); + }else { + result.forEach(grid -> { + gridGroupTotalResultDTOS.forEach(groupTotal -> { + if (grid.getGridId().equals(groupTotal.getGridId())) { + grid.setGroupTotal(groupTotal.getGridGroupTotal()); + } + }); + + }); + } + // 2. 网格下所有组内人数和(不需要去重) 人员状态 != "removed" + GridGroupPeopleTotalFormDTO peopleTotalFormDTO = new GridGroupPeopleTotalFormDTO(); + peopleTotalFormDTO.setCustomerId(customerId); + peopleTotalFormDTO.setDateId(dateId); + List gridGroupPeopleTotalResultDTOS = groupDataDao.selectGridGroupPeopleTotal(peopleTotalFormDTO); + result.forEach(grid -> { + gridGroupPeopleTotalResultDTOS.forEach(groupPeopleTotal -> { + if (grid.getGridId().equals(groupPeopleTotal.getGridId())){ + grid.setGroupMemberTotal(groupPeopleTotal.getGridGroupPeopleTotal()); + } + }); + }); + // 3. 网格下小组平均人数 + result.forEach(grid -> { + grid.setGroupMemberAvgCount(grid.getGroupTotal() == NumConstant.ZERO ? NumConstant.ZERO : grid.getGroupMemberTotal()/grid.getGroupTotal()); + }); + // 4. 网格下小组人数中位数 小组最大(小)成员数、最多(少)成员小组ID + GridGroupPeopleFormDTO everyGroupPeople = new GridGroupPeopleFormDTO(); + everyGroupPeople.setCustomerId(customerId); + everyGroupPeople.setDateId(dateId); + List everyGroupPeopleCount = groupDataDao.selectEveryGroupPeopleCount(everyGroupPeople); + Map> collect = everyGroupPeopleCount.stream().collect(Collectors.groupingBy(every -> every.getGridId())); + Set>> entries = collect.entrySet(); + entries.forEach(everyGroup -> { + List value = everyGroup.getValue(); + List groupPeopleSorted = value.stream().sorted(Comparator.comparing(GridGroupPeopleResultDTO::getGroupCount).reversed()).collect(Collectors.toList()); + Integer groupPeopleMedian = groupPeopleSorted.size() % 2 == 0 ? + (groupPeopleSorted.get(groupPeopleSorted.size() / 2 - 1).getGroupCount() + groupPeopleSorted.get(groupPeopleSorted.size() / 2).getGroupCount()) / 2 : + groupPeopleSorted.get(groupPeopleSorted.size() / 2).getGroupCount(); + result.forEach(grid -> { + if (groupPeopleSorted.get(0).getGridId().equals(grid.getGridId())){ + grid.setGroupMedian(groupPeopleMedian);//中位数 + //网格下小组成员最大数 + grid.setGroupMemberMaxCount(groupPeopleSorted.get(NumConstant.ZERO).getGroupCount()); + //最多成员小组ID + grid.setMaxMemberGroupId(groupPeopleSorted.get(NumConstant.ZERO).getGroupId()); + //网格下小组成员最小数 + grid.setGroupMemberMinCount(groupPeopleSorted.get(groupPeopleSorted.size()-NumConstant.ONE).getGroupCount()); + //最少成员小组ID + grid.setMinMemberGroupId(groupPeopleSorted.get(groupPeopleSorted.size()-NumConstant.ONE).getGroupId()); + } + }); + }); + // 5. 网格下小组增量 + GroupIncrFormDTO groupIncr = new GroupIncrFormDTO(); + groupIncr.setCustomerId(customerId); + groupIncr.setDateId(dateId); + List groupIncrResult = groupDataDao.selectGroupIncr(groupIncr); + result.forEach(grid -> { + groupIncrResult.forEach(gridIncr -> { + if (grid.getGridId().equals(gridIncr.getGridId())){ + grid.setGroupIncr(gridIncr.getGroupIncr()); + } + }); + }); + return result; + } + + /** + * @Description 获取同级机关下网格下的小组数量 + * @param + * @author zxc + */ + public List getAgencyGroupTotalCount(List allGrid,String dateId){ + if (allGrid.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return groupDataDao.getAgencyGroupTotalCount(allGrid,dateId); + } + + /** + * @Description 查询机关下网格内的小组人数 + * @param + * @author zxc + */ + @Override + public List selectAgencyGridGroupPeopleTotal(List allGrid,String dateId) { + if (allGrid.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return groupDataDao.selectAgencyGridGroupPeopleTotal(allGrid,dateId); + } + + /** + * @Description 查询机关下每个小组的人数 + * @param + * @author zxc + */ + public List selectAgencyEveryGroupPeopleCount(List allGrid,String dateId){ + if (allGrid.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return groupDataDao.selectAgencyEveryGroupPeopleCount(allGrid,dateId); + } + + /** + * @Description 查询机关下的小组日增数 + * @param + * @param dateId + * @author zxc + */ + public List selectAgencyGroupIncr(List allGrid,String dateId){ + if (allGrid.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return groupDataDao.selectAgencyGroupIncr(allGrid, dateId); + } + + /** + * @Description 查询机关下所有网格小组人数 + * @param gridIds + * @author zxc + */ + @Override + public List getAgencyGrid(List gridIds) { + if (gridIds.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return groupDataDao.getAgencyGrid(gridIds); + } + + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java index 59c2907d10..a549215ccd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java @@ -1,8 +1,6 @@ package com.epmet.service.impl; -import com.epmet.entity.issue.IssueEntity; -import com.epmet.entity.org.CustomerAgencyEntity; -import com.epmet.service.Issue.DemoIssueService; +import com.epmet.dto.AgencySubTreeDto; import com.epmet.service.StatsDemoService; import com.epmet.service.org.DemoGovOrgService; import com.epmet.service.stats.DemoDataStatsService; @@ -22,20 +20,12 @@ public class StatsDemoServiceImpl implements StatsDemoService { @Autowired private DemoGovOrgService demoGovOrgService; - @Autowired - private DemoIssueService demoIssueService; - @Autowired private DemoDataStatsService demoDataStatsService; - public void testList() { - List agencies = demoGovOrgService.listAllEntities(); - List issues = demoIssueService.listAllEntities(); - System.out.println(666); - } - //该service不加事务 //@Transactional(rollbackFor = Exception.class) + @Override public void testTx() { demoDataStatsService.testTx(); } @@ -65,4 +55,9 @@ public class StatsDemoServiceImpl implements StatsDemoService { e.printStackTrace(); } } + + @Override + public List getAllAgency(){ + return demoGovOrgService.getAllAgency(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java new file mode 100644 index 0000000000..ff97cf767b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java @@ -0,0 +1,162 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.entity.crm.CustomerEntity; +import com.epmet.entity.org.CustomerAgencyEntity; +import com.epmet.entity.org.CustomerDepartmentEntity; +import com.epmet.entity.org.CustomerGridEntity; +import com.epmet.entity.stats.DimGridEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.StatsDimService; +import com.epmet.service.crm.CustomerService; +import com.epmet.service.org.CustomerAgencyService; +import com.epmet.service.org.CustomerDepartmentService; +import com.epmet.service.org.CustomerGridService; +import com.epmet.service.stats.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class StatsDimServiceImpl implements StatsDimService { + + @Autowired + private DimGridService dimGridService; + + @Autowired + private DimAgencyService dimAgencyService; + + @Autowired + private CustomerGridService customerGridService; + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Autowired + private CustomerAgencyService customerAgencyService; + + @Autowired + private CustomerService customerService; + + @Autowired + private DimCustomerService dimCustomerService; + + @Autowired + private CustomerDepartmentService departmentService; + + @Autowired + private DimDepartmentService dimDepartmentService; + + @Override + public void initGridDim() { + DimGridEntity lastCreatedGridDim = dimGridService.getLastCreatedGridDim(); + List grids; + if (lastCreatedGridDim == null) { + // 首次初始化 + grids = customerGridService.listGridsByCreateTime(null, null); + } else { + // 非首次初始化 + // 结束时间边界与开始时间边界,包含开始时间不包含结束时间。结束时间可以为空,则查询从开始时间往后的所有新创建网格 + Date startTimeBorder = DateUtils.parse(DateUtils.format(lastCreatedGridDim.getCreatedTime(), DateUtils.DATE_PATTERN_YYYYMMDD), DateUtils.DATE_PATTERN_YYYYMMDD); + Date endTimeBorder = DateUtils.parse(DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD), DateUtils.DATE_PATTERN_YYYYMMDD); + + grids = customerGridService.listGridsByCreateTime(startTimeBorder, endTimeBorder); + } + + List gridDims = convertCustomerGrid2GridDim(grids); + if (!CollectionUtils.isEmpty(gridDims)) { + dimGridService.initGridDims(gridDims); + } + } + + /** + * 将网格信息转换成网格维度信息 + * @param grids + * @return + */ + private List convertCustomerGrid2GridDim(List grids) { + return grids.stream().map(grid -> { + DimGridEntity dimGrid = new DimGridEntity(); + dimGrid.setAgencyId(grid.getPid()); + dimGrid.setAreaCode(grid.getAreaCode()); + dimGrid.setCustomerId(grid.getCustomerId()); + dimGrid.setGridName(grid.getGridName()); + dimGrid.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dimGrid.setId(grid.getId()); + dimGrid.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + return dimGrid; + }).collect(Collectors.toList()); + } + + /** + * 初始化机关单位维度 + */ + @Override + public void initAgencyDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_AGENCY); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_AGENCY); + } + + Date statsEndTime = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD); + Date statsStartTime = null; + if (lastExecRecord.getExecTime() != null) { + statsStartTime = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYYMMDD); + } + + List agencies = customerAgencyService.listAgenciesByCreateTime(statsStartTime, statsEndTime); + if (!CollectionUtils.isEmpty(agencies)) { + dimAgencyService.initAgencyDims(agencies); + } + } + + /** + * 初始化网格维度 + */ + @Override + public void initCustomerDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_CUSTOMER); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_CUSTOMER); + } + + Date statsEndTime = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD); + Date statsStartTime = null; + if (lastExecRecord.getExecTime() != null) { + statsStartTime = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYYMMDD); + } + + List customers = customerService.listValidCustomersByCreateTime(statsStartTime, statsEndTime); + if (!CollectionUtils.isEmpty(customers)) { + dimCustomerService.initCustomerDims(customers); + } + } + + @Override + public void initDepartmentDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_DEPARTMENT); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_DEPARTMENT); + } + + Date statsEndTime = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD); + Date statsStartTime = null; + if (lastExecRecord.getExecTime() != null) { + statsStartTime = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYYMMDD); + } + + List departments = departmentService.listDepartmentsByCreatedTime(statsStartTime, statsEndTime); + if (!CollectionUtils.isEmpty(departments)) { + dimDepartmentService.initDepartmentDims(departments); + lastExecRecord.setExecTime(new Date()); + // 记录最后一次统计时间 + lastExecRecordService.updateById(lastExecRecord); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java new file mode 100644 index 0000000000..f91f0124b4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java @@ -0,0 +1,297 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.GroupConstant; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.group.result.*; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.entity.stats.DimAgencyEntity; +import com.epmet.service.StatsGroupService; +import com.epmet.service.group.GroupDataService; +import com.epmet.service.org.CustomerGridService; +import com.epmet.service.stats.*; +import com.epmet.util.DimIdGenerator; +import com.epmet.util.ModuleConstant; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @CreateTime 2020/6/16 14:14 + */ +@Service +@Slf4j +public class StatsGroupServiceImpl implements StatsGroupService { + + @Autowired + private DimGridService dimGridService; + @Autowired + private DimAgencyService dimAgencyService; + @Autowired + private GroupDataService groupDataService; + @Autowired + private FactGroupGridDailyService factGroupGridDailyService; + @Autowired + private FactGroupAgencyDailyService factGroupAgencyDailyService; + @Autowired + private FactGroupAgencyMonthlyService factGroupAgencyMonthlyService; + @Autowired + private DimCustomerService dimCustomerService; + @Autowired + private CustomerGridService customerGridService; + + /** + * @Description 统计【网格-日】 + * @param + * @author zxc + */ + @Override + public void groupGridDaily(Date date) { + Integer pageNo = NumConstant.ONE; + Integer pageSize = NumConstant.ONE_HUNDRED; + List customerIds; + do { + customerIds = dimCustomerService.selectCustomerIdPage(pageNo,pageSize); + if (customerIds.size() != NumConstant.ZERO){ + customerIds.forEach(customerId -> { + try { + DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); + +// List gridsInfo = dimGridService.getGridListByCustomerId(customerId); + List gridsInfo = customerGridService.getCustomerGridIdList(customerId, dimIdBean.getDateId()); + + List resultDTOS = groupDataService.groupGridDaily(customerId,dimIdBean,gridsInfo); + factGroupGridDailyService.statisticsGroupGridDaily(resultDTOS,customerId); + } catch (Exception e) { + log.error(GroupConstant.ERRORGRIDDAILY+customerId,e); + } + }); + } + + }while (customerIds.size() != NumConstant.ZERO && customerIds.size() == pageSize); + } + + /** + * @Description 统计 “小组” 有关数据, dim:【机关-日】 + * @author zxc + */ + @Override + public void groupAgencyDaily(Date date) { + Integer pageNo = NumConstant.ONE; + Integer pageSize = NumConstant.ONE_HUNDRED; + List customerIds; + do { + customerIds = dimCustomerService.selectCustomerIdPage(pageNo++,pageSize); + if (customerIds.size() != NumConstant.ZERO){ + DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); + customerIds.forEach(customerId -> { + try { + List customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); + List agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); + factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily,customerId); + } catch (Exception e) { + log.error(GroupConstant.ERRORAGENCYDAILY+customerId,e); + } + }); + } + }while (customerIds.size() != NumConstant.ZERO && customerIds.size() == pageSize); + } + + /** + * @Description 统计 “小组” 有关数据, dim:【机关-月】 + * @author zxc String customerId + */ + @Override + public void groupAgencyMonthly(Date date) { + DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); + String monthId = dimIdBean.getMonthId(); + List lastDayAgency = factGroupAgencyDailyService.getLastDayAgency(monthId); + List monthGroupIncr = factGroupAgencyDailyService.getMonthGroupIncr(monthId); + if (monthGroupIncr.size() == NumConstant.ZERO){ + lastDayAgency.forEach(agency -> { + agency.setGroupIncr(NumConstant.ZERO); + }); + }else { + lastDayAgency.forEach(agency -> { + monthGroupIncr.forEach(monthIncr -> { + if (agency.getAgencyId().equals(monthIncr.getAgencyId())){ + agency.setGroupIncr(monthIncr.getMonthGroupIncr()); + } + }); + }); + } + factGroupAgencyMonthlyService.insertAgencyGroupMonthly(lastDayAgency); + } + + public List getAgencyGroupDaily(List customerAgencyInfos, DimIdGenerator.DimIdBean timeDim,String customerId){ + if (customerAgencyInfos.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + List result = new ArrayList<>(); + String dateId = timeDim.getDateId(); + List agencyList = dimAgencyService.getAgencyListByCustomerId(customerId); + agencyList.forEach(agency -> { + AgencyGroupDailyResultDTO agencyResult = new AgencyGroupDailyResultDTO(); + String agencyId = agency.getId(); + agencyResult.setAgencyId(agencyId); + agencyResult.setCustomerId(customerId); + BeanUtils.copyProperties(timeDim,agencyResult); + //机关下的所有网格(包括直属网格) + List allGrid = this.getAllGrid(agencyId); + String pidByAgencyId = dimAgencyService.getPidByAgencyId(agencyId); + agencyResult.setPid(StringUtils.isBlank(pidByAgencyId)?"0":pidByAgencyId); + // TODO 1. 机关下有多少网格 + List customerGridIdList = customerGridService.getCustomerGridIdList(customerId, dateId); + AtomicReference gridSize = new AtomicReference<>(0); + if (customerGridIdList.size() != NumConstant.ZERO){ + customerGridIdList.forEach(gridId -> { + allGrid.forEach(allAgencyGrid -> { + if (gridId.getGridId().equals(allAgencyGrid)){ + gridSize.updateAndGet(v -> v + NumConstant.ONE); + } + }); + }); + agencyResult.setGridTotal(gridSize.get()); + }else { + agencyResult.setGridTotal(NumConstant.ZERO); + } + + // TODO 2. 机关下有多少小组,只算 state = ‘approved’ + List agencyGroupTotalCount = groupDataService.getAgencyGroupTotalCount(allGrid,dateId); + Integer groupCount = agencyGroupTotalCount.stream().collect(Collectors.summingInt(AgencyGroupTotalCountResultDTO::getGridGroupCount)); + agencyResult.setGroupTotalCount(groupCount); + // TODO 3. 机关下所有组内人数和(不需要去重) 人员状态 != "removed" + List agencyGridGroupPeopleTotal = groupDataService.selectAgencyGridGroupPeopleTotal(allGrid,dateId); + Integer groupPeopleCount = agencyGridGroupPeopleTotal.stream().collect(Collectors.summingInt(AgencyGridGroupPeopleTotalResultDTO::getGridGroupPeopleTotal)); + agencyResult.setGroupMemberTotalCount(groupPeopleCount); + + // TODO 4. 机关下小组平均人数 + agencyResult.setGroupMemberAvgCount( + agencyResult.getGroupTotalCount() == NumConstant.ZERO ? NumConstant.ZERO : + agencyResult.getGroupMemberTotalCount()/agencyResult.getGroupTotalCount()); + + // TODO 5. 机关下小组人数中位数 小组最大(小)成员数、最多(少)成员小组ID + List agencyGridGroupPeople = groupDataService.selectAgencyEveryGroupPeopleCount(allGrid,dateId); + List sorted = agencyGridGroupPeople.stream().sorted(Comparator.comparing(AgencyGridGroupPeopleResultDTO::getGroupCount).reversed()).collect(Collectors.toList()); + Integer groupPeopleMedian; + if (sorted.size() == NumConstant.ONE){ + agencyResult.setGroupMemberMaxCount(sorted.get(NumConstant.ZERO).getGroupCount()); + agencyResult.setMaxMemberGroupId(sorted.get(NumConstant.ZERO).getGroupId()); + agencyResult.setGroupMemberMinCount(sorted.get(NumConstant.ZERO).getGroupCount()); + agencyResult.setMinMemberGroupId(sorted.get(NumConstant.ZERO).getGroupId()); + }else if (sorted.size() >= NumConstant.TWO){ + groupPeopleMedian = sorted.size() % NumConstant.TWO == NumConstant.ZERO ? + (sorted.get(sorted.size() / NumConstant.TWO - NumConstant.ONE).getGroupCount() + sorted.get(sorted.size() / 2).getGroupCount()) / 2 : + sorted.get(sorted.size() / NumConstant.TWO).getGroupCount(); + agencyResult.setGroupMedian(groupPeopleMedian); + + agencyResult.setGroupMemberMaxCount(sorted.get(NumConstant.ZERO).getGroupCount()); + agencyResult.setMaxMemberGroupId(sorted.get(NumConstant.ZERO).getGroupId()); + agencyResult.setGroupMemberMinCount(sorted.get(sorted.size() - NumConstant.ONE).getGroupCount()); + agencyResult.setMinMemberGroupId(sorted.get(sorted.size() - NumConstant.ONE).getGroupId()); + } + // TODO 6. 机关下小组增量 + List agencyGroupIncr = groupDataService.selectAgencyGroupIncr(allGrid, dateId); + Integer groupIncr = agencyGroupIncr.stream().collect(Collectors.summingInt(AgencyGroupIncrResultDTO::getGroupIncr)); + agencyResult.setGroupIncr(groupIncr); + result.add(agencyResult); + }); + return result; + } + + /** + * @Description 根据当前机关ID,查询出直属网格和所有下级机关的网格 + * @param agencyId + * @author zxc + */ + public List getAllGrid(String agencyId){ + List result = new ArrayList<>(); + List allAgency = dimAgencyService.getAllAgency(); + + Map> subGridOfAgency = new HashMap<>(); + allAgency.forEach(agency -> { + this.initAgencyGridMap(agency.getAgencyId(),agency,subGridOfAgency); + }); + Set>> entries = subGridOfAgency.entrySet(); + entries.forEach(entry -> { + String key = entry.getKey(); + Set value = entry.getValue(); + if (key.equals(agencyId)){ + result.addAll(value); + } + }); + return result; + } + + /** + * @Description 递归获取机关下的网格id【包括直属机关】 + * @param pid + * @param agency + * @param subGridOfAgency + * @author zxc + */ + void initAgencyGridMap(String pid, AgencySubTreeDto agency, Map> subGridOfAgency){ + + //向map中放入数据 + if(subGridOfAgency.containsKey(pid)){ + //包含key + Set grids = subGridOfAgency.get(pid); + if(null == grids){ + grids = new HashSet<>(); + subGridOfAgency.put(pid,grids); + } + if(null != agency.getGridIds() && agency.getGridIds().size() > NumConstant.ZERO){ + grids.addAll(agency.getGridIds()); + } + }else{ + //不包含key + Set grids = new HashSet<>(agency.getGridIds()); + subGridOfAgency.put(pid,grids); + } + + //定义递归出口 + if(StringUtils.equals(ModuleConstant.AGENCY_LEVEL_COMMUNITY,agency.getLevel()) || null == agency.getSubAgencies() || agency.getSubAgencies().size() == NumConstant.ZERO){ + return ; + } + + + //定义递归入口 + agency.getSubAgencies().forEach(obj -> { + initAgencyGridMap(pid,obj,subGridOfAgency); + }); + } + + /** + * @Description 获取时间维度 dateId--weekId--monthId--quarterId--yearId + * 如果有自定义时间,根据自定义时间获取时间维度 + * 没有自定义时间,默认获取前一天的时间维度 + * @param + * @author zxc + */ + public DimIdGenerator.DimIdBean getDimIdBean(Date date){ + if (date != null){ + return DimIdGenerator.getDimIdBean(date); + } + ZoneId zoneId = ZoneId.systemDefault(); + LocalDate localDate = LocalDate.now().minusDays(NumConstant.ONE); + ZonedDateTime zdt = localDate.atStartOfDay(zoneId); + Date result = Date.from(zdt.toInstant()); + return DimIdGenerator.getDimIdBean(result); + } + + public List getAgencyAllGrid(String customerId,String agencyId){ + + return null; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java new file mode 100644 index 0000000000..fd6ffe7b88 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java @@ -0,0 +1,1003 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.IssueConstant; +import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueGridDTO; +import com.epmet.dto.issue.IssueProjectDTO; +import com.epmet.dto.project.ProjectAgencyDTO; +import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; +import com.epmet.dto.stats.FactIssueGridMonthlyDTO; +import com.epmet.entity.stats.*; +import com.epmet.service.Issue.IssueService; +import com.epmet.service.StatsIssueService; +import com.epmet.service.project.ProjectService; +import com.epmet.service.stats.*; +import com.epmet.util.DimIdGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/17 16:51 + */ +@Service +public class StatsIssueServiceImpl implements StatsIssueService { + @Autowired + private DimCustomerService dimCustomerService; + @Autowired + private IssueService issueService; + @Autowired + private DimAgencyService dimAgencyService; + @Autowired + private DimGridService dimGridService; + @Autowired + private ProjectService projectService; + @Autowired + private FactIssueAgencyDailyService factIssueAgencyDailyService; + @Autowired + private FactIssueAgencyMonthlyService factIssueAgencyMonthlyService; + @Autowired + private FactIssueGridDailyService factIssueGridDailyService; + @Autowired + private FactIssueGridMonthlyService factIssueGridMonthlyService; + + @Override + public void agencyGridIssueStats() { + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + //遍历统计每一个客户数据 + customerStats(customerId); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + } + + /** + * 一个客户一个线程, 分别统计机关日/月数据和网格日/月数据 + * @author zhaoqifeng + * @date 2020/6/22 11:03 + * @param customerId + * @return void + */ + @Async + public void customerStats(String customerId) { + //获取当前日期前一天 + Date date = DateUtils.getBeforeDay(new Date()); + //机关议题日统计 + saveIssueAgencyDaily(customerId, date); + //机关议题月统计 + saveIssueAgencyMonthly(customerId, date); + //网格议题日统计 + saveIssueGridDaily(customerId, date); + //网格议题月统计 + saveIssueGridMonthly(customerId, date); + } + + @Override + public void saveIssueAgencyDaily(String customerId, Date date) { + String dateString = DateUtils.format(date); + DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); + dimAgencyDTO.setCustomerId(customerId); + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + //清空数据 + factIssueAgencyDailyService.deleteByCustomerId(customerId, dimId.getDateId()); + //获取当前客户下所有机关 + List agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); + //获取机关下议题各种状态的数目统计 + List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId); + //获取机关下议题各种状态的数目增量 + List issueAgencyIncList = issueService.getAgencyIssueInc(customerId, dateString); + //获取机关下已关闭议题统计 + List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString); + //获取机关下已关闭议题增量 + List issueAgencyClosedIncList = issueService.getAgencyClosedIssueInc(customerId, dateString); + //已结案项目统计 + List projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString); + //已结案项目增量 + List projectAgencyClosedIncList = projectService.getAgencyClosedProjectInc(customerId, dateString); + + List list = new ArrayList<>(); + for (DimAgencyDTO agency : agencyList) { + FactIssueAgencyDailyEntity entity = initIssueAgencyDaily(dimId); + entity.setCustomerId(agency.getCustomerId()); + entity.setAgencyId(agency.getId()); + entity.setPid(agency.getPid()); + + String pIds; + if (null == agency.getPids() || agency.getPids().isEmpty()) { + pIds = agency.getPid().concat(":").concat(agency.getId()); + } else { + pIds = ("0").concat(":").concat(agency.getPids()).concat(":").concat(agency.getId()); + } + //总量统计 + saveTotal(issueAgencyTotalList, agency, entity, pIds); + //增量统计 + saveInc(issueAgencyIncList, agency, entity, pIds); + //已关闭议题已解决未解决统计 + if (entity.getClosedTotal() > NumConstant.ZERO) { + saveClosedTotal(issueAgencyClosedTotalList, agency, entity, pIds); + //已关闭议题已解决未解决增量统计 + if (entity.getClosedIncr() > NumConstant.ZERO) { + saveClosedInc(issueAgencyClosedIncList, agency, entity, pIds); + } + } + //已关闭项目已解决未解决统计 + if (entity.getShiftProjectTotal() > NumConstant.ZERO) { + saveClosedProjectTotal(projectAgencyClosedTotalList, agency, entity, pIds); + //已关闭项目已解决未解决增量统计 + if (entity.getClosedCaseTotal() > NumConstant.ZERO) { + saveClosedProjectInc(projectAgencyClosedIncList, agency, entity, pIds); + } + } + list.add(entity); + } + //批量插入 + factIssueAgencyDailyService.saveList(list); + } + + @Override + public void saveIssueAgencyMonthly(String customerId, Date date) { + String dateString = DateUtils.format(date); + DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); + dimAgencyDTO.setCustomerId(customerId); + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + //清空数据 + factIssueAgencyMonthlyService.deleteByCustomerId(customerId, dimId.getMonthId()); + //获取当前客户下所有机关 + List agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); + //获取机关下议题各种状态的数目统计 + List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId); + //获取机关下已关闭议题统计 + List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString); + //已结案项目统计 + List projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString); + //统计机关下议题各个指标月度增量 + List issueAgencyMonthlyIncList = factIssueAgencyMonthlyService.getAgencyMonthlyInc(customerId, dimId.getMonthId()); + List list = new ArrayList<>(); + for (DimAgencyDTO agency : agencyList) { + FactIssueAgencyDailyEntity daily = initIssueAgencyDaily(dimId); + FactIssueAgencyMonthlyEntity monthly = initIssueAgencyMonthly(dimId); + + String pIds; + if (null == agency.getPids() || agency.getPids().isEmpty()) { + pIds = agency.getPid().concat(":").concat(agency.getId()); + } else { + pIds = ("0").concat(":").concat(agency.getPids()).concat(":").concat(agency.getId()); + } + //总量统计 + saveTotal(issueAgencyTotalList, agency, daily, pIds); + //已关闭议题已解决未解决统计 + if (daily.getClosedTotal() > NumConstant.ZERO) { + saveClosedTotal(issueAgencyClosedTotalList, agency, daily, pIds); + } + //已关闭项目已解决未解决统计 + if (daily.getShiftProjectTotal() > NumConstant.ZERO) { + saveClosedProjectTotal(projectAgencyClosedTotalList, agency, daily, pIds); + } + monthly = ConvertUtils.sourceToTarget(daily, FactIssueAgencyMonthlyEntity.class); + //各指标增量统计 + for (int i = 0; i < issueAgencyMonthlyIncList.size(); i++) { + FactIssueAgencyMonthlyDTO dto = issueAgencyMonthlyIncList.get(i); + if (agency.getId().equals(dto.getAgencyId())) { + monthly.setIssueIncr(dto.getIssueIncr()); + monthly.setShiftProjectIncr(dto.getShiftProjectIncr()); + monthly.setClosedIncr(dto.getClosedIncr()); + monthly.setClosedResolvedIncr(dto.getClosedResolvedIncr()); + monthly.setClosedUnresolvedIncr(dto.getClosedUnresolvedIncr()); + monthly.setClosedCaseIncr(dto.getClosedCaseIncr()); + monthly.setClosedCaseResolvedIncr(dto.getClosedCaseResolvedIncr()); + monthly.setClosedCaseUnresolvedIncr(dto.getClosedCaseUnresolvedIncr()); + issueAgencyMonthlyIncList.remove(i); + break; + } + } + monthly.setCustomerId(agency.getCustomerId()); + monthly.setAgencyId(agency.getId()); + monthly.setPid(agency.getPid()); + + list.add(monthly); + } + //批量插入 + factIssueAgencyMonthlyService.saveList(list); + } + + @Override + public void saveIssueGridDaily(String customerId, Date date) { + String dateString = DateUtils.format(date); + DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); + dimAgencyDTO.setCustomerId(customerId); + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + //清空数据 + factIssueGridDailyService.deleteByCustomerId(customerId, dimId.getDateId()); + //获取客户下所有网格数据 + List gridList = dimGridService.getGridListByCustomerId(customerId); + //获取网格下议题各种状态的数目统计 + List gridTotalList = issueService.getGridIssueTotal(customerId, dateString); + //获取网格下议题各种状态的增量统计 + List gridIncList = issueService.getGridIssueInc(customerId, dateString); + //获取网格下已关闭议题各种状态的数目统计 + List gridClosedTotalList = issueService.getGridClosedIssueTotal(customerId, dateString); + //获取网格下已关闭议题各种状态的增量统计 + List gridClosedIncList = issueService.getGridClosedIssueInc(customerId, dateString); + //项目议题关系 + List issueProjectList = issueService.getIssueProjectList(customerId); + //已结案项目统计 + List closedProjectTotalList = projectService.getGridClosedProjectTotal(customerId, dateString); + //已结案项目增量 + List closedProjectIncList = projectService.getGridClosedProjectTotal(customerId, dateString); + + Map resolveMap= new HashMap<>(); + Map unResolveMap = new HashMap<>(); + Map resolveIncMap = new HashMap<>(); + Map unResolveIncMap = new HashMap<>(); + if (null != issueProjectList) { + List totalList = issueProjectList.stream().flatMap(ip -> + closedProjectTotalList.stream().filter(closed -> ip.getIssueId().equals(closed.getIssueId())).map(project -> { + IssueProjectDTO dto = new IssueProjectDTO(); + dto.setIssueId(ip.getIssueId()); + dto.setGridId(ip.getGridId()); + dto.setProjectId(ip.getProjectId()); + dto.setStatus(project.getStatus()); + return dto; + })).collect(Collectors.toList()); + Map> totalMap = + totalList.stream().collect(Collectors.groupingBy(IssueProjectDTO::getStatus)); + List resolveList = totalMap.get(IssueConstant.RESLOVED); + List unResolveList = totalMap.get(IssueConstant.UNRESLOVED); + if (null != resolveList) { + resolveMap = resolveList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, Collectors.counting())); + } + if (null != unResolveList) { + unResolveMap = unResolveList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, + Collectors.counting())); + } + List incList = issueProjectList.stream().flatMap(ip -> + closedProjectIncList.stream().filter(closed -> ip.getIssueId().equals(closed.getIssueId())).map(project -> { + IssueProjectDTO dto = new IssueProjectDTO(); + dto.setIssueId(ip.getIssueId()); + dto.setGridId(ip.getGridId()); + dto.setProjectId(ip.getProjectId()); + dto.setStatus(project.getStatus()); + return dto; + })).collect(Collectors.toList()); + Map> incMap = + incList.stream().collect(Collectors.groupingBy(IssueProjectDTO::getStatus)); + List resolveIncList = incMap.get(IssueConstant.RESLOVED); + List unResolveIncList = incMap.get(IssueConstant.UNRESLOVED); + if (null != resolveIncList) { + resolveIncMap = resolveIncList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, Collectors.counting())); + } + if (null != unResolveIncList) { + unResolveIncMap = unResolveIncList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, + Collectors.counting())); + } + } + + List list = new ArrayList<>(); + + for (DimGridEntity grid : gridList) { + FactIssueGridDailyEntity entity = initIssueGridDaily(dimId); + entity.setCustomerId(grid.getCustomerId()); + entity.setAgencyId(grid.getAgencyId()); + entity.setGridId(grid.getId()); + //总量统计 + saveGridTotal(gridTotalList, grid, entity); + //增量统计 + saveGridInc(gridIncList, grid, entity); + + if (entity.getClosedTotal() > NumConstant.ZERO) { + //已关闭议题已解决未解决数量统计 + saveGridClosedTotal(gridClosedTotalList, grid, entity); + + if (entity.getClosedIncr() > NumConstant.ZERO) { + //已关闭议题已解决未解决增量统计 + saveGridClosedInc(gridClosedIncList, grid, entity); + } + } + //已关闭项目已解决未解决统计 + saveClosedProject(resolveMap, unResolveMap, resolveIncMap, unResolveIncMap, grid, entity); + list.add(entity); + } + factIssueGridDailyService.saveList(list); + } + + @Override + public void saveIssueGridMonthly(String customerId, Date date) { + String dateString = DateUtils.format(date); + DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); + dimAgencyDTO.setCustomerId(customerId); + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + //清空数据 + factIssueGridMonthlyService.deleteByCustomerId(customerId, dimId.getMonthId()); + //获取客户下所有网格数据 + List gridList = dimGridService.getGridListByCustomerId(customerId); + //获取网格下议题各种状态的数目统计 + List gridTotalList = issueService.getGridIssueTotal(customerId, dateString); + //获取网格下已关闭议题各种状态的数目统计 + List gridClosedTotalList = issueService.getGridClosedIssueTotal(customerId, dateString); + //增量统计 + List gridMonthlyIncListList = factIssueGridMonthlyService.getGridMonthlyInc(customerId, dimId.getMonthId()); + //项目议题关系 + List issueProjectList = issueService.getIssueProjectList(customerId); + //已结案项目统计 + List closedProjectTotalList = projectService.getGridClosedProjectTotal(customerId, dateString); + Map resolveMap= new HashMap<>(); + Map unResolveMap = new HashMap<>(); + if (null != issueProjectList) { + List totalList = issueProjectList.stream().flatMap(ip -> + closedProjectTotalList.stream().filter(closed -> ip.getIssueId().equals(closed.getIssueId())).map(project -> { + IssueProjectDTO dto = new IssueProjectDTO(); + dto.setIssueId(ip.getIssueId()); + dto.setGridId(ip.getGridId()); + dto.setProjectId(ip.getProjectId()); + dto.setStatus(project.getStatus()); + return dto; + })).collect(Collectors.toList()); + Map> totalMap = + totalList.stream().collect(Collectors.groupingBy(IssueProjectDTO::getStatus)); + List resolveList = totalMap.get(IssueConstant.RESLOVED); + List unResolveList = totalMap.get(IssueConstant.UNRESLOVED); + if (null != resolveList) { + resolveMap = resolveList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, Collectors.counting())); + } + if (null != unResolveList) { + unResolveMap = unResolveList.stream().collect(Collectors.groupingBy(IssueProjectDTO:: getGridId, + Collectors.counting())); + } + } + + List list = new ArrayList<>(); + + for (DimGridEntity grid : gridList) { + FactIssueGridDailyEntity daily = initIssueGridDaily(dimId); + FactIssueGridMonthlyEntity monthly = initIssueGridMonthly(dimId); + + //总量统计 + saveGridTotal(gridTotalList, grid, daily); + + if (daily.getClosedTotal() > NumConstant.ZERO) { + //已关闭议题已解决未解决数量统计 + saveGridClosedTotal(gridClosedTotalList, grid, daily); + } + monthly = ConvertUtils.sourceToTarget(daily, FactIssueGridMonthlyEntity.class); + + //已关闭项目已解决未解决统计 + int resolve = null == resolveMap.get(grid.getId())?0:resolveMap.get(grid.getId()).intValue(); + int unResolve = null == unResolveMap.get(grid.getId())?0:unResolveMap.get(grid.getId()).intValue(); + int total = resolve + unResolve; + monthly.setClosedCaseTotal(total); + monthly.setClosedCaseResolvedTotal(resolve); + monthly.setClosedCaseUnresolvedTotal(unResolve); + if(total > NumConstant.ZERO) { + BigDecimal resolved = new BigDecimal(resolve); + BigDecimal unresolved = new BigDecimal(unResolve); + BigDecimal closed = new BigDecimal(total); + monthly.setClosedCaseResolvedPercent(resolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + monthly.setClosedCaseUnresolvedPercent(unresolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + } + + //各指标增量统计 + for (int i = 0; i < gridMonthlyIncListList.size(); i++) { + FactIssueGridMonthlyDTO dto = gridMonthlyIncListList.get(i); + if (grid.getId().equals(dto.getGridId())) { + monthly.setIssueIncr(dto.getIssueIncr()); + monthly.setShiftProjectIncr(dto.getShiftProjectIncr()); + monthly.setClosedIncr(dto.getClosedIncr()); + monthly.setClosedResolvedIncr(dto.getClosedResolvedIncr()); + monthly.setClosedUnresolvedIncr(dto.getClosedUnresolvedIncr()); + monthly.setClosedCaseIncr(dto.getClosedCaseIncr()); + monthly.setClosedCaseResolvedIncr(dto.getClosedCaseResolvedIncr()); + monthly.setClosedCaseUnresolvedIncr(dto.getClosedCaseUnresolvedIncr()); + gridMonthlyIncListList.remove(i); + break; + } + } + + monthly.setCustomerId(grid.getCustomerId()); + monthly.setAgencyId(grid.getAgencyId()); + monthly.setGridId(grid.getId()); + list.add(monthly); + } + factIssueGridMonthlyService.saveList(list); + } + + /** + * 已关闭项目已解决未解决统计 + * @author zhaoqifeng + * @date 2020/6/22 10:35 + * @param resolveMap + * @param unResolveMap + * @param resolveIncMap + * @param unResolveIncMap + * @param grid + * @param entity + * @return void + */ + private void saveClosedProject(Map resolveMap, Map unResolveMap, Map resolveIncMap, + Map unResolveIncMap, DimGridEntity grid, FactIssueGridDailyEntity entity) { + int resolve = null == resolveMap.get(grid.getId())?0:resolveMap.get(grid.getId()).intValue(); + int unResolve = null == unResolveMap.get(grid.getId())?0:unResolveMap.get(grid.getId()).intValue(); + int resolveInc = null == resolveIncMap.get(grid.getId())?0:resolveIncMap.get(grid.getId()).intValue(); + int unResolveInc = null == unResolveIncMap.get(grid.getId())?0:unResolveIncMap.get(grid.getId()).intValue(); + int total = resolve + unResolve; + int inc = resolveInc + unResolveInc; + entity.setClosedCaseTotal(total); + entity.setClosedCaseResolvedTotal(resolve); + entity.setClosedCaseUnresolvedTotal(unResolve); + entity.setClosedCaseIncr(inc); + entity.setClosedCaseResolvedIncr(resolveInc); + entity.setClosedCaseUnresolvedIncr(unResolveInc); + if(total != NumConstant.ZERO) { + BigDecimal resolved = new BigDecimal(resolve); + BigDecimal unresolved = new BigDecimal(unResolve); + BigDecimal closed = new BigDecimal(total); + entity.setClosedCaseResolvedPercent(resolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedCaseUnresolvedPercent(unresolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + } + } + + /** + * 已关闭议题已解决未解决增量统计 + * + * @param list + * @param grid + * @param entity + * @return void + * @author zhaoqifeng + * @date 2020/6/19 15:56 + */ + private void saveGridClosedInc(List list, DimGridEntity grid, FactIssueGridDailyEntity entity) { + //已解决数 + int resolvedInc = NumConstant.ZERO; + //未解决数 + int unresolvedInc = NumConstant.ZERO; + + for (IssueGridDTO dto : list) { + if (grid.getId().equals(dto.getGridId())) { + if (IssueConstant.RESLOVED.equals(dto.getStatus())) { + //表决中议题数量 + resolvedInc = dto.getCount(); + } else if (IssueConstant.UNRESLOVED.equals(dto.getStatus())) { + //已转项目议题数量 + unresolvedInc = dto.getCount(); + } + } + } + entity.setClosedResolvedIncr(resolvedInc); + entity.setClosedUnresolvedIncr(unresolvedInc); + } + + /** + * 已关闭议题已解决未解决总量级占比统计 + * + * @param list + * @param grid + * @param entity + * @return void + * @author zhaoqifeng + * @date 2020/6/19 15:56 + */ + private void saveGridClosedTotal(List list, DimGridEntity grid, FactIssueGridDailyEntity entity) { + //已解决数 + int resolvedCount = NumConstant.ZERO; + //未解决数 + int unresolvedCount = NumConstant.ZERO; + + for (IssueGridDTO dto : list) { + if (grid.getId().equals(dto.getGridId())) { + if (IssueConstant.RESLOVED.equals(dto.getStatus())) { + //已解决议题数量 + resolvedCount = dto.getCount(); + } else if (IssueConstant.UNRESLOVED.equals(dto.getStatus())) { + //未解决议题数量 + unresolvedCount = dto.getCount(); + } + } + } + entity.setClosedResolvedTotal(resolvedCount); + entity.setClosedUnresolvedTotal(unresolvedCount); + if(entity.getClosedTotal() > NumConstant.ZERO) { + BigDecimal resolved = new BigDecimal(resolvedCount); + BigDecimal unresolved = new BigDecimal(unresolvedCount); + BigDecimal closed = new BigDecimal(entity.getClosedTotal()); + entity.setClosedResolvedPercent(resolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedUnresolvedPercent(unresolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + } + } + + /** + * 网格议题增量统计 + * + * @param list + * @param grid + * @param entity + * @return void + * @author zhaoqifeng + * @date 2020/6/19 15:57 + */ + private void saveGridInc(List list, DimGridEntity grid, FactIssueGridDailyEntity entity) { + //表决中增量 + int votingInc = NumConstant.ZERO; + //已转项目增量 + int shiftInc = NumConstant.ZERO; + //已关闭增量 + int closedInc = NumConstant.ZERO; + for (IssueGridDTO dto : list) { + if (grid.getId().equals(dto.getGridId())) { + if (IssueConstant.VOTING.equals(dto.getStatus())) { + //表决中议题数量 + votingInc = dto.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(dto.getStatus())) { + //已转项目议题数量 + shiftInc = dto.getCount(); + } else { + //已关闭议题数量 + closedInc = dto.getCount(); + } + } + } + int issueInc = votingInc + shiftInc + closedInc; + entity.setVotingIncr(votingInc); + entity.setShiftProjectIncr(shiftInc); + entity.setClosedIncr(closedInc); + entity.setIssueIncr(issueInc); + } + + /** + * 网格议题总量统计 + * + * @param list + * @param grid + * @param entity + * @return void + * @author zhaoqifeng + * @date 2020/6/19 15:57 + */ + private void saveGridTotal(List list, DimGridEntity grid, FactIssueGridDailyEntity entity) { + //表决中数量 + Integer votingCount = NumConstant.ZERO; + //已转项目数量 + Integer shiftCount = NumConstant.ZERO; + //已关闭数量 + Integer closedCount = NumConstant.ZERO; + for (IssueGridDTO dto : list) { + if (dto.getGridId().equals(grid.getId())) { + if (IssueConstant.VOTING.equals(dto.getStatus())) { + //表决中议题数量 + votingCount = dto.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(dto.getStatus())) { + //已转项目议题数量 + shiftCount = dto.getCount(); + } else { + //已关闭议题数量 + closedCount = dto.getCount(); + } + } + } + int issueTotal = votingCount + shiftCount + closedCount; + entity.setVotingTotal(votingCount); + entity.setShiftProjectTotal(shiftCount); + entity.setClosedTotal(closedCount); + entity.setIssueTotal(issueTotal); + if (NumConstant.ZERO != issueTotal) { + BigDecimal voting = new BigDecimal(votingCount); + BigDecimal shift = new BigDecimal(shiftCount); + BigDecimal closed = new BigDecimal(closedCount); + BigDecimal total = new BigDecimal(issueTotal); + entity.setVotingPercent(voting.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setShiftProjectPercent(shift.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedPercent(closed.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + + } + } + + /** + * 已关闭项目已解决未解决增量统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 17:23 + */ + private void saveClosedProjectInc(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //已解决数 + int resolvedCount = NumConstant.ZERO; + //未解决数 + int unresolvedCount = NumConstant.ZERO; + + for (ProjectAgencyDTO project : list) { + if (agency.getId().equals(project.getAgencyId()) || project.getPIds().contains(pIds)) { + if (IssueConstant.RESLOVED.equals(project.getStatus())) { + //已解决数量 + resolvedCount = resolvedCount + project.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(project.getStatus())) { + //未解决数量 + unresolvedCount = unresolvedCount + project.getCount(); + } + } + } + int total = resolvedCount + unresolvedCount; + entity.setClosedCaseResolvedIncr(resolvedCount); + entity.setClosedCaseUnresolvedIncr(unresolvedCount); + entity.setClosedCaseIncr(total); + } + + /** + * 已关闭项目已解决未解决统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 17:23 + */ + private void saveClosedProjectTotal(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //已解决数 + int resolvedCount = NumConstant.ZERO; + //未解决数 + int unresolvedCount = NumConstant.ZERO; + + for (ProjectAgencyDTO project : list) { + if (agency.getId().equals(project.getAgencyId()) || project.getPIds().contains(pIds)) { + if (IssueConstant.RESLOVED.equals(project.getStatus())) { + //已解决数量 + resolvedCount = resolvedCount + project.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(project.getStatus())) { + //未解决数量 + unresolvedCount = unresolvedCount + project.getCount(); + } + } + } + int total = resolvedCount + unresolvedCount; + entity.setClosedCaseResolvedTotal(resolvedCount); + entity.setClosedCaseUnresolvedTotal(unresolvedCount); + entity.setClosedCaseTotal(total); + if (total > NumConstant.ZERO) { + BigDecimal resolved = new BigDecimal(resolvedCount); + BigDecimal unresolved = new BigDecimal(unresolvedCount); + BigDecimal closed = new BigDecimal(total); + entity.setClosedCaseResolvedPercent(resolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedCaseUnresolvedPercent(unresolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + } + } + + /** + * 议题各状态增量统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 15:55 + */ + private void saveInc(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //表决中增量 + int votingInc = NumConstant.ZERO; + //已转项目增量 + int shiftInc = NumConstant.ZERO; + //已关闭增量 + int closedInc = NumConstant.ZERO; + for (IssueAgencyDTO issueAgency : list) { + if (agency.getId().equals(issueAgency.getAgencyId()) || issueAgency.getPIds().contains(pIds)) { + if (IssueConstant.VOTING.equals(issueAgency.getStatus())) { + //表决中议题数量 + votingInc = votingInc + issueAgency.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(issueAgency.getStatus())) { + //已转项目议题数量 + shiftInc = shiftInc + issueAgency.getCount(); + } else { + //已关闭议题数量 + closedInc = closedInc + issueAgency.getCount(); + } + } + } + int issueInc = votingInc + shiftInc + closedInc; + entity.setVotingIncr(votingInc); + entity.setShiftProjectIncr(shiftInc); + entity.setClosedIncr(closedInc); + entity.setIssueIncr(issueInc); + } + + /** + * 议题各状态数量统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 15:54 + */ + private void saveTotal(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //表决中数量 + Integer votingCount = NumConstant.ZERO; + //已转项目数量 + Integer shiftCount = NumConstant.ZERO; + //已关闭数量 + Integer closedCount = NumConstant.ZERO; + + for (IssueAgencyDTO issueAgency : list) { + if (agency.getId().equals(issueAgency.getAgencyId()) || issueAgency.getPIds().contains(pIds)) { + if (IssueConstant.VOTING.equals(issueAgency.getStatus())) { + //表决中议题数量 + votingCount = votingCount + issueAgency.getCount(); + } else if (IssueConstant.SHIFT_PROJECT.equals(issueAgency.getStatus())) { + //已转项目议题数量 + shiftCount = shiftCount + issueAgency.getCount(); + } else { + //已关闭议题数量 + closedCount = closedCount + issueAgency.getCount(); + } + } + } + int issueTotal = votingCount + shiftCount + closedCount; + entity.setVotingTotal(votingCount); + entity.setShiftProjectTotal(shiftCount); + entity.setClosedTotal(closedCount); + entity.setIssueTotal(issueTotal); + if (NumConstant.ZERO != issueTotal) { + BigDecimal voting = new BigDecimal(votingCount); + BigDecimal shift = new BigDecimal(shiftCount); + BigDecimal closed = new BigDecimal(closedCount); + BigDecimal total = new BigDecimal(issueTotal); + entity.setVotingPercent(voting.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setShiftProjectPercent(shift.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedPercent(closed.divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + + } + } + + /** + * 已关闭议题中已解决和未解决总数统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 15:48 + */ + private void saveClosedTotal(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //已解决数 + int resolvedCount = NumConstant.ZERO; + //未解决数 + int unresolvedCount = NumConstant.ZERO; + + for (IssueAgencyDTO issueAgency : list) { + if (agency.getId().equals(issueAgency.getAgencyId()) || issueAgency.getPIds().contains(pIds)) { + if (IssueConstant.RESLOVED.equals(issueAgency.getStatus())) { + //表决中议题数量 + resolvedCount = resolvedCount + issueAgency.getCount(); + } else if (IssueConstant.UNRESLOVED.equals(issueAgency.getStatus())) { + //已转项目议题数量 + unresolvedCount = unresolvedCount + issueAgency.getCount(); + } + } + } + entity.setClosedResolvedTotal(resolvedCount); + entity.setClosedUnresolvedTotal(unresolvedCount); + if (entity.getClosedTotal() > NumConstant.ZERO) { + BigDecimal resolved = new BigDecimal(resolvedCount); + BigDecimal unresolved = new BigDecimal(unresolvedCount); + BigDecimal closed = new BigDecimal(entity.getClosedTotal()); + entity.setClosedResolvedPercent(resolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + entity.setClosedUnresolvedPercent(unresolved.divide(closed, NumConstant.SIX, RoundingMode.HALF_UP)); + } + } + + /** + * 已关闭议题中已解决和未解决增量统计 + * + * @param list + * @param agency + * @param entity + * @param pIds + * @return void + * @author zhaoqifeng + * @date 2020/6/18 15:48 + */ + private void saveClosedInc(List list, DimAgencyDTO agency, FactIssueAgencyDailyEntity entity, String pIds) { + //已解决数 + int resolvedInc = NumConstant.ZERO; + //未解决数 + int unresolvedInc = NumConstant.ZERO; + + for (IssueAgencyDTO issueAgency : list) { + if (agency.getId().equals(issueAgency.getAgencyId()) || issueAgency.getPIds().contains(pIds)) { + if (IssueConstant.RESLOVED.equals(issueAgency.getStatus())) { + //表决中议题数量 + resolvedInc = resolvedInc + issueAgency.getCount(); + } else if (IssueConstant.UNRESLOVED.equals(issueAgency.getStatus())) { + //已转项目议题数量 + unresolvedInc = unresolvedInc + issueAgency.getCount(); + } + } + } + entity.setClosedResolvedIncr(resolvedInc); + entity.setClosedUnresolvedIncr(unresolvedInc); + } + + + /** + * 初始化数据 + * + * @param dimIdBean + * @return com.epmet.entity.stats.FactIssueAgencyDailyEntity + * @author zhaoqifeng + * @date 2020/6/18 10:57 + */ + private FactIssueAgencyDailyEntity initIssueAgencyDaily(DimIdGenerator.DimIdBean dimIdBean) { + FactIssueAgencyDailyEntity entity = new FactIssueAgencyDailyEntity(); + entity.setYearId(dimIdBean.getYearId()); + entity.setQuarterId(dimIdBean.getQuarterId()); + entity.setMonthId(dimIdBean.getMonthId()); + entity.setWeekId(dimIdBean.getWeekId()); + entity.setDateId(dimIdBean.getDateId()); + entity.setIssueTotal(NumConstant.ZERO); + entity.setIssueIncr(NumConstant.ZERO); + entity.setVotingTotal(NumConstant.ZERO); + entity.setVotingIncr(NumConstant.ZERO); + entity.setVotingPercent(BigDecimal.ZERO); + entity.setShiftProjectTotal(NumConstant.ZERO); + entity.setShiftProjectIncr(NumConstant.ZERO); + entity.setShiftProjectPercent(BigDecimal.ZERO); + entity.setClosedIncr(NumConstant.ZERO); + entity.setClosedResolvedIncr(NumConstant.ZERO); + entity.setClosedPercent(BigDecimal.ZERO); + entity.setClosedUnresolvedIncr(NumConstant.ZERO); + entity.setClosedTotal(NumConstant.ZERO); + entity.setClosedResolvedTotal(NumConstant.ZERO); + entity.setClosedUnresolvedTotal(NumConstant.ZERO); + entity.setClosedResolvedPercent(BigDecimal.ZERO); + entity.setClosedUnresolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseIncr(NumConstant.ZERO); + entity.setClosedCaseResolvedIncr(NumConstant.ZERO); + entity.setClosedCaseUnresolvedIncr(NumConstant.ZERO); + entity.setClosedCaseTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedTotal(NumConstant.ZERO); + entity.setClosedCaseUnresolvedTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseUnresolvedPercent(BigDecimal.ZERO); + return entity; + } + + /** + * 初始化数据 + * + * @param dimIdBean + * @return com.epmet.entity.stats.FactIssueAgencyMonthlyEntity + * @author zhaoqifeng + * @date 2020/6/18 10:58 + */ + private FactIssueAgencyMonthlyEntity initIssueAgencyMonthly(DimIdGenerator.DimIdBean dimIdBean) { + FactIssueAgencyMonthlyEntity entity = new FactIssueAgencyMonthlyEntity(); + entity.setYearId(dimIdBean.getYearId()); + entity.setQuarterId(dimIdBean.getQuarterId()); + entity.setMonthId(dimIdBean.getMonthId()); + entity.setIssueTotal(NumConstant.ZERO); + entity.setIssueIncr(NumConstant.ZERO); + entity.setVotingTotal(NumConstant.ZERO); + entity.setVotingIncr(NumConstant.ZERO); + entity.setVotingPercent(BigDecimal.ZERO); + entity.setShiftProjectTotal(NumConstant.ZERO); + entity.setShiftProjectIncr(NumConstant.ZERO); + entity.setShiftProjectPercent(BigDecimal.ZERO); + entity.setClosedIncr(NumConstant.ZERO); + entity.setClosedResolvedIncr(NumConstant.ZERO); + entity.setClosedUnresolvedIncr(NumConstant.ZERO); + entity.setClosedTotal(NumConstant.ZERO); + entity.setClosedResolvedTotal(NumConstant.ZERO); + entity.setClosedUnresolvedTotal(NumConstant.ZERO); + entity.setClosedPercent(BigDecimal.ZERO); + entity.setClosedResolvedPercent(BigDecimal.ZERO); + entity.setClosedUnresolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseIncr(NumConstant.ZERO); + entity.setClosedCaseResolvedIncr(NumConstant.ZERO); + entity.setClosedCaseUnresolvedIncr(NumConstant.ZERO); + entity.setClosedCaseTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedTotal(NumConstant.ZERO); + entity.setClosedCaseUnresolvedTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseUnresolvedPercent(BigDecimal.ZERO); + return entity; + } + + private FactIssueGridDailyEntity initIssueGridDaily(DimIdGenerator.DimIdBean dimIdBean) { + FactIssueGridDailyEntity entity = new FactIssueGridDailyEntity(); + entity.setYearId(dimIdBean.getYearId()); + entity.setQuarterId(dimIdBean.getQuarterId()); + entity.setMonthId(dimIdBean.getMonthId()); + entity.setWeekId(dimIdBean.getWeekId()); + entity.setDateId(dimIdBean.getDateId()); + entity.setIssueTotal(NumConstant.ZERO); + entity.setIssueIncr(NumConstant.ZERO); + entity.setVotingTotal(NumConstant.ZERO); + entity.setVotingIncr(NumConstant.ZERO); + entity.setVotingPercent(BigDecimal.ZERO); + entity.setShiftProjectTotal(NumConstant.ZERO); + entity.setShiftProjectIncr(NumConstant.ZERO); + entity.setShiftProjectPercent(BigDecimal.ZERO); + entity.setClosedIncr(NumConstant.ZERO); + entity.setClosedResolvedIncr(NumConstant.ZERO); + entity.setClosedUnresolvedIncr(NumConstant.ZERO); + entity.setClosedTotal(NumConstant.ZERO); + entity.setClosedResolvedTotal(NumConstant.ZERO); + entity.setClosedUnresolvedTotal(NumConstant.ZERO); + entity.setClosedPercent(BigDecimal.ZERO); + entity.setClosedResolvedPercent(BigDecimal.ZERO); + entity.setClosedUnresolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseIncr(NumConstant.ZERO); + entity.setClosedCaseResolvedIncr(NumConstant.ZERO); + entity.setClosedCaseUnresolvedIncr(NumConstant.ZERO); + entity.setClosedCaseTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedTotal(NumConstant.ZERO); + entity.setClosedCaseUnresolvedTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseUnresolvedPercent(BigDecimal.ZERO); + return entity; + } + + private FactIssueGridMonthlyEntity initIssueGridMonthly(DimIdGenerator.DimIdBean dimIdBean) { + FactIssueGridMonthlyEntity entity = new FactIssueGridMonthlyEntity(); + entity.setYearId(dimIdBean.getYearId()); + entity.setQuarterId(dimIdBean.getQuarterId()); + entity.setMonthId(dimIdBean.getMonthId()); + entity.setIssueTotal(NumConstant.ZERO); + entity.setIssueIncr(NumConstant.ZERO); + entity.setVotingTotal(NumConstant.ZERO); + entity.setVotingIncr(NumConstant.ZERO); + entity.setVotingPercent(BigDecimal.ZERO); + entity.setShiftProjectTotal(NumConstant.ZERO); + entity.setShiftProjectIncr(NumConstant.ZERO); + entity.setShiftProjectPercent(BigDecimal.ZERO); + entity.setClosedIncr(NumConstant.ZERO); + entity.setClosedResolvedIncr(NumConstant.ZERO); + entity.setClosedUnresolvedIncr(NumConstant.ZERO); + entity.setClosedTotal(NumConstant.ZERO); + entity.setClosedResolvedTotal(NumConstant.ZERO); + entity.setClosedUnresolvedTotal(NumConstant.ZERO); + entity.setClosedPercent(BigDecimal.ZERO); + entity.setClosedResolvedPercent(BigDecimal.ZERO); + entity.setClosedUnresolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseIncr(NumConstant.ZERO); + entity.setClosedCaseResolvedIncr(NumConstant.ZERO); + entity.setClosedCaseUnresolvedIncr(NumConstant.ZERO); + entity.setClosedCaseTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedTotal(NumConstant.ZERO); + entity.setClosedCaseUnresolvedTotal(NumConstant.ZERO); + entity.setClosedCaseResolvedPercent(BigDecimal.ZERO); + entity.setClosedCaseUnresolvedPercent(BigDecimal.ZERO); + return entity; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java new file mode 100644 index 0000000000..1e5cac4aac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -0,0 +1,627 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.ProjectConstant; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.entity.issue.IssueEntity; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.entity.project.ProjectProcessEntity; +import com.epmet.entity.stats.*; +import com.epmet.service.Issue.IssueService; +import com.epmet.service.StatsProjectService; +import com.epmet.service.project.ProjectProcessService; +import com.epmet.service.project.ProjectService; +import com.epmet.service.stats.*; +import com.epmet.util.DimIdGenerator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.NumberFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 数据统计-项目(独立于任何具体数据源外层的service) + * + * @author sun + */ +@Service +public class StatsProjectServiceImpl implements StatsProjectService { + + protected static final Logger log = LoggerFactory.getLogger(StatsProjectServiceImpl.class); + @Autowired + private DimCustomerService dimCustomerService; + @Autowired + private DimAgencyService dimAgencyService; + @Autowired + private DimGridService dimGridService; + @Autowired + private ProjectService projectService; + @Autowired + private ProjectProcessService projectProcessService; + @Autowired + private IssueService issueService; + @Autowired + private FactAgencyProjectDailyService factAgencyProjectDailyService; + @Autowired + private FactAgencyProjectMonthlyService factAgencyProjectMonthlyService; + @Autowired + private FactGridProjectDailyService factGridProjectDailyService; + @Autowired + private FactGridProjectMonthlyService factGridProjectMonthlyService; + + /** + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + @Override + public void agencyProjectStats() { + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + try { + //遍历统计每一个客户数据 + customerAgencyStats(customerId); + } catch (Exception e) { + log.error("项目-机关-数据统计程序错误,对应客户Id:"+customerId, e); + log.error("Error creating model JSON", e); + } + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + } + + /** + * @Author sun + * @Description 分别统计机关日/月数据 + **/ + public void customerAgencyStats(String customerId) { + Date date = yesterDay(); + //1:查询各维度表Id,方便使用 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + + //2:根据客户Id查询机关维度表数据 + DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); + dimAgencyDTO.setCustomerId(customerId); + List dimAgencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); + + //3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据) + ProjectEntity projectEntity = new ProjectEntity(); + projectEntity.setCustomerId(customerId); + projectEntity.setCreatedTime(date); + projectEntity.setStatus(ProjectConstant.CLOSED); + List projectList = projectService.getProjectList(projectEntity); + + //4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据) + List processList = projectProcessService.getProcessList(projectEntity); + + //5:机关层级日月统计 + if (null != dimAgencyList && dimAgencyList.size() > NumConstant.ZERO) { + //5.1:执行机关日数据统计 + agencyDateProjectStats(customerId, dimId, dimAgencyList, projectList, processList); + + //5.2:执行机关月数据统计 + //if (Calendar.getInstance().get(Calendar.DATE) == 1) { + agencyMonthProjectStats(customerId, dimId, dimAgencyList); + //} + } + + } + + /** + * @param customerId + * @Author sun + * @Description 数据-项目-机关日统计 + **/ + private String agencyDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, List dimAgencyList, List projectList, List processList) { + Date date = yesterDay(); + //批量机关日统计新增对象 + List projectDateEntityList = new ArrayList<>(); + //计算百分比使用,保留小数点后两位 + NumberFormat numberFormat = NumberFormat.getInstance(); + numberFormat.setMaximumFractionDigits(6); + + //1:遍历机关维度数据,统计每个机关各项指标数 + for (DimAgencyDTO agency : dimAgencyList) { + //1.1:存放当前机关及所有下级机关Id + Map map = new HashMap<>(); + map.put(agency.getId(), agency.getId()); + String subPids = ((null == agency.getPids() || "".equals(agency.getPids())) ? agency.getId() : agency.getPids() + ":" + agency.getId()); + dimAgencyList.forEach(sub -> { + if (sub.getPids().contains(subPids)) { + map.put(sub.getId(), sub.getId()); + } + }); + //机关下截止当前日期的项目总数、已结案总数、已结案已解决总数、已结案未解决总数 + AtomicInteger projectTotal = new AtomicInteger(0); + AtomicInteger closedTotal = new AtomicInteger(0); + AtomicInteger resolvedTotal = new AtomicInteger(0); + AtomicInteger unResolvedTotal = new AtomicInteger(0); + //日增量中项目总数、已结案总数、已结案已解决总数、已结案未解决总数 + AtomicInteger projectIncr = new AtomicInteger(0); + AtomicInteger closedIncr = new AtomicInteger(0); + AtomicInteger resolvedIncr = new AtomicInteger(0); + AtomicInteger unResolvedIncr = new AtomicInteger(0); + //存放已结案项目Id,用于统计已结案中已解决、未解决数 + Map closeMap = new HashMap<>(); + //存放前一日已结案项目Id,用于统计日增量中已结案项目的已解决、未解决数量 + Map closeDateMap = new HashMap<>(); + //1.2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量 + processList.forEach(process -> { + //当前机关及下级 + if (map.containsKey(process.getAgencyId())) { + //进展表中是创建项目状态的数据总数即为客户该机关下项目总数 + if (ProjectConstant.CREATED.equals(process.getOperation())) { + projectTotal.addAndGet(1); + if (date.equals(process.getCreatedTime())) { + //日增量总数 + projectIncr.addAndGet(1); + } + } + if (ProjectConstant.CLOSE.equals(process.getOperation())) { + //截止当前日期的结案总数 + closedTotal.addAndGet(1); + closeMap.put(process.getProjectId(), process.getProjectId()); + if (date.equals(process.getCreatedTime())) { + //日增量已结案总数 + closedIncr.addAndGet(1); + closeDateMap.put(process.getProjectId(), process.getProjectId()); + } + } + } + }); + //1.3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量 + projectList.forEach(project -> { + //当前机关及下级 + if (map.containsKey(project.getAgencyId())) { + if (closeMap.containsKey(project.getId())) { + //已结案已解决 + if (ProjectConstant.RESOLVED.equals(project.getClosedStatus())) { + //截止当日的已结案已解决总量 + resolvedTotal.addAndGet(1); + if (closeDateMap.containsKey(project.getId())) { + //日增量中的已结案已解决总量 + resolvedIncr.addAndGet(1); + } + } + //已结案未解决 + if (ProjectConstant.UNRESOLVED.equals(project.getClosedStatus())) { + //截止当日的已结案未解决总量 + unResolvedTotal.addAndGet(1); + if (closeDateMap.containsKey(project.getId())) { + //日增量中的已结案未解决总量 + unResolvedIncr.addAndGet(1); + } + } + } + } + }); + + //1.4:封装机关日数据对象 + FactAgencyProjectDailyEntity agencyDailyEntity = new FactAgencyProjectDailyEntity(); + agencyDailyEntity.setCustomerId(customerId); + agencyDailyEntity.setAgencyId(agency.getId()); + agencyDailyEntity.setParentId(agency.getPid()); + agencyDailyEntity.setDateId(dimId.getDateId()); + agencyDailyEntity.setWeekId(dimId.getWeekId()); + agencyDailyEntity.setMonthId(dimId.getMonthId()); + agencyDailyEntity.setQuarterId(dimId.getQuarterId()); + agencyDailyEntity.setYearId(dimId.getYearId()); + agencyDailyEntity.setProjectTotal(projectTotal.intValue()); + agencyDailyEntity.setPendingTotal(projectTotal.intValue() - closedTotal.intValue()); + agencyDailyEntity.setClosedTotal(closedTotal.intValue()); + agencyDailyEntity.setResolvedTotal(resolvedTotal.intValue()); + agencyDailyEntity.setUnresolvedTotal(unResolvedTotal.intValue()); + if (projectTotal.intValue() > NumConstant.ZERO) { + agencyDailyEntity.setPendingRatio(new BigDecimal(numberFormat.format((float) agencyDailyEntity.getPendingTotal() / (float) projectTotal.intValue()))); + agencyDailyEntity.setClosedRatio(new BigDecimal(numberFormat.format((float) closedTotal.intValue() / (float) projectTotal.intValue()))); + } + if (closedTotal.intValue() > NumConstant.ZERO) { + agencyDailyEntity.setResolvedRatio(new BigDecimal(numberFormat.format((float) resolvedTotal.intValue() / (float) closedTotal.intValue()))); + agencyDailyEntity.setUnresolvedRatio(new BigDecimal(numberFormat.format((float) unResolvedTotal.intValue() / (float) closedTotal.intValue()))); + } + agencyDailyEntity.setProjectIncr(projectIncr.intValue()); + agencyDailyEntity.setPendingIncr(projectIncr.intValue() - closedIncr.intValue()); + agencyDailyEntity.setClosedIncr(closedIncr.intValue()); + agencyDailyEntity.setResolvedIncr(resolvedIncr.intValue()); + agencyDailyEntity.setUnresolvedIncr(unResolvedIncr.intValue()); + + projectDateEntityList.add(agencyDailyEntity); + } + + //2:批量保存数据,先删后增 + if (null != projectDateEntityList && projectDateEntityList.size() > NumConstant.ZERO) { + //2.1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + FactAgencyProjectDailyEntity delEntity = new FactAgencyProjectDailyEntity(); + delEntity.setCustomerId(customerId); + delEntity.setDateId(dimId.getDateId()); + factAgencyProjectDailyService.delDateProject(delEntity); + + //2.2:批量保存机关日统计数据 + factAgencyProjectDailyService.insertBatch(projectDateEntityList); + } + + return null; + } + + /** + * @param customerId + * @Author sun + * @Description 数据-项目-机关月统计 + **/ + private String agencyMonthProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, List dimAgencyList) { + Date date = yesterDay(); + //批量月数据新增对象 + List monthlyEntityList = new ArrayList<>(); + + //1:获取昨天日期所在月份的起始日期和结束日期 + MonthProjectListFormDTO formDTO = new MonthProjectListFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setMonthId(dimId.getMonthId()); + + //2:遍历机关维度数据,分别统计每个组织月数据 + for (DimAgencyDTO agency : dimAgencyList) { + //2.1:查询上一月机关日统计数据,按时间倒序 + formDTO.setAgencyId(agency.getId()); + List projectDailyList = factAgencyProjectDailyService.getMonthProjectList(formDTO); + + //2.2:汇总统计上一月机关月统计数据 + //月增量中项目总数、处理中总数、已结案总数、已结案已解决总数、已结案未解决总数 + int pendingIncr = 0; + int closedIncr = 0; + int resolvedIncr = 0; + int unResolvedIncr = 0; + for (FactAgencyProjectDailyEntity daily : projectDailyList) { + pendingIncr += daily.getPendingIncr(); + closedIncr += daily.getClosedIncr(); + resolvedIncr += daily.getResolvedIncr(); + unResolvedIncr += daily.getUnresolvedIncr(); + } + //2.3:实体字段属性赋值 + FactAgencyProjectMonthlyEntity monthlyEntity = new FactAgencyProjectMonthlyEntity(); + monthlyEntity.setCustomerId(customerId); + monthlyEntity.setAgencyId(agency.getId()); + monthlyEntity.setParentId(agency.getPid()); + monthlyEntity.setMonthId(dimId.getMonthId()); + monthlyEntity.setQuarterId(dimId.getQuarterId()); + monthlyEntity.setYearId(dimId.getYearId()); + if (null != projectDailyList && projectDailyList.size() > NumConstant.ZERO) { + FactAgencyProjectDailyEntity entity = projectDailyList.get(0); + monthlyEntity.setProjectTotal(entity.getProjectTotal()); + monthlyEntity.setPendingTotal(entity.getPendingTotal()); + monthlyEntity.setPendingRatio(entity.getPendingRatio()); + monthlyEntity.setClosedTotal(entity.getClosedTotal()); + monthlyEntity.setClosedRatio(entity.getClosedRatio()); + monthlyEntity.setResolvedTotal(entity.getResolvedTotal()); + monthlyEntity.setResolvedRatio(entity.getResolvedRatio()); + monthlyEntity.setUnresolvedTotal(entity.getUnresolvedTotal()); + monthlyEntity.setUnresolvedRatio(entity.getUnresolvedRatio()); + monthlyEntity.setProjectIncr(pendingIncr + closedIncr); + monthlyEntity.setPendingIncr(pendingIncr); + monthlyEntity.setClosedIncr(closedIncr); + monthlyEntity.setResolvedIncr(resolvedIncr); + monthlyEntity.setUnresolvedIncr(unResolvedIncr); + } + + monthlyEntityList.add(monthlyEntity); + } + + //3:批量新增数据,先删后增 + if (null != monthlyEntityList && monthlyEntityList.size() > NumConstant.ZERO) { + //3.1:根据客户Id、月份Id批量删除一下可能存在的历史数据 + FactAgencyProjectMonthlyEntity delEntity = new FactAgencyProjectMonthlyEntity(); + delEntity.setCustomerId(customerId); + delEntity.setMonthId(dimId.getMonthId()); + factAgencyProjectMonthlyService.delMonthProject(delEntity); + + //3.2:批量保存机关月统计数据 + factAgencyProjectMonthlyService.insertBatch(monthlyEntityList); + } + + return null; + } + + + /** + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + @Override + public void gridProjectStats() { + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + try { + //遍历统计每一个客户数据 + customerGridStats(customerId); + } catch (Exception e) { + log.error("项目-网格-数据统计程序错误,对应客户Id:"+customerId, e); + log.error("Error creating model JSON", e); + } + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + } + + /** + * @Author sun + * @Description 分别统计网格日/月数据 + **/ + public void customerGridStats(String customerId) { + Date date = yesterDay(); + //1:查询各维度表Id,方便使用 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + + //2:根据客户Id查询网格维度表数据 + List dimGridList = dimGridService.getGridListByCustomerId(customerId); + + //3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据) + ProjectEntity projectEntity = new ProjectEntity(); + projectEntity.setCustomerId(customerId); + projectEntity.setCreatedTime(date); + projectEntity.setStatus(ProjectConstant.CLOSED); + List projectList = projectService.getProjectList(projectEntity); + + //4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据) + List processList = projectProcessService.getProcessList(projectEntity); + + //5:网格层级日月统计 + if (null != dimGridList && dimGridList.size() > NumConstant.ZERO) { + //5.1:执行网格日数据统计 + gridDateProjectStats(customerId, dimId, dimGridList, projectList, processList); + + //5.2:执行网格月数据统计 + //if (Calendar.getInstance().get(Calendar.DATE) == 1) { + gridMonthProjectStats(customerId, dimId, dimGridList); + //} + } + + } + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-网格日统计 + **/ + private String gridDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, List dimGridList, List projectList, List processList) { + Date date = yesterDay(); + //批量网格日统计新增对象 + List gridDateEntityList = new ArrayList<>(); + //计算百分比使用,保留小数点后两位 + NumberFormat numberFormat = NumberFormat.getInstance(); + numberFormat.setMaximumFractionDigits(6); + + //1:根据客户Id查询议题库已转项目的网格项目关系数据 + List gridProjectList = issueService.getGridProjectList(customerId); + + //2:遍历网格维度数据,统计每个网格各项指标数据 + for (DimGridEntity grid : dimGridList) { + //2.1:存放网格下的项目Id + Map map = new HashMap<>(); + gridProjectList.forEach(gridProject -> { + if (grid.getId().equals(gridProject.getGridId())) { + map.put(gridProject.getProjectId(), gridProject.getGridId()); + } + }); + //网格下截止当前日期的项目总数、已结案总数、已结案已解决总数、已结案未解决总数 + AtomicInteger projectTotal = new AtomicInteger(0); + AtomicInteger closedTotal = new AtomicInteger(0); + AtomicInteger resolvedTotal = new AtomicInteger(0); + AtomicInteger unResolvedTotal = new AtomicInteger(0); + //网格日增量中项目总数、已结案总数、已结案已解决总数、已结案未解决总数 + AtomicInteger projectIncr = new AtomicInteger(0); + AtomicInteger closedIncr = new AtomicInteger(0); + AtomicInteger resolvedIncr = new AtomicInteger(0); + AtomicInteger unResolvedIncr = new AtomicInteger(0); + //存放已结案项目Id,用于统计已结案中已解决、未解决数 + Map closeMap = new HashMap<>(); + //存放前一日已结案项目Id,用于统计日增量中已结案项目的已解决、未解决数量 + Map closeDateMap = new HashMap<>(); + //2.2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量 + //截止当日项目总数 + projectTotal.addAndGet(map.size()); + processList.forEach(process -> { + //是网格下的项目,且是已结案的 + if (map.containsKey(process.getProjectId())) { + //进展表中是创建项目状态的数据总数即为该网格下项目总数 + if (ProjectConstant.CREATED.equals(process.getOperation()) && date.equals(process.getCreatedTime())) { + //日增量总数 + projectIncr.addAndGet(1); + } + if (ProjectConstant.CLOSE.equals(process.getOperation())) { + //截止当日的已结案总数 + closedTotal.addAndGet(1); + closeMap.put(process.getProjectId(), process.getProjectId()); + if (date.equals(process.getCreatedTime())) { + //日增量中已结案总数 + closedIncr.addAndGet(1); + closeDateMap.put(process.getProjectId(), process.getProjectId()); + } + } + } + }); + //2.3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量 + projectList.forEach(project -> { + //当前机关及下级 + if (map.containsKey(project.getId())) { + if (closeMap.containsKey(project.getId())) { + //已结案已解决 + if (ProjectConstant.RESOLVED.equals(project.getClosedStatus())) { + //截止当日的已结案已解决总量 + resolvedTotal.addAndGet(1); + if (closeDateMap.containsKey(project.getId())) { + //日增量中的已结案已解决总量 + resolvedIncr.addAndGet(1); + } + } + //已结案未解决 + if (ProjectConstant.UNRESOLVED.equals(project.getClosedStatus())) { + //截止当日的已结案未解决总量 + unResolvedTotal.addAndGet(1); + if (closeDateMap.containsKey(project.getId())) { + //日增量中的已结案未解决总量 + unResolvedIncr.addAndGet(1); + } + } + } + } + }); + + //2.4:封装日数据对象 + FactGridProjectDailyEntity gridDailyEntity = new FactGridProjectDailyEntity(); + gridDailyEntity.setCustomerId(customerId); + gridDailyEntity.setAgencyId(grid.getAgencyId()); + gridDailyEntity.setGridId(grid.getId()); + gridDailyEntity.setDateId(dimId.getDateId()); + gridDailyEntity.setWeekId(dimId.getWeekId()); + gridDailyEntity.setMonthId(dimId.getMonthId()); + gridDailyEntity.setQuarterId(dimId.getQuarterId()); + gridDailyEntity.setYearId(dimId.getYearId()); + gridDailyEntity.setProjectTotal(projectTotal.intValue()); + gridDailyEntity.setPendingTotal(projectTotal.intValue() - closedTotal.intValue()); + gridDailyEntity.setClosedTotal(closedTotal.intValue()); + gridDailyEntity.setResolvedTotal(resolvedTotal.intValue()); + gridDailyEntity.setUnresolvedTotal(unResolvedTotal.intValue()); + if (projectTotal.intValue() > NumConstant.ZERO) { + gridDailyEntity.setPendingRatio(new BigDecimal(numberFormat.format((float) gridDailyEntity.getPendingTotal() / (float) projectTotal.intValue()))); + gridDailyEntity.setClosedRatio(new BigDecimal(numberFormat.format((float) closedTotal.intValue() / (float) projectTotal.intValue()))); + } + if (closedTotal.intValue() > NumConstant.ZERO) { + gridDailyEntity.setResolvedRatio(new BigDecimal(numberFormat.format((float) resolvedTotal.intValue() / (float) closedTotal.intValue()))); + gridDailyEntity.setUnresolvedRatio(new BigDecimal(numberFormat.format((float) unResolvedTotal.intValue() / (float) closedTotal.intValue()))); + } + gridDailyEntity.setProjectIncr(projectIncr.intValue()); + gridDailyEntity.setPendingIncr(projectIncr.intValue() - closedIncr.intValue()); + gridDailyEntity.setClosedIncr(closedIncr.intValue()); + gridDailyEntity.setResolvedIncr(resolvedIncr.intValue()); + gridDailyEntity.setUnresolvedIncr(unResolvedIncr.intValue()); + + gridDateEntityList.add(gridDailyEntity); + } + + //3:批量新增数据,先删后增 + if (null != gridDateEntityList && gridDateEntityList.size() > NumConstant.ZERO) { + //3.1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + FactAgencyProjectDailyEntity delEntity = new FactAgencyProjectDailyEntity(); + delEntity.setCustomerId(customerId); + delEntity.setDateId(dimId.getDateId()); + factGridProjectDailyService.delDateProject(delEntity); + + //3.2:批量保存网格日统计数据 + factGridProjectDailyService.insertBatch(gridDateEntityList); + } + + return null; + } + + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-网格月统计 + **/ + private String gridMonthProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, List dimGridList) { + //批量月数据新增对象 + List monthlyEntityList = new ArrayList<>(); + + //1:查询客户网格月份内日统计数据 + MonthProjectListFormDTO formDTO = new MonthProjectListFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setMonthId(dimId.getMonthId()); + + //2:遍历网格维度数据,分别统计每个网格月数据 + for (DimGridEntity grid : dimGridList) { + //2.1:查询当前月网格日统计数据,按时间倒序 + formDTO.setGridId(grid.getId()); + List projectDailyList = factGridProjectDailyService.getMonthProjectList(formDTO); + + //2.2:汇总统计上一月网格月统计数据 + //月增量中项目总数、处理中总数、已结案总数、已结案已解决总数、已结案未解决总数 + int pendingIncr = 0; + int closedIncr = 0; + int resolvedIncr = 0; + int unResolvedIncr = 0; + for (FactGridProjectDailyEntity date : projectDailyList) { + pendingIncr += date.getPendingIncr(); + closedIncr += date.getClosedIncr(); + resolvedIncr += date.getResolvedIncr(); + unResolvedIncr += date.getUnresolvedIncr(); + } + //2.3:实体字段属性赋值 + FactGridProjectMonthlyEntity monthlyEntity = new FactGridProjectMonthlyEntity(); + monthlyEntity.setCustomerId(customerId); + monthlyEntity.setAgencyId(grid.getAgencyId()); + monthlyEntity.setGridId(grid.getId()); + monthlyEntity.setMonthId(dimId.getMonthId()); + monthlyEntity.setQuarterId(dimId.getQuarterId()); + monthlyEntity.setYearId(dimId.getYearId()); + if (null != projectDailyList && projectDailyList.size() > NumConstant.ZERO) { + FactGridProjectDailyEntity entity = projectDailyList.get(0); + monthlyEntity.setProjectTotal(entity.getProjectTotal()); + monthlyEntity.setPendingTotal(entity.getPendingTotal()); + monthlyEntity.setPendingRatio(entity.getPendingRatio()); + monthlyEntity.setClosedTotal(entity.getClosedTotal()); + monthlyEntity.setClosedRatio(entity.getClosedRatio()); + monthlyEntity.setResolvedTotal(entity.getResolvedTotal()); + monthlyEntity.setResolvedRatio(entity.getResolvedRatio()); + monthlyEntity.setUnresolvedTotal(entity.getUnresolvedTotal()); + monthlyEntity.setUnresolvedRatio(entity.getUnresolvedRatio()); + monthlyEntity.setProjectIncr(pendingIncr + closedIncr); + monthlyEntity.setPendingIncr(pendingIncr); + monthlyEntity.setClosedIncr(closedIncr); + monthlyEntity.setResolvedIncr(resolvedIncr); + monthlyEntity.setUnresolvedIncr(unResolvedIncr); + } + + monthlyEntityList.add(monthlyEntity); + } + + //3:批量新增数据,先删后增 + if (null != monthlyEntityList && monthlyEntityList.size() > NumConstant.ZERO) { + //3.1:根据客户Id、月份Id批量物理删除一下可能存在的历史数据 + FactAgencyProjectMonthlyEntity delEntity = new FactAgencyProjectMonthlyEntity(); + delEntity.setCustomerId(customerId); + delEntity.setMonthId(dimId.getMonthId()); + factGridProjectMonthlyService.delMonthProject(delEntity); + + //3.2:批量保存机关月统计数据 + factGridProjectMonthlyService.insertBatch(monthlyEntityList); + } + + return null; + } + + /** + * @Author sun + * @Description 获取当前日期的前一天日期(yyyy-mm-dd) + **/ + private Date yesterDay() { + Date date = new Date(); + try { + DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.HOUR_OF_DAY, -24); + String str = sdf.format(calendar.getTime()); + date = sdf.parse(str); + } catch (Exception e) { + e.printStackTrace(); + } + return date; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java new file mode 100644 index 0000000000..19d89bbe11 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java @@ -0,0 +1,1083 @@ +package com.epmet.service.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DimAgencyConstant; +import com.epmet.constant.ProjectConstant; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.dto.voice.ArticleViewedSummaryDTO; +import com.epmet.entity.stats.*; +import com.epmet.entity.voice.ArticleEntity; +import com.epmet.entity.voice.ArticleTagsEntity; +import com.epmet.service.StatsPublicityService; +import com.epmet.service.stats.*; +import com.epmet.service.voice.ArticleService; +import com.epmet.service.voice.ArticleTagsService; +import com.epmet.service.voice.ArticleVisitRecordService; +import com.epmet.util.DimIdGenerator; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.stream.Collectors; + +/** + * desc: 宣传能力数据统计 service + * + * @date: 2020/6/17 16:08 + * @author: jianjun liu + */ +@Slf4j +@Service +public class StatsPublicityServiceImpl implements StatsPublicityService { + + @Autowired + private DimAgencyService dimAgencyService; + @Autowired + private DimCustomerService dimCustomerService; + @Autowired + private DimGridService dimGridService; + @Autowired + private DimDepartmentService dimDepartmentService; + @Autowired + private ArticleTagsService articleTagsService; + @Autowired + private ArticleService articleService; + @Autowired + private ArticleVisitRecordService articleVisitRecordService; + @Autowired + private FactArticlePublishedGridDailyService factArticlePublishedGridDailyService; + @Autowired + private FactArticlePublishedDepartmentDailyService factArticlePublishedDepartmentDailyService; + @Autowired + private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService; + @Autowired + private FactTagUsedGridDailyService factTagUsedGridDailyService; + @Autowired + private FactTagUsedDepartmentDailyService factTagUsedDepartmentDailyService; + @Autowired + private FactTagUsedAgencyDailyService factTagUsedAgencyDailyService; + @Autowired + private FactTagUsedGridMonthlyService factTagUsedGridMonthlyService; + @Autowired + private FactTagUsedDepartmentMonthlyService factTagUsedDepartmentMonthlyService; + @Autowired + private FactTagUsedAgencyMonthlyService factTagUsedAgencyMonthlyService; + @Autowired + private FactTagUsedGridQuarterlyService factTagUsedGridQuarterlyService; + @Autowired + private FactTagUsedDepartmentQuarterlyService factTagUsedDepartmentQuarterlyService; + @Autowired + private FactTagUsedAgencyQuarterlyService factTagUsedAgencyQuarterlyService; + @Autowired + private FactTagUsedGridYearlyService factTagUsedGridYearlyService; + @Autowired + private FactTagUsedDepartmentYearlyService factTagUsedDepartmentYearlyService; + @Autowired + private FactTagUsedAgencyYearlyService factTagUsedAgencyYearlyService; + @Autowired + private FactTagViewedGridDailyService factTagViewedGridDailyService; + @Autowired + private FactTagViewedAgencyDailyService factTagViewedAgencyDailyService; + @Autowired + private FactTagViewedGridMonthlyService factTagViewedGridMonthlyService; + @Autowired + private FactTagViewedAgencyMonthlyService factTagViewedAgencyMonthlyService; + @Autowired + private FactTagViewedGridQuarterlyService factTagViewedGridQuarterlyService; + @Autowired + private FactTagViewedAgencyQuarterlyService factTagViewedAgencyQuarterlyService; + @Autowired + private FactTagViewedGridYearlyService factTagViewedGridYearlyService; + @Autowired + private FactTagViewedAgencyYearlyService factTagViewedAgencyYearlyService; + @Autowired + private ExecutorService executorService; + + @Override + public Boolean articleSummaryDailyStatsjob(Date statsDate) { + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + Date finalStatsDate = statsDate; + + try { + //key:所在机关Id + Map agencySummaryMap = new HashMap<>(); + statsPublishedGridDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap); + statsPublishedDepartmentDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap); + statsPublishedAgencyDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap); + } catch (Exception e) { + log.error("articlePublishedCountDayStats exception", e); + } + + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagUsedDailyStatsjob(Date statsDate) { + + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + Date finalStatsDate = statsDate; + executorService.submit(() -> { + //统计 + statsTagUsedDaily(finalStatsDate, dimIdBean, customerId); + }); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagUsedMonthlyStatsjob(Date statsDate) { + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + executorService.submit(() -> { + try { + statsTagUsedMonthly(dimIdBean.getMonthId(), customerId); + } catch (Exception e) { + log.error("statsTagUsedMonthly exception", e); + } + }); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagViewedDailyStatsjob(Date statsDate) { + + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + Date finalStatsDate = statsDate; + //executorService.submit(() -> { + //统计 + statsTagViewedDaily(finalStatsDate, dimIdBean, customerId); + //}); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagViewedMonthlyStatsjob(Date statsDate) { + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + executorService.submit(() -> { + try { + statsTagViewedMonthly(dimIdBean.getMonthId(), customerId); + } catch (Exception e) { + log.error("statsTagViewedMonthly exception", e); + } + }); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagUsedQuarterlyStatsjob(Date statsDate) { + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + executorService.submit(() -> { + try { + log.debug("start === statsTagUsedQuarterly "); + statsTagUsedQuarterly(dimIdBean.getQuarterId(), customerId); + } catch (Exception e) { + log.error("statsTagUsedQuarterly exception", e); + } + }); + executorService.submit(() -> { + try { + log.debug("start === statsTagUsedQuarterly "); + statsTagUsedYearly(dimIdBean.getYearId(), customerId); + } catch (Exception e) { + log.error("statsTagUsedYearly exception", e); + } + }); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + @Override + public Boolean tagViewedQuarterlyStatsjob(Date statsDate) { + //如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和 + if (statsDate == null) { + //当天的凌晨时间 即为今天之前的数据 + statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN); + } else { + statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate); + int pageNo = 1; + int pageSize = 100; + List customerIdList = null; + do { + customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); + if (!CollectionUtils.isEmpty(customerIdList)) { + for (String customerId : customerIdList) { + executorService.submit(() -> { + try { + log.debug("start === statsTagViewedQuarterly "); + statsTagViewedQuarterly(dimIdBean.getQuarterId(), customerId); + } catch (Exception e) { + log.error("statsTagUsedQuarterly exception", e); + } + }); + executorService.submit(() -> { + try { + log.debug("start === statsTagViewedYearly "); + statsTagViewedYearly(dimIdBean.getYearId(), customerId); + } catch (Exception e) { + log.error("statsTagUsedYearly exception", e); + } + }); + } + } + } while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() == pageSize); + return true; + } + + private void statsPublishedDepartmentDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId, Map agencySummaryMap) { + //获取所有客户 + List departmentDTOList = dimDepartmentService.getDepartmentListByCustomerId(customerId); + if (CollectionUtils.isEmpty(departmentDTOList)) { + log.warn("publicitySummary getDepartmentListByCustomerId return empty,customerId:{}", customerId); + return; + } + executorService.submit(() -> { + //转换为 需要插入的Entity + Map departmentDailyEntityMap = convertDepartmentDailyEntity(departmentDTOList, dimIdBean); + //获取当天的业务数据 + List publishedArticleCount = articleService.getAllDepartmentPublishedCount(customerId, DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN)); + + if (!CollectionUtils.isEmpty(publishedArticleCount)) { + for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) { + FactArticlePublishedDepartmentDailyEntity gridDailyEntities = departmentDailyEntityMap.get(summaryDTO.getPublisherId()); + if (gridDailyEntities == null) { + log.error("publicitySummary bizData departmentId:{} not exist in dimDepartment", summaryDTO.getGridId()); + continue; + } + gridDailyEntities.setArticleTotalCount(summaryDTO.getArticleTotalCount()); + gridDailyEntities.setArticlePublishedCount(summaryDTO.getArticlePublishedCount()); + //同一个机关下数据累加 + buildAgencySummaryData(agencySummaryMap, summaryDTO); + } + } + boolean b = factArticlePublishedDepartmentDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), departmentDailyEntityMap.values()); + }); + } + + /** + * desc:同一个机关下的数据进行类型处理 + * + * @param result + * @param summaryDTO + */ + private void buildAgencySummaryData(Map result, ArticleGridPublishedSummaryDTO summaryDTO) { + //同一个机关下数据累加 + ArticleGridPublishedSummaryDTO publishedSummaryDTO = result.get(summaryDTO.getAgencyId()); + if (publishedSummaryDTO == null) { + ArticleGridPublishedSummaryDTO summary = new ArticleGridPublishedSummaryDTO(); + summary.setCustomerId(summaryDTO.getCustomerId()); + summary.setAgencyId(summaryDTO.getAgencyId()); + summary.setGridId(summaryDTO.getGridId()); + summary.setPublisherId(summaryDTO.getPublisherId()); + summary.setArticleTotalCount(summaryDTO.getArticleTotalCount()); + summary.setArticlePublishedCount(summaryDTO.getArticlePublishedCount()); + result.put(summaryDTO.getPublisherId(), summaryDTO); + } else { + publishedSummaryDTO.setArticlePublishedCount(publishedSummaryDTO.getArticlePublishedCount() + summaryDTO.getArticlePublishedCount()); + publishedSummaryDTO.setArticleTotalCount(publishedSummaryDTO.getArticleTotalCount() + summaryDTO.getArticlePublishedCount()); + } + } + + /** + * desc:按日统计 网格纬度的 文章总数数据 + * + * @param statsDate + * @param dimIdBean + * @param customerId + * @param agencySummaryMap + */ + private void statsPublishedGridDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId, Map agencySummaryMap) { + //获取所有网格 + List gridDTOList = dimGridService.getGridListByCustomerId(customerId); + if (CollectionUtils.isEmpty(gridDTOList)) { + log.warn("publicitySummary getGridListByCustomerId return empty,customerId:{}", customerId); + return; + } + executorService.submit(() -> { + //转换为 需要插入的Entity + Map gridDailyEntityMap = convertGridDailyEntity(gridDTOList, dimIdBean); + //获取当天的业务数据 + List publishedArticleCount = articleService.getAllGridPublishedCount(customerId, statsDate); + if (!CollectionUtils.isEmpty(publishedArticleCount)) { + for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) { + FactArticlePublishedGridDailyEntity gridDailyEntity = gridDailyEntityMap.get(summaryDTO.getGridId()); + if (gridDailyEntity == null) { + log.error("publicitySummary getAllGridPublishedCount gridId:{} not exist in dimGrid", summaryDTO.getGridId()); + continue; + } + gridDailyEntity.setArticleTotalCount(summaryDTO.getArticleTotalCount()); + gridDailyEntity.setArticlePublishedCount(summaryDTO.getArticlePublishedCount()); + //同一个机关下数据累加 + buildAgencySummaryData(agencySummaryMap, summaryDTO); + } + } + boolean b = factArticlePublishedGridDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), gridDailyEntityMap.values()); + }); + + } + + private void statsPublishedAgencyDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId, Map agencySummaryMap) { + //获取所有机关 + List agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId); + if (CollectionUtils.isEmpty(agencyDTOList)) { + log.warn("publicitySummary getAgencyListByCustomerId return empty,customerId:{}", customerId); + return; + } + executorService.submit(() -> { + //转换为 需要插入的Entity + Map agencyDailyEntityMap = convertAgencyDailyEntity(agencyDTOList, dimIdBean); + //获取当天的业务数据 + List publishedArticleCount = articleService.getAllAgencyPublishedCount(customerId, statsDate); + Map haveDataAgencyDailyMap = new HashMap<>(); + Map haveDataAgencyDailySelfMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(publishedArticleCount)) { + for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) { + FactArticlePublishedAgencyDailyEntity gridDailyEntities = agencyDailyEntityMap.get(summaryDTO.getPublisherId()); + if (gridDailyEntities == null) { + log.error("publicitySummary bizData departmentId:{} not exist in dimDepartment", summaryDTO.getGridId()); + continue; + } + gridDailyEntities.setArticleTotalCount(summaryDTO.getArticleTotalCount()); + gridDailyEntities.setArticlePublishedCount(summaryDTO.getArticlePublishedCount()); + haveDataAgencyDailyMap.put(summaryDTO.getAgencyId(), gridDailyEntities); + //同一个机关下数据累加 + //buildAgencySummaryData(agencySummaryMap, summaryDTO); + //构建机关自己的数据 + FactArticlePublishedAgencyDailyEntity selfDaily = ConvertUtils.sourceToTarget(dimIdBean, FactArticlePublishedAgencyDailyEntity.class); + selfDaily.setCustomerId(gridDailyEntities.getCustomerId()); + selfDaily.setPid(gridDailyEntities.getPid()); + selfDaily.setAgencyId(summaryDTO.getAgencyId().concat(DimAgencyConstant.TYPE_SELF_ID_SUFFIX)); + selfDaily.setArticleTotalCount(summaryDTO.getArticleTotalCount()); + selfDaily.setArticlePublishedCount(summaryDTO.getArticlePublishedCount()); + haveDataAgencyDailySelfMap.put(selfDaily.getAgencyId(), selfDaily); + } + } + //数据向上级机关添加 + if (!CollectionUtils.isEmpty(haveDataAgencyDailyMap)) { + for (Map.Entry entry : haveDataAgencyDailyMap.entrySet()) { + String agencyId = entry.getKey(); + FactArticlePublishedAgencyDailyEntity summary = entry.getValue(); + FactArticlePublishedAgencyDailyEntity dailyEntity = agencyDailyEntityMap.get(agencyId); + if (dailyEntity == null) { + log.error("publicitySummary bizData agencyId:{} not exist in dimAgency", agencyId); + continue; + } + setPublishedData2ParentAgency(agencyDailyEntityMap, summary, dailyEntity); + } + } + //将机关本身的数据插入 + if (!CollectionUtils.isEmpty(haveDataAgencyDailySelfMap)) { + agencyDailyEntityMap.putAll(haveDataAgencyDailySelfMap); + } + boolean b = factArticlePublishedAgencyDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), agencyDailyEntityMap.values()); + }); + + } + + /** + * desc:按日统计 网格纬度的 标签被使用的次数 + * + * @param statsDate + * @param dimIdBean + * @param customerId + */ + private void statsTagUsedDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId) { + //1.业务数据来源 发布时间为统计时间的 + // 因为一个客户的发布文章数在同一天不会特别的多,所以以客户为单位查询今天发布的所有带有标签的文章 根据发布单位类型进行拆分 + // 1.1查出今天所有的文章标签 根据网格Id + // 1.2 + //获取所有网格 + List agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId); + if (CollectionUtils.isEmpty(agencyDTOList)) { + log.warn("publicitySummary getAgencyListByCustomerId return empty,customerId:{}", customerId); + return; + } + //转换为 需要插入的Entity + Map dimAgencyEntityMap = agencyDTOList.stream().collect(Collectors.toMap(DimAgencyEntity::getId, o -> o)); + //转换为 需要插入的Entity key gridId_tagId + Map tagUsedGridDailyMap = new HashMap<>(); + Map tagUsedDeptDailyMap = new HashMap<>(); + Map tagUsedAgencyDailyMap = new HashMap<>(); + Map tagUsedAgencyDailySelfMap = new HashMap<>(); + //获取当天的业务数据 + //1获取文章及机关id,网格Id + List publishedArticleList = articleService.getPublishedArticleByPublishTime(customerId, statsDate); + if (CollectionUtils.isEmpty(publishedArticleList)) { + return; + } + //KEY 文章Id + Map articleMap = publishedArticleList.stream().collect(Collectors.toMap(ArticleEntity::getId, o -> o)); + Date startTime = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); + Date endTime = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + //2 获取文章标签 + List articleTagsList = articleTagsService.getArticleTagsByCreateTime(customerId, startTime, endTime); + if (CollectionUtils.isEmpty(articleTagsList)) { + log.error("publicitySummary getArticleTagsByCreateTime customerId:{} have not articleTags,publishedArticleList:{}", customerId, JSON.toJSONString(publishedArticleList)); + return; + } + //tagId + for (ArticleTagsEntity tagEntity : articleTagsList) { + ArticleEntity articleEntity = articleMap.get(tagEntity.getArticleId()); + if (articleEntity == null) { + log.error("publicitySummary articleMap articleId:{} ", tagEntity.getArticleId()); + return; + } + DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(articleEntity.getOrgId()); + convertTagUsedAgencyDailyEntity(dimAgencyEntity.getPid(), tagUsedAgencyDailyMap, articleEntity, tagEntity, dimIdBean); + switch (articleEntity.getPublisherType()) { + case ProjectConstant.PUBLISHER_TYPE_GRID: + convertTagUsedGridDailyEntity(tagUsedGridDailyMap, articleEntity, tagEntity, dimIdBean); + break; + case ProjectConstant.PUBLISHER_TYPE_DEPT: + convertTagUsedDepartmentDailyEntity(tagUsedDeptDailyMap, articleEntity, tagEntity, dimIdBean); + break; + case ProjectConstant.PUBLISHER_TYPE_AGENCY: + convertTagUsedAgencyDailySelfEntity(dimAgencyEntity.getPid(), tagUsedAgencyDailySelfMap, articleEntity, tagEntity, dimIdBean); + break; + } + } + + factTagUsedGridDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), tagUsedGridDailyMap.values()); + factTagUsedDepartmentDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), tagUsedDeptDailyMap.values()); + //向上级机关递归添加 数据 + Map finalTagUsedAgencyDailyMap = new HashMap<>(); + finalTagUsedAgencyDailyMap.putAll(tagUsedAgencyDailyMap); + for (Map.Entry entry : tagUsedAgencyDailyMap.entrySet()) { + String agencyId = entry.getKey().split(StrConstant.UNDER_LINE)[0]; + FactTagUsedAgencyDailyEntity currentEntity = entry.getValue(); + DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(currentEntity.getAgencyId()); + if (dimAgencyEntity == null) { + log.error("dimAgencyEntityMap bizData agencyId:{} not exist in dimAgency", agencyId); + continue; + } + setTagUsedData2ParentAgency(dimAgencyEntityMap, finalTagUsedAgencyDailyMap, currentEntity, dimIdBean); + } + factTagUsedAgencyDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), finalTagUsedAgencyDailyMap.values()); + } + + /** + * desc:按日统计 标签被阅读的次数 + * + * @param statsDate + * @param dimIdBean + * @param customerId + */ + private void statsTagViewedDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId) { + //1.业务数据来源 发布时间为统计时间的 + // 因为一个客户的发布文章数在同一天不会特别的多,所以以客户为单位查询今天发布的所有带有标签的文章 根据发布单位类型进行拆分 + // 1.1查出今天所有的文章标签 根据网格Id + // 1.2 + //获取所有机关 用于后面想上级添加数据 + List agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId); + if (CollectionUtils.isEmpty(agencyDTOList)) { + log.debug("statsTagViewedDaily customerId:{} have any agency", customerId); + return; + } + + List dimGridList = dimGridService.getGridListByCustomerId(customerId); + if (CollectionUtils.isEmpty(dimGridList)) { + log.debug("statsTagViewedDaily customerId:{} have any grid", customerId); + return; + } + Map dimGridEntityMap = dimGridList.stream().collect(Collectors.toMap(DimGridEntity::getId, o -> o)); + //转换为 需要插入的Entity + Map dimAgencyEntityMap = agencyDTOList.stream().collect(Collectors.toMap(DimAgencyEntity::getId, o -> o)); + //转换为 需要插入的Entity key gridId_tagId + Map tagViewedGridDailyMap = new HashMap<>(); + Map tagViewedAgencyDailyMap = new HashMap<>(); + Map tagViewedAgencyDailySelfMap = new HashMap<>(); + //获取当天的业务数据 + //1获取今天文章的阅读记录数 + Date startTime = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); + Date endTime = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN); + List visitRecordList = articleVisitRecordService.getArticleVisitByCreateTime(customerId, startTime, endTime); + if (CollectionUtils.isEmpty(visitRecordList)) { + return; + } + + for (ArticleViewedSummaryDTO viewedSummaryDTO : visitRecordList) { + List articleTagsList = articleTagsService.getArticleTagsByArticleId(customerId, viewedSummaryDTO.getArticleId()); + if (CollectionUtils.isEmpty(articleTagsList)) { + continue; + } + ArticleEntity articleEntity = articleService.selectById(viewedSummaryDTO.getArticleId()); + if (articleEntity == null) { + continue; + } + boolean isAgencyPublished = false; + if (ProjectConstant.PUBLISHER_TYPE_AGENCY.equals(articleEntity.getPublisherType())) { + isAgencyPublished = true; + } + String gridId = viewedSummaryDTO.getGridId(); + DimGridEntity dimGridEntity = dimGridEntityMap.get(gridId); + + if (dimGridEntity == null) { + log.error("statsTagViewedDaily viewedRecord gridId:{} not exist in dimGridMap", gridId); + continue; + } + DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(dimGridEntity.getAgencyId()); + for (ArticleTagsEntity articleTag : articleTagsList) { + convertTagViewedGridDailyEntity(dimAgencyEntity, tagViewedGridDailyMap, articleTag, viewedSummaryDTO, dimIdBean); + convertTagViewedAgencyDailyEntity(dimAgencyEntity, tagViewedAgencyDailyMap, articleTag, viewedSummaryDTO, dimIdBean); + if (isAgencyPublished) { + convertTagViewedAgencyDailySelfEntity(dimAgencyEntity, tagViewedAgencyDailySelfMap, articleTag, viewedSummaryDTO, dimIdBean); + } + } + } + + factTagViewedGridDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), tagViewedGridDailyMap.values()); + + //向上级机关递归添加 数据 + Map finalTagUsedAgencyDailyMap = new HashMap<>(); + finalTagUsedAgencyDailyMap.putAll(tagViewedAgencyDailyMap); + for (Map.Entry entry : tagViewedAgencyDailyMap.entrySet()) { + String agencyId = entry.getKey(); + FactTagViewedAgencyDailyEntity currentEntity = entry.getValue(); + DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(currentEntity.getAgencyId()); + if (dimAgencyEntity == null) { + + log.error("dimAgencyEntityMap bizData agencyId:{} not exist in dimAgency", agencyId); + continue; + } + setTagViewedData2ParentAgency(dimAgencyEntityMap, finalTagUsedAgencyDailyMap, currentEntity, dimIdBean); + } + if (!CollectionUtils.isEmpty(tagViewedAgencyDailySelfMap)) { + finalTagUsedAgencyDailyMap.putAll(tagViewedAgencyDailySelfMap); + } + factTagViewedAgencyDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), finalTagUsedAgencyDailyMap.values()); + } + + /** + * desc:按月统计 标签使用数 + * + * @param monthId + * @param customerId + */ + private void statsTagUsedMonthly(String monthId, String customerId) { + List gridDailyList = factTagUsedGridDailyService.getTagUsedCountByMonth(customerId, monthId); + if (!CollectionUtils.isEmpty(gridDailyList)) { + List gridMonthlyList = ConvertUtils.sourceToTarget(gridDailyList, FactTagUsedGridMonthlyEntity.class); + factTagUsedGridMonthlyService.deleteAndInsertByMonthId(customerId, monthId, gridMonthlyList); + } + List deptDailyList = factTagUsedDepartmentDailyService.getTagUsedCountByMonth(customerId, monthId); + if (!CollectionUtils.isEmpty(deptDailyList)) { + List gridMonthlyList = ConvertUtils.sourceToTarget(deptDailyList, FactTagUsedDepartmentMonthlyEntity.class); + factTagUsedDepartmentMonthlyService.deleteAndInsertByMonthId(customerId, monthId, gridMonthlyList); + } + List agencyDailyList = factTagUsedAgencyDailyService.getTagUsedCountByMonth(customerId, monthId); + if (!CollectionUtils.isEmpty(agencyDailyList)) { + List agencyMonthlyList = ConvertUtils.sourceToTarget(agencyDailyList, FactTagUsedAgencyMonthlyEntity.class); + factTagUsedAgencyMonthlyService.deleteAndInsertByMonthId(customerId, monthId, (agencyMonthlyList)); + } + } + + /** + * desc:按月统计 标签使用数 + * + * @param monthId + * @param customerId + */ + private void statsTagViewedMonthly(String monthId, String customerId) { + List gridDailyList = factTagViewedGridDailyService.getTagViewedCountByMonth(customerId, monthId); + if (!CollectionUtils.isEmpty(gridDailyList)) { + List gridMonthlyList = ConvertUtils.sourceToTarget(gridDailyList, FactTagViewedGridMonthlyEntity.class); + factTagViewedGridMonthlyService.deleteAndInsertByMonthId(customerId, monthId, gridMonthlyList); + } + + List agencyDailyList = factTagViewedAgencyDailyService.getTagViewedCountByMonth(customerId, monthId); + if (!CollectionUtils.isEmpty(agencyDailyList)) { + List agencyMonthlyList = ConvertUtils.sourceToTarget(agencyDailyList, FactTagViewedAgencyMonthlyEntity.class); + factTagViewedAgencyMonthlyService.deleteAndInsertByMonthId(customerId, monthId, (agencyMonthlyList)); + } + } + + /** + * desc:按季统计 标签使用数 + * + * @param quarterId + * @param customerId + */ + private void statsTagUsedQuarterly(String quarterId, String customerId) { + List gridMonthlyList = factTagUsedGridMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId); + if (!CollectionUtils.isEmpty(gridMonthlyList)) { + List gridQuarterlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagUsedGridQuarterlyEntity.class); + factTagUsedGridQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, gridQuarterlyList); + } + List deptMonthlyList = factTagUsedDepartmentMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId); + if (!CollectionUtils.isEmpty(deptMonthlyList)) { + List deptQuarterlyList = ConvertUtils.sourceToTarget(deptMonthlyList, FactTagUsedDepartmentQuarterlyEntity.class); + factTagUsedDepartmentQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, deptQuarterlyList); + } + List agencyMonthlyList = factTagUsedAgencyMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId); + if (!CollectionUtils.isEmpty(agencyMonthlyList)) { + List agencyQuarterlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagUsedAgencyQuarterlyEntity.class); + factTagUsedAgencyQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, agencyQuarterlyList); + } + } + + /** + * desc:按季统计 标签查看数 + * + * @param quarterId + * @param customerId + */ + private void statsTagViewedQuarterly(String quarterId, String customerId) { + List gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); + if (!CollectionUtils.isEmpty(gridMonthlyList)) { + List gridQuarterlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridQuarterlyEntity.class); + factTagViewedGridQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, gridQuarterlyList); + } + + List agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); + if (!CollectionUtils.isEmpty(agencyMonthlyList)) { + List agencyQuarterlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyQuarterlyEntity.class); + factTagViewedAgencyQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, agencyQuarterlyList); + } + } + + /** + * desc:按年统计 标签使用数 + * + * @param yearId + * @param customerId + */ + private void statsTagUsedYearly(String yearId, String customerId) { + List gridMonthlyList = factTagUsedGridMonthlyService.getTagUsedCountByYearId(customerId, yearId); + if (!CollectionUtils.isEmpty(gridMonthlyList)) { + List gridYearlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagUsedGridYearlyEntity.class); + factTagUsedGridYearlyService.deleteAndInsertByYearId(customerId, yearId, gridYearlyList); + } + List deptMonthlyList = factTagUsedDepartmentMonthlyService.getTagUsedCountByYearId(customerId, yearId); + if (!CollectionUtils.isEmpty(deptMonthlyList)) { + List gridYearlyList = ConvertUtils.sourceToTarget(deptMonthlyList, FactTagUsedDepartmentYearlyEntity.class); + factTagUsedDepartmentYearlyService.deleteAndInsertByYearId(customerId, yearId, gridYearlyList); + } + List agencyMonthlyList = factTagUsedAgencyMonthlyService.getTagUsedCountByYearId(customerId, yearId); + if (!CollectionUtils.isEmpty(agencyMonthlyList)) { + List agencyYearlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagUsedAgencyYearlyEntity.class); + factTagUsedAgencyYearlyService.deleteAndInsertByYearId(customerId, yearId, agencyYearlyList); + } + } + + /** + * desc:按年统计 标签阅读数 + * + * @param yearId + * @param customerId + */ + private void statsTagViewedYearly(String yearId, String customerId) { + List gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByYearId(customerId, yearId); + if (!CollectionUtils.isEmpty(gridMonthlyList)) { + List gridYearlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridYearlyEntity.class); + factTagViewedGridYearlyService.deleteAndInsertByYearId(customerId, yearId, gridYearlyList); + } + List agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByYearId(customerId, yearId); + if (!CollectionUtils.isEmpty(agencyMonthlyList)) { + List agencyYearlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyYearlyEntity.class); + factTagViewedAgencyYearlyService.deleteAndInsertByYearId(customerId, yearId, agencyYearlyList); + } + } + + private void setTagUsedData2ParentAgency(Map dimAgencyEntityMap, Map agencyDailyEntityMap, FactTagUsedAgencyDailyEntity currentEntity, DimIdGenerator.DimIdBean dimIdBean) { + String pid = currentEntity.getPid(); + String tagId = currentEntity.getTagId(); + String key = pid.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagUsedAgencyDailyEntity parentAgencyDailyEntity = agencyDailyEntityMap.get(key); + DimAgencyEntity currentDimAgency = dimAgencyEntityMap.get(pid); + if (currentDimAgency == null) { + return; + } + if (parentAgencyDailyEntity == null) { + parentAgencyDailyEntity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedAgencyDailyEntity.class); + parentAgencyDailyEntity.setCustomerId(currentEntity.getCustomerId()); + parentAgencyDailyEntity.setPid(currentDimAgency.getPid()); + parentAgencyDailyEntity.setAgencyId(currentDimAgency.getId()); + parentAgencyDailyEntity.setTagId(currentEntity.getTagId()); + parentAgencyDailyEntity.setTagName(currentEntity.getTagName()); + parentAgencyDailyEntity.setUsedCount(currentEntity.getUsedCount()); + agencyDailyEntityMap.put(key, parentAgencyDailyEntity); + } else { + parentAgencyDailyEntity.setUsedCount(parentAgencyDailyEntity.getUsedCount() + currentEntity.getUsedCount()); + } + pid = currentDimAgency.getPid(); + if (!NumConstant.ZERO_STR.equals(pid)) { + setTagUsedData2ParentAgency(dimAgencyEntityMap, agencyDailyEntityMap, parentAgencyDailyEntity, dimIdBean); + } + } + + private void setTagViewedData2ParentAgency(Map dimAgencyEntityMap, Map agencyDailyEntityMap, FactTagViewedAgencyDailyEntity currentEntity, DimIdGenerator.DimIdBean dimIdBean) { + String pid = currentEntity.getPid(); + String tagId = currentEntity.getTagId(); + String key = pid.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagViewedAgencyDailyEntity parentAgencyDailyEntity = agencyDailyEntityMap.get(key); + DimAgencyEntity currentDimAgency = dimAgencyEntityMap.get(pid); + if (currentDimAgency == null) { + return; + } + if (parentAgencyDailyEntity == null) { + parentAgencyDailyEntity = ConvertUtils.sourceToTarget(dimIdBean, FactTagViewedAgencyDailyEntity.class); + parentAgencyDailyEntity.setCustomerId(currentEntity.getCustomerId()); + parentAgencyDailyEntity.setPid(currentDimAgency.getPid()); + parentAgencyDailyEntity.setAgencyId(currentDimAgency.getId()); + parentAgencyDailyEntity.setTagId(currentEntity.getTagId()); + parentAgencyDailyEntity.setTagName(currentEntity.getTagName()); + parentAgencyDailyEntity.setTagReadCount(currentEntity.getTagReadCount()); + agencyDailyEntityMap.put(key, parentAgencyDailyEntity); + } else { + parentAgencyDailyEntity.setTagReadCount(parentAgencyDailyEntity.getTagReadCount() + currentEntity.getTagReadCount()); + } + pid = currentDimAgency.getPid(); + if (!NumConstant.ZERO_STR.equals(pid)) { + setTagViewedData2ParentAgency(dimAgencyEntityMap, agencyDailyEntityMap, parentAgencyDailyEntity, dimIdBean); + } + } + + private void setPublishedData2ParentAgency(Map agencyDailyEntityMap, FactArticlePublishedAgencyDailyEntity agencySummary, FactArticlePublishedAgencyDailyEntity summary) { + String pid = summary.getPid(); + FactArticlePublishedAgencyDailyEntity parentAgency = agencyDailyEntityMap.get(pid); + if (parentAgency == null) { + return; + } + parentAgency.setArticleTotalCount(parentAgency.getArticleTotalCount() + agencySummary.getArticleTotalCount()); + parentAgency.setArticlePublishedCount(parentAgency.getArticlePublishedCount() + agencySummary.getArticlePublishedCount()); + pid = parentAgency.getPid(); + if (!NumConstant.ZERO_STR.equals(pid)) { + setPublishedData2ParentAgency(agencyDailyEntityMap, agencySummary, parentAgency); + } + } + + /** + * desc:将网格对象构建为 gridDaily 对象 + * + * @param dimGridEntities + * @param dimIdBean + * @return + */ + private Map convertGridDailyEntity(List dimGridEntities, DimIdGenerator.DimIdBean dimIdBean) { + Map result = new HashMap<>(); + dimGridEntities.forEach(dimGridEntity -> { + FactArticlePublishedGridDailyEntity entity = ConvertUtils.sourceToTarget(dimIdBean, FactArticlePublishedGridDailyEntity.class); + entity.setCustomerId(dimGridEntity.getCustomerId()); + entity.setAgencyId(dimGridEntity.getAgencyId()); + entity.setGridId(dimGridEntity.getId()); + entity.setArticleTotalCount(0); + entity.setArticlePublishedCount(0); + result.put(dimGridEntity.getId(), entity); + }); + return result; + } + + /** + * desc:将网格对象构建为 gridDaily 对象 + * + * @param dimDepartmentEntities + * @param dimIdBean + * @return + */ + private Map convertDepartmentDailyEntity(List dimDepartmentEntities, DimIdGenerator.DimIdBean dimIdBean) { + Map result = new HashMap<>(); + dimDepartmentEntities.forEach(dimGridEntity -> { + FactArticlePublishedDepartmentDailyEntity entity = ConvertUtils.sourceToTarget(dimIdBean, FactArticlePublishedDepartmentDailyEntity.class); + entity.setCustomerId(dimGridEntity.getCustomerId()); + entity.setAgencyId(dimGridEntity.getAgencyId()); + entity.setDepartmentId(dimGridEntity.getId()); + entity.setArticleTotalCount(0); + entity.setArticlePublishedCount(0); + result.put(dimGridEntity.getId(), entity); + }); + return result; + } + + /** + * desc:将机关卫队对象构建为 agencyDaily 对象 + * + * @param dimDepartmentEntities + * @param dimIdBean + * @return + */ + private Map convertAgencyDailyEntity(List dimDepartmentEntities, DimIdGenerator.DimIdBean dimIdBean) { + Map result = new HashMap<>(); + dimDepartmentEntities.forEach(dimGridEntity -> { + FactArticlePublishedAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dimIdBean, FactArticlePublishedAgencyDailyEntity.class); + entity.setCustomerId(dimGridEntity.getCustomerId()); + entity.setPid(dimGridEntity.getPid()); + entity.setAgencyId(dimGridEntity.getId()); + entity.setArticleTotalCount(0); + entity.setArticlePublishedCount(0); + result.put(dimGridEntity.getId(), entity); + }); + return result; + } + + + /** + * desc:将网格对象构建为 tagUsedGridDaily 对象 + * + * @param dimGridEntities + * @param dimIdBean + * @return + */ + private Map convertTagUsedGridDailyEntity(List dimGridEntities, DimIdGenerator.DimIdBean dimIdBean) { + Map result = new HashMap<>(); + dimGridEntities.forEach(dimGridEntity -> { + FactTagUsedGridDailyEntity entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedGridDailyEntity.class); + entity.setCustomerId(dimGridEntity.getCustomerId()); + entity.setAgencyId(dimGridEntity.getAgencyId()); + entity.setGridId(dimGridEntity.getId()); + entity.setTagId(""); + entity.setTagName(""); + entity.setUsedCount(0); + result.put(dimGridEntity.getId(), entity); + }); + return result; + } + + private void convertTagUsedGridDailyEntity(Map result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) { + String gridId = articleEntity.getPublisherId(); + String tagId = tagEntity.getTagId(); + String key = gridId.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagUsedGridDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedGridDailyEntity.class); + entity.setCustomerId(articleEntity.getCustomerId()); + entity.setAgencyId(articleEntity.getOrgId()); + entity.setGridId(gridId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setUsedCount(1); + result.put(key, entity); + } else { + entity.setUsedCount(entity.getUsedCount() + 1); + } + } + + private void convertTagUsedDepartmentDailyEntity(Map result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) { + String publisherId = articleEntity.getPublisherId(); + String tagId = tagEntity.getTagId(); + String key = publisherId.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagUsedDepartmentDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedDepartmentDailyEntity.class); + entity.setCustomerId(articleEntity.getCustomerId()); + entity.setAgencyId(articleEntity.getOrgId()); + entity.setDepartmentId(publisherId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setUsedCount(1); + result.put(key, entity); + } else { + entity.setUsedCount(entity.getUsedCount() + 1); + } + } + + private void convertTagUsedAgencyDailyEntity(String pid, Map result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) { + String agencyId = articleEntity.getOrgId(); + String tagId = tagEntity.getTagId(); + String key = agencyId.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagUsedAgencyDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedAgencyDailyEntity.class); + entity.setPid(pid); + entity.setCustomerId(articleEntity.getCustomerId()); + entity.setAgencyId(agencyId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setUsedCount(1); + result.put(key, entity); + } else { + entity.setUsedCount(entity.getUsedCount() + 1); + } + } + + private void convertTagUsedAgencyDailySelfEntity(String pid, Map result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) { + String agencyId = articleEntity.getOrgId().concat(DimAgencyConstant.TYPE_SELF_ID_SUFFIX); + String tagId = tagEntity.getTagId(); + String key = agencyId.concat(StrConstant.UNDER_LINE).concat(tagId); + FactTagUsedAgencyDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedAgencyDailyEntity.class); + entity.setPid(pid); + entity.setCustomerId(articleEntity.getCustomerId()); + entity.setAgencyId(agencyId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setUsedCount(1); + result.put(key, entity); + } else { + entity.setUsedCount(entity.getUsedCount() + 1); + } + } + + private void convertTagViewedGridDailyEntity(DimAgencyEntity dimAgencyEntity, Map result, + ArticleTagsEntity tagEntity, ArticleViewedSummaryDTO viewedSummaryDTO, DimIdGenerator.DimIdBean dimIdBean) { + String gridId = viewedSummaryDTO.getGridId(); + String tagId = tagEntity.getTagId(); + String key = gridId.concat(StrConstant.UNDER_LINE).concat(tagId); + Integer viewedCount = viewedSummaryDTO.getViewedCount() == null ? 0 : viewedSummaryDTO.getViewedCount(); + FactTagViewedGridDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagViewedGridDailyEntity.class); + entity.setGridId(gridId); + entity.setCustomerId(tagEntity.getCustomerId()); + entity.setAgencyId(dimAgencyEntity.getId()); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setTagReadCount(viewedCount); + result.put(key, entity); + } else { + entity.setTagReadCount(entity.getTagReadCount() + viewedCount); + } + } + + private void convertTagViewedAgencyDailyEntity(DimAgencyEntity dimAgencyEntity, Map result, + ArticleTagsEntity tagEntity, ArticleViewedSummaryDTO viewedSummaryDTO, DimIdGenerator.DimIdBean dimIdBean) { + String agencyId = dimAgencyEntity.getId(); + String tagId = tagEntity.getTagId(); + String key = agencyId.concat(StrConstant.UNDER_LINE).concat(tagId); + Integer viewedCount = viewedSummaryDTO.getViewedCount() == null ? 0 : viewedSummaryDTO.getViewedCount(); + FactTagViewedAgencyDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagViewedAgencyDailyEntity.class); + entity.setPid(dimAgencyEntity.getPid()); + entity.setCustomerId(tagEntity.getCustomerId()); + entity.setAgencyId(agencyId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setTagReadCount(viewedCount); + result.put(key, entity); + } else { + entity.setTagReadCount(entity.getTagReadCount() + viewedCount); + } + } + + private void convertTagViewedAgencyDailySelfEntity(DimAgencyEntity dimAgencyEntity, Map result, + ArticleTagsEntity tagEntity, ArticleViewedSummaryDTO viewedSummaryDTO, DimIdGenerator.DimIdBean dimIdBean) { + String agencyId = dimAgencyEntity.getId().concat(DimAgencyConstant.TYPE_SELF_ID_SUFFIX); + String tagId = tagEntity.getTagId(); + String key = agencyId.concat(StrConstant.UNDER_LINE).concat(tagId); + Integer viewedCount = viewedSummaryDTO.getViewedCount() == null ? 0 : viewedSummaryDTO.getViewedCount(); + FactTagViewedAgencyDailyEntity entity = result.get(key); + if (entity == null) { + entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagViewedAgencyDailyEntity.class); + entity.setPid(dimAgencyEntity.getPid()); + entity.setCustomerId(tagEntity.getCustomerId()); + entity.setAgencyId(agencyId); + entity.setTagId(tagId); + entity.setTagName(tagEntity.getTagName()); + entity.setTagReadCount(viewedCount); + result.put(key, entity); + } else { + entity.setTagReadCount(entity.getTagReadCount() + viewedCount); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java new file mode 100644 index 0000000000..034499e955 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java @@ -0,0 +1,10 @@ +package com.epmet.service.org; + +import com.epmet.entity.org.CustomerAgencyEntity; + +import java.util.Date; +import java.util.List; + +public interface CustomerAgencyService { + List listAgenciesByCreateTime(Date statsStartTime, Date statsEndTime); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerDepartmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerDepartmentService.java new file mode 100644 index 0000000000..1aa2c2f7db --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerDepartmentService.java @@ -0,0 +1,11 @@ +package com.epmet.service.org; + +import com.epmet.entity.org.CustomerDepartmentEntity; + +import java.util.Date; +import java.util.List; + +public interface CustomerDepartmentService { + + List listDepartmentsByCreatedTime(Date createdTimeFrom, Date createdTimeTo); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java new file mode 100644 index 0000000000..00b46e8b75 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java @@ -0,0 +1,35 @@ +package com.epmet.service.org; + +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; +import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; +import com.epmet.entity.org.CustomerGridEntity; + +import java.util.Date; +import java.util.List; + +public interface CustomerGridService { + /** + * 根据创建时间,截取时间段内的网格 + * @param start + * @param end + * @return + * @Param("start") Date start, @Param("end") Date end + */ + List listGridsByCreateTime(Date start, Date end); + + /** + * @Description 查询机关下有多少网格 + * @param community + * @author zxc + */ + List selectAgencyGridTotalCount(List community, String dateId); + + /** + * @Description 获取客户下某个时间点以前的网格ID + * @param customerId + * @param dateId + * @author zxc + */ + List getCustomerGridIdList(String customerId, String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java index e0f0c7369a..d5086c6b4e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/DemoGovOrgService.java @@ -1,9 +1,12 @@ package com.epmet.service.org; +import com.epmet.dto.AgencySubTreeDto; import com.epmet.entity.org.CustomerAgencyEntity; import java.util.List; public interface DemoGovOrgService { List listAllEntities(); + + List getAllAgency(); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java new file mode 100644 index 0000000000..2912ca0cca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java @@ -0,0 +1,25 @@ +package com.epmet.service.org.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.org.StatsCustomerAgencyDao; +import com.epmet.entity.org.CustomerAgencyEntity; +import com.epmet.service.org.CustomerAgencyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@DataSource(DataSourceConstant.GOV_ORG) +public class CustomerAgencyServiceImpl implements CustomerAgencyService { + + @Autowired + private StatsCustomerAgencyDao customerAgencyDao; + + @Override + public List listAgenciesByCreateTime(Date statsStartTime, Date statsEndTime) { + return customerAgencyDao.listAgenciesByCreateTime(statsStartTime, statsEndTime); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerDepartmentServiceImpl.java new file mode 100644 index 0000000000..ac430a3abd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerDepartmentServiceImpl.java @@ -0,0 +1,31 @@ +package com.epmet.service.org.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.org.CustomerDepartmentDao; +import com.epmet.entity.org.CustomerDepartmentEntity; +import com.epmet.service.org.CustomerDepartmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@DataSource(DataSourceConstant.GOV_ORG) +public class CustomerDepartmentServiceImpl implements CustomerDepartmentService { + + @Autowired + private CustomerDepartmentDao departmentDao; + + /** + * 根据创建时间查询部门列表 + * @param createdTimeFrom + * @param createdTimeTo + * @return + */ + @Override + public List listDepartmentsByCreatedTime(Date createdTimeFrom, Date createdTimeTo) { + return departmentDao.listDepartmentsByCreatedTime(createdTimeFrom, createdTimeTo); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java new file mode 100644 index 0000000000..fc95a3de29 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java @@ -0,0 +1,49 @@ +package com.epmet.service.org.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.org.CustomerGridDao; +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; +import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; +import com.epmet.entity.org.CustomerGridEntity; +import com.epmet.service.org.CustomerGridService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +@DataSource(DataSourceConstant.GOV_ORG) +public class CustomerGridServiceImpl implements CustomerGridService { + + @Autowired + private CustomerGridDao customerGridDao; + + @Override + public List listGridsByCreateTime(Date start, Date end) { + return customerGridDao.listGridsByCreateTime(start, end); + } + + /** + * @Description 查询机关下有多少网格 + * @param community + * @author zxc + */ + @Override + public List selectAgencyGridTotalCount(List community, String dateId) { + return customerGridDao.selectAgencyGridTotalCount(community,dateId); + } + + /** + * @Description 获取客户下某个时间点以前的网格ID + * @param customerId + * @param dateId + * @author zxc + */ + @Override + public List getCustomerGridIdList(String customerId, String dateId) { + return customerGridDao.getCustomerGridIdList(customerId, dateId); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java index 643510086b..0d1f46e0cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/DemoGovOrgServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.service.org.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.org.StatsCustomerAgencyDao; +import com.epmet.dto.AgencySubTreeDto; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.service.org.DemoGovOrgService; import org.springframework.beans.factory.annotation.Autowired; @@ -20,4 +21,9 @@ public class DemoGovOrgServiceImpl implements DemoGovOrgService { public List listAllEntities() { return govOrgDao.listAllEntities(); } + + @Override + public List getAllAgency() { + return govOrgDao.selectAllAgency(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java new file mode 100644 index 0000000000..729e724267 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.project; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.entity.project.ProjectProcessEntity; + +import java.util.List; + +/** + * 项目处理进展表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +public interface ProjectProcessService extends BaseService { + + /** + * @param projectEntity + * @Author sun + * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) + **/ + List getProcessList(ProjectEntity projectEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java new file mode 100644 index 0000000000..45929aebb7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.project; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.project.ProjectAgencyDTO; +import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.entity.project.ProjectEntity; + +import java.util.List; + +/** + * 项目表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +public interface ProjectService extends BaseService { + + /** + * @param projectEntity + * @Author sun + * @Description 根据客户Id查询客户项目业务表有效数据 + **/ + List getProjectList(ProjectEntity projectEntity); + + /** + * 已结案项目统计 + * @author zhaoqifeng + * @date 2020/6/18 17:04 + * @param customerId + * @param date + * @return java.util.List + */ + List getAgencyClosedProjectTotal(String customerId, String date); + + /** + * 已结案项目增量 + * @author zhaoqifeng + * @date 2020/6/18 17:04 + * @param customerId + * @param date + * @return java.util.List + */ + List getAgencyClosedProjectInc(String customerId, String date); + + /** + * 已结案项目统计 + * @author zhaoqifeng + * @date 2020/6/18 17:04 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridClosedProjectTotal(String customerId, String date); + + /** + * 已结案项目增量 + * @author zhaoqifeng + * @date 2020/6/18 17:04 + * @param customerId + * @param date + * @return java.util.List + */ + List getGridClosedProjectInc(String customerId, String date); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java new file mode 100644 index 0000000000..de1a52e1c2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.project.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.project.ProjectProcessDao; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.entity.project.ProjectProcessEntity; +import com.epmet.service.project.ProjectProcessService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目处理进展表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +@DataSource(DataSourceConstant.GOV_PROJECT) +public class ProjectProcessServiceImpl extends BaseServiceImpl implements ProjectProcessService { + + /** + * @param projectEntity + * @Author sun + * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) + **/ + @Override + public List getProcessList(ProjectEntity projectEntity) { + return baseDao.selectProcessList(projectEntity); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java new file mode 100644 index 0000000000..0a5bac27b6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.project.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.project.ProjectDao; +import com.epmet.dto.project.ProjectAgencyDTO; +import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.service.project.ProjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +@DataSource(DataSourceConstant.GOV_PROJECT) +public class ProjectServiceImpl extends BaseServiceImpl implements ProjectService { + + /** + * @param projectEntity + * @Author sun + * @Description 根据客户Id查询客户项目业务表有效数据 + **/ + @Override + public List getProjectList(ProjectEntity projectEntity) { + return baseDao.selectProjectList(projectEntity); + } + + @Override + public List getAgencyClosedProjectTotal(String customerId, String date) { + return baseDao.selectAgencyClosedProjectTotal(customerId, date); + } + + @Override + public List getAgencyClosedProjectInc(String customerId, String date) { + return baseDao.selectAgencyClosedProjectInc(customerId, date); + } + + @Override + public List getGridClosedProjectTotal(String customerId, String date) { + return baseDao.selectGridClosedProjectTotal(customerId, date); + } + + @Override + public List getGridClosedProjectInc(String customerId, String date) { + return baseDao.selectGridClosedProjectInc(customerId, date); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java new file mode 100644 index 0000000000..95c305943d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java @@ -0,0 +1,176 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.AgencySubDeptTreeDto; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.entity.org.CustomerAgencyEntity; +import com.epmet.entity.stats.DimAgencyEntity; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 机关维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimAgencyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimAgencyDTO + * @author generator + * @date 2020-06-16 + */ + DimAgencyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimAgencyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimAgencyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + /** + * @param dto + * @return + * @Author sun + * @Description 根据客户Id查询机关维度列表数据 + **/ + List getDimAgencyList(DimAgencyDTO dto); + + /** + * 初始化机关维度 + * @param agencies + */ + void initAgencyDims(List agencies); + + /** + * @Description 查询所有机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + List getAllAgency(); + + /** + * @Description 查询顶级机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + List getTopAgency(); + + /** + * desc: 根据客户Id 获取机关列表数据 + * + * @param customerId + * @return: + * @date: 2020/6/18 17:54 + * @author: jianjun liu + */ + List getAgencyListByCustomerId(String customerId); + + + + /** + * @Description 带部门 查询所有机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + List getAllAgencyWithDept(); + + + /** + * @Description 带部门 查询顶级机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + List getTopAgencyWithDept(); + + /** + * @Description 根据customerId获取机关信息 + * @param customerId + * @author zxc + */ + List getAgencyInfoByCustomerId(String customerId); + + /** + * @Description 根据机关Id获取上级机关ID + * @param agencyId + * @author zxc + */ + String getPidByAgencyId(String agencyId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java new file mode 100644 index 0000000000..a2d7aadaf5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimCustomerDTO; +import com.epmet.entity.crm.CustomerEntity; +import com.epmet.entity.org.CustomerDepartmentEntity; +import com.epmet.entity.stats.DimCustomerEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimCustomerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimCustomerDTO + * @author generator + * @date 2020-06-16 + */ + DimCustomerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimCustomerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimCustomerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + /** + * desc: 分页获取 客户id + * + * @param pageNo + * @param pageSize + * return: List + * @date: 2020/6/17 16:26 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ + List selectCustomerIdPage(Integer pageNo, Integer pageSize); + + /** + * 添加客户维度 + * @param customers + */ + void initCustomerDims(List customers); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java new file mode 100644 index 0000000000..02f644be46 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimDateDTO; +import com.epmet.entity.stats.DimDateEntity; + +import java.util.List; +import java.util.Map; + +/** + * 日期维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimDateService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimDateDTO + * @author generator + * @date 2020-06-16 + */ + DimDateDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimDateDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimDateDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + void initDimDate(); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java new file mode 100644 index 0000000000..7bf0b63b7c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDepartmentService.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimDepartmentDTO; +import com.epmet.entity.org.CustomerDepartmentEntity; +import com.epmet.entity.stats.DimDepartmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户部门维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimDepartmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimDepartmentDTO + * @author generator + * @date 2020-06-16 + */ + DimDepartmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimDepartmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimDepartmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + void initDepartmentDims(List departments); + + /** + * desc: 根据客户Id获取 部门数据 + * + * @param null + * @return: + * @date: 2020/6/18 17:45 + * @author: jianjun liu + */ + List getDepartmentListByCustomerId(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java new file mode 100644 index 0000000000..312659eb96 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridInfoResultDTO; +import com.epmet.dto.group.result.SubAgencyIdResultDTO; +import com.epmet.dto.stats.DimGridDTO; +import com.epmet.entity.stats.DimGridEntity; +import com.epmet.entity.stats.LastExecRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户网格维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimGridService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimGridDTO + * @author generator + * @date 2020-06-16 + */ + DimGridDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimGridDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimGridDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + DimGridEntity getLastCreatedGridDim(); + + /** + * 初始化网格维度 + * @param gridDims + */ + void initGridDims(List gridDims); + + /** + * desc: 根据客户Id获取 该客户下所有的网格数据 + * + * @param customerId + * @return: List + * @date: 2020/6/18 10:28 + * @author: jianjun liu + */ + List getGridListByCustomerId(String customerId); + + /** + * @Description 查询机关下的网格 + * @param formDTO + * @author zxc + */ + List selectAgencyGridInfo(List formDTO); + + /** + * @Description 根据当前机关ID查询下级机关ID + * @param formDTO + * @author zxc + */ + List selectSubAgencyId(List formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimMonthService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimMonthService.java new file mode 100644 index 0000000000..d6f8a75943 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimMonthService.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimMonthDTO; +import com.epmet.entity.stats.DimMonthEntity; + +import java.util.List; +import java.util.Map; + +/** + * 月份维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimMonthService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimMonthDTO + * @author generator + * @date 2020-06-16 + */ + DimMonthDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimMonthDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimMonthDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + void initMonthDim(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimQuarterService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimQuarterService.java new file mode 100644 index 0000000000..5e6fb31998 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimQuarterService.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimQuarterDTO; +import com.epmet.entity.stats.DimQuarterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 季度维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimQuarterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimQuarterDTO + * @author generator + * @date 2020-06-16 + */ + DimQuarterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimQuarterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimQuarterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + void initQuarterDim(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimTopicStatusService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimTopicStatusService.java new file mode 100644 index 0000000000..98d38951a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimTopicStatusService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimTopicStatusDTO; +import com.epmet.entity.stats.DimTopicStatusEntity; + +import java.util.List; +import java.util.Map; + +/** + * 话题状态维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimTopicStatusService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimTopicStatusDTO + * @author generator + * @date 2020-06-16 + */ + DimTopicStatusDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimTopicStatusDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimTopicStatusDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimWeekService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimWeekService.java new file mode 100644 index 0000000000..1737b3354b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimWeekService.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimWeekDTO; +import com.epmet.entity.stats.DimWeekEntity; + +import java.util.List; +import java.util.Map; + +/** + * 周维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimWeekService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimWeekDTO + * @author generator + * @date 2020-06-16 + */ + DimWeekDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimWeekDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimWeekDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + void initWeekDim(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimYearService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimYearService.java new file mode 100644 index 0000000000..ed840f7636 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimYearService.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.DimYearDTO; +import com.epmet.entity.stats.DimYearEntity; + +import java.util.List; +import java.util.Map; + +/** + * 年维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface DimYearService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DimYearDTO + * @author generator + * @date 2020-06-16 + */ + DimYearDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(DimYearDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(DimYearDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + + void initYearDim(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java new file mode 100644 index 0000000000..f7df122755 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; + +import java.util.List; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactAgencyProjectDailyService extends BaseService { + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月机关日统计数据,按时间倒序 + **/ + List getMonthProjectList(MonthProjectListFormDTO formDTO); + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + void delDateProject(FactAgencyProjectDailyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java new file mode 100644 index 0000000000..e1e6ebdc25 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; + +/** + * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactAgencyProjectMonthlyService extends BaseService { + + /** + * @param delEntity + * @return + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除可能存在的历史数据 + **/ + void delMonthProject(FactAgencyProjectMonthlyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedAgencyDailyService.java new file mode 100644 index 0000000000..dc9d7e3d63 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedAgencyDailyService.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.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; + +import java.util.Collection; + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactArticlePublishedAgencyDailyService extends BaseService { + + /** + * desc: 删除并插入数据 + * + * @param customerId + * @param dateId + * @param values + * @return: + * @date: 2020/6/18 18:59 + * @author: jianjun liu + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java new file mode 100644 index 0000000000..40ae1d8002 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedDepartmentDailyService.java @@ -0,0 +1,44 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; + +import java.util.Collection; + +/** + * 文章发布数量【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactArticlePublishedDepartmentDailyService extends BaseService { + + /** + * desc: 删除并插入数据 + * + * @param dateId + * @param values + * @return: + * @date: 2020/6/18 14:54 + * @author: jianjun liu + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedGridDailyService.java new file mode 100644 index 0000000000..d19038fa4e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactArticlePublishedGridDailyService.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; +import com.epmet.entity.stats.FactArticlePublishedGridDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 文章发布数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactArticlePublishedGridDailyService extends BaseService { + + /** + * desc: 根据客户Id 获取统计日期的 数据 + * + * @param customerId + * @param dateId + * @return: List + * @date: 2020/6/18 9:53 + * @author: jianjun liu + */ + @Deprecated + List getByBeforeDay(String customerId, String dateId); + + /** + * desc: 删除并插入数据 + * + * @param dateId + * @param values + * @return: + * @date: 2020/6/18 14:54 + * @author: jianjun liu + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java new file mode 100644 index 0000000000..f9d0e69145 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java @@ -0,0 +1,48 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; +import com.epmet.entity.stats.FactGridProjectDailyEntity; + +import java.util.List; + +/** + * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactGridProjectDailyService extends BaseService { + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + void delDateProject(FactAgencyProjectDailyEntity delEntity); + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月网格日统计数据,按时间倒序 + **/ + List getMonthProjectList(MonthProjectListFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java new file mode 100644 index 0000000000..502ea11e62 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; +import com.epmet.entity.stats.FactGridProjectMonthlyEntity; + +/** + * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactGridProjectMonthlyService extends BaseService { + + /** + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除一下可能存在的历史数据 + **/ + void delMonthProject(FactAgencyProjectMonthlyEntity delEntity); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java new file mode 100644 index 0000000000..913525715a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.group.result.AgencyGroupDailyResultDTO; +import com.epmet.dto.group.result.AgencyGroupMonthlyResultDTO; +import com.epmet.dto.stats.FactGroupAgencyDailyDTO; +import com.epmet.entity.stats.FactGroupAgencyDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 组-机关日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactGroupAgencyDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactGroupAgencyDailyDTO + * @author generator + * @date 2020-06-16 + */ + FactGroupAgencyDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(FactGroupAgencyDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(FactGroupAgencyDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + /** + * @Description 插入网格小组数据 【机关-日】 + * @param agencyList + * @author zxc + */ + void insertGroupAgencyDaily(List agencyList,String customerId); + + /** + * @Description 获取 网格小组【机关-日统计】的最后一天数据 + * @param + * @author zxc + */ + List getLastDayAgency(String monthId); + + /** + * @Description 查询 月的小组增量 + * @param monthId + * @author zxc + */ + List getMonthGroupIncr(String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyMonthlyService.java new file mode 100644 index 0000000000..75e43242c7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyMonthlyService.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.stats.FactGroupAgencyMonthlyDTO; +import com.epmet.entity.stats.FactGroupAgencyMonthlyEntity; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 组-机关月统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactGroupAgencyMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactGroupAgencyMonthlyDTO + * @author generator + * @date 2020-06-16 + */ + FactGroupAgencyMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(FactGroupAgencyMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(FactGroupAgencyMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + /** + * @Description 统计网格小组 【机关-月】 + * @param agencyMonth + * @author zxc + */ + void insertAgencyGroupMonthly(List agencyMonth); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupGridDailyService.java new file mode 100644 index 0000000000..bcf2157ecd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupGridDailyService.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.group.result.GroupGridDailyResultDTO; +import com.epmet.dto.stats.FactGroupGridDailyDTO; +import com.epmet.entity.stats.FactGroupGridDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 组-网格日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +public interface FactGroupGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactGroupGridDailyDTO + * @author generator + * @date 2020-06-16 + */ + FactGroupGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void save(FactGroupGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-16 + */ + void update(FactGroupGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-16 + */ + void delete(String[] ids); + + /** + * @Description 统计小组【网格-日】 + * @param formDto + * @author zxc + */ + void statisticsGroupGridDaily(List formDto,String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyDailyService.java new file mode 100644 index 0000000000..9334a5637c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyDailyService.java @@ -0,0 +1,114 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactIssueAgencyDailyDTO; +import com.epmet.entity.stats.FactIssueAgencyDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactIssueAgencyDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactIssueAgencyDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactIssueAgencyDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactIssueAgencyDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactIssueAgencyDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); + + /** + * 根据客户ID删除 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param customerId + * @param dateId + * @return void + */ + void deleteByCustomerId(String customerId, String dateId); + + /** + * 批量保存 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param list + * @return void + */ + void saveList(List list); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java new file mode 100644 index 0000000000..b388e8ee58 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java @@ -0,0 +1,124 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; +import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 组织机关议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactIssueAgencyMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactIssueAgencyMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactIssueAgencyMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactIssueAgencyMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactIssueAgencyMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); + + /** + * 统计网格议题各个指标月度增量 + * @author zhaoqifeng + * @date 2020/6/19 10:53 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getAgencyMonthlyInc(String customerId, String monthId); + + /** + * 根据客户ID删除 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param customerId + * @param monthId + * @return void + */ + void deleteByCustomerId(String customerId, String monthId); + + /** + * 批量保存 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param list + * @return void + */ + void saveList(List list); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridDailyService.java new file mode 100644 index 0000000000..786f71ac90 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridDailyService.java @@ -0,0 +1,114 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactIssueGridDailyDTO; +import com.epmet.entity.stats.FactIssueGridDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactIssueGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactIssueGridDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactIssueGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactIssueGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactIssueGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); + + /** + * 根据客户ID删除 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param customerId + * @param dateId + * @return void + */ + void deleteByCustomerId(String customerId, String dateId); + + /** + * 批量保存 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param list + * @return void + */ + void saveList(List list); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java new file mode 100644 index 0000000000..a40b8c7236 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java @@ -0,0 +1,124 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactIssueGridMonthlyDTO; +import com.epmet.entity.stats.FactIssueGridMonthlyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactIssueGridMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactIssueGridMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactIssueGridMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactIssueGridMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactIssueGridMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); + + /** + * 议题增量月统计 + * @author zhaoqifeng + * @date 2020/6/19 15:26 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridMonthlyInc(String customerId, String monthId); + + /** + * 根据客户ID删除 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param customerId + * @param monthId + * @return void + */ + void deleteByCustomerId(String customerId, String monthId); + + /** + * 批量保存 + * @author zhaoqifeng + * @date 2020/6/23 14:07 + * @param list + * @return void + */ + void saveList(List list); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyDailyService.java new file mode 100644 index 0000000000..da57ca03b9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyDailyService.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; +import com.epmet.entity.stats.FactTagUsedGridDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedAgencyDailyService extends BaseService { + /** + * desc:删除并插入数据 + * @param customerId + * @param dateId + * @param values + * @return + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + /** + * desc:根据月份获取 机关汇总数据 + * @param customerId + * @param monthId + * @return + */ + List getTagUsedCountByMonth(String customerId, String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyMonthlyService.java new file mode 100644 index 0000000000..3c90d2003a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; + +import java.util.List; + +/** + * 标签【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedAgencyMonthlyService extends BaseService { + + List getTagUsedCountByYearId(String customerId, String monthId); + + List getTagUsedCountByQuarterId(String customerId, String quarterId); + + Boolean deleteAndInsertByMonthId(String customerId, String monthId, List agencyMonthlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyQuarterlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyQuarterlyService.java new file mode 100644 index 0000000000..81c04f9735 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyQuarterlyService.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; + +import java.util.List; + +/** + * 标签【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedAgencyQuarterlyService extends BaseService { + + + boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List agencyQuarterlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyYearlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyYearlyService.java new file mode 100644 index 0000000000..83f4049722 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyYearlyService.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; + +import java.util.List; + +/** + * 标签【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedAgencyYearlyService extends BaseService { + + int deleteByYearId(String customerId, String yearId); + + Boolean deleteAndInsertByYearId(String customerId, String yearId, List agencyYearlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentDailyService.java new file mode 100644 index 0000000000..c13158859e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentDailyService.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedDepartmentDailyService extends BaseService { + /** + * desc:删除并插入数据 + * @param customerId + * @param dateId + * @param values + * @return + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + /** + * desc:根据客户Id,月份Id 按照部门Id 标签Id分组 + * @param customerId + * @param monthId + * @return + */ + List getTagUsedCountByMonth(String customerId, String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentMonthlyService.java new file mode 100644 index 0000000000..3eae455daa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; + +import java.util.List; + +/** + * 标签【部门】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedDepartmentMonthlyService extends BaseService { + + List getTagUsedCountByYearId(String customerId, String monthId); + + List getTagUsedCountByQuarterId(String customerId, String quarterId); + + Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentQuarterlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentQuarterlyService.java new file mode 100644 index 0000000000..849a7c3d4e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentQuarterlyService.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; + +import java.util.List; + +/** + * 标签【部门】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedDepartmentQuarterlyService extends BaseService { + + + Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List deptQuarterlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentYearlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentYearlyService.java new file mode 100644 index 0000000000..672940a9fb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentYearlyService.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; + +import java.util.List; + +/** + * 标签【部门】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedDepartmentYearlyService extends BaseService { + + + Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridDailyService.java new file mode 100644 index 0000000000..b86c537b27 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridDailyService.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedGridDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedGridDailyService extends BaseService { + + /** + * desc:删除并插入数据 + * @param customerId + * @param dateId + * @param values + * @return + */ + boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + /** + * desc:根据客户Id 获取网格 某月数据,按照网格分组 + * @param customerId + * @param monthId + * @return + */ + List getTagUsedCountByMonth(String customerId, String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridMonthlyService.java new file mode 100644 index 0000000000..36917fcba2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; + +import java.util.List; + +/** + * 标签【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedGridMonthlyService extends BaseService { + + List getTagUsedCountByYearId(String customerId, String monthId); + + List getTagUsedCountByQuarterId(String customerId, String quarterId); + + Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridQuarterlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridQuarterlyService.java new file mode 100644 index 0000000000..468c28a2de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridQuarterlyService.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; + +import java.util.List; + +/** + * 标签【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedGridQuarterlyService extends BaseService { + + Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List gridQuarterlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridYearlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridYearlyService.java new file mode 100644 index 0000000000..027b00a376 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridYearlyService.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; + +import java.util.List; + +/** + * 标签【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagUsedGridYearlyService extends BaseService { + Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyDailyService.java new file mode 100644 index 0000000000..bd24b1afd7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyDailyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedAgencyDailyService extends BaseService { + + + Boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + List getTagViewedCountByMonth(String customerId, String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyMonthlyService.java new file mode 100644 index 0000000000..02c2604600 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedAgencyMonthlyService extends BaseService { + + Boolean deleteAndInsertByMonthId(String customerId, String monthId, List agencyMonthlyList); + + List getTagViewedCountByQuarterId(String customerId, String quarterId); + + List getTagViewedCountByYearId(String customerId, String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyQuarterlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyQuarterlyService.java new file mode 100644 index 0000000000..e32ca8ad7e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyQuarterlyService.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedAgencyQuarterlyService extends BaseService { + + Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List agencyQuarterlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyYearlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyYearlyService.java new file mode 100644 index 0000000000..abd0e42e08 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyYearlyService.java @@ -0,0 +1,35 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedAgencyYearlyService extends BaseService { + + + Boolean deleteAndInsertByYearId(String customerId, String yearId, List agencyYearlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridDailyService.java new file mode 100644 index 0000000000..dbd488ade2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridDailyService.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedGridDailyEntity; + +import java.util.Collection; +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedGridDailyService extends BaseService { + + Boolean deleteAndInsertBatch(String customerId, String dateId, Collection values); + + List getTagViewedCountByMonth(String customerId, String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridMonthlyService.java new file mode 100644 index 0000000000..6c5ccc8840 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridMonthlyService.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedGridMonthlyService extends BaseService { + + Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList); + + List getTagViewedCountByQuarterId(String customerId, String quarterId); + + List getTagViewedCountByYearId(String customerId, String yearId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridQuarterlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridQuarterlyService.java new file mode 100644 index 0000000000..9e224c8802 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridQuarterlyService.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedGridQuarterlyService extends BaseService { + + Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List gridQuarterlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridYearlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridYearlyService.java new file mode 100644 index 0000000000..c18d0a7385 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridYearlyService.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +public interface FactTagViewedGridYearlyService extends BaseService { + + Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java new file mode 100644 index 0000000000..35bf90a324 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java @@ -0,0 +1,10 @@ +package com.epmet.service.stats; + +import com.epmet.entity.stats.LastExecRecordEntity; + +public interface LastExecRecordService { + LastExecRecordEntity getLastExecRecord(String statsSubject); + LastExecRecordEntity createLastExecRecord(String statsSubject); + + void updateById(LastExecRecordEntity lastExecRecord); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java index 8c95530636..698a7c2881 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.service.stats.impl; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.constant.DataSourceConstant; + import com.epmet.dao.stats.DimYearDao; import com.epmet.entity.stats.DimYearEntity; import com.epmet.service.stats.DemoDataStatsService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java new file mode 100644 index 0000000000..ef1c918895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -0,0 +1,249 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DimAgencyConstant; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimAgencyDao; +import com.epmet.dao.stats.LastExecRecordDao; +import com.epmet.dto.AgencySubDeptTreeDto; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.stats.DimAgencyDTO; +import com.epmet.entity.org.CustomerAgencyEntity; +import com.epmet.entity.stats.DimAgencyEntity; +import com.epmet.service.stats.DimAgencyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 机关维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimAgencyServiceImpl extends BaseServiceImpl implements DimAgencyService { + + @Autowired + private LastExecRecordDao lastExecRecordDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimAgencyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimAgencyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimAgencyDTO get(String id) { + DimAgencyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimAgencyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimAgencyDTO dto) { + DimAgencyEntity entity = ConvertUtils.sourceToTarget(dto, DimAgencyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimAgencyDTO dto) { + DimAgencyEntity entity = ConvertUtils.sourceToTarget(dto, DimAgencyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @param dto + * @return + * @Author sun + * @Description 根据客户Id查询机关维度列表数据 + **/ + @Override + public List getDimAgencyList(DimAgencyDTO dto) { + return baseDao.selectDimAgencyList(dto); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initAgencyDims(List agencies) { + for (CustomerAgencyEntity agency : agencies) { + initAgencyAllDim(agency); + initAgencySelfDim(agency); + } + + lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_AGENCY); + } + + public void initAgencyAllDim(CustomerAgencyEntity agency) { + DimAgencyEntity dimAgencyEntity = new DimAgencyEntity(); + dimAgencyEntity.setAgencyName(agency.getOrganizationName()); + dimAgencyEntity.setAllParentName(agency.getAllParentName()); + dimAgencyEntity.setCustomerId(agency.getCustomerId()); + dimAgencyEntity.setLevel(agency.getLevel()); + dimAgencyEntity.setAgencyDimType(DimAgencyConstant.TYPE_ALL); + dimAgencyEntity.setPid(agency.getPid()); + dimAgencyEntity.setPids(agency.getPids()); + dimAgencyEntity.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dimAgencyEntity.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dimAgencyEntity.setId(agency.getId()); + baseDao.insert(dimAgencyEntity); + } + + /** + * 初始化机关单位本身的维度(不包含本身) + * @param agency + */ + public void initAgencySelfDim(CustomerAgencyEntity agency) { + DimAgencyEntity dimAgencyEntity = new DimAgencyEntity(); + dimAgencyEntity.setAgencyName(agency.getOrganizationName()); + dimAgencyEntity.setAllParentName(agency.getAllParentName()); + dimAgencyEntity.setCustomerId(agency.getCustomerId()); + dimAgencyEntity.setLevel(agency.getLevel()); + dimAgencyEntity.setPid(agency.getId()); + dimAgencyEntity.setAgencyDimType(DimAgencyConstant.TYPE_SELF); + dimAgencyEntity.setPids(agency.getPids().concat(":").concat(agency.getId())); + dimAgencyEntity.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dimAgencyEntity.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dimAgencyEntity.setId(agency.getId().concat(DimAgencyConstant.TYPE_SELF_ID_SUFFIX)); + baseDao.insert(dimAgencyEntity); + } + + /** + * @Description 查询所有机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + @Override + public List getAllAgency() { + return baseDao.selectAllAgency(); + } + + + /** + * @Description 查询顶级机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + @Override + public List getTopAgency() { + return baseDao.selectTopAgency(); + } + + @Override + public List getAgencyListByCustomerId(String customerId) { + if (StringUtils.isBlank(customerId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getAgencyListByCustomerId(customerId); + } + + + + /** + * @Description 带部门 查询所有机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + @Override + public List getAllAgencyWithDept() { + return baseDao.selectAllAgencyWithDept(); + } + + + /** + * @Description 带部门 查询顶级机关以及它下级机关的信息 + * @param + * @return List + * @author wangc + * @date 2020.06.18 09:45 + **/ + @Override + public List getTopAgencyWithDept() { + return baseDao.selectTopAgencyWithDept(); + } + + /** + * @Description 根据customerId获取机关信息 + * @param customerId + * @author zxc + */ + @Override + public List getAgencyInfoByCustomerId(String customerId) { + return baseDao.selectDimAgencyByCustomerId(customerId); + } + + /** + * @Description 根据机关Id获取上级机关ID + * @param agencyId + * @author zxc + */ + @Override + public String getPidByAgencyId(String agencyId) { + return baseDao.getPidByAgencyId(agencyId); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java new file mode 100644 index 0000000000..71663ccc5a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java @@ -0,0 +1,134 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimCustomerDao; +import com.epmet.dao.stats.LastExecRecordDao; +import com.epmet.dto.stats.DimCustomerDTO; +import com.epmet.entity.crm.CustomerEntity; +import com.epmet.entity.stats.DimCustomerEntity; +import com.epmet.service.stats.DimCustomerService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 客户维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +@Slf4j +public class DimCustomerServiceImpl extends BaseServiceImpl implements DimCustomerService { + + @Autowired + private LastExecRecordDao lastExecRecordDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimCustomerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimCustomerDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimCustomerDTO get(String id) { + DimCustomerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimCustomerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimCustomerDTO dto) { + DimCustomerEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimCustomerDTO dto) { + DimCustomerEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List selectCustomerIdPage(Integer pageNo, Integer pageSize) { + if (pageNo == null || pageNo < 1 || pageSize == null || pageSize < 0) { + log.error("selectCustomerIdPage param error,pageNo:{},pageSize:{}", pageNo, pageSize); + throw new RenException(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getCode(), EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getMsg()); + } + return baseDao.selectCustomerIdPage((pageNo - 1) * pageSize,pageSize); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initCustomerDims(List customers) { + for (CustomerEntity customer : customers) { + DimCustomerEntity dim = new DimCustomerEntity(); + dim.setCustomerName(customer.getCustomerName()); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setId(customer.getId()); + baseDao.insert(dim); + } + lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_CUSTOMER); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java new file mode 100644 index 0000000000..f6f0d9ee55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java @@ -0,0 +1,185 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimDateDao; +import com.epmet.dto.stats.DimDateDTO; +import com.epmet.entity.stats.DimDateEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimDateService; +import com.epmet.service.stats.LastExecRecordService; +import com.epmet.util.DimIdGenerator; +import org.apache.commons.lang3.StringUtils; +import org.joda.time.LocalDate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 日期维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimDateServiceImpl extends BaseServiceImpl implements DimDateService { + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimDateDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimDateDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimDateDTO get(String id) { + DimDateEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimDateDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimDateDTO dto) { + DimDateEntity entity = ConvertUtils.sourceToTarget(dto, DimDateEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimDateDTO dto) { + DimDateEntity entity = ConvertUtils.sourceToTarget(dto, DimDateEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initDimDate() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_DATE); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_DATE); + } + + Date now = new Date(); + + Date targetDate = DateUtils.addDateDays(DateUtils.parse( + DateUtils.format(now, DateUtils.DATE_PATTERN_YYYYMMDD), + DateUtils.DATE_PATTERN_YYYYMMDD), -1); + + Date lastDimDate = null; + + if ((lastDimDate = lastExecRecord.getExecTime()) == null) { + // 首次初始化按日维度 + initDimDate(targetDate); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } else { + if (targetDate.equals(lastDimDate) || targetDate.after(lastDimDate)) { + initDimDate(lastDimDate, targetDate); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } + } + } + + /** + * 连续初始化 + * @param startDate + * @param targetDate + */ + private void initDimDate(Date startDate, Date targetDate) { + LocalDate localStartDate = new LocalDate(startDate); + LocalDate localTargetDate = new LocalDate(targetDate); + while (localTargetDate.isEqual(localStartDate) || localTargetDate.isAfter(localStartDate)) { + initDimDate(localStartDate.toDate()); + localStartDate = localStartDate.plusDays(1); + } + } + + /** + * 初始化单日 + * @param targetDate + */ + public void initDimDate(Date targetDate) { + DimDateEntity dimDateEntity = generateDimDate(targetDate); + baseDao.insert(dimDateEntity); + } + + public DimDateEntity generateDimDate(Date targetDate) { + // 日期id + String id = DimIdGenerator.getDateDimId(targetDate); + // 月份id + String monthId = DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMM); + // 日期名称字符串 + String dateNameStr = DateUtils.format(targetDate, DateUtils.DATE_NAME_PATTERN); + // 星期几 + String chineseWeekName = DateUtils.getWeekNameOfWeek(targetDate, DateUtils.WEEK_TYPE_CHINESE); + String englishWeekName = DateUtils.getWeekNameOfWeek(targetDate, DateUtils.WEEK_TYPE_ENGLISH); + // 一年的第几周 + String weekId = DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYY).concat("W").concat(String.valueOf(DateUtils.getWeekOfYear(targetDate))); + + DimDateEntity dimDateEntity = new DimDateEntity(); + dimDateEntity.setId(id); + dimDateEntity.setDateName(dateNameStr); + dimDateEntity.setDayOfWeek(englishWeekName); + dimDateEntity.setDayOfWeekName(chineseWeekName); + dimDateEntity.setWeekId(weekId); + dimDateEntity.setMonthId(monthId); + dimDateEntity.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dimDateEntity.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + return dimDateEntity; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java new file mode 100644 index 0000000000..276908d48d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimDepartmentDao; +import com.epmet.dao.stats.LastExecRecordDao; +import com.epmet.dto.stats.DimDepartmentDTO; +import com.epmet.entity.org.CustomerDepartmentEntity; +import com.epmet.entity.stats.DimDepartmentEntity; +import com.epmet.service.stats.DimDepartmentService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 客户部门维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Slf4j +@Service +public class DimDepartmentServiceImpl extends BaseServiceImpl implements DimDepartmentService { + + @Autowired + private LastExecRecordDao lastExecRecordDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimDepartmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimDepartmentDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimDepartmentDTO get(String id) { + DimDepartmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimDepartmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimDepartmentDTO dto) { + DimDepartmentEntity entity = ConvertUtils.sourceToTarget(dto, DimDepartmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimDepartmentDTO dto) { + DimDepartmentEntity entity = ConvertUtils.sourceToTarget(dto, DimDepartmentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initDepartmentDims(List departments) { + for (CustomerDepartmentEntity department : departments) { + DimDepartmentEntity dim = new DimDepartmentEntity(); + dim.setAgencyId(department.getAgencyId()); + dim.setCustomerId(department.getCustomerId()); + dim.setDepartmentName(department.getDepartmentName()); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setId(department.getId()); + baseDao.insert(dim); + } + lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_DEPARTMENT); + } + + @Override + public List getDepartmentListByCustomerId(String customerId) { + if (StringUtils.isBlank(customerId)){ + log.warn("getDepartmentListByCustomerId param is blank "); + } + return baseDao.getDepartmentListByCustomerId(customerId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java new file mode 100644 index 0000000000..72bdafb3c4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -0,0 +1,159 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimGridDao; +import com.epmet.dao.stats.LastExecRecordDao; +import com.epmet.dto.group.AgencyDTO; +import com.epmet.dto.group.result.AgencyGridInfoResultDTO; +import com.epmet.dto.group.result.SubAgencyIdResultDTO; +import com.epmet.dto.stats.DimGridDTO; +import com.epmet.entity.stats.DimGridEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimGridService; +import com.epmet.service.stats.LastExecRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 客户网格维度 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimGridServiceImpl extends BaseServiceImpl implements DimGridService { + + @Autowired + private LastExecRecordDao lastExecRecordDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimGridDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimGridDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimGridDTO get(String id) { + DimGridEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimGridDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimGridDTO dto) { + DimGridEntity entity = ConvertUtils.sourceToTarget(dto, DimGridEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimGridDTO dto) { + DimGridEntity entity = ConvertUtils.sourceToTarget(dto, DimGridEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public DimGridEntity getLastCreatedGridDim() { + return baseDao.getLastCreatedGridDimEntity(); + } + + /** + * 初始化网格维度 + * @param gridDims + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void initGridDims(List gridDims) { + for (DimGridEntity gridDim : gridDims) { + baseDao.insert(gridDim); + } + + lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_GRID); + } + + @Override + public List getGridListByCustomerId(String customerId) { + if (StringUtils.isBlank(customerId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getGridListByCustomerId(customerId); + } + + /** + * @Description 查询机关下的网格 + * @param formDTO + * @author zxc + */ + @Override + public List selectAgencyGridInfo(List formDTO) { + return baseDao.selectAgencyGridInfo(formDTO); + } + + /** + * @Description 根据当前机关ID查询下级机关ID + * @param formDTO + * @author zxc + */ + @Override + public List selectSubAgencyId(List formDTO) { + return baseDao.selectSubAgencyId(formDTO); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java new file mode 100644 index 0000000000..d732bb5c47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java @@ -0,0 +1,169 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimMonthDao; +import com.epmet.dto.stats.DimMonthDTO; +import com.epmet.entity.stats.DimMonthEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimMonthService; +import com.epmet.service.stats.LastExecRecordService; +import com.epmet.util.DimIdGenerator; +import org.apache.commons.lang3.StringUtils; +import org.joda.time.LocalDate; +import org.joda.time.LocalTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 月份维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimMonthServiceImpl extends BaseServiceImpl implements DimMonthService { + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimMonthDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimMonthDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimMonthDTO get(String id) { + DimMonthEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimMonthDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimMonthDTO dto) { + DimMonthEntity entity = ConvertUtils.sourceToTarget(dto, DimMonthEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimMonthDTO dto) { + DimMonthEntity entity = ConvertUtils.sourceToTarget(dto, DimMonthEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initMonthDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_MONTH); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_DEPARTMENT); + } + + Date now = new Date(); + Date startMonth; + Date targetMonth = DateUtils.addDateMonths(DateUtils.integrate(now, DateUtils.DATE_PATTERN_YYYYMM), -1); + + if (lastExecRecord.getExecTime() == null) { + initMonthDim(targetMonth); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } else { + startMonth = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYYMM); + if (targetMonth.equals(startMonth) || targetMonth.after(startMonth)) { + initMonthDims(startMonth, targetMonth); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } + } + } + + /** + * 按月维度连续生成 + * @param startMonth + * @param targetMonth + */ + public void initMonthDims(Date startMonth, Date targetMonth) { + LocalDate localstartMonth = new LocalDate(startMonth); + LocalDate localTargetMonth = new LocalDate(targetMonth); + while(localTargetMonth.isEqual(localstartMonth) || localTargetMonth.isAfter(localstartMonth)) { + initMonthDim(localstartMonth.toDate()); + localstartMonth = localstartMonth.plusMonths(1); + } + } + + public void initMonthDim(Date targetMonth) { + Date endDate = DateUtils.addDateDays(DateUtils.addDateMonths(targetMonth, 1), -1); + LocalDate localDate = new LocalDate(targetMonth); + + DimMonthEntity dim = new DimMonthEntity(); + dim.setStartDate(targetMonth); + dim.setEndDate(endDate); + dim.setMonthName(DateUtils.format(targetMonth, DateUtils.MONTH_NAME_PATTERN)); + dim.setMonthOrder(DateUtils.getMonthOfYear(targetMonth)); + dim.setQuarterId(localDate.getYear() + "Q" + DateUtils.getQuarterIndex(targetMonth)); + dim.setYearId(localDate.getYear() + ""); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setId(DimIdGenerator.getMonthDimId(targetMonth)); + baseDao.insert(dim); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java new file mode 100644 index 0000000000..767e2e6633 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java @@ -0,0 +1,210 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimQuarterDao; +import com.epmet.dto.stats.DimQuarterDTO; +import com.epmet.entity.stats.DimQuarterEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimQuarterService; +import com.epmet.service.stats.LastExecRecordService; +import com.epmet.util.DimIdGenerator; +import com.sun.org.apache.xpath.internal.operations.Bool; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 季度维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimQuarterServiceImpl extends BaseServiceImpl implements DimQuarterService { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Autowired + private DimQuarterDao dimQuarterDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimQuarterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimQuarterDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimQuarterDTO get(String id) { + DimQuarterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimQuarterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimQuarterDTO dto) { + DimQuarterEntity entity = ConvertUtils.sourceToTarget(dto, DimQuarterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimQuarterDTO dto) { + DimQuarterEntity entity = ConvertUtils.sourceToTarget(dto, DimQuarterEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initQuarterDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_QUARTER); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_QUARTER); + } + + //Date now = new Date(); + Date now = DateUtils.parse("20210430", DateUtils.DATE_PATTERN_YYYYMMDD); + + Date targetQuarter; + Date startQuarter; + + targetQuarter = DateUtils.integrate(DateUtils.addDateMonths(now, -3), DateUtils.DATE_PATTERN_YYYYMM); + + if (lastExecRecord.getExecTime() == null) { + // 初始化上一个季度 + initQuarterDim(targetQuarter); + lastExecRecord.setExecTime(new Date()); + lastExecRecordService.updateById(lastExecRecord); + } else { + // 连续初始化多个季度 + startQuarter = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYYMM); + if (initQuarterDim(startQuarter, targetQuarter)) { + lastExecRecord.setExecTime(new Date()); + lastExecRecordService.updateById(lastExecRecord); + } + } + } + + /** + * 连续初始化多个季度维度数据 + * @param startQday + * @param targetQday + * @return 是否产生新数据 + */ + public boolean initQuarterDim(Date startQday, Date targetQday) { + Boolean execed = false; + Integer startQuarterIdx; + Integer targetQuarterIdx; + while ((startQuarterIdx = Integer.valueOf(DateUtils.format(startQday, DateUtils.DATE_PATTERN_YYYY) + DateUtils.getQuarterIndex(startQday))) + <= (targetQuarterIdx = Integer.valueOf(DateUtils.format(targetQday, DateUtils.DATE_PATTERN_YYYY) + DateUtils.getQuarterIndex(targetQday)))) { + initQuarterDim(startQday); + startQday = DateUtils.addDateMonths(startQday, 3); + execed = true; + } + return execed; + } + /** + * 初始化指定月份维度数据 + */ + public void initQuarterDim(Date targetQday) { + DimQuarterEntity dim = new DimQuarterEntity(); + String quarterDimId = DimIdGenerator.getQuarterDimId(targetQday); + dim.setId(quarterDimId); + dim.setQuarterName(getQuarterName(targetQday)); + + String yyyy = DateUtils.format(targetQday, DateUtils.DATE_PATTERN_YYYY); + int quarter = DateUtils.getQuarterIndex(targetQday); + dim.setStartDate(DateUtils.getQuarterStartDate(yyyy, quarter)); + dim.setEndDate(DateUtils.getQuarterEndDate(yyyy, quarter)); + dim.setQuarterOrder(quarter); + dim.setYearId(yyyy); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dimQuarterDao.insert(dim); + logger.info("初始化季度数据,基于日期:" + targetQday + ",生成的DimId:" + quarterDimId); + } + + /** + * 季度名称 + * @param targetQday + * @return + */ + private String getQuarterName(Date targetQday) { + String yyyy = DateUtils.format(targetQday, DateUtils.DATE_PATTERN_YYYY); + int quarterIndex = DateUtils.getQuarterIndex(targetQday); + String quarterName; + switch (quarterIndex) { + case 1: + quarterName = "第一季度"; + break; + case 2: + quarterName = "第二季度"; + break; + case 3: + quarterName = "第三季度"; + break; + default: + quarterName = "第四季度"; + } + return yyyy.concat("年").concat(quarterName); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimTopicStatusServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimTopicStatusServiceImpl.java new file mode 100644 index 0000000000..987c30dcb7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimTopicStatusServiceImpl.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.DimTopicStatusDao; +import com.epmet.dto.stats.DimTopicStatusDTO; +import com.epmet.entity.stats.DimTopicStatusEntity; +import com.epmet.service.stats.DimTopicStatusService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 话题状态维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimTopicStatusServiceImpl extends BaseServiceImpl implements DimTopicStatusService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimTopicStatusDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimTopicStatusDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimTopicStatusDTO get(String id) { + DimTopicStatusEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimTopicStatusDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimTopicStatusDTO dto) { + DimTopicStatusEntity entity = ConvertUtils.sourceToTarget(dto, DimTopicStatusEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimTopicStatusDTO dto) { + DimTopicStatusEntity entity = ConvertUtils.sourceToTarget(dto, DimTopicStatusEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java new file mode 100644 index 0000000000..45359643cf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java @@ -0,0 +1,177 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimWeekDao; +import com.epmet.dto.stats.DimWeekDTO; +import com.epmet.entity.stats.DimWeekEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimWeekService; +import com.epmet.service.stats.LastExecRecordService; +import org.apache.commons.lang3.StringUtils; +import org.joda.time.LocalDate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 周维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimWeekServiceImpl extends BaseServiceImpl implements DimWeekService { + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimWeekDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimWeekDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimWeekDTO get(String id) { + DimWeekEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimWeekDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimWeekDTO dto) { + DimWeekEntity entity = ConvertUtils.sourceToTarget(dto, DimWeekEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimWeekDTO dto) { + DimWeekEntity entity = ConvertUtils.sourceToTarget(dto, DimWeekEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initWeekDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_WEEK); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_WEEK); + } + + Date now = new Date(); + Date startWeekDay; + Date targetWeekDay = DateUtils.getWeekStartAndEnd(DateUtils.addDateDays(now, -7))[0]; + + if (lastExecRecord.getExecTime() == null) { + // 首次执行 + initWeekDim(targetWeekDay); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } else { + startWeekDay = DateUtils.getWeekStartAndEnd(lastExecRecord.getExecTime())[0]; + if (targetWeekDay.equals(startWeekDay) || targetWeekDay.after(startWeekDay)) { + initWeekDim(startWeekDay, targetWeekDay); + lastExecRecord.setExecTime(now); + lastExecRecordService.updateById(lastExecRecord); + } + } + } + + /** + * 按周维度连续初始化 + * @param startWeekDay + * @param targetWeekDay + */ + private void initWeekDim(Date startWeekDay, Date targetWeekDay) { + LocalDate localStartWeekDay = new LocalDate(startWeekDay); + LocalDate localTargetWeekDay = new LocalDate(targetWeekDay); + + while (localTargetWeekDay.isEqual(localStartWeekDay) + || localTargetWeekDay.isAfter(localStartWeekDay)) { + + initWeekDim(localStartWeekDay.toDate()); + localStartWeekDay = localStartWeekDay.plusDays(7); + } + } + + /** + * 单周初始化 + * @param targetWeekDay + */ + private void initWeekDim(Date targetWeekDay) { + Date[] weekBorders = DateUtils.getWeekStartAndEnd(targetWeekDay); + String yyyy = DateUtils.format(targetWeekDay, DateUtils.DATE_PATTERN_YYYY); + int weekOfYear = DateUtils.getWeekOfYear(targetWeekDay); + + Date now = new Date(); + DimWeekEntity dim = new DimWeekEntity(); + dim.setEndDate(weekBorders[1]); + dim.setStartDate(weekBorders[0]); + dim.setWeekName(yyyy + "年第" + weekOfYear + "周"); + dim.setWeekOrder(weekOfYear); + dim.setYearId(yyyy); + dim.setId(yyyy.concat("W").concat(String.format("%02d", weekOfYear))); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + + baseDao.insert(dim); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java new file mode 100644 index 0000000000..7f216f15f3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java @@ -0,0 +1,170 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.RobotConstant; +import com.epmet.constant.StatsSubject; +import com.epmet.dao.stats.DimYearDao; +import com.epmet.dto.stats.DimYearDTO; +import com.epmet.entity.stats.DimYearEntity; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.DimYearService; +import com.epmet.service.stats.LastExecRecordService; +import org.apache.commons.lang3.StringUtils; +import org.joda.time.LocalDate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 年维度表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class DimYearServiceImpl extends BaseServiceImpl implements DimYearService { + + @Autowired + private LastExecRecordService lastExecRecordService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DimYearDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DimYearDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DimYearDTO get(String id) { + DimYearEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DimYearDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DimYearDTO dto) { + DimYearEntity entity = ConvertUtils.sourceToTarget(dto, DimYearEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DimYearDTO dto) { + DimYearEntity entity = ConvertUtils.sourceToTarget(dto, DimYearEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void initYearDim() { + LastExecRecordEntity lastExecRecord = lastExecRecordService.getLastExecRecord(StatsSubject.DIM_YEAR); + if (lastExecRecord == null) { + lastExecRecord = lastExecRecordService.createLastExecRecord(StatsSubject.DIM_YEAR); + } + + Date now = new Date(); + + Date startYear; + Date targetYear; + + targetYear = DateUtils.integrate(DateUtils.addDateYears(now, -1), DateUtils.DATE_PATTERN_YYYY); + if (lastExecRecord.getExecTime() == null) { + // 第一次执行统计 + initYearDim(targetYear); + lastExecRecord.setExecTime(now); + // 记录最后一次统计时间 + lastExecRecordService.updateById(lastExecRecord); + } else { + startYear = DateUtils.integrate(lastExecRecord.getExecTime(), DateUtils.DATE_PATTERN_YYYY); + if (targetYear.equals(startYear) || targetYear.after(startYear)) { + initYearDims(startYear, targetYear); + lastExecRecord.setExecTime(now); + // 记录最后一次统计时间 + lastExecRecordService.updateById(lastExecRecord); + } + } + } + + /** + * 按年连续初始化 + * @param startYear + * @param targetYear + */ + private void initYearDims(Date startYear, Date targetYear) { + LocalDate localStartYear = new LocalDate(startYear); + LocalDate localTargetYear = new LocalDate(targetYear); + while (localStartYear.getYear() <= localTargetYear.getYear()) { + initYearDim(localStartYear.toDate()); + localStartYear = localStartYear.plusYears(1); + } + } + + /** + * 俺年单次统计 + * @param targetYear + */ + public void initYearDim(Date targetYear) { + String yyyy = DateUtils.format(targetYear, DateUtils.DATE_PATTERN_YYYY); + + DimYearEntity dim = new DimYearEntity(); + dim.setId(yyyy); + dim.setYearName(yyyy.concat("年")); + dim.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + dim.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + baseDao.insert(dim); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java new file mode 100644 index 0000000000..bbb1b39e44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactAgencyProjectDailyDao; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; +import com.epmet.service.stats.FactAgencyProjectDailyService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl implements FactAgencyProjectDailyService { + + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月机关日统计数据,按时间倒序 + **/ + @Override + public List getMonthProjectList(MonthProjectListFormDTO formDTO) { + return baseDao.selectMonthProjectList(formDTO); + } + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + @Override + public void delDateProject(FactAgencyProjectDailyEntity delEntity) { + baseDao.delDateProject(delEntity); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java new file mode 100644 index 0000000000..df869107f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.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.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactAgencyProjectMonthlyDao; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; +import com.epmet.service.stats.FactAgencyProjectMonthlyService; +import org.springframework.stereotype.Service; + +/** + * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactAgencyProjectMonthlyServiceImpl extends BaseServiceImpl implements FactAgencyProjectMonthlyService { + + /** + * @param delEntity + * @return + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除可能存在的历史数据 + **/ + @Override + public void delMonthProject(FactAgencyProjectMonthlyEntity delEntity) { + baseDao.delMonthProject(delEntity); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..48d8bbe0f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.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.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactArticlePublishedAgencyDailyDao; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; +import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; + +/** + * 文章发布数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactArticlePublishedAgencyDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedAgencyDailyService { + + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)){ + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); + this.insertBatch(values, 100); + return true; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java new file mode 100644 index 0000000000..6f9e172dce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactArticlePublishedDepartmentDailyDao; +import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; +import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; + +/** + * 文章发布数量【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactArticlePublishedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedDepartmentDailyService { + + + @Override + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)){ + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); + this.insertBatch(values, 100); + return true; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java new file mode 100644 index 0000000000..c13a282916 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactArticlePublishedGridDailyDao; +import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; +import com.epmet.entity.stats.FactArticlePublishedGridDailyEntity; +import com.epmet.service.stats.FactArticlePublishedGridDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 文章发布数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactArticlePublishedGridDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedGridDailyService { + + + @Override + public List getByBeforeDay(String customerId, String dateId) { + log.debug("getByBeforeDay param customerId:{},dateId:{}", customerId, dateId); + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(dateId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getByBeforeDay(customerId, dateId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)) { + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i); + this.insertBatch(values, 100); + return true; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java new file mode 100644 index 0000000000..1b54cd7686 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactGridProjectDailyDao; +import com.epmet.dto.project.form.MonthProjectListFormDTO; +import com.epmet.entity.stats.FactAgencyProjectDailyEntity; +import com.epmet.entity.stats.FactGridProjectDailyEntity; +import com.epmet.service.stats.FactGridProjectDailyService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactGridProjectDailyServiceImpl extends BaseServiceImpl implements FactGridProjectDailyService { + + /** + * @param delEntity + * @Author sun + * @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 + **/ + @Override + public void delDateProject(FactAgencyProjectDailyEntity delEntity) { + baseDao.delDateProject(delEntity); + } + + /** + * @param formDTO + * @Author sun + * @Description 查询上一月网格日统计数据,按时间倒序 + **/ + @Override + public List getMonthProjectList(MonthProjectListFormDTO formDTO) { + return baseDao.selectMonthProjectList(formDTO); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java new file mode 100644 index 0000000000..1d026d2891 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java @@ -0,0 +1,44 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.stats.FactGridProjectMonthlyDao; +import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; +import com.epmet.entity.stats.FactGridProjectMonthlyEntity; +import com.epmet.service.stats.FactGridProjectMonthlyService; +import org.springframework.stereotype.Service; + +/** + * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactGridProjectMonthlyServiceImpl extends BaseServiceImpl implements FactGridProjectMonthlyService { + + /** + * @Author sun + * @Description 根据客户Id、月份Id批量物理删除一下可能存在的历史数据 + **/ + @Override + public void delMonthProject(FactAgencyProjectMonthlyEntity delEntity) { + baseDao.delMonthProject(delEntity); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..6dd5a0705b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java @@ -0,0 +1,142 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactGroupAgencyDailyDao; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.group.result.AgencyGroupDailyResultDTO; +import com.epmet.dto.group.result.AgencyGroupMonthlyResultDTO; +import com.epmet.dto.stats.FactGroupAgencyDailyDTO; +import com.epmet.entity.stats.FactGroupAgencyDailyEntity; +import com.epmet.service.stats.FactGroupAgencyDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 组-机关日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactGroupAgencyDailyServiceImpl extends BaseServiceImpl implements FactGroupAgencyDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactGroupAgencyDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactGroupAgencyDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactGroupAgencyDailyDTO get(String id) { + FactGroupAgencyDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactGroupAgencyDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactGroupAgencyDailyDTO dto) { + FactGroupAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupAgencyDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactGroupAgencyDailyDTO dto) { + FactGroupAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupAgencyDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 插入网格小组数据 【机关-日】 先删除、再插入 + * @param agencyList + * @author zxc + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupAgencyDaily(List agencyList,String customerId) { + if (agencyList.size() != NumConstant.ZERO){ + baseDao.deleteInsertAgencyDailyByDateId(agencyList.get(NumConstant.ZERO).getDateId(),customerId); + baseDao.insertGroupAgencyDaily(agencyList); + } + + } + + /** + * @Description 获取 网格小组【机关-日统计】的最后一天数据 + * @param + * @author zxc + */ + public List getLastDayAgency(String monthId){ + return baseDao.getLastDayAgency(monthId); + } + + /** + * @Description 查询 月的小组增量 + * @param monthId + * @author zxc + */ + @Override + public List getMonthGroupIncr(String monthId) { + if (StringUtils.isBlank(monthId)){ + return new ArrayList<>(); + } + return baseDao.getMonthGroupIncr(monthId); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..a9ba8ff7ac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactGroupAgencyMonthlyDao; +import com.epmet.dto.group.form.AgencyMonthlyFormDTO; +import com.epmet.dto.stats.FactGroupAgencyMonthlyDTO; +import com.epmet.entity.stats.FactGroupAgencyMonthlyEntity; +import com.epmet.service.stats.FactGroupAgencyMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 组-机关月统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactGroupAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactGroupAgencyMonthlyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactGroupAgencyMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactGroupAgencyMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactGroupAgencyMonthlyDTO get(String id) { + FactGroupAgencyMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactGroupAgencyMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactGroupAgencyMonthlyDTO dto) { + FactGroupAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupAgencyMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactGroupAgencyMonthlyDTO dto) { + FactGroupAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupAgencyMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 统计网格小组 【机关-月】 + * @param agencyMonth + * @author zxc + */ + @Override + public void insertAgencyGroupMonthly(List agencyMonth) { + if (agencyMonth.size() == NumConstant.ZERO){ + return; + } + baseDao.deleteInsertAgencyMonthlyByMonthId(agencyMonth.get(NumConstant.ZERO).getMonthId()); + baseDao.insertAgencyGroupMonthly(agencyMonth); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java new file mode 100644 index 0000000000..6556ba92b6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java @@ -0,0 +1,123 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.group.result.GroupGridDailyResultDTO; +import com.epmet.dto.stats.FactGroupGridDailyDTO; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactGroupGridDailyDao; +import com.epmet.entity.stats.FactGroupGridDailyEntity; +import com.epmet.service.StatsGroupService; +import com.epmet.service.group.GroupDataService; +import com.epmet.service.stats.FactGroupGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 组-网格日统计数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-16 + */ +@Service +public class FactGroupGridDailyServiceImpl extends BaseServiceImpl implements FactGroupGridDailyService { + + @Autowired + private StatsGroupService statsGroupService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactGroupGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactGroupGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactGroupGridDailyDTO get(String id) { + FactGroupGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactGroupGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactGroupGridDailyDTO dto) { + FactGroupGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactGroupGridDailyDTO dto) { + FactGroupGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGroupGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 统计小组【网格-日】 + * @param + * @author zxc + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void statisticsGroupGridDaily(List formDto,String customerId) { + if (formDto.size() == NumConstant.ZERO){ + return; + } + String dateId = formDto.get(NumConstant.ZERO).getDateId(); + baseDao.deleteInsertDateId(dateId,customerId); + baseDao.insertGroupGridDaily(formDto); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..e6007e90d2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactIssueAgencyDailyDao; +import com.epmet.dto.stats.FactIssueAgencyDailyDTO; +import com.epmet.entity.stats.FactIssueAgencyDailyEntity; +import com.epmet.service.stats.FactIssueAgencyDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactIssueAgencyDailyServiceImpl extends BaseServiceImpl implements FactIssueAgencyDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactIssueAgencyDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactIssueAgencyDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactIssueAgencyDailyDTO get(String id) { + FactIssueAgencyDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactIssueAgencyDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactIssueAgencyDailyDTO dto) { + FactIssueAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueAgencyDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactIssueAgencyDailyDTO dto) { + FactIssueAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueAgencyDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByCustomerId(String customerId, String dateId) { + baseDao.deleteByCustomerId(customerId, dateId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveList(List list) { + insertBatch(list); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..7215ecb179 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java @@ -0,0 +1,118 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactIssueAgencyMonthlyDao; +import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; +import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; +import com.epmet.service.stats.FactIssueAgencyMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 组织机关议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactIssueAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactIssueAgencyMonthlyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactIssueAgencyMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactIssueAgencyMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactIssueAgencyMonthlyDTO get(String id) { + FactIssueAgencyMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactIssueAgencyMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactIssueAgencyMonthlyDTO dto) { + FactIssueAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueAgencyMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactIssueAgencyMonthlyDTO dto) { + FactIssueAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueAgencyMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getAgencyMonthlyInc(String customerId, String monthId) { + return baseDao.selectAgencyMonthlyInc(customerId, monthId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByCustomerId(String customerId, String monthId) { + baseDao.deleteByCustomerId(customerId, monthId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveList(List list) { + insertBatch(list); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java new file mode 100644 index 0000000000..063e2ef8c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactIssueGridDailyDao; +import com.epmet.dto.stats.FactIssueGridDailyDTO; +import com.epmet.entity.stats.FactIssueGridDailyEntity; +import com.epmet.service.stats.FactIssueGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格议题数量(按日) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactIssueGridDailyServiceImpl extends BaseServiceImpl implements FactIssueGridDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactIssueGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactIssueGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactIssueGridDailyDTO get(String id) { + FactIssueGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactIssueGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactIssueGridDailyDTO dto) { + FactIssueGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactIssueGridDailyDTO dto) { + FactIssueGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByCustomerId(String customerId, String dateId) { + baseDao.deleteByCustomerId(customerId, dateId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveList(List list) { + insertBatch(list); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..d3b0468011 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.FactIssueGridMonthlyDao; +import com.epmet.dto.stats.FactIssueGridMonthlyDTO; +import com.epmet.entity.stats.FactIssueGridMonthlyEntity; +import com.epmet.service.stats.FactIssueGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格议题数量(按月) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactIssueGridMonthlyServiceImpl extends BaseServiceImpl implements FactIssueGridMonthlyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactIssueGridMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactIssueGridMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactIssueGridMonthlyDTO get(String id) { + FactIssueGridMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactIssueGridMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactIssueGridMonthlyDTO dto) { + FactIssueGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueGridMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactIssueGridMonthlyDTO dto) { + FactIssueGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactIssueGridMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getGridMonthlyInc(String customerId, String monthId) { + return baseDao.selectGridMonthlyInc(customerId, monthId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByCustomerId(String customerId, String monthId) { + baseDao.deleteByCustomerId(customerId, monthId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveList(List list) { + insertBatch(list); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..7eef72f9d7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedAgencyDailyDao; +import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; +import com.epmet.entity.stats.FactTagUsedGridDailyEntity; +import com.epmet.service.stats.FactTagUsedAgencyDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyDailyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)){ + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i); + this.insertBatch(values, 100); + return true; + } + + @Override + public List getTagUsedCountByMonth(String customerId, String monthId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByMonth(customerId,monthId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..85c51f9fdb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java @@ -0,0 +1,69 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao; +import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; +import com.epmet.service.stats.FactTagUsedAgencyMonthlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyMonthlyService { + + @Override + public List getTagUsedCountByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByYearId(customerId, yearId); + } + + @Override + public List getTagUsedCountByQuarterId(String customerId, String quarterId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByQuarterId(customerId, quarterId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List agencyMonthlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(agencyMonthlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByMonthId(customerId,monthId); + return this.insertBatch(agencyMonthlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java new file mode 100644 index 0000000000..ec83b4b9b6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.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.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao; +import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; +import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyQuarterlyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List agencyQuarterlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(agencyQuarterlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByQuarterId(customerId,quarterId); + return this.insertBatch(agencyQuarterlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java new file mode 100644 index 0000000000..32f24e5836 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.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.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao; +import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; +import com.epmet.service.stats.FactTagUsedAgencyYearlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyYearlyService { + + @Override + public int deleteByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.deleteByYearId(customerId, yearId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByYearId(String customerId, String yearId, List agencyYearlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId) || CollectionUtils.isEmpty(agencyYearlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByYearId(customerId, yearId); + return this.insertBatch(agencyYearlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java new file mode 100644 index 0000000000..f88f1f330a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java @@ -0,0 +1,64 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao; +import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; +import com.epmet.service.stats.FactTagUsedDepartmentDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【部门】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentDailyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)){ + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); + this.insertBatch(values, 100); + return true; + } + + @Override + public List getTagUsedCountByMonth(String customerId, String monthId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByMonthId(customerId,monthId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java new file mode 100644 index 0000000000..e0411038be --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java @@ -0,0 +1,70 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao; +import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; +import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【部门】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentMonthlyService { + + + @Override + public List getTagUsedCountByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByYearId(customerId,yearId); + } + + @Override + public List getTagUsedCountByQuarterId(String customerId, String quarterId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByQuarterId(customerId,quarterId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByMonthId(customerId,monthId); + return this.insertBatch(gridMonthlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java new file mode 100644 index 0000000000..bb51750412 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao; +import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; +import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【部门】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentQuarterlyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List deptQuarterlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(deptQuarterlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByQuarterId(customerId,quarterId); + return this.insertBatch(deptQuarterlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java new file mode 100644 index 0000000000..6614095001 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao; +import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; +import com.epmet.service.stats.FactTagUsedDepartmentYearlyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【部门】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentYearlyService { + + @Override + public Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId) || CollectionUtils.isEmpty(gridYearlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByYearId(customerId, yearId); + return this.insertBatch(gridYearlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java new file mode 100644 index 0000000000..95081992f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedGridDailyDao; +import com.epmet.entity.stats.FactTagUsedGridDailyEntity; +import com.epmet.service.stats.FactTagUsedGridDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 标签【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl implements FactTagUsedGridDailyService { + + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)){ + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); + this.insertBatch(values, 100); + return true; + } + + @Override + public List getTagUsedCountByMonth(String customerId, String monthId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByMonthId(customerId,monthId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..05dc9a8942 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedGridMonthlyDao; +import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; +import com.epmet.service.stats.FactTagUsedGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridMonthlyService { + + @Override + public List getTagUsedCountByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByYearId(customerId,yearId); + } + + @Override + public List getTagUsedCountByQuarterId(String customerId, String quarterId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByQuarterId(customerId,quarterId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByMonthId(customerId,monthId); + return this.insertBatch(gridMonthlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java new file mode 100644 index 0000000000..4e6bf21e2c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao; +import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; +import com.epmet.service.stats.FactTagUsedGridQuarterlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridQuarterlyService { + + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List gridQuarterlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(gridQuarterlyList)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByQuarterId(customerId,quarterId); + return this.insertBatch(gridQuarterlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java new file mode 100644 index 0000000000..02c7902ec2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagUsedGridYearlyDao; +import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; +import com.epmet.service.stats.FactTagUsedGridYearlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 标签【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridYearlyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId) || CollectionUtils.isEmpty(gridYearlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByYearId(customerId, yearId); + return this.insertBatch(gridYearlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..9e9500e96e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.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.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedAgencyDailyDao; +import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; +import com.epmet.service.stats.FactTagViewedAgencyDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagViewedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyDailyService { + + @Override + public Boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)) { + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i); + this.insertBatch(values, 100); + return true; + } + + @Override + public List getTagViewedCountByMonth(String customerId, String monthId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagViewedCountByMonthId(customerId, monthId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..0b7f08a6ed --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedAgencyMonthlyDao; +import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; +import com.epmet.service.stats.FactTagViewedAgencyMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyMonthlyService { + + @Override + public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List agencyMonthlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(agencyMonthlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByMonthId(customerId, monthId); + return this.insertBatch(agencyMonthlyList, 100); + } + + @Override + public List getTagViewedCountByQuarterId(String customerId, String quarterId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagViewedCountByQuarterId(customerId, quarterId); + } + + @Override + public List getTagViewedCountByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByYearId(customerId, yearId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java new file mode 100644 index 0000000000..ba226febc9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedAgencyQuarterlyDao; +import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; +import com.epmet.service.stats.FactTagViewedAgencyQuarterlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyQuarterlyService { + + @Override + public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List agencyQuarterlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(agencyQuarterlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByQuarterId(customerId, quarterId); + return this.insertBatch(agencyQuarterlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java new file mode 100644 index 0000000000..d5a0f0c123 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedAgencyYearlyDao; +import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; +import com.epmet.service.stats.FactTagViewedAgencyYearlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【机关】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyYearlyService { + + @Override + public Boolean deleteAndInsertByYearId(String customerId, String yearId, List agencyYearlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId) || CollectionUtils.isEmpty(agencyYearlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByYearId(customerId, yearId); + return this.insertBatch(agencyYearlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java new file mode 100644 index 0000000000..2f3d9c0781 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java @@ -0,0 +1,64 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedGridDailyDao; +import com.epmet.entity.stats.FactTagViewedGridDailyEntity; +import com.epmet.service.stats.FactTagViewedGridDailyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】日统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Slf4j +@Service +public class FactTagViewedGridDailyServiceImpl extends BaseServiceImpl implements FactTagViewedGridDailyService { + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertBatch(String customerId, String dateId, Collection values) { + if (CollectionUtils.isEmpty(values)) { + return false; + } + int i = baseDao.deleteByDateId(customerId, dateId); + log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i); + this.insertBatch(values, 100); + return true; + } + + @Override + public List getTagViewedCountByMonth(String customerId, String monthId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagViewedCountByMonthId(customerId, monthId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..59e0726914 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedGridMonthlyDao; +import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; +import com.epmet.service.stats.FactTagViewedGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】月统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridMonthlyService { + + @Override + public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List gridMonthlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByMonthId(customerId, monthId); + return this.insertBatch(gridMonthlyList, 100); + } + + @Override + public List getTagViewedCountByQuarterId(String customerId, String quarterId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagViewCountByQuarterId(customerId, quarterId); + } + + @Override + public List getTagViewedCountByYearId(String customerId, String yearId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getTagUsedCountByYearId(customerId, yearId); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java new file mode 100644 index 0000000000..1671a6f4ef --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedGridQuarterlyDao; +import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; +import com.epmet.service.stats.FactTagViewedGridQuarterlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】季度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridQuarterlyService { + + @Override + public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List gridQuarterlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(gridQuarterlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByQuarterId(customerId, quarterId); + return this.insertBatch(gridQuarterlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java new file mode 100644 index 0000000000..a7dd6a6242 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.stats.FactTagViewedGridYearlyDao; +import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; +import com.epmet.service.stats.FactTagViewedGridYearlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 文章引用标签阅读数量【网格】年度统计表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-18 + */ +@Service +public class FactTagViewedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridYearlyService { + + @Override + public Boolean deleteAndInsertByYearId(String customerId, String yearId, List gridYearlyList) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId) || CollectionUtils.isEmpty(gridYearlyList)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + baseDao.deleteByYearId(customerId, yearId); + return this.insertBatch(gridYearlyList, 100); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java new file mode 100644 index 0000000000..5fe4e6f924 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java @@ -0,0 +1,42 @@ +package com.epmet.service.stats.impl; + +import com.epmet.constant.RobotConstant; +import com.epmet.dao.stats.LastExecRecordDao; +import com.epmet.entity.stats.LastExecRecordEntity; +import com.epmet.service.stats.LastExecRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; + +@Service +public class LastExecRecordServiceImpl implements LastExecRecordService { + @Autowired + private LastExecRecordDao lastExecRecordDao; + + public LastExecRecordEntity getLastExecRecord(String statsSubject) { + return lastExecRecordDao.getLastExecRecord(statsSubject); + } + + /** + * 创建末次执行记录 + * @param statsSubject + * @return + */ + @Override + public LastExecRecordEntity createLastExecRecord(String statsSubject) { + Date now = new Date(); + LastExecRecordEntity entity = new LastExecRecordEntity(); + entity.setExecTime(now); + entity.setSubject(statsSubject); + entity.setCreatedBy(RobotConstant.DIMENSION_ROBOT); + entity.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); + lastExecRecordDao.insert(entity); + return entity; + } + + @Override + public void updateById(LastExecRecordEntity lastExecRecord) { + lastExecRecordDao.updateById(lastExecRecord); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyDailyService.java new file mode 100644 index 0000000000..f489c17788 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyDailyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactParticipationUserAgencyDailyDTO; +import com.epmet.entity.stats.user.FactParticipationUserAgencyDailyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 机关下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactParticipationUserAgencyDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactParticipationUserAgencyDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactParticipationUserAgencyDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactParticipationUserAgencyDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactParticipationUserAgencyDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyMonthlyService.java new file mode 100644 index 0000000000..913b9140f4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserAgencyMonthlyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactParticipationUserAgencyMonthlyDTO; +import com.epmet.entity.stats.user.FactParticipationUserAgencyMonthlyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 机关下(按月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactParticipationUserAgencyMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactParticipationUserAgencyMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactParticipationUserAgencyMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactParticipationUserAgencyMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactParticipationUserAgencyMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java new file mode 100644 index 0000000000..5b4ef692c7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactParticipationUserGridDailyDTO; +import com.epmet.entity.stats.user.FactParticipationUserGridDailyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 网格下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactParticipationUserGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactParticipationUserGridDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactParticipationUserGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactParticipationUserGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactParticipationUserGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridMonthlyService.java new file mode 100644 index 0000000000..729f51a276 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridMonthlyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactParticipationUserGridMonthlyDTO; +import com.epmet.entity.stats.user.FactParticipationUserGridMonthlyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 网格下(月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactParticipationUserGridMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactParticipationUserGridMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactParticipationUserGridMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactParticipationUserGridMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactParticipationUserGridMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyDailyService.java new file mode 100644 index 0000000000..4b83259245 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyDailyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactRegUserAgencyDailyDTO; +import com.epmet.entity.stats.user.FactRegUserAgencyDailyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 机关(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactRegUserAgencyDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactRegUserAgencyDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactRegUserAgencyDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactRegUserAgencyDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactRegUserAgencyDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java new file mode 100644 index 0000000000..6f5f7c4963 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; +import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 机关(按月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactRegUserAgencyMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactRegUserAgencyMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactRegUserAgencyMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactRegUserAgencyMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactRegUserAgencyMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridDailyService.java new file mode 100644 index 0000000000..b3ed088fb3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridDailyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactRegUserGridDailyDTO; +import com.epmet.entity.stats.user.FactRegUserGridDailyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 网格(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactRegUserGridDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactRegUserGridDailyDTO + * @author generator + * @date 2020-06-17 + */ + FactRegUserGridDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactRegUserGridDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactRegUserGridDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java new file mode 100644 index 0000000000..11c7dd2e12 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; +import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 网格(月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface FactRegUserGridMonthlyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactRegUserGridMonthlyDTO + * @author generator + * @date 2020-06-17 + */ + FactRegUserGridMonthlyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void save(FactRegUserGridMonthlyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-17 + */ + void update(FactRegUserGridMonthlyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..f606044f1f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyDailyServiceImpl.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactParticipationUserAgencyDailyDao; +import com.epmet.dto.stats.user.FactParticipationUserAgencyDailyDTO; +import com.epmet.entity.stats.user.FactParticipationUserAgencyDailyEntity; +import com.epmet.service.stats.user.FactParticipationUserAgencyDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 机关下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactParticipationUserAgencyDailyServiceImpl extends BaseServiceImpl implements FactParticipationUserAgencyDailyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactParticipationUserAgencyDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactParticipationUserAgencyDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactParticipationUserAgencyDailyDTO get(String id) { + FactParticipationUserAgencyDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactParticipationUserAgencyDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactParticipationUserAgencyDailyDTO dto) { + FactParticipationUserAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserAgencyDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactParticipationUserAgencyDailyDTO dto) { + FactParticipationUserAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserAgencyDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..f9b7ac4b0c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserAgencyMonthlyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactParticipationUserAgencyMonthlyDao; +import com.epmet.dto.stats.user.FactParticipationUserAgencyMonthlyDTO; +import com.epmet.entity.stats.user.FactParticipationUserAgencyMonthlyEntity; +import com.epmet.service.stats.user.FactParticipationUserAgencyMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 机关下(按月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactParticipationUserAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactParticipationUserAgencyMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactParticipationUserAgencyMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactParticipationUserAgencyMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactParticipationUserAgencyMonthlyDTO get(String id) { + FactParticipationUserAgencyMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactParticipationUserAgencyMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactParticipationUserAgencyMonthlyDTO dto) { + FactParticipationUserAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserAgencyMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactParticipationUserAgencyMonthlyDTO dto) { + FactParticipationUserAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserAgencyMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java new file mode 100644 index 0000000000..8d6915f6fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactParticipationUserGridDailyDao; +import com.epmet.dto.stats.user.FactParticipationUserGridDailyDTO; +import com.epmet.entity.stats.user.FactParticipationUserGridDailyEntity; +import com.epmet.service.stats.user.FactParticipationUserGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格下(按日)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactParticipationUserGridDailyServiceImpl extends BaseServiceImpl implements FactParticipationUserGridDailyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactParticipationUserGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactParticipationUserGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactParticipationUserGridDailyDTO get(String id) { + FactParticipationUserGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactParticipationUserGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactParticipationUserGridDailyDTO dto) { + FactParticipationUserGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactParticipationUserGridDailyDTO dto) { + FactParticipationUserGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..e6068acf90 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridMonthlyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactParticipationUserGridMonthlyDao; +import com.epmet.dto.stats.user.FactParticipationUserGridMonthlyDTO; +import com.epmet.entity.stats.user.FactParticipationUserGridMonthlyEntity; +import com.epmet.service.stats.user.FactParticipationUserGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格下(月)参与用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactParticipationUserGridMonthlyServiceImpl extends BaseServiceImpl implements FactParticipationUserGridMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactParticipationUserGridMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactParticipationUserGridMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactParticipationUserGridMonthlyDTO get(String id) { + FactParticipationUserGridMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactParticipationUserGridMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactParticipationUserGridMonthlyDTO dto) { + FactParticipationUserGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserGridMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactParticipationUserGridMonthlyDTO dto) { + FactParticipationUserGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactParticipationUserGridMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyDailyServiceImpl.java new file mode 100644 index 0000000000..c97a763f61 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyDailyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactRegUserAgencyDailyDao; +import com.epmet.dto.stats.user.FactRegUserAgencyDailyDTO; +import com.epmet.entity.stats.user.FactRegUserAgencyDailyEntity; +import com.epmet.service.stats.user.FactRegUserAgencyDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 机关(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactRegUserAgencyDailyServiceImpl extends BaseServiceImpl implements FactRegUserAgencyDailyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactRegUserAgencyDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactRegUserAgencyDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactRegUserAgencyDailyDTO get(String id) { + FactRegUserAgencyDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactRegUserAgencyDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactRegUserAgencyDailyDTO dto) { + FactRegUserAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserAgencyDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactRegUserAgencyDailyDTO dto) { + FactRegUserAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserAgencyDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java new file mode 100644 index 0000000000..55925a2b81 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactRegUserAgencyMonthlyDao; +import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; +import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; +import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 机关(按月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactRegUserAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactRegUserAgencyMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactRegUserAgencyMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactRegUserAgencyMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactRegUserAgencyMonthlyDTO get(String id) { + FactRegUserAgencyMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactRegUserAgencyMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactRegUserAgencyMonthlyDTO dto) { + FactRegUserAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserAgencyMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactRegUserAgencyMonthlyDTO dto) { + FactRegUserAgencyMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserAgencyMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridDailyServiceImpl.java new file mode 100644 index 0000000000..8aba7fbcd5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridDailyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactRegUserGridDailyDao; +import com.epmet.dto.stats.user.FactRegUserGridDailyDTO; +import com.epmet.entity.stats.user.FactRegUserGridDailyEntity; +import com.epmet.service.stats.user.FactRegUserGridDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格(按日)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactRegUserGridDailyServiceImpl extends BaseServiceImpl implements FactRegUserGridDailyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactRegUserGridDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactRegUserGridDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactRegUserGridDailyDTO get(String id) { + FactRegUserGridDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactRegUserGridDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactRegUserGridDailyDTO dto) { + FactRegUserGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserGridDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactRegUserGridDailyDTO dto) { + FactRegUserGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserGridDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..2054ea5909 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.stats.user.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.stats.user.FactRegUserGridMonthlyDao; +import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; +import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; +import com.epmet.service.stats.user.FactRegUserGridMonthlyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格(月)注册用户数分析 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Service +public class FactRegUserGridMonthlyServiceImpl extends BaseServiceImpl implements FactRegUserGridMonthlyService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactRegUserGridMonthlyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactRegUserGridMonthlyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactRegUserGridMonthlyDTO get(String id) { + FactRegUserGridMonthlyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactRegUserGridMonthlyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactRegUserGridMonthlyDTO dto) { + FactRegUserGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserGridMonthlyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactRegUserGridMonthlyDTO dto) { + FactRegUserGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, FactRegUserGridMonthlyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java new file mode 100644 index 0000000000..3f20d2a9e7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java @@ -0,0 +1,28 @@ +package com.epmet.service.user; + +import com.epmet.dto.AgencySubTreeDto; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +public interface UserService { + + /** + * @Description 遍历所有机关(它的下级机关)统计注册用户和参与用户的数据,使用level控制 + * @param topAgencies - List + * @return + * @author wangc + * @date 2020.06.18 10:03 + **/ + void traverseAgencyUser(List topAgencies, Date targetDate); + + /** + * @Description 遍历所有机关的直属网格统计注册用户参与用户的数据 + * @param agencies - List + * @return + * @author wangc + * @date 2020.06.18 10:03 + **/ + void traverseGridUser(List agencies, Date targetDate); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java new file mode 100644 index 0000000000..cef6dbe508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -0,0 +1,230 @@ +package com.epmet.service.user.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.user.UserDao; +import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO; +import com.epmet.service.user.UserService; +import com.epmet.util.ModuleConstant; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description 直连epmet-user + * @ClassName UserServiceImpl + * @Auth wangc + * @Date 2020-06-18 09:55 + */ +@DataSource(DataSourceConstant.EPMET_USER) +@Service +public class UserServiceImpl implements UserService { + + private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class); + + @Autowired + private UserDao userDao; + + /** + * @Description 遍历所有机关(它的下级机关)统计注册用户和参与用户的数据,使用level控制 + * @param agencies - List + * @return + * @author wangc + * @date 2020.06.18 10:03 + **/ + @Override + public void traverseAgencyUser(List agencies, Date targetDate) { + if(null == agencies || agencies.size() == NumConstant.ZERO){ + logger.warn("没有相应的机关集合"); + return ; + } + //自上向下检索 + //Map> agencyMap = agencies.stream().collect(Collectors.groupingBy(AgencySubTreeDto::getAgencyId)); + Map> subGridOfAgency = new HashMap<>(); + agencies.forEach(agency -> { + initAgencyGridMap(agency.getAgencyId(),agency,subGridOfAgency); + }); + + //对每一个机关进行数据统计 + if(subGridOfAgency.size() > NumConstant.ZERO){ + subGridOfAgency.forEach((k,v) -> { + queryUserData(v,targetDate); + }); + } + + } + + /** + * @Description 遍历所有机关的直属网格统计注册用户参与用户的数据 + * @param agencies - List + * @return + * @author wangc + * @date 2020.06.18 10:03 + **/ + @Override + public void traverseGridUser(List agencies, Date targetDate) { + if(null == agencies || agencies.size() == NumConstant.ZERO){ + logger.warn("没有相应的机关集合"); + return ; + } + //自上向下检索 + Map> agencyMap = agencies.stream().collect(Collectors.groupingBy(AgencySubTreeDto::getAgencyId)); + if(null != agencyMap && agencyMap.size() > NumConstant.ZERO){ + agencyMap.forEach((k,v) -> { + if(null != v && v.size() > NumConstant.ZERO){ + queryUserData(new HashSet<>(v.get(NumConstant.ZERO).getGridIds()),targetDate); + } + }); + } + } + + + /** + * @Description 初始化机关-所有下级网格Map + * @param agency - AgencySubTreeDto + * @param subGridOfAgency - Map> + * @return + * @author wangc + * @date 2020.06.18 15:54 + **/ + void initAgencyGridMap(String pid, AgencySubTreeDto agency, Map> subGridOfAgency){ + + //向map中放入数据 + if(subGridOfAgency.containsKey(pid)){ + //包含key + Set grids = subGridOfAgency.get(pid); + if(null == grids){ + grids = new HashSet<>(); + subGridOfAgency.put(pid,grids); + } + if(null != agency.getGridIds() && agency.getGridIds().size() > NumConstant.ZERO){ + grids.addAll(agency.getGridIds()); + } + }else{ + //不包含key + Set grids = new HashSet<>(agency.getGridIds()); + subGridOfAgency.put(pid,grids); + } + + //定义递归出口 + if(StringUtils.equals(ModuleConstant.AGENCY_LEVEL_COMMUNITY,agency.getLevel()) || null == agency.getSubAgencies() || agency.getSubAgencies().size() == NumConstant.ZERO){ + return ; + } + + + //定义递归入口 + agency.getSubAgencies().forEach(obj -> { + initAgencyGridMap(pid,obj,subGridOfAgency); + }); + } + + /** + * @Description 执行查询用户数据统计的逻辑 + * @param gridIds - 机关下所有网格集合/机关下直属网格集合 + * @param targetDate + * @return + * @author wangc + * @date 2020.06.19 10:01 + **/ + void queryUserData(Set gridIds,Date targetDate){ + //默认查询注册用户 + + //1.计算机关下注册用户一个时间单位内的累计与增长 + CommonTotalAndIncCountResultDTO regData = + userDao.selectResiTotalAndIncrByLevel(ModuleConstant.REG_OR_PARTI_FLAG_REG,gridIds,targetDate); + //2.查询注册用户的Id列表 + List incrRegUsers = + userDao.selectIncrUserIds(ModuleConstant.REG_OR_PARTI_FLAG_REG,gridIds,targetDate); + List totalRegUsers = + userDao.selectTotalUserIds(ModuleConstant.REG_OR_PARTI_FLAG_REG,gridIds,targetDate); + //3.查询机关下一个时间单位内热心居民的累计与增量(注册用户) + CommonTotalAndIncCountResultDTO warmRegData = + userDao.selectWarmTotalAndIncr(totalRegUsers,incrRegUsers,gridIds,targetDate); + //4.查询机关下一个时间单位内党员的累计与增量(注册用户) + CommonTotalAndIncCountResultDTO partyRegData = + userDao.selectPartyTotalAndIncr(totalRegUsers,incrRegUsers,targetDate); + + + //参与用户 + //1.计算机关下参与用户一个时间单位内的累计与增长 + CommonTotalAndIncCountResultDTO partiData = + userDao.selectResiTotalAndIncrByLevel(ModuleConstant.REG_OR_PARTI_FLAG_PARTI,gridIds,targetDate); + //2.查询参与用户的Id列表 + List incrPartiUsers = + userDao.selectIncrUserIds(ModuleConstant.REG_OR_PARTI_FLAG_PARTI,gridIds,targetDate); + List totalPartiUsers = + userDao.selectTotalUserIds(ModuleConstant.REG_OR_PARTI_FLAG_PARTI,gridIds,targetDate); + //3.查询机关下一个时间单位内热心居民的累计与增量(参与用户) + CommonTotalAndIncCountResultDTO warmPartiData = + userDao.selectWarmTotalAndIncr(totalPartiUsers,incrPartiUsers,gridIds,targetDate); + //4.查询机关下一个时间单位内党员的累计与增量(参与用户) + CommonTotalAndIncCountResultDTO partyPartiData = + userDao.selectPartyTotalAndIncr(totalPartiUsers,incrPartiUsers,targetDate); + + + Calendar calendar =Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.add(Calendar.DATE, NumConstant.ONE_NEG); + Date targetDateCheck = null == targetDate ? calendar.getTime() : targetDate; + + calendar.setTime(targetDateCheck); + //如果目标日期是当月的最后一天 + if(calendar.get(Calendar.DATE) == calendar.getActualMaximum(Calendar.DAY_OF_MONTH)){ + //求出这个月的第一天 + calendar.setTime(new Date()); + calendar.set(Calendar.DAY_OF_MONTH, NumConstant.ONE); + calendar.set(Calendar.HOUR_OF_DAY, NumConstant.ZERO); + calendar.set(Calendar.MINUTE, NumConstant.ZERO); + calendar.set(Calendar.SECOND, NumConstant.ZERO); + + //本月注册用户增长数 + Integer regIncrMonthly = userDao.selectResiIncrWithinTimeRange(ModuleConstant.REG_OR_PARTI_FLAG_REG,gridIds,calendar.getTime(),targetDateCheck); + //本月新增注册用户Id集合 + List incrRegIdsMonthly = userDao.selectIncrUserIdsWithinTimeRange(ModuleConstant.REG_OR_PARTI_FLAG_REG,gridIds,calendar.getTime(),targetDateCheck); + //本月新增党员数(注册用户) + Integer incrPartyOfRegMonthly = userDao.selectPartyIncrWithinTimeRange(incrRegIdsMonthly,calendar.getTime(),targetDateCheck); + //本月新增热心居民数(注册用户) + Integer incrWarmOfRegMonthly = userDao.selectWarmIncrWithinTimeRange(incrRegIdsMonthly,gridIds,calendar.getTime(),targetDateCheck); + + + //本月参与用户增长数 + Integer partiIncrMonthly = userDao.selectResiIncrWithinTimeRange(ModuleConstant.REG_OR_PARTI_FLAG_PARTI,gridIds,calendar.getTime(),targetDateCheck); + //本月新增参与用户Id集合 + List incrPartiIdsMonthly = userDao.selectIncrUserIdsWithinTimeRange(ModuleConstant.REG_OR_PARTI_FLAG_PARTI,gridIds,calendar.getTime(),targetDateCheck); + //本月新增党员数(参与用户) + Integer incrPartyOfPartiMonthly = userDao.selectPartyIncrWithinTimeRange(incrPartiIdsMonthly,calendar.getTime(),targetDateCheck); + //本月新增热心居民数(参与用户) + Integer incrWarmOfPartiMonthly = userDao.selectWarmIncrWithinTimeRange(incrPartiIdsMonthly,gridIds,calendar.getTime(),targetDateCheck); + + } + } + + public static void main(String[] args) { + + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.set(Calendar.DAY_OF_MONTH, 1); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + System.out.println(format.format(calendar.getTime())); + + + + calendar.setTime(calendar.getTime()); + calendar.add(Calendar.DATE, -1); + System.out.println(calendar.getTime()); + System.out.println(format.format(calendar.getTime())); + System.out.println(format2.format(calendar.getTime())); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java new file mode 100644 index 0000000000..125e46e962 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticlePublishRangeEntity; + +import java.util.Date; +import java.util.List; + +/** + * 文章发布范围表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface ArticlePublishRangeService extends BaseService { + + /** + * desc: 根据客户Id 、创建日期查询 有史以来所有的发布文章总数 + * + * @param customerId + * @param createDate + * @return: List + * @date: 2020/6/17 16:59 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ + List getAllPublishedCount(String customerId, Date createDate); + + /** + * desc: 根据客户Id、创建日期查询某一天的 文章发布数据 + * + * @param customerId + * @param startDate + * @param endDate + * @return: List + * @date: 2020/6/17 21:43 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ + List getOneDayPublishedCount(String customerId, Date startDate, Date endDate); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java new file mode 100644 index 0000000000..5477d54cd2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticleEntity; + +import java.util.Date; +import java.util.List; + +/** + * desc: 数据统计文章service + * + * return: + * @date: 2020/6/17 15:28 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ +public interface ArticleService extends BaseService { + + /** + * desc:根据客户id、发布时间 获取文章总数 + * @param customerId + * @param publishDate + * @return + */ + List getAllDepartmentPublishedCount(String customerId, Date publishDate); + /** + * desc:根据客户id、发布时间 获取文章总数 + * @param customerId + * @param publishDate + * @return + */ + List getAllAgencyPublishedCount(String customerId, Date publishDate); + /** + * desc:根据客户id、发布时间 获取文章总数 + * @param customerId + * @param publishDate + * @return + */ + List getAllGridPublishedCount(String customerId, Date publishDate); + + /** + * desc:根据客户id,发布时间 获取文章数据 + * @param customerId + * @param statsDate + * @return + */ + List getPublishedArticleByPublishTime(String customerId, Date statsDate); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleTagsService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleTagsService.java new file mode 100644 index 0000000000..07067cd1dd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleTagsService.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.service.voice; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.voice.ArticleTagsEntity; + +import java.util.Date; +import java.util.List; + +/** + * 文章标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface ArticleTagsService extends BaseService { + + /** + * desc:根据客户Id 创建时间获取 文章便签数据 + * + * @param customerId + * @param startTime + * @param endTime + * @return + */ + List getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime); + + List getArticleTagsByArticleId(String customerId, String articleId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleVisitRecordService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleVisitRecordService.java new file mode 100644 index 0000000000..69de820d79 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleVisitRecordService.java @@ -0,0 +1,44 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.voice.ArticleViewedSummaryDTO; +import com.epmet.entity.voice.ArticleVisitRecordEntity; + +import java.util.Date; +import java.util.List; + +/** + * 文章访问记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +public interface ArticleVisitRecordService extends BaseService { + + /** + * desc:根据客户Id + * + * @param customerId + * @param startTime + * @param endTime + * @return + */ + List getArticleVisitByCreateTime(String customerId, Date startTime, Date endTime); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java new file mode 100644 index 0000000000..8fc2f430cd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.voice.ArticlePublishRangeDao; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticlePublishRangeEntity; +import com.epmet.service.voice.ArticlePublishRangeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 文章发布范围表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.GOV_VOICE) +public class ArticlePublishRangeServiceImpl extends BaseServiceImpl implements ArticlePublishRangeService { + + + @Override + public List getAllPublishedCount(String customerId, Date createDate) { + log.debug("getAllPublishedCount param customerId:{},createDate:{}", customerId, createDate); + return baseDao.getAllPublishedCount(customerId, createDate); + } + + /** + * desc: 根据客户Id、创建日期查询某一天的 文章发布数据 + * + * @param customerId + * @param startDate + * @param endDate + * @return: List + * @date: 2020/6/17 21:43 + * @author: jianjun liu + * email:liujianjun@git.elinkit.com.cn + */ + @Override + public List getOneDayPublishedCount(String customerId, Date startDate, Date endDate) { + log.debug("getOneDayPublishedCount param startDate:{},endDate:{}", startDate, endDate); + return baseDao.getOneDayPublishedCount(customerId, startDate, endDate); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java new file mode 100644 index 0000000000..08ce42e396 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java @@ -0,0 +1,77 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.ProjectConstant; +import com.epmet.dao.voice.ArticleDao; +import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; +import com.epmet.entity.voice.ArticleEntity; +import com.epmet.service.voice.ArticleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 项目表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +@DataSource(DataSourceConstant.GOV_VOICE) +public class ArticleServiceImpl extends BaseServiceImpl implements ArticleService { + + @Override + public List getAllDepartmentPublishedCount(String customerId, Date publishDate) { + checkParam(customerId, publishDate); + return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_DEPT); + } + + @Override + public List getAllAgencyPublishedCount(String customerId, Date publishDate) { + checkParam(customerId, publishDate); + return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_AGENCY); + } + + @Override + public List getAllGridPublishedCount(String customerId, Date publishDate) { + checkParam(customerId, publishDate); + return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_GRID); + } + + + + @Override + public List getPublishedArticleByPublishTime(String customerId, Date publishDate) { + checkParam(customerId, publishDate); + return baseDao.getPublishedArticleByDay(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_GRID); + } + + private void checkParam(String customerId, Date publishDate) { + if (StringUtils.isBlank(customerId) || publishDate == null) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleTagsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleTagsServiceImpl.java new file mode 100644 index 0000000000..52a8a43295 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleTagsServiceImpl.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.voice.ArticleTagsDao; +import com.epmet.entity.voice.ArticleTagsEntity; +import com.epmet.service.voice.ArticleTagsService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 文章标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.GOV_VOICE) +public class ArticleTagsServiceImpl extends BaseServiceImpl implements ArticleTagsService { + + @Override + public List getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime) { + this.checkParam(customerId, endTime, endTime); + return baseDao.getArticleTagsByDay(customerId, startTime, endTime); + } + + @Override + public List getArticleTagsByArticleId(String customerId, String articleId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(articleId)) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getArticleTagsByArticleId(customerId, articleId); + } + + private void checkParam(String customerId, Date starTime, Date endTime) { + if (StringUtils.isBlank(customerId) || starTime == null || endTime == null) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleVisitRecordServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleVisitRecordServiceImpl.java new file mode 100644 index 0000000000..689a1a32e2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleVisitRecordServiceImpl.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.voice.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.voice.ArticleVisitRecordDao; +import com.epmet.dto.voice.ArticleViewedSummaryDTO; +import com.epmet.entity.voice.ArticleVisitRecordEntity; +import com.epmet.service.voice.ArticleVisitRecordService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 文章访问记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-17 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.GOV_VOICE) +public class ArticleVisitRecordServiceImpl extends BaseServiceImpl implements ArticleVisitRecordService { + + @Override + public List getArticleVisitByCreateTime(String customerId, Date startTime, Date endTime) { + if (StringUtils.isBlank(customerId) || startTime == null || endTime == null) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getArticleVisitByCreateTime(customerId, startTime, endTime); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/DimIdGenerator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/DimIdGenerator.java new file mode 100644 index 0000000000..35e1f6d99b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/DimIdGenerator.java @@ -0,0 +1,91 @@ +package com.epmet.util; + +import com.epmet.commons.tools.utils.DateUtils; +import lombok.Data; + +import java.util.Calendar; +import java.util.Date; + +public class DimIdGenerator { + + /** + * 生成日期维度ID + * @param targetDate + * @return + */ + public static String getDateDimId(Date targetDate) { + return DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMMDD); + } + + /** + * 获取月维度ID + * @param date + * @return + */ + public static String getMonthDimId(Date date) { + return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMM); + } + + /** + * 获取周维度ID ,每周的星期一为 周的开始 + * @param date + * @return + */ + public static String getWeekDimId(Date date) { + String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + Calendar calendar = Calendar.getInstance(); + calendar.setFirstDayOfWeek(Calendar.MONDAY); + calendar.setTime(date); + return yyyy.concat("W").concat(calendar.get(Calendar.WEEK_OF_YEAR)+""); + } + + /** + * 获取季度维度ID + * @param date + * @return + */ + public static String getQuarterDimId(Date date) { + String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + return yyyy.concat("Q").concat(DateUtils.getQuarterIndex(date) + ""); + } + + /** + * 获取年维度ID + * @param date + * @return + */ + public static String getYearDimId(Date date) { + return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + } + + /** + * 获取封装了所有ID的对象 + * @return + */ + public static DimIdBean getDimIdBean(Date date) { + DimIdBean dimIdBean = new DimIdBean(); + dimIdBean.setDateId(getDateDimId(date)); + dimIdBean.setMonthId(getMonthDimId(date)); + dimIdBean.setWeekId(getWeekDimId(date)); + dimIdBean.setQuarterId(getQuarterDimId(date)); + dimIdBean.setYearId(getYearDimId(date)); + return dimIdBean; + } + + public static void main(String[] args) { + DimIdBean dimIdBean = getDimIdBean(DateUtils.stringToDate("2020-06-14",DateUtils.DATE_PATTERN)); + System.out.println(dimIdBean); + } + + @Data + public static class DimIdBean { + private String dateId; + private String monthId; + private String quarterId; + private String yearId; + private String weekId; + + public DimIdBean() { + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ModuleConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ModuleConstant.java new file mode 100644 index 0000000000..1ef0b26a51 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ModuleConstant.java @@ -0,0 +1,19 @@ +package com.epmet.util; + +public interface ModuleConstant { + + /** + * 注册用户标识 + * */ + String REG_OR_PARTI_FLAG_REG = "reg"; + + /** + * 参与用户标识 + * */ + String REG_OR_PARTI_FLAG_PARTI = "parti"; + + /** + * 机关级别-社区 + * */ + String AGENCY_LEVEL_COMMUNITY = "community"; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index 838cf424d4..ad6caadfa5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -61,19 +61,6 @@ spring: baseline-on-migrate: true baseline-version: 0 -#stats: -# datasources: -# - name: statsDatasource -# driver-class-name: com.mysql.cj.jdbc.Driver -# url: @datasource.druid.stats.url@ -# username: @datasource.druid.stats.username@ -# password: @datasource.druid.stats.password@ -# - name: orgDatasource -# driver-class-name: com.mysql.cj.jdbc.Driver -# url: @datasource.druid.org.url@ -# username: @datasource.druid.org.username@ -# password: @datasource.druid.org.password@ - management: endpoints: web: @@ -143,13 +130,36 @@ dynamic: url: @datasource.druid.issue.url@ username: @datasource.druid.issue.username@ password: @datasource.druid.issue.password@ - + govProject: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.project.url@ + username: @datasource.druid.project.username@ + password: @datasource.druid.project.password@ + govVoice: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.voice.url@ + username: @datasource.druid.voice.username@ + password: @datasource.druid.voice.password@ + operCrm: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.crm.url@ + username: @datasource.druid.crm.username@ + password: @datasource.druid.crm.password@ + resiGroup: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.group.url@ + username: @datasource.druid.group.username@ + password: @datasource.druid.group.password@ + epmetuser: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.user.url@ + username: @datasource.druid.user.username@ + password: @datasource.druid.user.password@ + thread: # 线程池配置 threadPool: corePoolSize: @thread.pool.core-pool-size@ maxPoolSize: @thread.pool.max-pool-size@ queueCapacity: @thread.pool.queue-capacity@ - keepAlive: @thread.pool.keep-alive@ - - \ No newline at end of file + keepAlive: @thread.pool.keep-alive@ \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql new file mode 100644 index 0000000000..9f1554015e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql @@ -0,0 +1 @@ +ALTER TABLE dim_agency ADD COLUMN AGENCY_DIM_TYPE VARCHAR(10) NOT NULL COMMENT '机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等'; \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql new file mode 100644 index 0000000000..cd25dce6a9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql @@ -0,0 +1,574 @@ +/*================================ 宣传能力 ======================================*/ + +/* + Navicat Premium Data Transfer + + Source Server : 亿联 + Source Server Type : MySQL + Source Server Version : 50728 + Source Host : 192.168.1.130:3306 + Source Schema : epmet_data_statistical + + Target Server Type : MySQL + Target Server Version : 50728 + File Encoding : 65001 + + Date: 22/06/2020 16:40:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for fact_article_published_agency_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_article_published_agency_daily`; +CREATE TABLE `fact_article_published_agency_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量', + `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【机关】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_article_published_department_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_article_published_department_daily`; +CREATE TABLE `fact_article_published_department_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布文章单位所属机关ID 发布文章单位所属机关ID', + `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID', + `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量', + `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【部门】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_article_published_grid_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_article_published_grid_daily`; +CREATE TABLE `fact_article_published_grid_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布单位所属机关ID 发布单位所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量', + `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【网格】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_agency_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_agency_daily`; +CREATE TABLE `fact_tag_used_agency_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_agency_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_agency_monthly`; +CREATE TABLE `fact_tag_used_agency_monthly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】月统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_agency_quarterly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_agency_quarterly`; +CREATE TABLE `fact_tag_used_agency_quarterly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】季度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_agency_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_agency_yearly`; +CREATE TABLE `fact_tag_used_agency_yearly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】年度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_department_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_department_daily`; +CREATE TABLE `fact_tag_used_department_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID', + `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_department_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_department_monthly`; +CREATE TABLE `fact_tag_used_department_monthly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】月统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_department_quarterly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_department_quarterly`; +CREATE TABLE `fact_tag_used_department_quarterly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】季度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_department_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_department_yearly`; +CREATE TABLE `fact_tag_used_department_yearly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】年度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_grid_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_grid_daily`; +CREATE TABLE `fact_tag_used_grid_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_grid_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_grid_monthly`; +CREATE TABLE `fact_tag_used_grid_monthly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】月统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_grid_quarterly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_grid_quarterly`; +CREATE TABLE `fact_tag_used_grid_quarterly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】季度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_used_grid_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_used_grid_yearly`; +CREATE TABLE `fact_tag_used_grid_yearly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】年度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_agency_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_agency_daily`; +CREATE TABLE `fact_tag_viewed_agency_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_agency_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_agency_monthly`; +CREATE TABLE `fact_tag_viewed_agency_monthly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】月统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_agency_quarterly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_agency_quarterly`; +CREATE TABLE `fact_tag_viewed_agency_quarterly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】季度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_agency_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_agency_yearly`; +CREATE TABLE `fact_tag_viewed_agency_yearly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】年度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_grid_daily +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_grid_daily`; +CREATE TABLE `fact_tag_viewed_grid_daily` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日', + `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】日统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_grid_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_grid_monthly`; +CREATE TABLE `fact_tag_viewed_grid_monthly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】月统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_grid_quarterly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_grid_quarterly`; +CREATE TABLE `fact_tag_viewed_grid_quarterly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】季度统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for fact_tag_viewed_grid_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_tag_viewed_grid_yearly`; +CREATE TABLE `fact_tag_viewed_grid_yearly` ( + `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID', + `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID', + `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID', + `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID', + `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID', + `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称', + `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数', + `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年', + `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态', + `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】年度统计表' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..ae47a96fcd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml @@ -0,0 +1,164 @@ + + + + + + + + + + ${appname} + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + ${log.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml new file mode 100644 index 0000000000..0aac258069 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml new file mode 100644 index 0000000000..968ca9d83d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml index 6a0a0c8e2f..3120f939d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml @@ -2,7 +2,167 @@ - + SELECT ORG_ID AS "agencyId", + ORG_ID_PATH AS "pIds", + ISSUE_STATUS AS "status", + COUNT(ID) AS "count" + FROM + issue + WHERE + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} + GROUP BY + ORG_ID, ISSUE_STATUS + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml new file mode 100644 index 0000000000..6d3bc43ce3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml new file mode 100644 index 0000000000..6a5253e473 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml index 789a79dfe1..3e22e1b5c3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml @@ -10,4 +10,69 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml new file mode 100644 index 0000000000..7c20a18f4c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml new file mode 100644 index 0000000000..9f839a668e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml new file mode 100644 index 0000000000..5869a269a6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml @@ -0,0 +1,253 @@ + + + + + + + INSERT INTO dim_agency(id, agency_name, customer_id, pid, pids, all_parent_name, level, del_flag, revision, created_by, + created_time, updated_by, updated_time) + VALUE (#{id}, #{agencyName}, #{customerId}, #{pid}, #{pids}, #{allParentName}, #{level}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime}) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml new file mode 100644 index 0000000000..120be8603a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml @@ -0,0 +1,14 @@ + + + + + + INSERT INTO dim_customer(id, customer_name, del_flag, revision, created_by, created_time, updated_by, updated_time) + VALUES (#{id}, #{customerName}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime}) + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml new file mode 100644 index 0000000000..ad531351b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml @@ -0,0 +1,39 @@ + + + + + + + + + + INSERT INTO dim_date + (ID, DATE_NAME, DAY_OF_WEEK, DAY_OF_WEEK_NAME, WEEK_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) + VALUES + (#{id}, #{dateName}, #{dayOfWeek}, #{dayOfWeekName}, #{weekId}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime}) + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml new file mode 100644 index 0000000000..8941d496fd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDepartmentDao.xml @@ -0,0 +1,22 @@ + + + + + + + INSERT INTO dim_department(id, department_name, agency_id, customer_id, del_flag, revision, created_by, created_time, + updated_by, updated_time) + VALUE (#{id}, #{departmentName}, #{agencyId}, #{customerId}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime}) + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml new file mode 100644 index 0000000000..783230dc55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimMonthDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimMonthDao.xml new file mode 100644 index 0000000000..ffffa6903e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimMonthDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimQuarterDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimQuarterDao.xml new file mode 100644 index 0000000000..e9a609876a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimQuarterDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimTopicStatusDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimTopicStatusDao.xml new file mode 100644 index 0000000000..3c7aec1c8e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimTopicStatusDao.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimWeekDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimWeekDao.xml new file mode 100644 index 0000000000..04575603f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimWeekDao.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml new file mode 100644 index 0000000000..eb6fc087bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + DELETE + FROM + fact_agency_project_daily + WHERE + customer_id = #{customerId} + AND date_id = #{dateId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml new file mode 100644 index 0000000000..846b2c7a26 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml @@ -0,0 +1,15 @@ + + + + + + + DELETE + FROM + fact_agency_project_monthly + WHERE + customer_id = #{customerId} + AND month_id = #{monthId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml new file mode 100644 index 0000000000..ea4debe1dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedAgencyDailyDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_article_published_agency_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml new file mode 100644 index 0000000000..abe5fafc0a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedDepartmentDailyDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_article_published_department_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedGridDailyDao.xml new file mode 100644 index 0000000000..b265d0b0c9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactArticlePublishedGridDailyDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_article_published_grid_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml new file mode 100644 index 0000000000..3f386bf7ba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + DELETE + FROM + fact_grid_project_daily + WHERE + customer_id = #{customerId} + AND date_id = #{dateId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml new file mode 100644 index 0000000000..916ff301c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml @@ -0,0 +1,14 @@ + + + + + + + DELETE + FROM + fact_grid_project_monthly + WHERE + customer_id = #{customerId} + AND month_id = #{monthId} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyDailyDao.xml new file mode 100644 index 0000000000..d2ef1b2a30 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyDailyDao.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fact_group_agency_daily ( + ID, CUSTOMER_ID, AGENCY_ID, PID, DATE_ID, WEEK_ID, MONTH_ID, QUARTER_ID, YEAR_ID, GRID_TOTAL, GROUP_TOTAL_COUNT, GROUP_MEMBER_TOTAL_COUNT, + GROUP_MEMBER_AVG_COUNT, GROUP_MEDIAN, GROUP_INCR, GROUP_MEMBER_MAX_COUNT, MAX_MEMBER_GROUP_ID, GROUP_MEMBER_MIN_COUNT, + MIN_MEMBER_GROUP_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) + values + + ( + REPLACE(UUID(),'-',''), + #{agency.customerId}, + #{agency.agencyId}, + #{agency.pid}, + #{agency.dateId}, + #{agency.weekId}, + #{agency.monthId}, + #{agency.quarterId}, + #{agency.yearId}, + #{agency.gridTotal}, + #{agency.groupTotalCount}, + #{agency.groupMemberTotalCount}, + #{agency.groupMemberAvgCount}, + #{agency.groupMedian}, + #{agency.groupIncr}, + #{agency.groupMemberMaxCount}, + IFNULL(#{agency.maxMemberGroupId},NULL), + #{agency.groupMemberMinCount}, + IFNULL(#{agency.minMemberGroupId},NULL), + #{agency.delFlag}, + #{agency.revision}, + #{agency.createdBy}, + NOW(), + #{agency.updatedBy}, + NOW() + ) + + + + + + + + + + + + DELETE + FROM + fact_group_agency_daily + WHERE + date_id = #{dateId} + AND customer_id = #{customerId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyMonthlyDao.xml new file mode 100644 index 0000000000..cb0187485f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupAgencyMonthlyDao.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fact_group_agency_monthly + (ID, CUSTOMER_ID, AGENCY_ID, PID, MONTH_ID, QUARTER_ID, YEAR_ID, GRID_TOTAL, GROUP_TOTAL, GROUP_MEMBER_TOTAL, + GROUP_MEMBER_AVG_COUNT, GROUP_MEDIAN, GROUP_INCR, GROUP_MEMBER_MAX_COUNT, MAX_MEMBER_GROUP_ID, + GROUP_MEMBER_MIN_COUNT, MIN_MEMBER_GROUP_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, + UPDATED_BY, UPDATED_TIME) + VALUES + + ( + REPLACE(UUID(),'-',''), + #{agency.customerId}, + #{agency.agencyId}, + #{agency.pid}, + #{agency.monthId}, + #{agency.quarterId}, + #{agency.yearId}, + #{agency.gridTotal}, + #{agency.groupTotal}, + #{agency.groupMemberTotal}, + #{agency.groupMemberAvgCount}, + #{agency.groupMedian}, + #{agency.groupIncr}, + #{agency.groupMemberMaxCount}, + #{agency.maxMemberGroupId}, + #{agency.groupMemberMinCount}, + #{agency.minMemberGroupId}, + #{agency.delFlag}, + #{agency.revision}, + #{agency.createdBy}, + NOW(), + #{agency.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_group_agency_monthly + WHERE + month_id = #{monthId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupGridDailyDao.xml new file mode 100644 index 0000000000..8c8ab22e50 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGroupGridDailyDao.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO fact_group_grid_daily (ID, CUSTOMER_ID, AGENCY_ID, GRID_ID, DATE_ID, WEEK_ID, MONTH_ID, YEAR_ID, QUARTER_ID, GRID_TOTAL, + GROUP_TOTAL, GROUP_MEMBER_TOTAL, GROUP_MEMBER_AVG_COUNT, GROUP_MEDIAN, GROUP_INCR, GROUP_MEMBER_MAX_COUNT, MAX_MEMBER_GROUP_ID, + GROUP_MEMBER_MIN_COUNT, MIN_MEMBER_GROUP_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) + VALUES + + ( + REPLACE(UUID(),'-',''), + #{grid.customerId}, + #{grid.agencyId}, + #{grid.gridId}, + #{grid.dateId}, + #{grid.weekId}, + #{grid.monthId}, + #{grid.yearId}, + #{grid.quarterId}, + #{grid.gridTotal}, + #{grid.groupTotal}, + #{grid.groupMemberTotal}, + #{grid.groupMemberAvgCount}, + #{grid.groupMedian}, + #{grid.groupIncr}, + #{grid.groupMemberMaxCount}, + #{grid.maxMemberGroupId}, + #{grid.groupMemberMinCount}, + #{grid.minMemberGroupId}, + #{grid.delFlag}, + #{grid.revision}, + #{grid.createdBy}, + NOW(), + #{grid.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_group_grid_daily + WHERE + date_id = #{dateId} + AND customer_id = #{customerId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyDailyDao.xml new file mode 100644 index 0000000000..20262ed8d4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyDailyDao.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_issue_agency_daily WHERE CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml new file mode 100644 index 0000000000..430abbd36c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_issue_agency_monthly WHERE CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridDailyDao.xml new file mode 100644 index 0000000000..998f24e343 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridDailyDao.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM fact_issue_grid_daily WHERE CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml new file mode 100644 index 0000000000..cbcc5b4276 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + fact_issue_grid_monthly + WHERE + CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyDailyDao.xml new file mode 100644 index 0000000000..b99b5e409b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyDailyDao.xml @@ -0,0 +1,33 @@ + + + + + + + DELETE FROM fact_tag_used_agency_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyMonthlyDao.xml new file mode 100644 index 0000000000..05d22a1a38 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyMonthlyDao.xml @@ -0,0 +1,55 @@ + + + + + + + + + DELETE FROM fact_tag_used_agency_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyQuarterlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyQuarterlyDao.xml new file mode 100644 index 0000000000..ccd42622a4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyQuarterlyDao.xml @@ -0,0 +1,9 @@ + + + + + + + DELETE FROM fact_tag_used_agency_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyYearlyDao.xml new file mode 100644 index 0000000000..b3851f7b5a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyYearlyDao.xml @@ -0,0 +1,9 @@ + + + + + + + DELETE FROM fact_tag_used_agency_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentDailyDao.xml new file mode 100644 index 0000000000..8e8fb7e9b3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentDailyDao.xml @@ -0,0 +1,34 @@ + + + + + + + DELETE FROM fact_tag_used_department_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentMonthlyDao.xml new file mode 100644 index 0000000000..af8efb5266 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentMonthlyDao.xml @@ -0,0 +1,55 @@ + + + + + + + + + DELETE FROM fact_tag_used_department_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentQuarterlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentQuarterlyDao.xml new file mode 100644 index 0000000000..fab6a6b6f4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentQuarterlyDao.xml @@ -0,0 +1,10 @@ + + + + + + + + DELETE FROM fact_tag_used_department_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentYearlyDao.xml new file mode 100644 index 0000000000..e17b6fdf3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentYearlyDao.xml @@ -0,0 +1,9 @@ + + + + + + + DELETE FROM fact_tag_used_department_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridDailyDao.xml new file mode 100644 index 0000000000..1970dc22a7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridDailyDao.xml @@ -0,0 +1,30 @@ + + + + + + DELETE FROM fact_tag_used_grid_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridMonthlyDao.xml new file mode 100644 index 0000000000..67974a20e2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridMonthlyDao.xml @@ -0,0 +1,56 @@ + + + + + + + + + + DELETE FROM fact_tag_used_grid_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridQuarterlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridQuarterlyDao.xml new file mode 100644 index 0000000000..dc35b17d52 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridQuarterlyDao.xml @@ -0,0 +1,11 @@ + + + + + + + DELETE FROM fact_tag_used_grid_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridYearlyDao.xml new file mode 100644 index 0000000000..e2501f4f3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridYearlyDao.xml @@ -0,0 +1,10 @@ + + + + + + DELETE FROM fact_tag_used_grid_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyDailyDao.xml new file mode 100644 index 0000000000..f8c7a55728 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyDailyDao.xml @@ -0,0 +1,33 @@ + + + + + + + DELETE FROM fact_tag_viewed_agency_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyMonthlyDao.xml new file mode 100644 index 0000000000..85e33ec0ac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyMonthlyDao.xml @@ -0,0 +1,54 @@ + + + + + + + DELETE FROM fact_tag_viewed_agency_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyQuarterlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyQuarterlyDao.xml new file mode 100644 index 0000000000..83c09a954d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyQuarterlyDao.xml @@ -0,0 +1,10 @@ + + + + + + DELETE FROM fact_tag_viewed_agency_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyYearlyDao.xml new file mode 100644 index 0000000000..25b2d6a11c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedAgencyYearlyDao.xml @@ -0,0 +1,11 @@ + + + + + + + DELETE FROM fact_tag_viewed_agency_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridDailyDao.xml new file mode 100644 index 0000000000..3fa886f434 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridDailyDao.xml @@ -0,0 +1,32 @@ + + + + + + + + DELETE FROM fact_tag_viewed_grid_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridMonthlyDao.xml new file mode 100644 index 0000000000..8bde85f5a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridMonthlyDao.xml @@ -0,0 +1,53 @@ + + + + + + + DELETE FROM fact_tag_viewed_grid_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridQuarterlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridQuarterlyDao.xml new file mode 100644 index 0000000000..8d2908737e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridQuarterlyDao.xml @@ -0,0 +1,9 @@ + + + + + + + DELETE FROM fact_tag_viewed_grid_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridYearlyDao.xml new file mode 100644 index 0000000000..30276d91ac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridYearlyDao.xml @@ -0,0 +1,9 @@ + + + + + + + DELETE FROM fact_tag_viewed_grid_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml new file mode 100755 index 0000000000..2ae86b2d8b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + UPDATE last_exec_record SET EXEC_TIME = #{date} WHERE SUBJECT = #{subject} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml new file mode 100644 index 0000000000..91dc279ec1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml new file mode 100644 index 0000000000..a5fca9a9dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml new file mode 100644 index 0000000000..154d617001 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleTagsDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleTagsDao.xml new file mode 100644 index 0000000000..a6a733f6ac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleTagsDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleVisitRecordDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleVisitRecordDao.xml new file mode 100644 index 0000000000..c5019d41f4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleVisitRecordDao.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index 8b389883f0..f589819cb1 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -28,6 +28,11 @@ epmet-commons-mybatis 2.0.0 + + com.epmet + data-statistical-client + 2.0.0 + org.springframework.boot spring-boot-starter-web diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsGroupService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsGroupService.java new file mode 100644 index 0000000000..db3ed102d1 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsGroupService.java @@ -0,0 +1,32 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:12 + */ +public interface StatsGroupService { + + /** + * @Description 统计 “网格小组”, dim:【网格-日】 + * @param + * @author zxc + */ + Result groupGridDaily(); + + /** + * @Description 统计 “网格小组”, dim:【机关-日】 + * @param + * @author zxc + */ + Result groupAgencyDaily(); + + /** + * @Description 统计 “网格小组”, dim:【机关-月】 + * @param + * @author zxc + */ + Result groupAgencyMonthly(); + +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsIssueService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsIssueService.java new file mode 100644 index 0000000000..23590743e6 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsIssueService.java @@ -0,0 +1,19 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/23 14:38 + */ +public interface StatsIssueService { + /** + * 议题统计 + * @author zhaoqifeng + * @date 2020/6/23 14:39 + * @param + * @return com.epmet.commons.tools.utils.Result + */ + Result agencyGridIssueStats(); +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsProjectService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsProjectService.java new file mode 100644 index 0000000000..473f8c798b --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsProjectService.java @@ -0,0 +1,23 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; + +/** + * @Description 数据统计-项目-机关、网格日月统计任务接口 + * @Author sun + */ +public interface StatsProjectService { + + + /** + * @Description 数据统计-项目-机关日月统计 + * @Author sun + */ + Result agencyProjectStats(); + + /** + * @Description 数据统计-项目-网格日月统计 + * @Author sun + */ + Result gridProjectStats(); +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsPublicityTaskService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsPublicityTaskService.java new file mode 100644 index 0000000000..cdc8a32f46 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsPublicityTaskService.java @@ -0,0 +1,72 @@ +package com.epmet.service; + + +import com.epmet.commons.tools.utils.Result; + +/** + * desc: 数据-宣传能力-数据统计 + * + * @return: + * @date: 2020/6/22 10:24 + * @author: jianjun liu + */ +public interface StatsPublicityTaskService { + + /** + * desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result articleSummaryDailyStatsjob(); + + /** + * desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @return: + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagUsedDailyStatsjob(); + + /** + * desc: 【月】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagUsedMonthlyStatsjob(); + + /** + * desc: 【季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagUsedQuarterlyStatsjob(); + + /** + * desc: 【日】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagViewedDailyStatsjob(); + + /** + * desc: 【月,季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagViewedMonthlyStatsjob(); + + /** + * desc: 【季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + Result tagViewedQuarterlyStatsjob(); + +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java new file mode 100644 index 0000000000..babf60f42b --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java @@ -0,0 +1,31 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsGroupService; +import feign.DataStatisticalOpenFeignClient; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:13 + */ +public class StatsGroupServiceImpl implements StatsGroupService { + + @Autowired + private DataStatisticalOpenFeignClient statsPublicityFeignClient; + + @Override + public Result groupGridDaily() { + return statsPublicityFeignClient.groupGridDaily(); + } + + @Override + public Result groupAgencyDaily() { + return statsPublicityFeignClient.groupAgencyDaily(); + } + + @Override + public Result groupAgencyMonthly() { + return statsPublicityFeignClient.groupAgencyMonthly(); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java new file mode 100644 index 0000000000..a8803c5f5e --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java @@ -0,0 +1,23 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsIssueService; +import feign.DataStatisticalOpenFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/23 14:40 + */ +@Service +public class StatsIssueServiceImpl implements StatsIssueService { + @Autowired + private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; + + @Override + public Result agencyGridIssueStats() { + return dataStatisticalOpenFeignClient.agencyGridIssueStats(); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java new file mode 100644 index 0000000000..0245c79754 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -0,0 +1,34 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsProjectService; +import feign.DataStatisticalOpenFeignClient; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description 数据统计-项目-机关、网格日月统计任务接口 + * @Author sun + */ +public class StatsProjectServiceImpl implements StatsProjectService { + + @Autowired + private DataStatisticalOpenFeignClient statsPublicityFeignClient; + + /** + * @Description 数据统计-项目-机关日月统计 + * @Author sun + */ + @Override + public Result agencyProjectStats() { + return statsPublicityFeignClient.agencyProjectStats(); + } + + /** + * @Description 数据统计-项目-网格日月统计 + * @Author sun + */ + @Override + public Result gridProjectStats() { + return statsPublicityFeignClient.gridProjectStats(); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsPublicityTaskServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsPublicityTaskServiceImpl.java new file mode 100644 index 0000000000..6abfabaaa7 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsPublicityTaskServiceImpl.java @@ -0,0 +1,94 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import feign.DataStatisticalOpenFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * desc:数据统计 任务服务类 + */ +@Service +public class StatsPublicityTaskServiceImpl implements StatsPublicityTaskService { + @Autowired + private DataStatisticalOpenFeignClient dataStatsOpenFeignClient; + + /** + * desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result articleSummaryDailyStatsjob() { + return dataStatsOpenFeignClient.articleSummaryDailyStatsjob(); + } + + /** + * desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 + * + * @return: + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedDailyStatsjob() { + return dataStatsOpenFeignClient.tagUsedDailyStatsjob(); + } + + /** + * desc: 【月】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedMonthlyStatsjob() { + return dataStatsOpenFeignClient.tagUsedMonthlyStatsjob(); + } + + /** + * desc: 【季,年】 统计发表文章最多的分类 包含 机关 部门 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagUsedQuarterlyStatsjob() { + return dataStatsOpenFeignClient.tagUsedQuarterlyStatsjob(); + } + + /** + * desc: 【日】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedDailyStatsjob() { + return dataStatsOpenFeignClient.tagViewedDailyStatsjob(); + } + + /** + * desc: 【月】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedMonthlyStatsjob() { + return dataStatsOpenFeignClient.tagViewedMonthlyStatsjob(); + } + + /** + * desc: 【季,年】 统计阅读最多的标签 包含 机关 网格 + * + * @date: 2020/6/22 9:09 + * @author: jianjun liu + */ + @Override + public Result tagViewedQuarterlyStatsjob() { + return dataStatsOpenFeignClient.tagViewedQuarterlyStatsjob(); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java new file mode 100644 index 0000000000..658850ba45 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * desc:文章总数 日统计定时任务 + */ +@Component("publicityArticleSummaryDailyStatsTask") +public class PublicityArticleSummaryDailyStatsTask implements ITask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsPublicityTaskService statsPublicityTaskService; + + + @Override + public void run(String params) { + logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行,参数为:{}", params); + Result result = statsPublicityTaskService.articleSummaryDailyStatsjob(); + if (result.success()) { + logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行成功"); + } else { + logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java new file mode 100644 index 0000000000..2d850980a4 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * desc:标签被使用次数 日统计定时任务 + */ +@Component("publicityTagUsedDailyStatsjob") +public class PublicityTagUsedDailyStatsTask implements ITask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsPublicityTaskService statsPublicityTaskService; + + + @Override + public void run(String params) { + logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行,参数为:{}", params); + Result result = statsPublicityTaskService.tagUsedDailyStatsjob(); + if (result.success()) { + logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行定时任务执行成功"); + } else { + logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java new file mode 100644 index 0000000000..df99756776 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * desc:标签被使用次数 【月、季、年】统计定时任务 + */ +@Component("publicityTagUsedMonthlyStatsjob") +public class PublicityTagUsedMonthlyStatsTask implements ITask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsPublicityTaskService statsPublicityTaskService; + + + @Override + public void run(String params) { + logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行,参数为:{}", params); + Result result = statsPublicityTaskService.tagUsedMonthlyStatsjob(); + if (result.success()) { + logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行定时任务执行成功"); + } else { + logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java new file mode 100644 index 0000000000..5484440742 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * desc:标签被阅读次数 【日】统计定时任务 + */ +@Component("publicityTagViewedDailyStatsTask") +public class PublicityTagViewedDailyStatsTask implements ITask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsPublicityTaskService statsPublicityTaskService; + + + @Override + public void run(String params) { + logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行,参数为:{}", params); + Result result = statsPublicityTaskService.tagViewedDailyStatsjob(); + if (result.success()) { + logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行定时任务执行成功"); + } else { + logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java new file mode 100644 index 0000000000..d68677fde3 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsPublicityTaskService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * desc:标签被阅读次数 【月、季、年】统计定时任务 + */ +@Component("publicityTagViewedMonthlyStatsTask") +public class PublicityTagViewedMonthlyStatsTask implements ITask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsPublicityTaskService statsPublicityTaskService; + + + @Override + public void run(String params) { + logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params); + Result result = statsPublicityTaskService.tagViewedMonthlyStatsjob(); + if (result.success()) { + logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行定时任务执行成功"); + } else { + logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java new file mode 100644 index 0000000000..99f2d1739a --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java @@ -0,0 +1,34 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsGroupService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:09 + * + * 统计 “网格小组”, dim:【机关-日】 + */ +@Component("statsGroupAgencyDailyTask") +public class StatsGroupAgencyDailyTask implements ITask { + + @Autowired + private StatsGroupService statsGroupService; + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Override + public void run(String params) { + logger.debug("StatsGroupAgencyDailyTask定时任务正在执行,参数为:{}", params); + Result result = statsGroupService.groupGridDaily(); + if (result.success()){ + logger.debug("StatsGroupAgencyDailyTask定时任务正在执行定时任务执行成功"); + }else { + logger.debug("StatsGroupAgencyDailyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyMonthlyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyMonthlyTask.java new file mode 100644 index 0000000000..bcd59c4047 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyMonthlyTask.java @@ -0,0 +1,34 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsGroupService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:09 + * + * 统计 “网格小组”, dim:【机关-日】 + */ +@Component("statsGroupAgencyMonthlyTask") +public class StatsGroupAgencyMonthlyTask implements ITask { + + @Autowired + private StatsGroupService statsGroupService; + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Override + public void run(String params) { + logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行,参数为:{}", params); + Result result = statsGroupService.groupAgencyMonthly(); + if (result.success()){ + logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行定时任务执行成功"); + }else { + logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupGridDailyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupGridDailyTask.java new file mode 100644 index 0000000000..675c63ea88 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupGridDailyTask.java @@ -0,0 +1,35 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsGroupService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:09 + * + * 统计 “网格小组”, dim:【网格-日】 + * + */ +@Component("statsGroupGridDailyTask") +public class StatsGroupGridDailyTask implements ITask { + + @Autowired + private StatsGroupService statsGroupService; + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Override + public void run(String params) { + logger.debug("StatsGroupGridDailyTask定时任务正在执行,参数为:{}", params); + Result result = statsGroupService.groupAgencyDaily(); + if (result.success()){ + logger.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行成功"); + }else { + logger.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsIssueTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsIssueTask.java new file mode 100644 index 0000000000..20448d11d2 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsIssueTask.java @@ -0,0 +1,32 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsIssueService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.logging.Log; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/6/23 14:36 + */ +@Slf4j +@Component("statsIssueTask") +public class StatsIssueTask implements ITask { + @Autowired + private StatsIssueService statsIssueService; + + @Override + public void run(String params) { + log.debug("StatsGroupGridDailyTask定时任务正在执行,参数为:{}", params); + Result result = statsIssueService.agencyGridIssueStats(); + if (result.success()){ + log.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行成功"); + }else { + log.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectAgencyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectAgencyTask.java new file mode 100644 index 0000000000..fcb09dae46 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectAgencyTask.java @@ -0,0 +1,32 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsProjectService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Description 数据统计-项目-机关日月统计任务 + * @Author sun + */ +@Component("statsProjectAgencyTask") +public class StatsProjectAgencyTask implements ITask { + + @Autowired + private StatsProjectService statsProjectService; + + private Logger log = LoggerFactory.getLogger(getClass()); + + @Override + public void run(String params) { + log.debug("StatsProjectAgencyTask定时任务正在执行,参数为:{}", params); + Result result = statsProjectService.agencyProjectStats(); + if (result.success()){ + log.debug("StatsProjectAgencyTask定时任务正在执行定时任务执行成功"); + }else { + log.debug("StatsProjectAgencyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectGridTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectGridTask.java new file mode 100644 index 0000000000..293aa82380 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsProjectGridTask.java @@ -0,0 +1,35 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.StatsProjectService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @CreateTime 2020/6/22 14:09 + * + * 统计 “网格小组”, dim:【网格-日】 + * + */ +@Component("statsProjectGridTask") +public class StatsProjectGridTask implements ITask { + + @Autowired + private StatsProjectService statsProjectService; + + private Logger log = LoggerFactory.getLogger(getClass()); + + @Override + public void run(String params) { + log.debug("StatsProjectGridTask定时任务正在执行,参数为:{}", params); + Result result = statsProjectService.gridProjectStats(); + if (result.success()){ + log.debug("StatsProjectGridTask定时任务正在执行定时任务执行成功"); + }else { + log.debug("StatsProjectGridTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java index aba19d20a8..30acef4ea8 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java @@ -33,7 +33,7 @@ public class LoginUserDetailsResultDTO { private Set deptIdList; /** - * 当前登录的组织id(顶级) + * 当前登录用户所属的机关id */ private String agencyId; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index 279232667f..b2cba9216e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -216,11 +216,11 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl registerRecordWithDiffCustAndGrid = registerRecords.stream().filter(obj -> !customerId.equals(obj.getCustomerId()) && !gridId.equals(obj.getGridId())).findAny(); if(registerRecordWithDiffCustAndGrid.isPresent()){ - //如果存在不同客户不同网格的注册信息 + //如果存在不同客户不同网格的注册信息(当前用户已经在别的客户下的网格注册过) //注册用户 参与用户 registerRelationToSave.setFirstRegister(NumConstant.ZERO_STR); registerRelationToSave.setRegister(NumConstant.ONE_STR);