diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index 8e526e2a73..49dbbb94d5 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: epmet_dba password: EpmEt-dbA-UsEr #oracle配置 diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index de94f499a2..323b2a7fca 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -442,6 +442,7 @@ epmet: urlWhiteList: - /data/report/test/test - /data/report/screen/** + - /data/report/screenkc/** - /epmetuser/customerstaff/customerlist swaggerUrls: diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java new file mode 100644 index 0000000000..9e1b9c346b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueAvgAuditTimeDTO { + + private String gridName; + private Integer avgAuditTime; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java new file mode 100644 index 0000000000..655df79505 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class IssueEffectResultDTO { + + private Double reportEffectiveRatio; + private Double conversionRatio; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java new file mode 100644 index 0000000000..0ddfcfbf80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueGridTotalRankDTO { + + private String gridId; + private String gridName; + private Integer issueCount; + + private List gridNameDataList = new ArrayList<>(); + private List issueCountDataList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java new file mode 100644 index 0000000000..9ae403b1c2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class KcIssueSummary { + + private String dateId; + private Integer reportCount; + private Integer issueCount; + private Integer pendingCount; + private Integer rejectedCount; + private Integer processingCount; + private Integer closedCount; + private Integer issueViewCount; + private Integer voteCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java new file mode 100644 index 0000000000..ee831f9761 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.result.issue; + + +import java.util.ArrayList; +import java.util.List; + +public class KcPartiTrendResultDTO { + + private String monthId; + private Integer reportCount; + + private List xAxis = new ArrayList<>(); + private List reportCountDataList = new ArrayList<>(); + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getReportCount() { + return reportCount; + } + + public void setReportCount(Integer reportCount) { + this.reportCount = reportCount; + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getReportCountDataList() { + return reportCountDataList; + } + + public void setReportCountDataList(List reportCountDataList) { + this.reportCountDataList = reportCountDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java new file mode 100644 index 0000000000..3e48b9798f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class GridProjectCountRankResultDTO { + private List gridNameDataList = new ArrayList<>(); + private List projectCountDataList = new ArrayList<>(); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java new file mode 100644 index 0000000000..3f035afd94 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class GridProjectCountResultDTO { + + private String gridId; + private String gridName; + private Integer projectCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java new file mode 100644 index 0000000000..83ca38001d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java @@ -0,0 +1,9 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectAvgClosedTimeResultDTO { + private String gridName; + private Integer avgClosedCaseTime; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java new file mode 100644 index 0000000000..dd03a4c899 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java @@ -0,0 +1,10 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectCategoryAnalysisResultDTO { + private String categoryId; + private String categoryName; + private Integer projectCount; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java new file mode 100644 index 0000000000..717fc32c23 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java @@ -0,0 +1,87 @@ +package com.epmet.dto.result.project; + +import java.util.ArrayList; +import java.util.List; + +/** + * xAxis 被lombok生成后是XAxis,与nei不符,所以使用手动生成getter/setter方法 + */ +public class ProjectSatisfactionResultDTO { + + private List xAxis = new ArrayList<>(); + private List greatSatisDataList = new ArrayList<>(); + private List goodSatisDataList = new ArrayList<>(); + private List disSatisDataList = new ArrayList<>(); + + private String monthId; + // 满意 + private Integer goodSatis; + // 非常满意 + private Integer greatSatis; + // 不满意 + private Integer disSatis; + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getGreatSatisDataList() { + return greatSatisDataList; + } + + public void setGreatSatisDataList(List greatSatisDataList) { + this.greatSatisDataList = greatSatisDataList; + } + + public List getGoodSatisDataList() { + return goodSatisDataList; + } + + public void setGoodSatisDataList(List goodSatisDataList) { + this.goodSatisDataList = goodSatisDataList; + } + + public List getDisSatisDataList() { + return disSatisDataList; + } + + public void setDisSatisDataList(List disSatisDataList) { + this.disSatisDataList = disSatisDataList; + } + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getGoodSatis() { + return goodSatis; + } + + public void setGoodSatis(Integer goodSatis) { + this.goodSatis = goodSatis; + } + + public Integer getGreatSatis() { + return greatSatis; + } + + public void setGreatSatis(Integer greatSatis) { + this.greatSatis = greatSatis; + } + + public Integer getDisSatis() { + return disSatis; + } + + public void setDisSatis(Integer disSatis) { + this.disSatis = disSatis; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java new file mode 100644 index 0000000000..f0b7ef4750 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectSummaryResultDTO { + + private String dateId; + private Integer projectCount; + private Integer processingCount; + private Integer closedCount; + private Integer moveCount; + private Integer closedCaseCount; + private Integer projectViewCount; + private Integer voteCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java new file mode 100644 index 0000000000..926310a31d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java @@ -0,0 +1,13 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class UserSummaryResultDTO { + + private String dateId; + private Integer vistorCount; + private Integer regUserCount; + private Integer partyUserCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java new file mode 100644 index 0000000000..51d156b993 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcUserPointRankResultDTO { + + private List userNameDataList = new ArrayList<>(); + private List pointsDataList = new ArrayList<>(); + + @Data + public static class KcUserPoint { + private String userId; + private String userName; + private Integer pointTotal; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java new file mode 100644 index 0000000000..c87ddbc2cd --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class KcUserPortrayalResultDTO { + + // 年龄分布 + private AgeDistribution ageDistribution; + // 性别分布 + private GenderDistribution genderDistribution; + + @Data + public static class AgeDistribution { + private Integer ageLevel1; + private Integer ageLevel2; + private Integer ageLevel3; + private Integer ageLevel4; + private Integer ageLevel5; + private Integer ageLevel6; + } + + @Data + public static class GenderDistribution { + private Integer malePartyUserCount; + private Integer femalePartyUserCount; + } + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java new file mode 100644 index 0000000000..f29c9e3124 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcUserRankResultDTO { + + // 网格名称 + private String gridName; + // 浏览用户数 + private Integer viewUserCount; + + private List gridNameDataList = new ArrayList<>(); + private List totalUserDataList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java new file mode 100644 index 0000000000..5c2ef112d7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java @@ -0,0 +1,63 @@ +package com.epmet.dto.result.user; + +import java.util.ArrayList; +import java.util.List; + +public class KcUserTrendResultDTO { + + private String monthId; + private Integer regUserCount; + private Integer partyUserCount; + + private List xAxis = new ArrayList<>(); + private List userDataList = new ArrayList<>(); + private List partyUserDataList = new ArrayList<>(); + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getRegUserCount() { + return regUserCount; + } + + public void setRegUserCount(Integer regUserCount) { + this.regUserCount = regUserCount; + } + + public Integer getPartyUserCount() { + return partyUserCount; + } + + public void setPartyUserCount(Integer partyUserCount) { + this.partyUserCount = partyUserCount; + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getUserDataList() { + return userDataList; + } + + public void setUserDataList(List userDataList) { + this.userDataList = userDataList; + } + + public List getPartyUserDataList() { + return partyUserDataList; + } + + public void setPartyUserDataList(List partyUserDataList) { + this.partyUserDataList = partyUserDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java new file mode 100644 index 0000000000..09d2fb8584 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcCategoryNewsCountResultDTO { + + private String categoryName; + private Integer newsCount; + private Integer partiCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java new file mode 100644 index 0000000000..1d2d60f98d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result.user; + +import java.util.ArrayList; +import java.util.List; + +public class ScreenKcCategoryNewsRankResultDTO { + + private List xAxis = new ArrayList<>(); + private List partiCountDataList = new ArrayList<>(); + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getPartiCountDataList() { + return partiCountDataList; + } + + public void setPartiCountDataList(List partiCountDataList) { + this.partiCountDataList = partiCountDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java new file mode 100644 index 0000000000..2fe7201164 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcNewsHotRankResultDTO { + + private String newsId; + private String newsTitle; + private Integer hotCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java new file mode 100644 index 0000000000..c240f7da10 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +public class ScreenKcNewsPartiTrendResultDTO { + + private List xAxis = new ArrayList<>(); + + private List partiCountDataList = new ArrayList<>(); + + @Data + public static class ScreenKcNewsPartyCount { + + private String monthId; + private Integer partiCount; + + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getPartiCountDataList() { + return partiCountDataList; + } + + public void setPartiCountDataList(List partiCountDataList) { + this.partiCountDataList = partiCountDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java new file mode 100644 index 0000000000..0cf7fab7cd --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcNewsSummaryResultDTO { + + private String dateId; + private Integer newsCount; + private Integer readCount; + private Integer likeCount; + private Integer commentCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java new file mode 100644 index 0000000000..fc1a44996d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java new file mode 100644 index 0000000000..4b6c4a80ef --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupUserCountRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java index cca3eb4f1b..e4beb2b1cd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -1,11 +1,9 @@ package com.epmet.evaluationindex.screen.dto.form; -import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,6 +13,7 @@ import java.io.Serializable; @Data public class HeartVolunteerrankFormDTO implements Serializable { private static final long serialVersionUID = -2880432640584616651L; + public interface AddUserInternalGroup {} /** * 页码,从1开始 */ @@ -29,5 +28,5 @@ public class HeartVolunteerrankFormDTO implements Serializable { * 客户Id */ private String customerId; - public interface AddUserInternalGroup {} + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java new file mode 100644 index 0000000000..0f870ea551 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GridNameGroupCountResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称 + */ + private String gridName = ""; + + /** + * 社群数量 + */ + private Integer groupCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java new file mode 100644 index 0000000000..fc9799ef03 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GroupGridgroupcountrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称集合 + */ + private LinkedList gridNameDataList; + + /** + * 社群数量集合 + */ + private LinkedList groupCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java new file mode 100644 index 0000000000..8eb7a406ae --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class GroupPartitopictrendResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 横坐标月份集合 + */ + private LinkedList xAxis; + + /** + * 话题数量 集合 + */ + private LinkedList actCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java new file mode 100644 index 0000000000..31325b7b60 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-各类总数汇总 + * @Author sun + */ +@Data +public class GroupSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + private String dateId = ""; + + /** + * 社群总数 + */ + private Integer groupCount = 0; + /** + * 群员总数 + */ + private Integer memberCount = 0; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 话题参与量 + */ + private Integer partiCount = 0; + /** + * 转化议题率,这个后端自己算 + */ + private String shiftIssueRatio = ""; + /** + * 话题转议题总数 + */ + @JsonIgnore + private Integer shiftIssueCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java new file mode 100644 index 0000000000..d1068120bf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java new file mode 100644 index 0000000000..d183b967c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupUserCountRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 群成员数 + */ + private Integer memberCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java new file mode 100644 index 0000000000..c7febe5772 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class KcTopicTrendGridMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 月id :yyyyMM + */ + private String monthId = ""; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java index 89ca2fd383..de0b16022b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java @@ -27,4 +27,9 @@ public class MonthPieChartResultDTO implements Serializable { * 治理能力 */ private Double governAbility = 0.0; + + /** + * 月份Id + */ + private String monthId; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java deleted file mode 100644 index a16df89c2a..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.epmet.controller.test; - -import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.commons.tools.utils.Result; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("test") -public class TestController { - - @ExternalAppRequestAuth - @RequestMapping("/test") - public Result test(ExternalAppRequestParam externalAppRequestParam, String ext) { - return new Result().ok("调用成功,客户信息:"+externalAppRequestParam); - } - -} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index fd3564c53b..6da1ba9359 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -67,8 +67,8 @@ public class IndexController { } /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:02 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index f945c8c43f..a3f03120df 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -4,9 +4,18 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -61,6 +70,73 @@ public class KcScreenController { public Result heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){ return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * 议题分析-各类总数 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/summary") + public Result getIssueSummary(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcIssueSummary issueSummary = kcScreenService.getIssueSummary(customerId); + return new Result().ok(issueSummary); + } + + /** + * 参与趋势 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/partitrend") + public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcPartiTrendResultDTO trendResultDTO = kcScreenService.getIssuePartiTrend(customerId); + return new Result().ok(trendResultDTO); + } + + /** + * 按照议题总数排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/gridtotalrank") + public Result getIssueGridTotalRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueGridTotalRank(customerId)); + } + + /** + * 议题分析-审核效率排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/avgaudittimerank") + public Result getAvgAuditTimeRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getAvgAuditTimeRank(customerId)); + } + + /** + * 议题分析-议题效率 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/effective") + public Result getIssueEffective(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueEffective(customerId)); + } + /** * @param externalAppRequestParam @@ -86,4 +162,250 @@ public class KcScreenController { return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/summary") + public Result groupSummary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupSummary(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/partitopictrend") + public Result groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupPartitopictrend(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/gridgroupcountrank") + public Result groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/usercountrank") + public Result> groupUserCountRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupUserCountRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupUserCountRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupUserCountRank(formDTO)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/topicshiftissueratiorank") + public Result> groupTopicShiftIssueRatioRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupTopicShiftIssueRatioRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupTopicShiftIssueRatioRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupTopicShiftIssueRatioRank(formDTO)); + } + + /** + * 项目各类总数汇总 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/summary") + public Result getProjectSummary(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getProjectSummary(customerId)); + } + + /** + * 项目分析-网格下项目数量排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/gridcountrank") + public Result getProjectGridCountRank(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getGridProjectCountRank(customerId)); + } + + /** + * 项目分析-项目类别 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/categoryanalysis") + public Result> getProjectCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getProjectCategoryAnalysis(customerId)); + } + + /** + * 网格项目平均结案时间 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/avgclosedtimeanalysis") + public Result> getGridProjectAvgClosedTimeAnalysis(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getGridProjectAvgClosedTimeAnalysis(customerId)); + } + + /** + * 项目分析-居民满意度 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/statis") + public Result getProjectSatisfactionAnalyze(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getProjectSatisfactionAnalyze(customerId)); + } + + /** + * 用户-summary + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/summary") + public Result getUserSummary(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getUserSummary(customerId)); + } + + /** + * 用户量趋势 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/trend") + public Result getUserTrend(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserTrend(customerId)); + } + + /** + * 网格用户排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/griduserrank") + public Result getUserRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserRank(customerId)); + } + + /** + * 用户画像 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/userportrayal") + public Result getUserPortrayal(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserPortrayal(customerId)); + } + + /** + * 用户积分排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/pointsrank") + public Result getUserPointsRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserPointsRank(customerId)); + } + + /** + * 党建声音-各类总数 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/summary") + public Result getNewsSummary(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsSummary(customerId)); + } + + /** + * 新闻阅读参与趋势 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/partitrend") + public Result getNewsPartiTrend(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsPartiTrend(customerId)); + } + + /** + * 党建声音-分类的news数量 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/category") + public Result> getNewsCountGroupByCategory(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getNewsCountOfCategory(customerId)); + } + + /** + * 党建声音-分类的用户参与数排行 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/userparticategoryrank") + public Result getNewsPartiCategoryRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsPartiCategoryRank(customerId)); + } + + /** + * 党建声音-热点新闻排行 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/hotrank") + public Result> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getNewsHotRank(customerId)); + } + + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 3128862ece..cc6c9e9e2b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -54,8 +54,8 @@ public interface ScreenIndexDataMonthlyDao{ List selectMonthBarchart(@Param("agencyId")String agencyId); /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 2c4358ce15..bc15ca191f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.result.user.KcUserPointRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO; import com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO; import org.apache.ibatis.annotations.Mapper; @@ -51,4 +52,5 @@ public interface ScreenPartyUserRankDataDao{ **/ List selectPartymemberPointOrder(@Param("agencyId")String agencyId); + List listUserPoints(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java index 8ab08ef8ce..23e6e5afbd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java @@ -17,8 +17,14 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupTopicShiftIssueRatioRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupUserCountRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-小组详情(先根据customerId+dateId删除) * @@ -28,4 +34,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupDetailGridDailyDao { + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按社群总数降序排列 + * @author sun + */ + List selectGroupUserCountRankList(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按话题总数降序排列 + * @author sun + */ + List selectGroupTopicShiftIssueRatioRankList(GroupTopicShiftIssueRatioRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java index 3b92aa4fa1..e6871db1b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java @@ -17,7 +17,12 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.GridNameGroupCountResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * KC-小组分析各类总数(先根据customerId+dateId删除) @@ -28,4 +33,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupSummaryGridDailyDao { + /** + * @param customerId + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO selectGroupSummaryDaily(@Param("customerId") String customerId); + + /** + * @param customerId + * @Description 按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + * @author sun + */ + LinkedList selectGridDailyList(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java index 2ec71f1d79..8693d6b52e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java @@ -17,7 +17,14 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.IssueAvgAuditTimeDTO; +import com.epmet.dto.result.issue.IssueEffectResultDTO; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.dto.result.issue.KcIssueSummary; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-议题分析(各类总数) @@ -28,4 +35,11 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueSummaryGridDailyDao { + KcIssueSummary getIssueSummary(@Param("customerId") String customerId); + + List getIssueGridTotalRank(@Param("customerId") String customerId); + + List getAvgAuditTimeRank(@Param("customerId") String customerId); + + IssueEffectResultDTO getIssueEffective(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java index 37edac5861..fb9d9918ba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 @@ -28,4 +32,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueTrendGridMonthlyDao { + List getIssuePartiTrend(@Param("customerId") String customerId); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java index 6a779fb248..ce34407ab0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcCategoryNewsCountResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-新闻-按类别统计(先根据customerId+dateId删除) * @@ -28,4 +31,7 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsCategoryAnalysisDao { + List getNewsCountOfCategory(String customerId); + + List listNewsPartiCategoryRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java index 6a03be5485..bf42d979df 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsHotRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-热点新闻排行-(先根据customerId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsRankDao { + List getNewsHotRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java index ec9d49c5c2..16b215f5f2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -28,4 +29,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsSummaryDailyDao { + ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java index c3d60f0b83..92422cf436 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsPartiTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-新闻参与趋势-(先根据customerId+monthId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsTrendMonthlyDao { + List getNewsPartiTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java index a730e97577..c7b7a6b68d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.ProjectCategoryAnalysisResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目按分类统计上报总数(先根据customerId+dateId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectCategoryGridDailyDao { + List listProjectCountGroupByCategory(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java index 324bc723c5..1a204bc242 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.ProjectSatisfactionResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目满意度分析(customerId+monthId先删除记录,再插入) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectSatisGridMonthlyDao { + List getProjectSatisfactionAnalyze(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java index 2c50f1205c..9ce1afc8cf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.GridProjectCountResultDTO; +import com.epmet.dto.result.project.ProjectAvgClosedTimeResultDTO; +import com.epmet.dto.result.project.ProjectSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) * @@ -28,4 +33,9 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectSummaryGridDailyDao { + List getGridProjectCountRank(String customerId); + + ProjectSummaryResultDTO getProjectSummary(String customerId); + + List getGridProjectAvgClosedTimeAnalysis(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java index 8c8e181b0f..12ec47650b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.KcTopicTrendGridMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-话题参与趋势(先根据customerId+monthId删除) @@ -28,4 +32,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcTopicTrendGridMonthlyDao { + /** + * @param customerId + * @Description 按客户查询最近十二个月所有网格汇总数据 + * @author sun + */ + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index dbd5ca3fc1..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.datareport.dao.evaluationindex.screenkc; - -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao { - -} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java index ff33f78b39..40bb9f7ae3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.UserSummaryResultDTO; +import com.epmet.dto.result.user.KcUserPortrayalResultDTO; +import com.epmet.dto.result.user.KcUserRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-用户分析(先根据customerId+dateId删除,后插入) * @@ -28,4 +33,11 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcUserSummaryDailyDao { + UserSummaryResultDTO getUserSummary(String customerId); + + List getUserRank(String customerId); + + KcUserPortrayalResultDTO.AgeDistribution getAgeDistribution(String customerId); + + KcUserPortrayalResultDTO.GenderDistribution getGenderDistribution(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java index 92bb3dce0f..c4010379cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.KcUserTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-用户趋势分析(根据monthId+customerId先删后增) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcUserTrendGridMonthlyDao { + List getUserTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index cb57c5ef36..d7646b243d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -18,10 +18,8 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java new file mode 100644 index 0000000000..605b75cf34 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.datareport.dao.issue; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-14 + */ +@Data +public class ScreenKcIssueSummaryGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键(先根据customerId+dateId删除,后插入) + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java similarity index 57% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java index 03f18a5709..527aaa443c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java @@ -15,28 +15,28 @@ * along with this program. If not, see . */ -package com.epmet.entity.evaluationindex.screen; +package com.epmet.datareport.dao.issue; -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import java.io.Serializable; +import java.util.Date; import lombok.Data; -import lombok.EqualsAndHashCode; -import java.util.Date; /** - * KC-用户公益时长排名(先根据customerId删除) + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 + * @since v1.0.0 2020-09-14 */ @Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_kc_user_heat_rank_grid_daily") -public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { +public class ScreenKcIssueTrendGridMonthlyDTO implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; + + /** + * ID 主键(每天上报当前月),按照customerId+monthId先删除记录,再插入 + */ + private String id; /** * 客户Id @@ -44,9 +44,9 @@ public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { private String customerId; /** - * 数据更新至:yyyyMMdd + * 月id :yyyyMM */ - private String dateId; + private String monthId; /** * 网格id @@ -59,7 +59,7 @@ public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { private String gridName; /** - * 网格所属组织id + * 网格所属的组织id */ private String parentAgencyId; @@ -69,28 +69,38 @@ public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { private String allParentIds; /** - * 用户id + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 */ - private String userId; + private Integer revision; /** - * 用户姓名 + * 创建人 */ - private String userName; + private String createdBy; /** - * 1志愿者 0不是志愿者 + * 创建时间 */ - private Integer volunteerFlag; + private Date createdTime; /** - * 爱心时长 单位分钟 + * 更新人 */ - private Integer heartTime; + private String updatedBy; /** - * 积分 + * 更新时间 */ - private Integer points; + private Date updatedTime; -} +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java index 761d369b7a..4ff9cf0fd4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java @@ -38,8 +38,8 @@ public interface IndexService { MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO); /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 448b032c21..f17e492904 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,11 +1,18 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.dto.result.issue.*; +import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; + /** * 孔村大屏api * @@ -48,4 +55,83 @@ public interface KcScreenService { * @author sun */ List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); + KcIssueSummary getIssueSummary(String customerId); + + KcPartiTrendResultDTO getIssuePartiTrend(String customerId); + + IssueGridTotalRankDTO getIssueGridTotalRank(String customerId); + + List getAvgAuditTimeRank(String customerId); + + IssueEffectResultDTO getIssueEffective(String customerId); + + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + List groupUserCountRank(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO); + /** + * 项目各类总数 + * @param customerId + * @return + */ + ProjectSummaryResultDTO getProjectSummary(String customerId); + + GridProjectCountRankResultDTO getGridProjectCountRank(String customerId); + + List getProjectCategoryAnalysis(String customerId); + + List getGridProjectAvgClosedTimeAnalysis(String customerId); + + ProjectSatisfactionResultDTO getProjectSatisfactionAnalyze(String customerId); + + UserSummaryResultDTO getUserSummary(String customerId); + + KcUserTrendResultDTO getUserTrend(String customerId); + + KcUserRankResultDTO getUserRank(String customerId); + + KcUserPortrayalResultDTO getUserPortrayal(String customerId); + + KcUserPointRankResultDTO getUserPointsRank(String customerId); + + ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId); + + ScreenKcNewsPartiTrendResultDTO getNewsPartiTrend(String customerId); + + List getNewsCountOfCategory(String customerId); + + ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId); + + List getNewsHotRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index b0c9715031..d9761fcf09 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -57,7 +57,7 @@ public class IndexServiceImpl implements IndexService { yearAverageIndexResultDTO.setPartyDevAbility(getRound(yearAverageIndexResultDTO.getPartyDevAbility())); yearAverageIndexResultDTO.setGovernAbility(getRound(yearAverageIndexResultDTO.getGovernAbility())); yearAverageIndexResultDTO.setServiceAbility(getRound(yearAverageIndexResultDTO.getServiceAbility())); - yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getYearAverageIndex())); + yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getPartyDevAbility() + yearAverageIndexResultDTO.getGovernAbility() + yearAverageIndexResultDTO.getServiceAbility())); return yearAverageIndexResultDTO; } @@ -71,22 +71,22 @@ public class IndexServiceImpl implements IndexService { @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { - MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); - if (null == pieChartDTO){ + MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), null); + String monthId = dateUtils.getCurrentMonthId(); + int time = NumConstant.TWELVE; + //保证获取月度指数数据的最大可能性 + while ((null == pieChartDTO || StringUtils.isBlank(pieChartDTO.getMonthId())) && time > NumConstant.ONE) { + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); + pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), monthId); + } + if (null == pieChartDTO) { return new MonthPieChartResultDTO(); } // 处理小数四舍五入 pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility())); pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility())); pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility())); - String monthId = dateUtils.getCurrentMonthId(); - int time = NumConstant.TWELVE; - //保证获取月度指数数据的最大可能性 - while(null == pieChartDTO && time > NumConstant.ONE){ - time--; - monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); - pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId); - } return pieChartDTO; } @@ -126,7 +126,7 @@ public class IndexServiceImpl implements IndexService { barchart.setPartyDevAbility(getRound(barchart.getPartyDevAbility())); barchart.setGovernAbility(getRound(barchart.getGovernAbility())); barchart.setServiceAbility(getRound(barchart.getServiceAbility())); - barchart.setIndexTotal(getRound(barchart.getIndexTotal())); + barchart.setIndexTotal(getRound(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility())); }); List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); //升序 当前月份在队尾 @@ -179,8 +179,8 @@ public class IndexServiceImpl implements IndexService { } /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ @@ -199,7 +199,7 @@ public class IndexServiceImpl implements IndexService { indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); - indexRank.setTotalIndex(getRound(indexRank.getTotalIndex())); + indexRank.setTotalIndex(getRound(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility())); }); return subAgencyIndexRankResultDTOS; } @@ -218,7 +218,7 @@ public class IndexServiceImpl implements IndexService { rank.setPartyDevAbility(getRound(rank.getPartyDevAbility())); rank.setGovernAbility(getRound(rank.getGovernAbility())); rank.setServiceAbility(getRound(rank.getServiceAbility())); - rank.setTotalIndex(getRound(rank.getTotalIndex())); + rank.setTotalIndex(getRound(rank.getPartyDevAbility() + rank.getGovernAbility() + rank.getServiceAbility())); }); } return subAgencyIndexRankResultDTOS; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index e86c1d7353..b300d5d4c8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -4,14 +4,24 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyUserRankDataDao; import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; +import com.epmet.dto.result.issue.*; +import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.text.NumberFormat; import java.util.LinkedList; import java.util.List; @@ -27,6 +37,7 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private DateUtils dateUtils; + @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired @@ -38,6 +49,54 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcIssueSummaryGridDailyDao screenKcIssueSummaryGridDailyDao; + + @Autowired + private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + + @Autowired + private ScreenKcProjectSummaryGridDailyDao screenKcProjectSummaryGridDailyDao; + + @Autowired + private ScreenKcProjectCategoryGridDailyDao screenKcProjectCategoryGridDailyDao; + + @Autowired + private ScreenKcProjectSummaryGridDailyDao projectSummaryGridDailyDao; + + @Autowired + private ScreenKcProjectSatisGridMonthlyDao projectSatisGridMonthlyDao; + + @Autowired + private ScreenKcUserSummaryDailyDao kcUserSummaryDailyDao; + + @Autowired + private ScreenKcUserTrendGridMonthlyDao userTrendGridMonthlyDao; + + @Autowired + private ScreenPartyUserRankDataDao partyUserRankDataDao; + + @Autowired + private ScreenKcNewsSummaryDailyDao screenKcNewsSummaryDailyDao; + + @Autowired + private ScreenKcNewsTrendMonthlyDao screenKcNewsTrendMonthlyDao; + + @Autowired + private ScreenKcNewsCategoryAnalysisDao screenKcNewsCategoryAnalysisDao; + + @Autowired + private ScreenKcNewsRankDao screenKcNewsRankDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -118,4 +177,281 @@ public class KcScreenServiceImpl implements KcScreenService { return list; } + @Override + public KcIssueSummary getIssueSummary(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueSummary(customerId); + } + + @Override + public KcPartiTrendResultDTO getIssuePartiTrend(String customerId) { + List trend = trendGridMonthlyDao.getIssuePartiTrend(customerId); + KcPartiTrendResultDTO result = new KcPartiTrendResultDTO(); + trend.stream().forEach(t -> { + String month = t.getMonthId().substring(4); + result.getxAxis().add(new Integer(month).toString().concat("月")); + result.getReportCountDataList().add(t.getReportCount()); + }); + return result; + } + + @Override + public IssueGridTotalRankDTO getIssueGridTotalRank(String customerId) { + List issueGridTotals = screenKcIssueSummaryGridDailyDao.getIssueGridTotalRank(customerId); + + IssueGridTotalRankDTO resultDTO = new IssueGridTotalRankDTO(); + issueGridTotals.stream().forEach(igt -> { + resultDTO.getGridNameDataList().add(igt.getGridName()); + resultDTO.getIssueCountDataList().add(igt.getIssueCount()); + }); + + return resultDTO; + } + + @Override + public List getAvgAuditTimeRank(String customerId) { + return screenKcIssueSummaryGridDailyDao.getAvgAuditTimeRank(customerId); + } + + @Override + public IssueEffectResultDTO getIssueEffective(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueEffective(customerId); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @Override + public GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam) { + //1.按客户查询最近一天各网格各项数据的汇总值 + GroupSummaryResultDTO resultDTO = screenKcGroupSummaryGridDailyDao.selectGroupSummaryDaily(externalAppRequestParam.getCustomerId()); + if (null == resultDTO) { + return new GroupSummaryResultDTO(); + } + + //2.计算转化议题率,保留两位小数 + if (resultDTO.getTopicCount() < NumConstant.ONE || resultDTO.getShiftIssueCount() < NumConstant.ONE) { + resultDTO.setShiftIssueRatio("0%"); + } else { + NumberFormat numberFormat = NumberFormat.getInstance(); + //设置精确到小数点后2位 + numberFormat.setMaximumFractionDigits(2); + String ratio = numberFormat.format((float) resultDTO.getShiftIssueCount() / (float) resultDTO.getTopicCount() * 100); + resultDTO.setShiftIssueRatio(ratio + "%"); + } + + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @Override + public GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam) { + GroupPartitopictrendResultDTO resultDTO = new GroupPartitopictrendResultDTO(); + LinkedList xAxis = new LinkedList<>(); + LinkedList actCountDataList = new LinkedList<>(); + //1.按客户查询最近十二个月所有网格汇总数据 + List list = screenKcTopicTrendGridMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId()); + //2.倒序遍历封装数据 + for (int i = list.size() - 1; i >= 0; i--) { + xAxis.add(list.get(i).getMonthId()); + actCountDataList.add(list.get(i).getTopicCount()); + } + //3.封装数据并返回 + resultDTO.setXAxis(xAxis); + resultDTO.setActCountDataList(actCountDataList); + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam) { + GroupGridgroupcountrankResultDTO resultDTO = new GroupGridgroupcountrankResultDTO(); + LinkedList gridNameDataList = new LinkedList<>(); + LinkedList groupCountDataList = new LinkedList<>(); + //1.按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + LinkedList list = screenKcGroupSummaryGridDailyDao.selectGridDailyList(externalAppRequestParam.getCustomerId()); + //2.封装数据 + list.forEach(l -> { + gridNameDataList.add(l.getGridName()); + groupCountDataList.add(l.getGroupCount()); + }); + resultDTO.setGridNameDataList(gridNameDataList); + resultDTO.setGroupCountDataList(groupCountDataList); + + return resultDTO; + } + + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public List groupUserCountRank(GroupUserCountRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按社群总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupUserCountRankList(formDTO); + return list; + } + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @Override + public List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按话题总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupTopicShiftIssueRatioRankList(formDTO); + return list; + } + + @Override + public ProjectSummaryResultDTO getProjectSummary(String customerId) { + return projectSummaryGridDailyDao.getProjectSummary(customerId); + } + + @Override + public GridProjectCountRankResultDTO getGridProjectCountRank(String customerId) { + List gridCounts = screenKcProjectSummaryGridDailyDao.getGridProjectCountRank(customerId); + GridProjectCountRankResultDTO rankResult = new GridProjectCountRankResultDTO(); + gridCounts.stream().forEach(gc -> { + rankResult.getGridNameDataList().add(gc.getGridName()); + rankResult.getProjectCountDataList().add(gc.getProjectCount()); + }); + return rankResult; + } + + @Override + public List getProjectCategoryAnalysis(String customerId) { + return screenKcProjectCategoryGridDailyDao.listProjectCountGroupByCategory(customerId); + } + + @Override + public List getGridProjectAvgClosedTimeAnalysis(String customerId) { + return screenKcProjectSummaryGridDailyDao.getGridProjectAvgClosedTimeAnalysis(customerId); + } + + @Override + public ProjectSatisfactionResultDTO getProjectSatisfactionAnalyze(String customerId) { + List pss = projectSatisGridMonthlyDao.getProjectSatisfactionAnalyze(customerId); + + ProjectSatisfactionResultDTO resultDTO = new ProjectSatisfactionResultDTO(); + pss.stream().forEach(ps -> { + String monthNo = ps.getMonthId().substring(4); + resultDTO.getxAxis().add(new Integer(monthNo).toString().concat("月")); + resultDTO.getGreatSatisDataList().add(ps.getGreatSatis()); + resultDTO.getGoodSatisDataList().add(ps.getGoodSatis()); + resultDTO.getDisSatisDataList().add(ps.getDisSatis()); + }); + return resultDTO; + } + + @Override + public UserSummaryResultDTO getUserSummary(String customerId) { + return kcUserSummaryDailyDao.getUserSummary(customerId); + } + + @Override + public KcUserTrendResultDTO getUserTrend(String customerId) { + List userSomeNums = userTrendGridMonthlyDao.getUserTrend(customerId); + KcUserTrendResultDTO trend = new KcUserTrendResultDTO(); + userSomeNums.stream().forEach(usm -> { + String monthStr = usm.getMonthId().substring(4); + trend.getxAxis().add(new Integer(monthStr).toString().concat("月")); + trend.getUserDataList().add(usm.getRegUserCount()); + trend.getPartyUserDataList().add(usm.getPartyUserCount()); + }); + + return trend; + } + + @Override + public KcUserRankResultDTO getUserRank(String customerId) { + List list = kcUserSummaryDailyDao.getUserRank(customerId); + + KcUserRankResultDTO rank = new KcUserRankResultDTO(); + list.stream().forEach(i -> { + rank.getGridNameDataList().add(i.getGridName()); + rank.getTotalUserDataList().add(i.getViewUserCount()); + }); + + return rank; + } + + @Override + public KcUserPortrayalResultDTO getUserPortrayal(String customerId) { + KcUserPortrayalResultDTO.AgeDistribution ageDistribution = kcUserSummaryDailyDao.getAgeDistribution(customerId); + KcUserPortrayalResultDTO.GenderDistribution genderDistribution = kcUserSummaryDailyDao.getGenderDistribution(customerId); + + KcUserPortrayalResultDTO portrayal = new KcUserPortrayalResultDTO(); + portrayal.setAgeDistribution(ageDistribution); + portrayal.setGenderDistribution(genderDistribution); + + return portrayal; + } + + @Override + public KcUserPointRankResultDTO getUserPointsRank(String customerId) { + List userPoints = partyUserRankDataDao.listUserPoints(customerId); + KcUserPointRankResultDTO rank = new KcUserPointRankResultDTO(); + userPoints.stream().forEach(p -> { + rank.getUserNameDataList().add(p.getUserName()); + rank.getPointsDataList().add(p.getPointTotal()); + }); + return rank; + } + + @Override + public ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId) { + return screenKcNewsSummaryDailyDao.getNewsSummary(customerId); + } + + @Override + public ScreenKcNewsPartiTrendResultDTO getNewsPartiTrend(String customerId) { + List partyCounts = + screenKcNewsTrendMonthlyDao.getNewsPartiTrend(customerId); + + ScreenKcNewsPartiTrendResultDTO trend = new ScreenKcNewsPartiTrendResultDTO(); + partyCounts.stream().forEach(pc -> { + String monthId = pc.getMonthId(); + trend.getxAxis().add(new Integer(monthId.substring(4)).toString().concat("月")); + trend.getPartiCountDataList().add(pc.getPartiCount()); + }); + + return trend; + } + + @Override + public List getNewsCountOfCategory(String customerId) { + return screenKcNewsCategoryAnalysisDao.getNewsCountOfCategory(customerId); + } + + @Override + public ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId) { + List partiCounts = screenKcNewsCategoryAnalysisDao.listNewsPartiCategoryRank(customerId); + ScreenKcCategoryNewsRankResultDTO rank = new ScreenKcCategoryNewsRankResultDTO(); + partiCounts.stream().forEach(pc -> { + rank.getxAxis().add(pc.getCategoryName()); + rank.getPartiCountDataList().add(pc.getPartiCount()); + }); + return rank; + } + + @Override + public List getNewsHotRank(String customerId) { + return screenKcNewsRankDao.getNewsHotRank(customerId); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml similarity index 56% rename from epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml rename to epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml index 76f68580a1..607ea18a04 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml @@ -1,7 +1,8 @@ - + - + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..889b92ae59 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 0a040c2ccb..be4cf400b4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -8,7 +8,8 @@ SELECT service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, + MONTH_ID FROM screen_index_data_monthly WHERE @@ -32,8 +33,7 @@ month_id AS monthId, service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, - (service_ablity * SERVICE_ABLITY_WEIGHT + party_dev_ablity * PARTY_DEV_WEIGHT + govern_ablity * GOVERN_ABLITY_WEIGHT) AS indexTotal + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility FROM screen_index_data_monthly WHERE @@ -43,11 +43,10 @@ LIMIT 12 - + @@ -69,7 +69,6 @@ service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, - (service_ablity * SERVICE_ABLITY_WEIGHT + party_dev_ablity * PARTY_DEV_WEIGHT + govern_ablity * GOVERN_ABLITY_WEIGHT) AS totalIndex, ORG_ID orgId FROM screen_index_data_monthly diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 2bda5e1ec7..4aeae5361a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -6,7 +6,6 @@ + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index a7062885ce..47ae608fc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -4,8 +4,7 @@ - SELECT month_id AS "monthId", act_count AS "actCount" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml index 618e712bff..c0d3133d95 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml @@ -3,5 +3,62 @@ + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml index 03bbdb55c2..d461ab19d2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml @@ -3,5 +3,58 @@ + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 98b91d3ee3..57c743144f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -3,5 +3,58 @@ + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml index e9298902f1..731c8b8083 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml @@ -3,6 +3,12 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml index c42b4df218..da547c9ba0 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml @@ -3,4 +3,34 @@ + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml index 49fb7817e0..ff51305086 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml @@ -3,6 +3,18 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml index 715ce1f038..1094a408a4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml @@ -3,6 +3,20 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml index 71d977bd38..06d6826cbb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml @@ -3,6 +3,13 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml index 76241a4406..1f51a6da8b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml @@ -4,4 +4,19 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml index 0155931631..0727b6fbb2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml @@ -3,6 +3,19 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml index 183c0858e0..7c79e5da1c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml @@ -3,4 +3,55 @@ + + + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml index f6eb105077..60f288f628 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml @@ -4,5 +4,27 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml index 7ccf73a888..48e8bc1604 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml @@ -3,6 +3,62 @@ + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml index 39f0f5a0fc..f86c96af36 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml @@ -3,6 +3,15 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml index 62f94e5d1f..d6a88821a2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml @@ -5,21 +5,31 @@ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 49057915f6..819abb75c6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -15,11 +15,11 @@ public interface IndexCalConstant { /** * 批量删除 一次删除50 */ - Integer DELETE_SIZE=1000; + Integer DELETE_SIZE = 1000; /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 1000; + Integer PAGE_SIZE = 900; String GRID_ID="GRID_ID"; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java index 8fc4130dbc..5e29044533 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java @@ -63,5 +63,6 @@ public class KcGroupDetailFormDTO implements Serializable { /** * 转为议题的话题数 */ - private Integer shifitIssueCount; + private Integer shiftIssueCount; + } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java index 97843831e2..daccb603d2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java @@ -38,15 +38,15 @@ public class KcProjectSatisanalysisFormDTO implements Serializable { /** * 非常满意项目总数 */ - private Integer greatSatis; + private Integer greatSatisfaction; /** * 满意项目总数 */ - private Integer goodSatis; + private Integer goodSatisfaction; /** * 不满意的项目总数 */ - private Integer disSatis; + private Integer disSatisfaction; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java index cd9b0db555..79e7c0a448 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java @@ -48,7 +48,7 @@ public class KcUserSummaryFormDTO implements Serializable { /** * 党员用户 */ - private Integer partyUserCount; + private Integer partyCount; /** * 小于20岁的党员总人数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index b9491f1cf2..4d44af0d47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -175,7 +175,7 @@ public class IndexCalculateController { * @param form * @return */ - @ExternalAppRequestAuth + //@ExternalAppRequestAuth @PostMapping("stopcalculate") public Result stopcalculate(@RequestBody CalculateCommonFormDTO form) { ValidatorUtils.validateEntity(form); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index 58ed6bf539..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.evaluationindex.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.evaluationindex.screen.ScreenKcUserHeatRankGridDailyEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao extends BaseDao { - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index a49d1a1e13..04db895412 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -1,7 +1,5 @@ package com.epmet.eum; -import com.epmet.dto.indexcal.CalculateCommonFormDTO; - /** * 需要计算指标code枚举类 * @@ -9,43 +7,58 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; * @date 2020-08-26 11:14 **/ public enum IndexCodeEnum { - DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1), - WANG_GE_XIANG_GUAN("wanggexiangguan", "网格相关", 1), - SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1), - JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1), - QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1), - QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1), + DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1, false), + WANG_GE_XIANG_GUAN("wanggexiangguan", "网格相关", 1, false), + SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1, false), + JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1, false), + QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1, false), + QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1, false), + + DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2, false), + ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2, false), + FU_WU_NENG_LI("fuwunengli", "服务能力", 2, false), - DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2), - ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2), - FU_WU_NENG_LI("fuwunengli", "服务能力", 2), + CAN_YU_YI_SHI("canyuyishi", "参与议事", 4, false), + DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4, false), + LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4, false), - CAN_YU_YI_SHI("canyuyishi", "参与议事", 4), - DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), - LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), - ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), - ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), - XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), - SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), - SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), - JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ("jiedaoxiashusysqdjnlhzpjz","街道下属所有社区党建能力汇总(平均值)",5), - JIE_DAO_XIA_SHU_SYSQZLNLHZ("jiedaoxiashusysqzlnlhz","街道下属所有社区治理能力汇总 (平均值) ",5), - JIE_DAO_XIA_SHU_SQFWNLDFPYZ("jiedaoxiashusqfwnldfpjz","街道下属社区服务能力得分 (平均值) ",5), - QU_XIA_SHU_JIE_DFWNLHZPJZ("quxiashujiedfwnlhzpjz","区下属街道服务能力汇总(平均值)",5), - QU_XIA_JI_JIE_DDJNLHZPJZ("quxiajijieddjnlhzpjz","区下级街道党建能力汇总(平均值)",5), - SUO_YOU_JIE_DAO_ZLNLPJZ("suoyoujiedaozlnlpjz","所有街道治理能力(平均值)",5), - SUO_YOU_ZHI_SHU_BMZLNLPJZ("suoyouzhishubmzlnlpjz","所有直属部门治理能力(平均值)",5), + ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz", "组织内党员的联系群众能力考评分(平均值)", 5, true), + ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz", "组织内党员的参与议事能力考评分(平均值)", 5, true), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz", "下属所有网格的党建能力(平均值)", 5, true), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz", "社区下属所有网格治理能力汇总(平均值)", 5, true), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz", "社区下级所有网格服务能力得分(平均值) ", 5, true), + JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ("jiedaoxiashusysqdjnlhzpjz", "街道下属所有社区党建能力汇总(平均值)", 5, true), + JIE_DAO_XIA_SHU_SYSQZLNLHZ("jiedaoxiashusysqzlnlhz", "街道下属所有社区治理能力汇总 (平均值) ", 5, true), + JIE_DAO_XIA_SHU_SQFWNLDFPYZ("jiedaoxiashusqfwnldfpjz", "街道下属社区服务能力得分 (平均值) ", 5, true), + QU_XIA_SHU_JIE_DFWNLHZPJZ("quxiashujiedfwnlhzpjz", "区下属街道服务能力汇总(平均值)", 5, true), + QU_XIA_JI_JIE_DDJNLHZPJZ("quxiajijieddjnlhzpjz", "区下级街道党建能力汇总(平均值)", 5, true), + SUO_YOU_JIE_DAO_ZLNLPJZ("suoyoujiedaozlnlpjz", "所有街道治理能力(平均值)", 5, true), + SUO_YOU_ZHI_SHU_BMZLNLPJZ("suoyouzhishubmzlnlpjz", "所有直属部门治理能力(平均值)", 5, true), ; + /** + * code + */ private String code; + /** + * name + */ private String name; + /** + * 等级 + */ private Integer level; + /** + * 是否是平均值 + */ + private Boolean isAvgIndex; - IndexCodeEnum(String code, String name, Integer level) { + IndexCodeEnum(String code, String name, Integer level, Boolean isAvgIndex) { this.code = code; this.name = name; this.level = level; + this.isAvgIndex = isAvgIndex; } public static IndexCodeEnum getEnum(String code) { @@ -58,6 +71,16 @@ public enum IndexCodeEnum { return null; } + public static boolean isAvgIndex(String code) { + IndexCodeEnum[] values = IndexCodeEnum.values(); + for (IndexCodeEnum value : values) { + if (code != null && value.getCode().equals(code)) { + return value.isAvgIndex; + } + } + return false; + } + public String getCode() { return code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 0de8be20fc..9d9cfe5739 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -41,6 +41,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @Slf4j @@ -77,27 +78,26 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【党员相关】指标权重信息不存在"); } - Map cpcScoreTotalMap = new HashMap<>(); Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); int pageNo = NumConstant.ONE; int pageSize = IndexCalConstant.PAGE_SIZE; List list = null; - Map preLastCpcScoreTotalMap = new HashMap<>(); - CpcScoreEntity currentLastCpcScore = null; + Map cpcScoreTotalMap = new HashMap<>(); + Map userTotalCount = new HashMap<>(); + //删除总分 然后插入 + int effectRow; do { + effectRow = cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + } while (effectRow > NumConstant.ZERO); + do { + List result = new ArrayList<>(); //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); pageNo++; if (CollectionUtils.isEmpty(list)) { log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); } else { - //获取最后一条 - currentLastCpcScore = list.get(list.size() - 1); - if (preLastCpcScoreTotalMap.containsKey(currentLastCpcScore.getUserId())) { - cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); - preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); - } Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); userGroupMap.forEach((userId, partScoreList) -> { CpcScoreEntity totalEntity = null; @@ -114,29 +114,28 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); totalEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG)); - - if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { - preLastCpcScoreTotalMap.put(part.getUserId(), part); - } else { - cpcScoreTotalMap.put(userId, totalEntity); - } + cpcScoreTotalMap.put(userId, totalEntity); } //自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + AtomicInteger atomicInteger = userTotalCount.get(part.getUserId()); + + if (atomicInteger == null) { + atomicInteger = new AtomicInteger(0); + userTotalCount.put(part.getUserId(), atomicInteger); + } + int totalCount = atomicInteger.addAndGet(1); + //todo 次代码限制了 党员的 4级指标的个数 看看是否还有更好的方式 + if (totalCount == 3) { + result.add(totalEntity); + } log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); totalEntity.setScore(totalEntity.getScore().add(total)); } }); } - - //没查询到数据 就把上次的放进去 - if (list == null || list.size() < pageSize || !CollectionUtils.isEmpty(preLastCpcScoreTotalMap)) { - cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); - } - //删除总分 然后插入 - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); - insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - } while (!CollectionUtils.isEmpty(list)); + insertCpcScoreBatch(formDTO, result, IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } @@ -174,7 +173,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ public void insertCpcScoreBatch(CalculateCommonFormDTO formDTO, List values, String indexCode) { if (CollectionUtils.isEmpty(values)) { - log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); + log.warn("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); return; } List> partition = ListUtils.partition(values, IndexCalConstant.INSERT_SIZE); @@ -332,7 +331,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ public void insertCpcSubScoreBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { if (CollectionUtils.isEmpty(subList)) { - log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); + log.warn("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); return; } List> partition = ListUtils.partition(subList, IndexCalConstant.INSERT_SIZE); @@ -379,7 +378,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), index.getAllParentIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); + + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), index.getAllParentIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), IndexCodeEnum.isAvgIndex(index.getIndexCode()), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 9355c6f79e..6266d20651 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -375,6 +375,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl getAgencyListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index c439df6213..b8efe2a1ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -57,7 +57,13 @@ public class BatchScoreCalculator { for (SampleValue vo : indexValueVOs) { String sampleId = vo.getSampleId(); //归一后的值 - BigDecimal normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); + BigDecimal normalizeValue;// = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); + //如果不需要归一 则 直接value*权重 + if (idx.isScore()) { + normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + } else { + normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); + } BigDecimal score = normalizeValue.multiply(weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index 0c805af16c..64d73ad3f6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -39,5 +39,10 @@ public class IndexInputVO implements Serializable { */ private BigDecimal weight; + /** + * 是否是分数 如果是分数 直接不用计算 乘以权重即可 + */ + private boolean isScore; + private ScoreCalculator scoreCalculator; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml index 149c94e075..b7867b1098 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml @@ -22,7 +22,7 @@ delete from screen_kc_act_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index e7cf3fa2cd..4dca3289ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_kc_group_detail_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} limit 1000; @@ -70,7 +70,7 @@ #{item.groupLeader}, #{item.memberCount}, #{item.topicCount}, - #{item.shifitIssueCount}, + #{item.shiftIssueCount}, 0, 0, 'APP_USER', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml index 833ca38965..380d1e540f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml @@ -26,7 +26,7 @@ delete from screen_kc_group_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml index 57055dfcba..741fd14534 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_issue_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml index 38d1b6cda4..64b3a8578a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml @@ -23,7 +23,7 @@ delete from screen_kc_news_category_analysis - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml index 9a29f845d8..f2cd35dd00 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml @@ -21,7 +21,7 @@ delete from screen_kc_news_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml index ea2ca56f7d..855456a973 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_platform_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml index a285d083b3..1a06d2959a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml @@ -24,7 +24,7 @@ delete from screen_kc_project_category_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml index 1147f687d5..740caa71e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml @@ -59,9 +59,9 @@ #{item.gridName}, #{item.parentAgencyId}, #{item.allParentIds}, - #{item.greatSatis}, - #{item.goodSatis}, - #{item.disSatis}, + #{item.greatSatisfaction}, + #{item.goodSatisfaction}, + #{item.disSatisfaction}, 0, 0, 'APP_USER', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml index 614ffac3af..cd19511251 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_project_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml deleted file mode 100644 index a8a3c2eff3..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml index d1c0e9dea2..001b32e398 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_user_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; @@ -77,7 +77,7 @@ #{item.allParentIds}, #{item.visitorCount}, #{item.regUserCount}, - #{item.partyUserCount}, + #{item.partyCount}, #{item.ageLevel1}, #{item.ageLevel2}, #{item.ageLevel3}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml index 414ae85ecb..2e7de8203d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_volunteer_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 16549e9b47..05a9360b47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -76,8 +76,8 @@ public class DemoScoreCal { List> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -102,8 +102,8 @@ public class DemoScoreCal { List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -161,10 +161,10 @@ public class DemoScoreCal { // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), sc1); - IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), sc2); - IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), sc3); - IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), sc4); + IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), false, sc1); + IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), false, sc2); + IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), false, sc3); + IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), false, sc4); List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); @@ -234,10 +234,10 @@ public class DemoScoreCal { // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.3), sc1); - IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.2), sc2); - IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.2), sc3); - IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(0.6), new BigDecimal(0.3), sc4); + IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb1", index1SampleValues, new BigDecimal(-1), new BigDecimal("0.3"), false, sc1); + IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal("0.2"), false, sc2); + IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb3", index1SampleValues3, new BigDecimal(-1), new BigDecimal("0.2"), false, sc3); + IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb4", index1SampleValues4, new BigDecimal(0.6), new BigDecimal("0.3"), false, sc4); List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); @@ -250,7 +250,9 @@ public class DemoScoreCal { System.err.println("----------------11111111----------------"); result2.forEach((key, value) -> { - System.out.println(key.concat("的得分为:").concat(value.toString())); + System.out.println(key.concat("的总得分为:") + value.getTotalScore()); + //System.out.println(JSON.toJSONString(indexInputVOS)); + value.getDetails().forEach(o -> System.out.println(JSON.toJSONString(o))); }); System.err.println("-----------------2222222222---------------"); } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 2e49c80102..de4de9ed21 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,13 +75,13 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "2c448b7da527055fbeebb628f8d3dcb0"); - claim.put("customerId", "c1"); + claim.put("appId", "acc4ad66c82a7b46e741364b4c62dce2"); + claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1"); long ts = System.currentTimeMillis() - 1000 * 60 * 4; System.out.println("时间戳:" + ts); claim.put("ts", ts); - String abc = new ExtAppJwtTokenUtils().createToken(claim, "d4b73db4cf8e46ef99fa1f95149c2791ef2396fded114dd09e406cbce83fc88a"); + String abc = new ExtAppJwtTokenUtils().createToken(claim, "612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970"); System.out.println(abc); }