318 changed files with 12817 additions and 541 deletions
@ -0,0 +1,212 @@ |
|||
package com.epmet.commons.tools.validator; |
|||
|
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Calendar; |
|||
import java.util.GregorianCalendar; |
|||
import java.util.Hashtable; |
|||
import java.util.regex.Matcher; |
|||
import java.util.regex.Pattern; |
|||
|
|||
import static java.util.regex.Pattern.*; |
|||
|
|||
/** |
|||
* 身份证号校验 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/18 9:59 |
|||
*/ |
|||
public class IdCardNoValidatorUtils { |
|||
|
|||
private static Logger logger = LoggerFactory.getLogger(IdCardNoValidatorUtils.class); |
|||
|
|||
/** |
|||
* 身份证验证 |
|||
* |
|||
* @param idCardNo |
|||
* @return 校验信息,correct为成功,失败会返回对应的失败原因 |
|||
*/ |
|||
public static boolean checkIsIdCardNo(String idCardNo) { |
|||
String[] wf = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"}; |
|||
String[] checkCode = {"7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"}; |
|||
String iDCardNo = ""; |
|||
try { |
|||
//判断号码的长度 15位或18位
|
|||
if (idCardNo.length() != 15 && idCardNo.length() != 18) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证号码长度应该为15位或18位")); |
|||
return false; |
|||
} |
|||
if (idCardNo.length() == 18) { |
|||
String lastStr = idCardNo.substring(idCardNo.length() - 1); |
|||
if (!Character.isDigit(lastStr.charAt(0))) { |
|||
if (Character.isLowerCase(lastStr.charAt(0))) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "18身份证号最后一位字母需要大写")); |
|||
return false; |
|||
} |
|||
} else { |
|||
logger.info(String.format("身份证号%s最后一位为数字")); |
|||
} |
|||
} |
|||
if (idCardNo.length() == 18) { |
|||
iDCardNo = idCardNo.substring(0, 17); |
|||
} else if (idCardNo.length() == 15) { |
|||
iDCardNo = idCardNo.substring(0, 6) + "19" + idCardNo.substring(6, 15); |
|||
} |
|||
if (isStrNum(iDCardNo) == false) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字")); |
|||
return false; |
|||
} |
|||
//判断出生年月
|
|||
String strYear = iDCardNo.substring(6, 10);// 年份
|
|||
String strMonth = iDCardNo.substring(10, 12);// 月份
|
|||
String strDay = iDCardNo.substring(12, 14);// 月份
|
|||
if (isStrDate(strYear + "-" + strMonth + "-" + strDay) == false) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证生日无效")); |
|||
return false; |
|||
} |
|||
GregorianCalendar gc = new GregorianCalendar(); |
|||
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd"); |
|||
if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150 || (gc.getTime().getTime() - s.parse(strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证生日不在有效范围")); |
|||
return false; |
|||
} |
|||
if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证月份无效")); |
|||
return false; |
|||
} |
|||
if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证日期无效")); |
|||
return false; |
|||
} |
|||
//判断地区码
|
|||
Hashtable h = GetAreaCode(); |
|||
if (h.get(iDCardNo.substring(0, 2)) == null) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证地区编码错误")); |
|||
return false; |
|||
} |
|||
//判断最后一位
|
|||
int theLastOne = 0; |
|||
for (int i = 0; i < 17; i++) { |
|||
theLastOne = theLastOne + Integer.parseInt(String.valueOf(iDCardNo.charAt(i))) * Integer.parseInt(checkCode[i]); |
|||
} |
|||
int modValue = theLastOne % 11; |
|||
String strVerifyCode = wf[modValue]; |
|||
iDCardNo = iDCardNo + strVerifyCode; |
|||
|
|||
if (idCardNo.length() == 18 && !iDCardNo.equals(idCardNo)) { |
|||
logger.error(String.format("校验身份证号:%s错误:%s", idCardNo, "身份证无效,不是合法的身份证号码")); |
|||
return false; |
|||
} |
|||
|
|||
} catch (Exception e) { |
|||
logger.error(String.format("校验身份证号方法异常")); |
|||
e.printStackTrace(); |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* 地区代码 |
|||
* |
|||
* @return Hashtable |
|||
*/ |
|||
private static Hashtable GetAreaCode() { |
|||
Hashtable<String, String> hashtable = new Hashtable<String, String>(); |
|||
hashtable.put("11", "北京"); |
|||
hashtable.put("12", "天津"); |
|||
hashtable.put("13", "河北"); |
|||
hashtable.put("14", "山西"); |
|||
hashtable.put("15", "内蒙古"); |
|||
hashtable.put("21", "辽宁"); |
|||
hashtable.put("22", "吉林"); |
|||
hashtable.put("23", "黑龙江"); |
|||
hashtable.put("31", "上海"); |
|||
hashtable.put("32", "江苏"); |
|||
hashtable.put("33", "浙江"); |
|||
hashtable.put("34", "安徽"); |
|||
hashtable.put("35", "福建"); |
|||
hashtable.put("36", "江西"); |
|||
hashtable.put("37", "山东"); |
|||
hashtable.put("41", "河南"); |
|||
hashtable.put("42", "湖北"); |
|||
hashtable.put("43", "湖南"); |
|||
hashtable.put("44", "广东"); |
|||
hashtable.put("45", "广西"); |
|||
hashtable.put("46", "海南"); |
|||
hashtable.put("50", "重庆"); |
|||
hashtable.put("51", "四川"); |
|||
hashtable.put("52", "贵州"); |
|||
hashtable.put("53", "云南"); |
|||
hashtable.put("54", "西藏"); |
|||
hashtable.put("61", "陕西"); |
|||
hashtable.put("62", "甘肃"); |
|||
hashtable.put("63", "青海"); |
|||
hashtable.put("64", "宁夏"); |
|||
hashtable.put("65", "新疆"); |
|||
hashtable.put("71", "台湾"); |
|||
hashtable.put("81", "香港"); |
|||
hashtable.put("82", "澳门"); |
|||
hashtable.put("91", "国外"); |
|||
return hashtable; |
|||
} |
|||
|
|||
/** |
|||
* 判断字符串是否为数字 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
private static boolean isStrNum(String str) { |
|||
Pattern pattern = compile("[0-9]*"); |
|||
Matcher isNum = pattern.matcher(str); |
|||
if (isNum.matches()) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 判断字符串是否为日期格式 |
|||
* |
|||
* @param strDate |
|||
* @return |
|||
*/ |
|||
public static boolean isStrDate(String strDate) { |
|||
Pattern pattern = compile("^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$"); |
|||
Matcher m = pattern.matcher(strDate); |
|||
if (m.matches()) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
|
|||
//根据身份证号判断性别 1男2女0未知
|
|||
public static String getGender(String idCard) { |
|||
String gender = "0"; |
|||
if (!IdCardNoValidatorUtils.checkIsIdCardNo(idCard)) { |
|||
return gender; |
|||
} |
|||
if (idCard.length() == 18) { |
|||
if (Integer.parseInt(idCard.substring(16).substring(0, 1)) % 2 == 0) { |
|||
gender = "2"; |
|||
} else { |
|||
gender = "1"; |
|||
} |
|||
} else if (idCard.length() == 15) { |
|||
String usex = idCard.substring(14, 15); |
|||
if (Integer.parseInt(usex) % 2 == 0) { |
|||
gender = "2"; |
|||
} else { |
|||
gender = "1"; |
|||
} |
|||
} |
|||
return gender; |
|||
} |
|||
|
|||
} |
|||
|
|||
@ -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 = "已关闭"; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.epmet.project.constant; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目 |
|||
**/ |
|||
public interface ProjectConstant { |
|||
|
|||
String DATE = "date"; |
|||
String MONTH = "month"; |
|||
|
|||
/** |
|||
* 根据Token获取组织信息失败 |
|||
*/ |
|||
String GET_AGENCYID = "根据Token获取组织信息失败"; |
|||
|
|||
} |
|||
@ -0,0 +1,182 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
|
|||
} |
|||
@ -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; |
|||
|
|||
} |
|||
@ -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; |
|||
|
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.epmet.project.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @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%小数点后两位) |
|||
*/ |
|||
private String ratio; |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
package com.epmet.project.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @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; |
|||
|
|||
/** |
|||
* 处理中占比 |
|||
*/ |
|||
private String pendingRatio; |
|||
|
|||
/** |
|||
* 已结案总数 |
|||
*/ |
|||
private Integer closedTotal; |
|||
|
|||
/** |
|||
* 已结案占比 |
|||
*/ |
|||
private String closedRatio; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -0,0 +1,63 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -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"; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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; |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.epmet.user.form; |
|||
|
|||
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; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.user.form; |
|||
|
|||
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; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.user.form; |
|||
|
|||
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; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.epmet.user.form; |
|||
|
|||
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; |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.user.result; |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.user.result; |
|||
|
|||
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; |
|||
|
|||
@JsonIgnore |
|||
private String agencyId; |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.epmet.user.result; |
|||
|
|||
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; |
|||
|
|||
@JsonIgnore |
|||
private String gridId; |
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
package com.epmet.user.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 用户汇总信息 返参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 String warmHeartedTotal; |
|||
|
|||
/** |
|||
* 热心居民占比 |
|||
*/ |
|||
private String warmHeartedProportion; |
|||
|
|||
@JsonIgnore |
|||
private String id; |
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
package com.epmet.module.issue.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.issue.dto.form.IssueIncrtrendFormDTO; |
|||
import com.epmet.issue.dto.result.*; |
|||
import com.epmet.module.issue.service.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<com.epmet.issue.dto.result.IssueSummaryInfoResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 17:31 |
|||
*/ |
|||
@PostMapping("summaryinfo") |
|||
public Result<IssueSummaryInfoResultDTO> getSummaryInfo(@LoginUser TokenDto tokenDto) { |
|||
return new Result<IssueSummaryInfoResultDTO>().ok(issueService.getSummaryInfo(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* 数据汇总饼状图 |
|||
* |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.issue.dto.result.IssueSummaryPieResultDTO>> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 17:31 |
|||
*/ |
|||
@PostMapping("summarypie") |
|||
public Result<List<IssueSummaryPieResultDTO>> getSummaryPie(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<IssueSummaryPieResultDTO>>().ok(issueService.getSummaryPie(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* 下级机关议题统计 |
|||
* |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.issue.dto.result.IssueSubAgencyResultDTO>> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 17:31 |
|||
*/ |
|||
@PostMapping("subagency") |
|||
public Result<List<IssueSubAgencyResultDTO>> getSubAgency(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<IssueSubAgencyResultDTO>>().ok(issueService.getSubAgency(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* 网格议题统计 |
|||
* |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.issue.dto.result.IssueSubGridResultDTO>> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 17:31 |
|||
*/ |
|||
@PostMapping("subgrid") |
|||
public Result<List<IssueSubGridResultDTO>> getSubGrid(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<IssueSubGridResultDTO>>().ok(issueService.getSubGrid(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* 议题分析 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.issue.dto.result.IssueIncrtrendResultDTO>> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 17:31 |
|||
*/ |
|||
@PostMapping("incrtrend") |
|||
public Result<List<IssueIncrtrendResultDTO>> getIncrtrend(@LoginUser TokenDto tokenDto, @RequestBody IssueIncrtrendFormDTO formDTO) { |
|||
return new Result<List<IssueIncrtrendResultDTO>>().ok(issueService.getIncrtrend(tokenDto, formDTO)); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
package com.epmet.module.issue.dao; |
|||
|
|||
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<com.epmet.issue.dto.result.IssueDataDTO> |
|||
*/ |
|||
List<IssueDataDTO> selectSubAgencyList(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* 获取机关下网格统计信息 |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 15:21 |
|||
* @param agencyId |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueDataDTO> |
|||
*/ |
|||
List<IssueDataDTO> selectGridList(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* 获取当前机关日增量 |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 15:22 |
|||
* @param agencyId |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueDataDTO> |
|||
*/ |
|||
List<IssueDataDTO> selectAgencyIncDailyList(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* 获取当前机关月增量 |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 15:23 |
|||
* @param agencyId |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueDataDTO> |
|||
*/ |
|||
List<IssueDataDTO> selectAgencyIncMonthlyList(@Param("agencyId") String agencyId); |
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
package com.epmet.module.issue.service; |
|||
|
|||
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<IssueSummaryPieResultDTO> getSummaryPie(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* 下级机关 |
|||
* |
|||
* @param tokenDto |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueSubAgencyResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 16:40 |
|||
*/ |
|||
List<IssueSubAgencyResultDTO> getSubAgency(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* 网格 |
|||
* |
|||
* @param tokenDto |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueSubGridResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 16:41 |
|||
*/ |
|||
List<IssueSubGridResultDTO> getSubGrid(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* 议题分析 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.issue.dto.result.IssueIncrtrendResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/6/22 16:41 |
|||
*/ |
|||
List<IssueIncrtrendResultDTO> getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO); |
|||
} |
|||
@ -0,0 +1,172 @@ |
|||
package com.epmet.module.issue.service.impl; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
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.module.issue.dao.IssueDao; |
|||
import com.epmet.module.issue.service.IssueService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
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<IssueSummaryPieResultDTO> getSummaryPie(TokenDto tokenDto) { |
|||
List<IssueSummaryPieResultDTO> 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<IssueSubAgencyResultDTO> getSubAgency(TokenDto tokenDto) { |
|||
List<IssueSubAgencyResultDTO> list = new ArrayList<>(); |
|||
String agencyId = getAgencyId(tokenDto); |
|||
List<IssueDataDTO> 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<IssueSubGridResultDTO> getSubGrid(TokenDto tokenDto) { |
|||
List<IssueSubGridResultDTO> list = new ArrayList<>(); |
|||
String agencyId = getAgencyId(tokenDto); |
|||
List<IssueDataDTO> 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<IssueIncrtrendResultDTO> getIncrtrend(TokenDto tokenDto, IssueIncrtrendFormDTO formDTO) { |
|||
List<IssueIncrtrendResultDTO> list = new ArrayList<>(); |
|||
String agencyId = getAgencyId(tokenDto); |
|||
List<IssueDataDTO> 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) { |
|||
return data.stripTrailingZeros().toString().concat("%"); |
|||
} |
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
package com.epmet.module.project.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.module.project.service.ProjectService; |
|||
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<ProjectSummaryResultDTO> projectSummary(@LoginUser TokenDto tokenDto) { |
|||
return new Result<ProjectSummaryResultDTO>().ok(projectService.getProjectSummary(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取组织下饼图数据 |
|||
**/ |
|||
@PostMapping("summaryinfo") |
|||
public Result<List<ProjectSummaryInfoResultDTO>> summaryInfo(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<ProjectSummaryInfoResultDTO>>().ok(projectService.getSummaryInfo(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取下级组织柱状图数据 |
|||
**/ |
|||
@PostMapping("subagency") |
|||
public Result<List<ProjectSubAgencyResultDTO>> subAgency(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<ProjectSubAgencyResultDTO>>().ok(projectService.getSubAgency(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取机关直属网格项目数据 |
|||
**/ |
|||
@PostMapping("subgrid") |
|||
public Result<List<ProjectSubGridResultDTO>> subGrid(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<ProjectSubGridResultDTO>>().ok(projectService.getSubGrid(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-日/月数据查询 |
|||
**/ |
|||
@PostMapping("incrtrend") |
|||
public Result<List<ProjectIncrTrendResultDTO>> incrTrend(@LoginUser TokenDto tokenDto, @RequestBody ProjectIncrTrendFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, ProjectIncrTrendFormDTO.ProjectIncr.class); |
|||
return new Result<List<ProjectIncrTrendResultDTO>>().ok(projectService.getProjectIncrTrend(tokenDto,formDTO)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package com.epmet.module.project.dao; |
|||
|
|||
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<ProjectSummaryInfoResultDTO> selectSummaryInfo(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 查询组织最近日期的日统计数据 |
|||
**/ |
|||
FactAgencyProjectDailyDTO selectAgencyProjectDaily(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取最近日期下级组织柱状图数据(按项目总量降序) |
|||
**/ |
|||
List<ProjectSubAgencyResultDTO> selectSubAgency(FactAgencyProjectDailyDTO agencyProjectDailyDTO); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 查询机关下直属网格最近一天的日统计数据,按项目总数降序 |
|||
**/ |
|||
List<ProjectSubGridResultDTO> selectSubGrid(FactAgencyProjectDailyDTO agencyProjectDailyDTO); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 查询机关日统计近九十天数据 |
|||
**/ |
|||
List<ProjectIncrTrendResultDTO> selectIncrTrendDaily(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 查询机关月统计近十二个月数据 |
|||
**/ |
|||
List<ProjectIncrTrendResultDTO> selectIncrTrendMonthly(@Param("agencyId") String agencyId); |
|||
} |
|||
@ -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<ProjectSummaryInfoResultDTO> getSummaryInfo(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取下级组织柱状图数据 |
|||
**/ |
|||
List<ProjectSubAgencyResultDTO> getSubAgency(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取机关直属网格项目数据 |
|||
**/ |
|||
List<ProjectSubGridResultDTO> getSubGrid(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-日/月数据查询 |
|||
**/ |
|||
List<ProjectIncrTrendResultDTO> getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO); |
|||
} |
|||
@ -0,0 +1,150 @@ |
|||
package com.epmet.module.project.service.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.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.module.project.dao.ProjectDao; |
|||
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.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) { |
|||
resultDTO.setPendingRatio(resultDTO.getPendingRatio() + "%"); |
|||
resultDTO.setClosedRatio(resultDTO.getClosedRatio() + "%"); |
|||
} |
|||
return resultDTO; |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取组织下饼图数据 |
|||
**/ |
|||
@Override |
|||
public List<ProjectSummaryInfoResultDTO> getSummaryInfo(TokenDto tokenDto) { |
|||
List<ProjectSummaryInfoResultDTO> resultList = new ArrayList<>(); |
|||
//1:根据token获取agencyId
|
|||
String agencyId = getLoginUserDetails(tokenDto); |
|||
|
|||
//2:根据agencyId查询各状态统计数据
|
|||
resultList = projectDao.selectSummaryInfo(agencyId); |
|||
if (null != resultList && resultList.size() > NumConstant.ZERO) { |
|||
resultList.forEach(sum -> { |
|||
sum.setRatio(sum.getRatio() + "%"); |
|||
}); |
|||
} |
|||
return resultList; |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 数据-项目-获取下级组织柱状图数据 |
|||
**/ |
|||
@Override |
|||
public List<ProjectSubAgencyResultDTO> getSubAgency(TokenDto tokenDto) { |
|||
List<ProjectSubAgencyResultDTO> 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<ProjectSubGridResultDTO> getSubGrid(TokenDto tokenDto) { |
|||
List<ProjectSubGridResultDTO> 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<ProjectIncrTrendResultDTO> getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO) { |
|||
List<ProjectIncrTrendResultDTO> 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 null; |
|||
} |
|||
|
|||
/** |
|||
* @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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.controller; |
|||
|
|||
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.module.publicity.service.PublicityService; |
|||
import com.epmet.publicity.dto.form.TagFormDTO; |
|||
import com.epmet.publicity.dto.result.FactArticlePublishedAgencyDailyDTO; |
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
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;//
|
|||
|
|||
|
|||
/** |
|||
* @param tokenDTO |
|||
* @return |
|||
* @Author jyy |
|||
* @Description 宣传能力—工作端—当前机关累计发文和当前发文 |
|||
**/ |
|||
@PostMapping("summaryinfo") |
|||
public Result<FactArticlePublishedAgencyDailyDTO> summaryInfo(@LoginUser TokenDto tokenDto) { |
|||
return new Result<FactArticlePublishedAgencyDailyDTO>().ok(publicityService.summaryInfo(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据 |
|||
* @author jyy |
|||
*/ |
|||
@PostMapping("tagviewed") |
|||
public Result<List<FactTagAgencyDTO>> 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<List<FactTagAgencyDTO>>().ok(publicityService.tagviewed(tokenDto, pageSize, type)); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据 |
|||
* @author jyy |
|||
*/ |
|||
@PostMapping("tagused") |
|||
public Result<List<FactTagAgencyDTO>> 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<List<FactTagAgencyDTO>>().ok(publicityService.tagused(tokenDto, pageSize, type)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.publicity.dto.result.FactArticlePublishedAgencyDailyDTO; |
|||
import com.epmet.entity.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-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactArticlePublishedAgencyDailyDao extends BaseDao<FactArticlePublishedAgencyDailyEntity> { |
|||
|
|||
/** |
|||
* @Description 宣传能力—工作端—当前机关累计发文和当前发文 |
|||
* @param agencyId |
|||
* @author jyy |
|||
*/ |
|||
FactArticlePublishedAgencyDailyDTO summaryInfo(@Param("agencyId") String agencyId); |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactArticlePublishedDepartmentDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章发布数量【部门】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactArticlePublishedDepartmentDailyDao extends BaseDao<FactArticlePublishedDepartmentDailyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactArticlePublishedGridDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章发布数量【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactArticlePublishedGridDailyDao extends BaseDao<FactArticlePublishedGridDailyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagUsedAgencyMonthlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagUsedAgencyQuarterlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagUsedAgencyYearlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactTagViewedAgencyDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTagViewedAgencyDailyDao extends BaseDao<FactTagViewedAgencyDailyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagViewedAgencyMonthlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagViewedAgencyQuarterlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactTagViewedAgencyYearlyDao { |
|||
/** |
|||
* @param agencyId monthId |
|||
* @Description 根据标签分组,获取当月每个标签数量,按照数量降序,取前pagesize个 |
|||
* @author zxc |
|||
*/ |
|||
List<FactTagAgencyDTO> getYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactTagViewedGridDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTagViewedGridDailyDao extends BaseDao<FactTagViewedGridDailyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactTagViewedGridMonthlyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTagViewedGridMonthlyDao extends BaseDao<FactTagViewedGridMonthlyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactTagViewedGridQuarterlyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTagViewedGridQuarterlyDao extends BaseDao<FactTagViewedGridQuarterlyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.FactTagViewedGridYearlyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTagViewedGridYearlyDao extends BaseDao<FactTagViewedGridYearlyEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章发布数量【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章发布数量【部门】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章发布数量【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-19 |
|||
*/ |
|||
@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; |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.publicity.dto.result.FactArticlePublishedAgencyDailyDTO; |
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
|
|||
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 |
|||
*/ |
|||
FactArticlePublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据 |
|||
* @param tokenDto,formDTO |
|||
* @author jyy |
|||
*/ |
|||
public List<FactTagAgencyDTO> tagviewed(TokenDto tokenDto, Integer pageSize, String type) ; |
|||
|
|||
/** |
|||
* @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据 |
|||
* @param tokenDto,pageSize,type |
|||
* @author jyy |
|||
*/ |
|||
public List<FactTagAgencyDTO> tagused(TokenDto tokenDto, Integer pageSize, String type) ; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,151 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.module.publicity.service.impl; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.module.publicity.dao.FactArticlePublishedAgencyDailyDao; |
|||
import com.epmet.module.publicity.dao.FactTagViewedAgencyMonthlyDao; |
|||
import com.epmet.module.publicity.dao.FactTagViewedAgencyQuarterlyDao; |
|||
import com.epmet.module.publicity.dao.FactTagViewedAgencyYearlyDao; |
|||
|
|||
import com.epmet.module.publicity.service.PublicityService; |
|||
import com.epmet.publicity.dto.result.FactArticlePublishedAgencyDailyDTO; |
|||
|
|||
import com.epmet.publicity.dto.result.FactTagAgencyDTO; |
|||
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 FactArticlePublishedAgencyDailyDao factArticlePublishedAgencyDailyDao;//机关每日发文
|
|||
@Autowired |
|||
private FactTagViewedAgencyMonthlyDao factTagViewedAgencyMonthlyDao;//机关-每月-阅读
|
|||
@Autowired |
|||
private FactTagViewedAgencyQuarterlyDao factTagViewedAgencyQuarterlyDao;//机关-每季度-阅读
|
|||
@Autowired |
|||
private FactTagViewedAgencyYearlyDao factTagViewedAgencyYearlyDao;//机关-每年-阅读
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @Description 宣传能力—工作端—当前机关累计发文和当前发文 |
|||
* @author jyy |
|||
*/ |
|||
@Override |
|||
public FactArticlePublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto) { |
|||
String agencyId = this.getLoginUserDetails(tokenDto); |
|||
return factArticlePublishedAgencyDailyDao.summaryInfo(agencyId); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @param tokenDto,formDTO |
|||
* @Description 宣传能力—工作端—宣传能力-获取阅读最多的分类数据 |
|||
* @author jyy |
|||
*/ |
|||
@Override |
|||
public List<FactTagAgencyDTO> 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 factTagViewedAgencyMonthlyDao.getMonthlyCountByTag(agencyId, monthId, pageSize); |
|||
|
|||
} else if (StringUtils.equals("quarter", type)) {//当季
|
|||
String quarterId = strDate + "Q" + DateUtils.getQuarterIndex(date); |
|||
return factTagViewedAgencyQuarterlyDao.getQuarterlyCountByTag(agencyId, quarterId, pageSize); |
|||
|
|||
} else if (StringUtils.equals("year", type)) {//当年
|
|||
|
|||
return factTagViewedAgencyYearlyDao.getYearlyCountByTag(agencyId, yearId, pageSize); |
|||
|
|||
} else { |
|||
return null; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto,pageSize,type |
|||
* @Description 宣传能力—工作端—宣传能力-获取发表最多的分类数据 |
|||
* @author jyy |
|||
*/ |
|||
@Override |
|||
public List<FactTagAgencyDTO> 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 factTagViewedAgencyMonthlyDao.getMonthlyCountByTag(agencyId, monthId, pageSize); |
|||
|
|||
} else if (StringUtils.equals("quarter", type)) {//当季
|
|||
String quarterId = strDate + "Q" + DateUtils.getQuarterIndex(date); |
|||
return factTagViewedAgencyQuarterlyDao.getQuarterlyCountByTag(agencyId, quarterId, pageSize); |
|||
|
|||
} else if (StringUtils.equals("year", type)) {//当年
|
|||
|
|||
return factTagViewedAgencyYearlyDao.getYearlyCountByTag(agencyId, yearId, pageSize); |
|||
|
|||
} 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(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
package com.epmet.module.topic.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.module.topic.service.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<TopicSummaryResultDTO> topicSummary(@LoginUser TokenDto tokenDto){ |
|||
return new Result<TopicSummaryResultDTO>().ok(topicService.topicSummary(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 话题——话题分析 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("incrtrend") |
|||
public Result<List<TopicIncrTrendResultDTO>> topicIncrTrend(@LoginUser TokenDto tokenDto, @RequestBody TopicIncrTrendFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, TopicIncrTrendFormDTO.TopicIncr.class); |
|||
return new Result<List<TopicIncrTrendResultDTO>>().ok(topicService.topicIncrTrend(tokenDto,formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 话题——直属网格话题数 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("subgrid") |
|||
public Result<List<TopicSubGridResultDTO>> topicSubGrid(@LoginUser TokenDto tokenDto){ |
|||
return new Result<List<TopicSubGridResultDTO>>().ok(topicService.topicSubGrid(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 话题——下级机关话题数 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("subagency") |
|||
public Result<List<TopicSubAgencyResultDTO>> topicSubAgency(@LoginUser TokenDto tokenDto){ |
|||
return new Result<List<TopicSubAgencyResultDTO>>().ok(topicService.topicSubAgency(tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 话题——话题分析表 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("summaryinfo") |
|||
public Result<List<TopicSummaryInfoResultDTO>> topicSummaryInfo(@LoginUser TokenDto tokenDto){ |
|||
return new Result<List<TopicSummaryInfoResultDTO>>().ok(topicService.topicSummaryInfo(tokenDto)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,108 @@ |
|||
package com.epmet.module.topic.dao; |
|||
|
|||
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<TopicStatusResultDTO> getTopicStatus(@Param("agencyId")String agencyId); |
|||
|
|||
/** |
|||
* @Description 获取机关下已转议题数量 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
TopicShiftedCountResultDTO getShiftedCount(@Param("agencyId")String agencyId); |
|||
|
|||
/** |
|||
* @Description 获取话题信息(状态,数量,百分比) |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSummaryInfoResultDTO> topicSummaryInfo(@Param("agencyId")String agencyId); |
|||
|
|||
/** |
|||
* @Description 根据当前机关判断是否有下级机关 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<String> getSubAgencyIdList(@Param("agencyId")String agencyId); |
|||
|
|||
/** |
|||
* @Description 获取最后一天的所有话题数据 【fact_topic_status_agency_daily】 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubAgencyResultDTO> getAllTopicInfoLastDay(); |
|||
|
|||
/** |
|||
* @Description 获取最后一天的所有话题已转议题数据 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubAgencyResultDTO> getAllTopicShiftedInfoLastDay(); |
|||
|
|||
/** |
|||
* @Description 校验机关下是否存在直属网格 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<String> getSubGridIdList(@Param("agencyId")String agencyId); |
|||
|
|||
/** |
|||
* @Description 获取最后一天的所有话题数据 【fact_topic_status_grid_daily】【grid】 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubGridResultDTO> getGridAllTopicInfoLastDay(); |
|||
|
|||
/** |
|||
* @Description 获取最后一天的所有话题已转议题数据【grid】 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubGridResultDTO> getGridAllTopicShiftedInfoLastDay(); |
|||
|
|||
/** |
|||
* @Description 话题日增长 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<TopicIncrTrendResultDTO> getTopicIncrDaily(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Description 话题转议题日增长 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<TopicIncrTrendResultDTO> getTopicShiftedIncrDaily(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Description 话题月增长 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<TopicIncrTrendResultDTO> getTopicIncrMonthly(@Param("agencyId") String agencyId); |
|||
|
|||
/** |
|||
* @Description 话题转议题月增长 |
|||
* @param agencyId |
|||
* @author zxc |
|||
*/ |
|||
List<TopicIncrTrendResultDTO> getTopicShiftedIncrMonthly(@Param("agencyId") String agencyId); |
|||
|
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
package com.epmet.module.topic.service; |
|||
|
|||
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<TopicIncrTrendResultDTO> topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 话题——直属网格话题数 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubGridResultDTO> topicSubGrid( TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Description 话题——下级机关话题数 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSubAgencyResultDTO> topicSubAgency(TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Description 话题——话题分析表 |
|||
* @param tokenDto |
|||
* @author zxc |
|||
*/ |
|||
List<TopicSummaryInfoResultDTO> topicSummaryInfo(TokenDto tokenDto); |
|||
|
|||
} |
|||
@ -0,0 +1,182 @@ |
|||
package com.epmet.module.topic.service.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.module.topic.dao.TopicDao; |
|||
import com.epmet.module.topic.service.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<TopicStatusResultDTO> 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<TopicIncrTrendResultDTO> topicIncrTrend(TokenDto tokenDto, TopicIncrTrendFormDTO formDTO) { |
|||
String agencyId = this.getLoginUserDetails(tokenDto); |
|||
List<TopicIncrTrendResultDTO> result = new ArrayList<>(); |
|||
if (formDTO.getType().equals(TopicConstant.DATE)){ |
|||
List<TopicIncrTrendResultDTO> topicIncrDaily = topicDao.getTopicIncrDaily(agencyId); |
|||
List<TopicIncrTrendResultDTO> topicShiftedIncrDaily = topicDao.getTopicShiftedIncrDaily(agencyId); |
|||
topicIncrDaily.addAll(topicShiftedIncrDaily); |
|||
result = topicIncrDaily.stream().sorted(Comparator.comparing(TopicIncrTrendResultDTO::getDate).reversed()).collect(Collectors.toList()); |
|||
}else { |
|||
List<TopicIncrTrendResultDTO> topicIncrMonthly = topicDao.getTopicIncrMonthly(agencyId); |
|||
List<TopicIncrTrendResultDTO> 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<TopicSubGridResultDTO> topicSubGrid(TokenDto tokenDto) { |
|||
String agencyId = this.getLoginUserDetails(tokenDto); |
|||
List<TopicSubGridResultDTO> result = new ArrayList<>(); |
|||
List<String> subGridIdList = topicDao.getSubGridIdList(agencyId); |
|||
if (subGridIdList.size() != NumConstant.ZERO){ |
|||
List<TopicSubGridResultDTO> gridAllTopicInfoLastDay = topicDao.getGridAllTopicInfoLastDay(); |
|||
List<TopicSubGridResultDTO> 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<TopicSubAgencyResultDTO> topicSubAgency(TokenDto tokenDto) { |
|||
String agencyId = this.getLoginUserDetails(tokenDto); |
|||
List<TopicSubAgencyResultDTO> result = new ArrayList<>(); |
|||
List<String> subAgencyIdList = topicDao.getSubAgencyIdList(agencyId); |
|||
//存在下级机关
|
|||
if (subAgencyIdList.size() != NumConstant.ZERO){ |
|||
List<TopicSubAgencyResultDTO> allTopicInfoLastDay = topicDao.getAllTopicInfoLastDay(); |
|||
List<TopicSubAgencyResultDTO> 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<TopicSummaryInfoResultDTO> topicSummaryInfo(TokenDto tokenDto) { |
|||
String agencyId = this.getLoginUserDetails(tokenDto); |
|||
List<TopicSummaryInfoResultDTO> 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(); |
|||
} |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
package com.epmet.module.user.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.module.user.service.UserService; |
|||
import com.epmet.user.form.UserIncrTrendFormDTO; |
|||
import com.epmet.user.form.UserSubAgencyFormDTO; |
|||
import com.epmet.user.form.UserSubGridFormDTO; |
|||
import com.epmet.user.form.UserSummaryInfoFormDTO; |
|||
import com.epmet.user.result.UserIncrTrendResultDTO; |
|||
import com.epmet.user.result.UserSubAgencyResultDTO; |
|||
import com.epmet.user.result.UserSubGridResultDTO; |
|||
import com.epmet.user.result.UserSummaryInfoResultDTO; |
|||
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; |
|||
|
|||
/** |
|||
* 组织能力用户相关接口入口 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/22 13:22 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("user") |
|||
public class UserController { |
|||
@Autowired |
|||
private UserService userService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.user.result.UserSummaryInfoResultDTO> |
|||
* @author yinzuomei |
|||
* @description 用户汇总信息查询 |
|||
* @Date 2020/6/22 13:27 |
|||
**/ |
|||
@PostMapping("summaryinfo") |
|||
public Result<UserSummaryInfoResultDTO> summaryInfo(@RequestBody UserSummaryInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
UserSummaryInfoResultDTO userSummaryInfoResultDTO = userService.summaryInfo(formDTO); |
|||
return new Result<UserSummaryInfoResultDTO>().ok(userSummaryInfoResultDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.user.result.UserSubAgencyResultDTO> |
|||
* @author yinzuomei |
|||
* @description 直属机关柱状图查询 |
|||
* @Date 2020/6/22 13:30 |
|||
**/ |
|||
@PostMapping("subagency") |
|||
public Result<UserSubAgencyResultDTO> subAgency(@RequestBody UserSubAgencyFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
UserSubAgencyResultDTO userSubAgencyResultDTO = userService.subAgency(formDTO); |
|||
return new Result<UserSubAgencyResultDTO>().ok(userSubAgencyResultDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.user.result.UserSubGridResultDTO> |
|||
* @author yinzuomei |
|||
* @description 直属网格柱状图查询 |
|||
* @Date 2020/6/22 13:33 |
|||
**/ |
|||
@PostMapping("subgrid") |
|||
public Result<UserSubGridResultDTO> subGrid(@RequestBody UserSubGridFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
UserSubGridResultDTO userSubGridResultDTO = userService.subGrid(formDTO); |
|||
return new Result<UserSubGridResultDTO>().ok(userSubGridResultDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.user.result.UserIncrTrendResultDTO> |
|||
* @author yinzuomei |
|||
* @description 按日、按月查询注册用户数(参与用户数)增量折线图 |
|||
* @Date 2020/6/22 13:36 |
|||
**/ |
|||
@PostMapping("incrtrend") |
|||
public Result<UserIncrTrendResultDTO> incrTrend(@RequestBody UserIncrTrendFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
UserIncrTrendResultDTO userIncrTrendResultDTO = userService.incrTrend(formDTO); |
|||
return new Result<UserIncrTrendResultDTO>().ok(userIncrTrendResultDTO); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
package com.epmet.module.user.service; |
|||
|
|||
import com.epmet.user.form.UserIncrTrendFormDTO; |
|||
import com.epmet.user.form.UserSubAgencyFormDTO; |
|||
import com.epmet.user.form.UserSubGridFormDTO; |
|||
import com.epmet.user.form.UserSummaryInfoFormDTO; |
|||
import com.epmet.user.result.UserIncrTrendResultDTO; |
|||
import com.epmet.user.result.UserSubAgencyResultDTO; |
|||
import com.epmet.user.result.UserSubGridResultDTO; |
|||
import com.epmet.user.result.UserSummaryInfoResultDTO; |
|||
|
|||
/** |
|||
* 组织能力用户相关接口 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/22 13:23 |
|||
*/ |
|||
public interface UserService { |
|||
/** |
|||
* @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 |
|||
**/ |
|||
UserSubAgencyResultDTO subAgency(UserSubAgencyFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.user.result.UserSubGridResultDTO |
|||
* @author yinzuomei |
|||
* @description 直属网格柱状图查询 |
|||
* @Date 2020/6/22 13:42 |
|||
**/ |
|||
UserSubGridResultDTO subGrid(UserSubGridFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.user.result.UserIncrTrendResultDTO |
|||
* @author yinzuomei |
|||
* @description 按日、按月查询注册用户数(参与用户数)增量折线图 |
|||
* @Date 2020/6/22 13:42 |
|||
**/ |
|||
UserIncrTrendResultDTO incrTrend(UserIncrTrendFormDTO formDTO); |
|||
} |
|||
@ -0,0 +1,110 @@ |
|||
package com.epmet.module.user.service.impl; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.module.user.service.UserService; |
|||
import com.epmet.user.form.UserIncrTrendFormDTO; |
|||
import com.epmet.user.form.UserSubAgencyFormDTO; |
|||
import com.epmet.user.form.UserSubGridFormDTO; |
|||
import com.epmet.user.form.UserSummaryInfoFormDTO; |
|||
import com.epmet.user.result.UserIncrTrendResultDTO; |
|||
import com.epmet.user.result.UserSubAgencyResultDTO; |
|||
import com.epmet.user.result.UserSubGridResultDTO; |
|||
import com.epmet.user.result.UserSummaryInfoResultDTO; |
|||
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; |
|||
|
|||
/** |
|||
* 组织能力用户相关接口 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/22 13:23 |
|||
*/ |
|||
@Service |
|||
public class UserServiceImpl implements UserService { |
|||
private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class); |
|||
@Autowired |
|||
private LoginUserUtil loginUserUtil; |
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
/** |
|||
* @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<LoginUserDetailsResultDTO> result=epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO); |
|||
if(!result.success()){ |
|||
throw new RenException("查询用户所属组织信息失败"); |
|||
} |
|||
if(result.success()){ |
|||
if (null == result.getData() || StringUtils.isBlank(result.getData().getAgencyId())) { |
|||
throw new RenException("查询用户所属组织信息失败"); |
|||
} |
|||
} |
|||
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) { |
|||
String myAgencyId=this.getMyAgency(); |
|||
//TODO
|
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.user.result.UserSubAgencyResultDTO |
|||
* @author yinzuomei |
|||
* @description 直属机关柱状图查询 |
|||
* @Date 2020/6/22 13:42 |
|||
**/ |
|||
@Override |
|||
public UserSubAgencyResultDTO subAgency(UserSubAgencyFormDTO formDTO) { |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.user.result.UserSubGridResultDTO |
|||
* @author yinzuomei |
|||
* @description 直属网格柱状图查询 |
|||
* @Date 2020/6/22 13:42 |
|||
**/ |
|||
@Override |
|||
public UserSubGridResultDTO subGrid(UserSubGridFormDTO formDTO) { |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.user.result.UserIncrTrendResultDTO |
|||
* @author yinzuomei |
|||
* @description 按日、按月查询注册用户数(参与用户数)增量折线图 |
|||
* @Date 2020/6/22 13:42 |
|||
**/ |
|||
@Override |
|||
public UserIncrTrendResultDTO incrTrend(UserIncrTrendFormDTO formDTO) { |
|||
return null; |
|||
} |
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
<include resource="org/springframework/boot/logging/logback/base.xml"/> |
|||
|
|||
<property name="log.path" value="logs/data-report"/> |
|||
|
|||
<springProperty scope="context" name="appname" source="spring.application.name"/> |
|||
|
|||
<!-- 日志上下文名称 --> |
|||
<contextName>${appname}</contextName> |
|||
|
|||
<!-- 彩色日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" |
|||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
|
|||
<!--1. 输出到控制台--> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>debug</level> |
|||
</filter> |
|||
<encoder> |
|||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|||
<!-- 设置字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!--2. 输出到文档--> |
|||
<!-- 2.1 level为 DEBUG 日志,时间滚动输出 --> |
|||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/debug.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 日志归档 --> |
|||
<fileNamePattern>${log.path}/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.2 level为 INFO 日志,时间滚动输出 --> |
|||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/info.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 每天日志归档路径以及格式 --> |
|||
<fileNamePattern>${log.path}/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.3 level为 WARN 日志,时间滚动输出 --> |
|||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/warn.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.4 level为 ERROR 日志,时间滚动输出 --> |
|||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/error.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录ERROR级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>ERROR</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 开发、测试环境 --> |
|||
<springProfile name="dev,test"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.module.publicity.dao" level="INFO"/> |
|||
<logger name="com.epmet.module.publicity.dao" level="DEBUG"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
<!-- 生产环境 --> |
|||
<springProfile name="prod"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.module.publicity.dao" level="INFO"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="CONSOLE"/> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
</configuration> |
|||
@ -0,0 +1,88 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.module.issue.dao.IssueDao"> |
|||
<!-- 获取当前机关统计信息--> |
|||
<select id="selectAgencyInfo" resultType="com.epmet.issue.dto.result.IssueDataDTO"> |
|||
SELECT AGENCY_ID, |
|||
ISSUE_TOTAL, |
|||
VOTING_TOTAL, |
|||
VOTING_PERCENT, |
|||
SHIFT_PROJECT_TOTAL, |
|||
SHIFT_PROJECT_PERCENT, |
|||
CLOSED_TOTAL, |
|||
CLOSED_PERCENT, |
|||
MAX(DATE_ID) AS DATE_ID, |
|||
DATE_FORMAT(DATE_ID, '%Y.%m.%d') AS DATE_NAME |
|||
FROM |
|||
fact_issue_agency_daily fiad |
|||
WHERE DEL_FLAG = '0' |
|||
AND AGENCY_ID = #{agencyId} |
|||
</select> |
|||
<!-- 获取下级机关统计信息--> |
|||
<select id="selectSubAgencyList" resultType="com.epmet.issue.dto.result.IssueDataDTO"> |
|||
SELECT AGENCY_ID, |
|||
da.AGENCY_NAME, |
|||
ISSUE_TOTAL, |
|||
VOTING_TOTAL, |
|||
SHIFT_PROJECT_TOTAL, |
|||
CLOSED_TOTAL, |
|||
MAX(DATE_ID) AS DATE_ID |
|||
FROM |
|||
fact_issue_agency_daily fiad |
|||
INNER JOIN |
|||
dim_agency da ON fiad.AGENCY_ID = da.ID |
|||
WHERE fiad.DEL_FLAG = '0' |
|||
AND PID = #{agencyId} |
|||
GROUP BY AGENCY_ID |
|||
</select> |
|||
<!-- 获取机关下网格统计信息--> |
|||
<select id="selectGridList" resultType="com.epmet.issue.dto.result.IssueDataDTO"> |
|||
SELECT GRID_ID, |
|||
dg.GRID_NAME, |
|||
ISSUE_TOTAL, |
|||
VOTING_TOTAL, |
|||
SHIFT_PROJECT_TOTAL, |
|||
CLOSED_TOTAL, |
|||
MAX(DATE_ID) AS DATE_ID |
|||
FROM |
|||
fact_issue_grid_daily figd |
|||
INNER JOIN |
|||
dim_grid dg ON figd.GRID_ID = dg.ID |
|||
WHERE figd.DEL_FLAG = '0' |
|||
AND figd.AGENCY_ID = #{agencyId} |
|||
GROUP BY GRID_ID |
|||
</select> |
|||
<!-- 获取当前机关日增量--> |
|||
<select id="selectAgencyIncDailyList" resultType="com.epmet.issue.dto.result.IssueDataDTO"> |
|||
SELECT AGENCY_ID, |
|||
ISSUE_INCR, |
|||
VOTING_INCR, |
|||
SHIFT_PROJECT_INCR, |
|||
CLOSED_INCR, |
|||
DATE_FORMAT(DATE_ID, '%Y/%m/%d') |
|||
FROM |
|||
fact_issue_agency_daily fiad |
|||
WHERE DEL_FLAG = '0' |
|||
AND AGENCY_ID = #{agencyId} |
|||
ORDER BY |
|||
DATE_ID DESC |
|||
LIMIT 90 |
|||
</select> |
|||
<!-- 获取当前机关月增量--> |
|||
<select id="selectAgencyIncMonthlyList" resultType="com.epmet.issue.dto.result.IssueDataDTO"> |
|||
SELECT AGENCY_ID, |
|||
ISSUE_INCR, |
|||
VOTING_INCR, |
|||
SHIFT_PROJECT_INCR, |
|||
CLOSED_INCR, |
|||
DATE_FORMAT(STR_TO_DATE(MONTH_ID,'%Y%m'), '%Y/%m') AS MONTH_ID |
|||
FROM |
|||
fact_issue_agency_monthly fiam |
|||
WHERE DEL_FLAG = '0' |
|||
AND AGENCY_ID = #{agencyId} |
|||
ORDER BY |
|||
MONTH_ID DESC |
|||
LIMIT 12 |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,228 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.module.project.dao.ProjectDao"> |
|||
|
|||
|
|||
<select id="selectProjectSummary" resultType="com.epmet.project.dto.result.ProjectSummaryResultDTO"> |
|||
SELECT |
|||
agency_id AS "agencyId", |
|||
project_total AS "projectTotal", |
|||
DATE_FORMAT(date_id, '%Y.%m.%d') AS "dateName", |
|||
pending_total AS "pendingTotal", |
|||
CAST(pending_ratio AS DECIMAL (9, 2)) AS "pendingRatio", |
|||
closed_total AS "closedTotal", |
|||
CAST(closed_ratio AS DECIMAL(9, 2)) AS "closedRatio" |
|||
FROM |
|||
fact_agency_project_daily |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY date_id DESC |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
<select id="selectSummaryInfo" resultType="com.epmet.project.dto.result.ProjectSummaryInfoResultDTO"> |
|||
( |
|||
SELECT |
|||
"处理中" AS "name", |
|||
pending_total AS "value", |
|||
CAST(PENDING_RATIO AS DECIMAL (9, 2)) AS "ratio" |
|||
FROM |
|||
fact_agency_project_daily |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
date_id DESC |
|||
LIMIT 1 |
|||
) |
|||
UNION ALL |
|||
( |
|||
SELECT |
|||
"已结案" AS "name", |
|||
closed_total AS "value", |
|||
CAST(closed_ratio AS DECIMAL(9, 2)) AS "ratio" |
|||
FROM |
|||
fact_agency_project_daily |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
date_id DESC |
|||
LIMIT 1 |
|||
) |
|||
</select> |
|||
|
|||
<select id="selectAgencyProjectDaily" resultType="com.epmet.project.dto.FactAgencyProjectDailyDTO"> |
|||
SELECT |
|||
id, |
|||
customer_id, |
|||
agency_id, |
|||
parent_id, |
|||
date_id, |
|||
week_id, |
|||
month_id, |
|||
quarter_id, |
|||
year_id |
|||
FROM |
|||
fact_agency_project_daily fapd |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
date_id DESC |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
<select id="selectSubAgency" resultType="com.epmet.project.dto.result.ProjectSubAgencyResultDTO"> |
|||
SELECT |
|||
* |
|||
FROM ( |
|||
( |
|||
SELECT |
|||
da.id AS "agencyId", |
|||
da.agency_name AS "name", |
|||
fapd.pending_total AS "value", |
|||
"处理中" AS "type", |
|||
fapd.project_total |
|||
FROM |
|||
fact_agency_project_daily fapd |
|||
LEFT JOIN dim_agency da ON fapd.agency_id = da.id |
|||
WHERE |
|||
fapd.del_flag = '0' |
|||
AND fapd.parent_id = #{agencyId} |
|||
AND fapd.date_id = #{dateId} |
|||
) |
|||
UNION ALL |
|||
( |
|||
SELECT |
|||
da.id AS "agencyId", |
|||
da.agency_name AS "name", |
|||
fapd.closed_total AS "value", |
|||
"已结案" AS "type", |
|||
fapd.project_total |
|||
FROM |
|||
fact_agency_project_daily fapd |
|||
LEFT JOIN dim_agency da ON fapd.agency_id = da.id |
|||
WHERE |
|||
fapd.del_flag = '0' |
|||
AND fapd.parent_id = #{agencyId} |
|||
AND fapd.date_id = #{dateId} |
|||
) |
|||
) a |
|||
ORDER BY |
|||
a.project_total DESC |
|||
</select> |
|||
|
|||
<select id="selectSubGrid" resultType="com.epmet.project.dto.result.ProjectSubGridResultDTO"> |
|||
SELECT |
|||
* |
|||
FROM ( |
|||
( |
|||
SELECT |
|||
da.id AS "agencyId", |
|||
da.agency_name AS "name", |
|||
fgpd.pending_total AS "value", |
|||
"处理中" AS "type", |
|||
fgpd.project_total |
|||
FROM |
|||
fact_grid_project_daily fgpd |
|||
LEFT JOIN dim_agency da ON fgpd.agency_id = da.id |
|||
WHERE |
|||
fgpd.del_flag = '0' |
|||
AND fgpd.agency_id = #{agencyId} |
|||
AND fgpd.date_id = #{dateId} |
|||
) |
|||
UNION ALL |
|||
( |
|||
SELECT |
|||
da.id AS "agencyId", |
|||
da.agency_name AS "name", |
|||
fgpd.closed_total AS "value", |
|||
"已结案" AS "type", |
|||
fgpd.project_total |
|||
FROM |
|||
fact_grid_project_daily fgpd |
|||
LEFT JOIN dim_agency da ON fgpd.agency_id = da.id |
|||
WHERE |
|||
fgpd.del_flag = '0' |
|||
AND fgpd.agency_id = #{agencyId} |
|||
AND fgpd.date_id = #{dateId} |
|||
) |
|||
) a |
|||
ORDER BY |
|||
a.project_total DESC |
|||
</select> |
|||
|
|||
<select id="selectIncrTrendDaily" resultType="com.epmet.project.dto.result.ProjectIncrTrendResultDTO"> |
|||
SELECT * FROM( |
|||
( |
|||
SELECT |
|||
DATE_FORMAT(DATE_ID, "%Y/%m/%d") AS "date", |
|||
PENDING_INCR AS "value", |
|||
"处理中" AS "type" |
|||
FROM |
|||
fact_agency_project_daily |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
date_id DESC |
|||
LIMIT 90 |
|||
) |
|||
UNION ALL |
|||
( |
|||
SELECT |
|||
DATE_FORMAT(DATE_ID, "%Y/%m/%d") AS "date", |
|||
CLOSED_INCR AS "value", |
|||
"已结案" AS "type" |
|||
FROM |
|||
fact_agency_project_daily |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
date_id DESC |
|||
LIMIT 90 |
|||
) |
|||
) a ORDER BY a.DATE_ID DESC, a.type ASC |
|||
</select> |
|||
|
|||
<select id="selectIncrTrendMonthly" resultType="com.epmet.project.dto.result.ProjectIncrTrendResultDTO"> |
|||
SELECT * FROM( |
|||
( |
|||
SELECT |
|||
DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date", |
|||
pending_incr AS "value", |
|||
"处理中" AS "type", |
|||
month_id |
|||
FROM |
|||
fact_agency_project_monthly |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
month_id DESC |
|||
LIMIT 12 |
|||
) |
|||
UNION ALL |
|||
( |
|||
SELECT |
|||
DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date", |
|||
closed_incr AS "value", |
|||
"已结案" AS "type", |
|||
month_id |
|||
FROM |
|||
fact_agency_project_monthly |
|||
WHERE |
|||
del_flag = '0' |
|||
AND agency_id = #{agencyId} |
|||
ORDER BY |
|||
month_id DESC |
|||
LIMIT 12 |
|||
) |
|||
)a ORDER BY a.month_id DESC,a.type ASC |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.FactArticlePublishedAgencyDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.FactArticlePublishedAgencyDailyEntity" id="factArticlePublishedAgencyDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="articleTotalCount" column="ARTICLE_TOTAL_COUNT"/> |
|||
<result property="articlePublishedCount" column="ARTICLE_PUBLISHED_COUNT"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="weekId" column="WEEK_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
<!-- 机关每日发文:文章累计发文数量、当前发文数量、数据截止日期 --> |
|||
<select id="summaryInfo" parameterType="java.lang.String" resultType="com.epmet.publicity.dto.result.FactArticlePublishedAgencyDailyDTO"> |
|||
SELECT |
|||
article_total_count AS publishedTotal, |
|||
article_published_count AS publishingTotal, |
|||
DATE_FORMAT( date_id, '%Y-%m-%d' ) AS dateName |
|||
FROM fact_article_published_agency_daily |
|||
AND agency_id = #{agencyId} |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,27 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.FactArticlePublishedDepartmentDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.FactArticlePublishedDepartmentDailyEntity" id="factArticlePublishedDepartmentDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="departmentId" column="DEPARTMENT_ID"/> |
|||
<result property="articleTotalCount" column="ARTICLE_TOTAL_COUNT"/> |
|||
<result property="articlePublishedCount" column="ARTICLE_PUBLISHED_COUNT"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="weekId" column="WEEK_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,27 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.FactArticlePublishedGridDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.FactArticlePublishedGridDailyEntity" id="factArticlePublishedGridDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="articleTotalCount" column="ARTICLE_TOTAL_COUNT"/> |
|||
<result property="articlePublishedCount" column="ARTICLE_PUBLISHED_COUNT"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="weekId" column="WEEK_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,20 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.module.publicity.dao.FactTagUsedAgencyMonthlyDao"> |
|||
|
|||
<select id="getMonthlyCountByTag" resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|||
SELECT |
|||
tag_name AS name, |
|||
agency_id AS agencyId, |
|||
tag_id AS tagId, |
|||
COUNT(tag_read_count) AS value |
|||
FROM fact_tag_viewed_agency_monthly |
|||
where agency_id = #{agencyId} |
|||
AND month_id = #{monthId} |
|||
GROUP BY TAG_ID |
|||
ORDER BY value DESC |
|||
LIMIT #{pageSize} |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.module.publicity.dao.FactTagUsedAgencyQuarterlyDao"> |
|||
|
|||
|
|||
<select id="getQuarterlyCountByTag" parameterType="java.lang.String" |
|||
resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|||
SELECT |
|||
tag_name AS name, |
|||
agency_id AS agencyId, |
|||
tag_id AS tagId, |
|||
COUNT(tag_read_count) AS value |
|||
FROM fact_tag_viewed_agency_quarterly |
|||
where agency_id = #{agencyId} |
|||
AND quarter_id = #{quarterId} |
|||
GROUP BY TAG_ID |
|||
ORDER BY value DESC |
|||
LIMIT #{pageSize} |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.module.publicity.dao.FactTagUsedAgencyYearlyDao"> |
|||
|
|||
|
|||
|
|||
<select id="getYearlyCountByTag" parameterType="map" |
|||
resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|||
SELECT |
|||
tag_name AS name, |
|||
agency_id AS agencyId, |
|||
tag_id AS tagId, |
|||
COUNT(tag_read_count) AS value |
|||
FROM fact_tag_viewed_agency_yearly |
|||
where agency_id = #{agencyId} |
|||
AND year_id = #{yearId} |
|||
GROUP BY tag_id |
|||
ORDER BY value DESC |
|||
LIMIT #{pageSize} |
|||
</select> |
|||
|
|||
</mapper> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue