Browse Source

Merge branch 'dev_screen_data' into dev_temp

dev
wxz 5 years ago
parent
commit
fdf90cd2ff
  1. 2
      epmet-cloud-generator/src/main/resources/application.yml
  2. 1
      epmet-gateway/src/main/resources/bootstrap.yml
  3. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java
  4. 11
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java
  5. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java
  6. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java
  7. 46
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java
  8. 12
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java
  9. 14
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java
  10. 9
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java
  11. 10
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java
  12. 87
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java
  13. 17
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java
  14. 13
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java
  15. 20
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java
  16. 29
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java
  17. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java
  18. 63
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java
  19. 12
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java
  20. 26
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java
  21. 12
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java
  22. 37
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java
  23. 14
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java
  24. 32
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java
  25. 32
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java
  26. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java
  27. 26
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java
  28. 28
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java
  29. 28
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java
  30. 48
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java
  31. 33
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java
  32. 33
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java
  33. 26
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java
  34. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java
  35. 19
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java
  36. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  37. 322
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java
  38. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  39. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
  40. 19
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java
  41. 18
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java
  42. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java
  43. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java
  44. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java
  45. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java
  46. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java
  47. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java
  48. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java
  49. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java
  50. 10
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java
  51. 10
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java
  52. 31
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java
  53. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java
  54. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java
  55. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java
  56. 156
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java
  57. 62
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java
  58. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java
  59. 86
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java
  60. 30
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  61. 336
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java
  62. 5
      epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml
  63. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml
  64. 11
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  65. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  66. 9
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  67. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml
  68. 57
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml
  69. 53
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml
  70. 53
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml
  71. 10
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml
  72. 30
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml
  73. 16
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml
  74. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml
  75. 11
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml
  76. 15
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml
  77. 17
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml
  78. 51
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml
  79. 24
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml
  80. 56
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml
  81. 13
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml
  82. 32
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml
  83. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java
  84. 3
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java
  85. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java
  86. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java
  87. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  88. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java
  89. 77
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java
  90. 54
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  91. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  92. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  93. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  94. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  95. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  96. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
  97. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java
  98. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java
  99. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml
  100. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml

2
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配置

1
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:

15
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;
}

11
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;
}

18
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<String> gridNameDataList = new ArrayList<>();
private List<Integer> issueCountDataList = new ArrayList<>();
}

18
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;
}

46
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<String> xAxis = new ArrayList<>();
private List<Integer> 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<String> getxAxis() {
return xAxis;
}
public void setxAxis(List<String> xAxis) {
this.xAxis = xAxis;
}
public List<Integer> getReportCountDataList() {
return reportCountDataList;
}
public void setReportCountDataList(List<Integer> reportCountDataList) {
this.reportCountDataList = reportCountDataList;
}
}

12
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<String> gridNameDataList = new ArrayList<>();
private List<Integer> projectCountDataList = new ArrayList<>();
}

14
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;
}

9
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;
}

10
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;
}

87
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<String> xAxis = new ArrayList<>();
private List<Integer> greatSatisDataList = new ArrayList<>();
private List<Integer> goodSatisDataList = new ArrayList<>();
private List<Integer> disSatisDataList = new ArrayList<>();
private String monthId;
// 满意
private Integer goodSatis;
// 非常满意
private Integer greatSatis;
// 不满意
private Integer disSatis;
public List<String> getxAxis() {
return xAxis;
}
public void setxAxis(List<String> xAxis) {
this.xAxis = xAxis;
}
public List<Integer> getGreatSatisDataList() {
return greatSatisDataList;
}
public void setGreatSatisDataList(List<Integer> greatSatisDataList) {
this.greatSatisDataList = greatSatisDataList;
}
public List<Integer> getGoodSatisDataList() {
return goodSatisDataList;
}
public void setGoodSatisDataList(List<Integer> goodSatisDataList) {
this.goodSatisDataList = goodSatisDataList;
}
public List<Integer> getDisSatisDataList() {
return disSatisDataList;
}
public void setDisSatisDataList(List<Integer> 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;
}
}

17
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;
}

13
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;
}

20
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<String> userNameDataList = new ArrayList<>();
private List<Integer> pointsDataList = new ArrayList<>();
@Data
public static class KcUserPoint {
private String userId;
private String userName;
private Integer pointTotal;
}
}

29
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;
}
}

19
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<String> gridNameDataList = new ArrayList<>();
private List<Integer> totalUserDataList = new ArrayList<>();
}

63
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<String> xAxis = new ArrayList<>();
private List<Integer> userDataList = new ArrayList<>();
private List<Integer> 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<String> getxAxis() {
return xAxis;
}
public void setxAxis(List<String> xAxis) {
this.xAxis = xAxis;
}
public List<Integer> getUserDataList() {
return userDataList;
}
public void setUserDataList(List<Integer> userDataList) {
this.userDataList = userDataList;
}
public List<Integer> getPartyUserDataList() {
return partyUserDataList;
}
public void setPartyUserDataList(List<Integer> partyUserDataList) {
this.partyUserDataList = partyUserDataList;
}
}

12
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;
}

26
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<String> xAxis = new ArrayList<>();
private List<Integer> partiCountDataList = new ArrayList<>();
public List<String> getxAxis() {
return xAxis;
}
public void setxAxis(List<String> xAxis) {
this.xAxis = xAxis;
}
public List<Integer> getPartiCountDataList() {
return partiCountDataList;
}
public void setPartiCountDataList(List<Integer> partiCountDataList) {
this.partiCountDataList = partiCountDataList;
}
}

12
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;
}

37
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<String> xAxis = new ArrayList<>();
private List<Integer> partiCountDataList = new ArrayList<>();
@Data
public static class ScreenKcNewsPartyCount {
private String monthId;
private Integer partiCount;
}
public List<String> getxAxis() {
return xAxis;
}
public void setxAxis(List<String> xAxis) {
this.xAxis = xAxis;
}
public List<Integer> getPartiCountDataList() {
return partiCountDataList;
}
public void setPartiCountDataList(List<Integer> partiCountDataList) {
this.partiCountDataList = partiCountDataList;
}
}

14
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;
}

32
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 {}
}

32
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 {}
}

5
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 {}
}

26
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;
}

28
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<String> gridNameDataList;
/**
* 社群数量集合
*/
private LinkedList<Integer> groupCountDataList;
}

28
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<String> xAxis;
/**
* 话题数量 集合
*/
private LinkedList<Integer> actCountDataList;
}

48
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;
}

33
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 = "";
}

33
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 = "";
}

26
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;
}

5
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;
}

19
epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java

@ -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);
}
}

2
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 上午
*/

322
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<HeartActcounttrendResultDTO> heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){
return new Result<HeartActcounttrendResultDTO>().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<List<HeartVolunteerrankResultDTO>>().ok(kcScreenService.heartVolunteerrank(formDTO));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-各类总数
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/summary")
public Result<GroupSummaryResultDTO> groupSummary(ExternalAppRequestParam externalAppRequestParam){
return new Result<GroupSummaryResultDTO>().ok(kcScreenService.groupSummary(externalAppRequestParam));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-话题参与趋势
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/partitopictrend")
public Result<GroupPartitopictrendResultDTO> groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam){
return new Result<GroupPartitopictrendResultDTO>().ok(kcScreenService.groupPartitopictrend(externalAppRequestParam));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/gridgroupcountrank")
public Result<GroupGridgroupcountrankResultDTO> groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam){
return new Result<GroupGridgroupcountrankResultDTO>().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/usercountrank")
public Result<List<GroupUserCountRankResultDTO>> groupUserCountRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupUserCountRankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GroupUserCountRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
return new Result<List<GroupUserCountRankResultDTO>>().ok(kcScreenService.groupUserCountRank(formDTO));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-话题数量排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/topicshiftissueratiorank")
public Result<List<GroupTopicShiftIssueRatioRankResultDTO>> groupTopicShiftIssueRatioRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupTopicShiftIssueRatioRankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GroupTopicShiftIssueRatioRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
return new Result<List<GroupTopicShiftIssueRatioRankResultDTO>>().ok(kcScreenService.groupTopicShiftIssueRatioRank(formDTO));
}
/**
* 项目各类总数汇总
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("project/summary")
public Result<ProjectSummaryResultDTO> getProjectSummary(ExternalAppRequestParam externalAppRequestParam){
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
String customerId = externalAppRequestParam.getCustomerId();
return new Result<ProjectSummaryResultDTO>().ok(kcScreenService.getProjectSummary(customerId));
}
/**
* 项目分析-网格下项目数量排名
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("project/gridcountrank")
public Result<GridProjectCountRankResultDTO> getProjectGridCountRank(ExternalAppRequestParam externalAppRequestParam){
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
String customerId = externalAppRequestParam.getCustomerId();
return new Result<GridProjectCountRankResultDTO>().ok(kcScreenService.getGridProjectCountRank(customerId));
}
/**
* 项目分析-项目类别
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("project/categoryanalysis")
public Result<List<ProjectCategoryAnalysisResultDTO>> getProjectCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam){
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
String customerId = externalAppRequestParam.getCustomerId();
return new Result<List<ProjectCategoryAnalysisResultDTO>>().ok(kcScreenService.getProjectCategoryAnalysis(customerId));
}
/**
* 网格项目平均结案时间
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("project/avgclosedtimeanalysis")
public Result<List<ProjectAvgClosedTimeResultDTO>> getGridProjectAvgClosedTimeAnalysis(ExternalAppRequestParam externalAppRequestParam){
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
String customerId = externalAppRequestParam.getCustomerId();
return new Result<List<ProjectAvgClosedTimeResultDTO>>().ok(kcScreenService.getGridProjectAvgClosedTimeAnalysis(customerId));
}
/**
* 项目分析-居民满意度
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("project/statis")
public Result<ProjectSatisfactionResultDTO> getProjectSatisfactionAnalyze(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<ProjectSatisfactionResultDTO>().ok(kcScreenService.getProjectSatisfactionAnalyze(customerId));
}
/**
* 用户-summary
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/summary")
public Result<UserSummaryResultDTO> getUserSummary(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
return new Result<UserSummaryResultDTO>().ok(kcScreenService.getUserSummary(customerId));
}
/**
* 用户量趋势
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/trend")
public Result<KcUserTrendResultDTO> getUserTrend(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<KcUserTrendResultDTO>().ok(kcScreenService.getUserTrend(customerId));
}
/**
* 网格用户排名
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/griduserrank")
public Result<KcUserRankResultDTO> getUserRank(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<KcUserRankResultDTO>().ok(kcScreenService.getUserRank(customerId));
}
/**
* 用户画像
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/userportrayal")
public Result<KcUserPortrayalResultDTO> getUserPortrayal(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<KcUserPortrayalResultDTO>().ok(kcScreenService.getUserPortrayal(customerId));
}
/**
* 用户积分排名
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/pointsrank")
public Result<KcUserPointRankResultDTO> getUserPointsRank(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<KcUserPointRankResultDTO>().ok(kcScreenService.getUserPointsRank(customerId));
}
/**
* 党建声音-各类总数
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/summary")
public Result<ScreenKcNewsSummaryResultDTO> getNewsSummary(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<ScreenKcNewsSummaryResultDTO>().ok(kcScreenService.getNewsSummary(customerId));
}
/**
* 新闻阅读参与趋势
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/partitrend")
public Result<ScreenKcNewsPartiTrendResultDTO> getNewsPartiTrend(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<ScreenKcNewsPartiTrendResultDTO>().ok(kcScreenService.getNewsPartiTrend(customerId));
}
/**
* 党建声音-分类的news数量
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/category")
public Result<List<ScreenKcCategoryNewsCountResultDTO>> getNewsCountGroupByCategory(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<List<ScreenKcCategoryNewsCountResultDTO>>().ok(kcScreenService.getNewsCountOfCategory(customerId));
}
/**
* 党建声音-分类的用户参与数排行
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/userparticategoryrank")
public Result<ScreenKcCategoryNewsRankResultDTO> getNewsPartiCategoryRank(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<ScreenKcCategoryNewsRankResultDTO>().ok(kcScreenService.getNewsPartiCategoryRank(customerId));
}
/**
* 党建声音-热点新闻排行
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/hotrank")
public Result<List<ScreenKcNewsHotRankResultDTO>> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<List<ScreenKcNewsHotRankResultDTO>>().ok(kcScreenService.getNewsHotRank(customerId));
}
}

2
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<MonthBarchartResult> selectMonthBarchart(@Param("agencyId")String agencyId);
/**
* @Description 4下级部门指数排行
* @param subAgencyIndexRankFormDTO
* @Description 4下级组织/部门指数排行 (不包含部门的数据)
* @author zxc
* @date 2020/8/20 10:04 上午
*/

2
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<PartyUserPointResultDTO> selectPartymemberPointOrder(@Param("agencyId")String agencyId);
List<KcUserPointRankResultDTO.KcUserPoint> listUserPoints(String customerId);
}

19
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<GroupUserCountRankResultDTO> selectGroupUserCountRankList(GroupUserCountRankFormDTO formDTO);
/**
* @param formDTO
* @Description 按客户查询最近一天所有网格数据 再按话题总数降序排列
* @author sun
*/
List<GroupTopicShiftIssueRatioRankResultDTO> selectGroupTopicShiftIssueRatioRankList(GroupTopicShiftIssueRatioRankFormDTO formDTO);
}

18
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<GridNameGroupCountResultDTO> selectGridDailyList(@Param("customerId") String customerId);
}

14
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<IssueGridTotalRankDTO> getIssueGridTotalRank(@Param("customerId") String customerId);
List<IssueAvgAuditTimeDTO> getAvgAuditTimeRank(@Param("customerId") String customerId);
IssueEffectResultDTO getIssueEffective(@Param("customerId") String customerId);
}

6
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<KcPartiTrendResultDTO> getIssuePartiTrend(@Param("customerId") String customerId);
}

6
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<ScreenKcCategoryNewsCountResultDTO> getNewsCountOfCategory(String customerId);
List<ScreenKcCategoryNewsCountResultDTO> listNewsPartiCategoryRank(String customerId);
}

4
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<ScreenKcNewsHotRankResultDTO> getNewsHotRank(String customerId);
}

2
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);
}

4
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<ScreenKcNewsPartiTrendResultDTO.ScreenKcNewsPartyCount> getNewsPartiTrend(String customerId);
}

4
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<ProjectCategoryAnalysisResultDTO> listProjectCountGroupByCategory(String customerId);
}

4
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<ProjectSatisfactionResultDTO> getProjectSatisfactionAnalyze(String customerId);
}

10
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<GridProjectCountResultDTO> getGridProjectCountRank(String customerId);
ProjectSummaryResultDTO getProjectSummary(String customerId);
List<ProjectAvgClosedTimeResultDTO> getGridProjectAvgClosedTimeAnalysis(String customerId);
}

10
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<KcTopicTrendGridMonthlyResultDTO> selectActTrendMonthly(@Param("customerId") String customerId);
}

31
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java

@ -1,31 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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 {
}

12
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<KcUserRankResultDTO> getUserRank(String customerId);
KcUserPortrayalResultDTO.AgeDistribution getAgeDistribution(String customerId);
KcUserPortrayalResultDTO.GenderDistribution getGenderDistribution(String customerId);
}

4
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<KcUserTrendResultDTO> getUserTrend(String customerId);
}

2
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;

156
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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;
}

62
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java → 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 <http://www.gnu.org/licenses/>.
*/
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;
}
}

2
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 上午
*/

86
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<HeartVolunteerrankResultDTO> heartVolunteerrank(HeartVolunteerrankFormDTO formDTO);
KcIssueSummary getIssueSummary(String customerId);
KcPartiTrendResultDTO getIssuePartiTrend(String customerId);
IssueGridTotalRankDTO getIssueGridTotalRank(String customerId);
List<IssueAvgAuditTimeDTO> 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<GroupUserCountRankResultDTO> groupUserCountRank(GroupUserCountRankFormDTO formDTO);
/**
* @param formDTO
* @Description 邻里党群-话题数量排名
* @author sun
*/
List<GroupTopicShiftIssueRatioRankResultDTO> groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO);
/**
* 项目各类总数
* @param customerId
* @return
*/
ProjectSummaryResultDTO getProjectSummary(String customerId);
GridProjectCountRankResultDTO getGridProjectCountRank(String customerId);
List<ProjectCategoryAnalysisResultDTO> getProjectCategoryAnalysis(String customerId);
List<ProjectAvgClosedTimeResultDTO> 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<ScreenKcCategoryNewsCountResultDTO> getNewsCountOfCategory(String customerId);
ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId);
List<ScreenKcNewsHotRankResultDTO> getNewsHotRank(String customerId);
}

30
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<MonthBarchartResult> 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;

336
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<KcPartiTrendResultDTO> 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<IssueGridTotalRankDTO> 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<IssueAvgAuditTimeDTO> 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<String> xAxis = new LinkedList<>();
LinkedList<Integer> actCountDataList = new LinkedList<>();
//1.按客户查询最近十二个月所有网格汇总数据
List<KcTopicTrendGridMonthlyResultDTO> 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<String> gridNameDataList = new LinkedList<>();
LinkedList<Integer> groupCountDataList = new LinkedList<>();
//1.按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列
LinkedList<GridNameGroupCountResultDTO> 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<GroupUserCountRankResultDTO> groupUserCountRank(GroupUserCountRankFormDTO formDTO) {
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
//按客户查询最近一天所有网格数据 再按社群总数降序排列
List<GroupUserCountRankResultDTO> list = screenKcGroupDetailGridDailyDao.selectGroupUserCountRankList(formDTO);
return list;
}
/**
* @param formDTO
* @Description 邻里党群-话题数量排名
* @author sun
*/
@Override
public List<GroupTopicShiftIssueRatioRankResultDTO> groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO) {
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
//按客户查询最近一天所有网格数据 再按话题总数降序排列
List<GroupTopicShiftIssueRatioRankResultDTO> list = screenKcGroupDetailGridDailyDao.selectGroupTopicShiftIssueRatioRankList(formDTO);
return list;
}
@Override
public ProjectSummaryResultDTO getProjectSummary(String customerId) {
return projectSummaryGridDailyDao.getProjectSummary(customerId);
}
@Override
public GridProjectCountRankResultDTO getGridProjectCountRank(String customerId) {
List<GridProjectCountResultDTO> 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<ProjectCategoryAnalysisResultDTO> getProjectCategoryAnalysis(String customerId) {
return screenKcProjectCategoryGridDailyDao.listProjectCountGroupByCategory(customerId);
}
@Override
public List<ProjectAvgClosedTimeResultDTO> getGridProjectAvgClosedTimeAnalysis(String customerId) {
return screenKcProjectSummaryGridDailyDao.getGridProjectAvgClosedTimeAnalysis(customerId);
}
@Override
public ProjectSatisfactionResultDTO getProjectSatisfactionAnalyze(String customerId) {
List<ProjectSatisfactionResultDTO> 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<KcUserTrendResultDTO> 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<KcUserRankResultDTO> 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<KcUserPointRankResultDTO.KcUserPoint> 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<ScreenKcNewsPartiTrendResultDTO.ScreenKcNewsPartyCount> 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<ScreenKcCategoryNewsCountResultDTO> getNewsCountOfCategory(String customerId) {
return screenKcNewsCategoryAnalysisDao.getNewsCountOfCategory(customerId);
}
@Override
public ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId) {
List<ScreenKcCategoryNewsCountResultDTO> 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<ScreenKcNewsHotRankResultDTO> getNewsHotRank(String customerId) {
return screenKcNewsRankDao.getNewsHotRank(customerId);
}
}

5
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml → epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcUserHeatRankGridDailyDao">
<mapper namespace="com.epmet.datareport.dao.issue.ScreenKcIssueSummaryGridDailyDTO">
</mapper>
</mapper>

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.issue.ScreenKcIssueTrendGridMonthlyDTO">
</mapper>

11
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
</select>
<!-- 下级部门指数排行 -->
<!-- 下级组织/部门指数排行 (不包含部门的数据) -->
<select id="selectSubAgencyIndexRank" parameterType="com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO">
SELECT
org_name AS NAME,
index_total AS totalIndex,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility
@ -57,6 +56,7 @@
del_flag = '0'
AND parent_id = #{agencyId}
AND year_id = #{yearId}
AND ORG_TYPE != 'department'
ORDER BY index_total DESC
LIMIT #{topNum}
</select>
@ -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

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml

@ -6,7 +6,6 @@
<!-- 1、年度平均指数 -->
<select id="selectYearAverageIndex" resultType="com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO">
SELECT
index_total AS yearAverageIndex,
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
govern_ablity AS governAbility
@ -24,10 +23,9 @@
resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO">
SELECT
org_name AS `NAME`,
ROUND(index_total, 1) AS totalIndex,
ROUND(govern_ablity, 1) AS governAbility,
ROUND(party_dev_ablity, 1) AS partyDevAbility,
ROUND(service_ablity, 1) AS serviceAbility,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility,
ORG_ID orgId
FROM
screen_index_data_yearly

9
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -35,4 +35,13 @@
ORDER BY
POINT_TOTAL DESC
</select>
<select id="listUserPoints" resultType="com.epmet.dto.result.user.KcUserPointRankResultDTO$KcUserPoint">
select ur.USER_NAME userName,
ur.POINT_TOTAL pointTotal
from screen_party_user_rank_data ur
where ur.DEL_FLAG = 0
and ur.CUSTOMER_ID = #{customerId}
order by ur.POINT_TOTAL asc
</select>
</mapper>

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml

@ -4,8 +4,7 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao">
<select id="selectActTrendMonthly"
resultType="com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO">
<select id="selectActTrendMonthly" resultType="com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO">
SELECT
month_id AS "monthId",
act_count AS "actCount"

57
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml

@ -3,5 +3,62 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcGroupDetailGridDailyDao">
<select id="selectGroupUserCountRankList" resultType="com.epmet.evaluationindex.screen.dto.result.GroupUserCountRankResultDTO">
SELECT
grid_id AS "groupId",
grid_name AS "groupName",
member_count AS "memberCount",
group_leader AS "groupLeader"
FROM
screen_kc_group_detail_grid_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND date_id = (
select
date_id
from
screen_kc_group_detail_grid_daily
where
del_flag = '0'
and customer_id = #{customerId}
order by
date_id desc,
created_time desc
limit 1
)
ORDER BY
member_count DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectGroupTopicShiftIssueRatioRankList" resultType="com.epmet.evaluationindex.screen.dto.result.GroupTopicShiftIssueRatioRankResultDTO">
SELECT
grid_id AS "groupId",
grid_name AS "groupName",
topic_count AS "topicCount",
group_leader AS "groupLeader"
FROM
screen_kc_group_detail_grid_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND date_id = (
select
date_id
from
screen_kc_group_detail_grid_daily
where
del_flag = '0'
and customer_id = #{customerId}
order by
date_id desc,
created_time desc
limit 1
)
ORDER BY
member_count DESC
LIMIT #{pageNo}, #{pageSize}
</select>
</mapper>

53
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml

@ -3,5 +3,58 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcGroupSummaryGridDailyDao">
<select id="selectGroupSummaryDaily" resultType="com.epmet.evaluationindex.screen.dto.result.GroupSummaryResultDTO">
SELECT
date_id,
sum(group_count) "groupCount",
sum(member_count) "memberCount",
sum(topic_count) "topicCount",
sum(parti_count) "partiCount",
sum(shift_issue_count) "shiftIssueCount"
FROM
screen_kc_group_summary_grid_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND date_id = (
select
date_id
from
screen_kc_group_summary_grid_daily
where
del_flag = '0'
and customer_id = #{customerId}
order by
date_id desc,
created_time desc
limit 1
)
</select>
<select id="selectGridDailyList" resultType="com.epmet.evaluationindex.screen.dto.result.GridNameGroupCountResultDTO">
SELECT
grid_name AS "gridName",
group_count AS "groupCount"
FROM
screen_kc_group_summary_grid_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND date_id = (
select
date_id
from
screen_kc_group_summary_grid_daily
where
del_flag = '0'
and customer_id = #{customerId}
order by
date_id desc,
created_time desc
limit 1
)
ORDER BY
group_count DESC
</select>
</mapper>

53
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml

@ -3,5 +3,58 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueSummaryGridDailyDao">
<select id="getIssueSummary" resultType="com.epmet.dto.result.issue.KcIssueSummary">
select t1.DATE_ID dateId,
sum(REPORT_COUNT) reportCount,
sum(ISSUE_COUNT) issueCount,
sum(PENDING_COUNT) pendingCount,
sum(REJECTED_COUNT) rejectedCount,
sum(PROCESSING_COUNT) processingCount,
sum(CLOSED_COUNT) closedCount,
sum(ISSUE_VIEW_COUNT) issueViewCount,
sum(VOTE_COUNT) voteCount
from screen_kc_issue_summary_grid_daily t1
inner join (
select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id from screen_kc_issue_summary_grid_daily t21 where t21.CUSTOMER_ID=#{customerId}) t2
on (t1.CUSTOMER_ID = t2.customerId and t1.DATE_ID = t2.max_date_id)
</select>
<select id="getIssueGridTotalRank" resultType="com.epmet.dto.result.issue.IssueGridTotalRankDTO">
select
GRID_ID gridId,
GRID_NAME gridName,
ISSUE_COUNT issueCount
from screen_kc_issue_summary_grid_daily isd
inner join (
select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id
from screen_kc_issue_summary_grid_daily t21
where t21.CUSTOMER_ID = #{customerId}) latest
on (isd.CUSTOMER_ID = latest.customerId and isd.DATE_ID = latest.max_date_id)
order by isd.ISSUE_COUNT desc
limit 7
</select>
<select id="getAvgAuditTimeRank" resultType="com.epmet.dto.result.issue.IssueAvgAuditTimeDTO">
select isd.GRID_ID gridId, isd.GRID_NAME gridName, isd.AVG_AUDIT_TIME avgAuditTime
from screen_kc_issue_summary_grid_daily isd
inner join (
select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id
from screen_kc_issue_summary_grid_daily t21
where t21.CUSTOMER_ID = #{customerId}) latest
on (isd.CUSTOMER_ID = latest.customerId and isd.DATE_ID = latest.max_date_id)
order by isd.AVG_AUDIT_TIME desc
limit 7
</select>
<select id="getIssueEffective" resultType="com.epmet.dto.result.issue.IssueEffectResultDTO">
select (sum(isd.PASSED_COUNT) / sum(REPORT_COUNT)) * 100 reportEffectiveRatio,
(sum(isd.SHIFT_TO_PROJECT_COUNT) / sum(REPORT_COUNT)) * 100 conversionRatio
from screen_kc_issue_summary_grid_daily isd
inner join (
select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id
from screen_kc_issue_summary_grid_daily t21
where t21.CUSTOMER_ID = #{customerId}) latest
on (isd.CUSTOMER_ID = latest.customerId and isd.CUSTOMER_ID = latest.customerId and
isd.DATE_ID = latest.max_date_id)
</select>
</mapper>

10
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml

@ -3,6 +3,12 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridMonthlyDao">
<select id="getIssuePartiTrend" resultType="com.epmet.dto.result.issue.KcPartiTrendResultDTO">
select MONTH_ID monthId,
sum(trend.REPORT_COUNT) reportCount
from screen_kc_issue_trend_grid_monthly trend
where CUSTOMER_ID = #{customerId}
group by MONTH_ID
order by MONTH_ID asc
</select>
</mapper>

30
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml

@ -3,4 +3,34 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsCategoryAnalysisDao">
<select id="getNewsCountOfCategory"
resultType="com.epmet.dto.result.user.ScreenKcCategoryNewsCountResultDTO">
select pcd.CATEGORY_ID categoryId,
pcd.CATEGORY_NAME categoryName,
pcd.NEWS_COUNT newsCount
from screen_kc_news_category_analysis pcd
inner join (
select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_news_category_analysis
where CUSTOMER_ID = #{customerId}
and DEL_FLAG = 0
) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID)
where pcd.DEL_FLAG = 0
order by pcd.NEWS_COUNT asc
</select>
<select id="listNewsPartiCategoryRank"
resultType="com.epmet.dto.result.user.ScreenKcCategoryNewsCountResultDTO">
select pcd.CATEGORY_NAME categoryName,
(pcd.READ_COUNT + pcd.LIKE_COUNT + pcd.DIS_LIKE_COUNT) partiCount
from screen_kc_news_category_analysis pcd
inner join (
select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_news_category_analysis
where CUSTOMER_ID = #{customerId}
and DEL_FLAG = 0
) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID)
where pcd.DEL_FLAG = 0
order by convert(pcd.CATEGORY_NAME using gbk)
</select>
</mapper>

16
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml

@ -3,6 +3,18 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsRankDao">
<select id="getNewsHotRank" resultType="com.epmet.dto.result.user.ScreenKcNewsHotRankResultDTO">
select pcd.NEWS_ID newsId,
pcd.NEWS_TITLE newsTitle,
pcd.HOT_COUNT hotCount
from screen_kc_news_rank pcd
inner join (
select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_news_rank
where CUSTOMER_ID = #{customerId}
and DEL_FLAG = 0
) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID)
where pcd.DEL_FLAG = 0
order by pcd.HOT_COUNT desc
</select>
</mapper>

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml

@ -3,6 +3,20 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsSummaryDailyDao">
<select id="getNewsSummary" resultType="com.epmet.dto.result.user.ScreenKcNewsSummaryResultDTO">
select ns.DATE_ID dateId,
ns.NEWS_COUNT newsCount,
ns.READ_COUNT readCount,
ns.COMMENT_COUNT commentCount,
ns.LIKE_COUNT likeCount
from screen_kc_news_summary_daily ns
inner join (
select CUSTOMER_ID,
max(DATE_ID) MAX_DATE_ID
from screen_kc_news_summary_daily
where DEL_FLAG = 0
and CUSTOMER_ID = #{customerId}
) latest on (ns.CUSTOMER_ID = latest.CUSTOMER_ID and ns.DATE_ID = latest.MAX_DATE_ID)
where ns.DEL_FLAG = 0
</select>
</mapper>

11
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml

@ -3,6 +3,13 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsTrendMonthlyDao">
<select id="getNewsPartiTrend"
resultType="com.epmet.dto.result.user.ScreenKcNewsPartiTrendResultDTO$ScreenKcNewsPartyCount">
select ntm.MONTH_ID, ntm.PARTI_COUNT
from screen_kc_news_trend_monthly ntm
where ntm.CUSTOMER_ID = #{customerId}
and ntm.DEL_FLAG = 0
order by MONTH_ID asc
limit 12
</select>
</mapper>

15
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml

@ -4,4 +4,19 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcProjectCategoryGridDailyDao">
<select id="listProjectCountGroupByCategory"
resultType="com.epmet.dto.result.project.ProjectCategoryAnalysisResultDTO">
select CATEGORY_ID categoryId,
CATEGORY_NAME categoryName,
sum(pcd.PROJECT_COUNT) projectCount
from screen_kc_project_category_grid_daily pcd
inner join (
select t.CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_project_category_grid_daily t
where CUSTOMER_ID = #{customerId}
) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID)
where pcd.DEL_FLAG = 0
group by CATEGORY_ID
order by projectCount desc;
</select>
</mapper>

17
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml

@ -3,6 +3,19 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcProjectSatisGridMonthlyDao">
<select id="getProjectSatisfactionAnalyze" resultType="com.epmet.dto.result.project.ProjectSatisfactionResultDTO">
select t.monthId, greatSatis, goodSatis, disSatis
from (
select psm.MONTH_ID monthId,
sum(psm.GREAT_SATIS) greatSatis,
sum(psm.GOOD_SATIS) goodSatis,
sum(psm.DIS_SATIS) disSatis
from screen_kc_project_satis_grid_monthly psm
where psm.DEL_FLAG = 0
and psm.CUSTOMER_ID = #{customerId}
group by psm.MONTH_ID
) t
order by t.monthId asc
limit 12
</select>
</mapper>

51
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml

@ -3,4 +3,55 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcProjectSummaryGridDailyDao">
<!--项目各类总数-->
<select id="getProjectSummary" resultType="com.epmet.dto.result.project.ProjectSummaryResultDTO">
select SUM(PROJECT_COUNT) projectCount,
SUM(PROCESSING_COUNT) processingCount,
SUM(CLOSED_COUNT) closedCount,
SUM(MOVE_COUNT) moveCount,
SUM(CLOSED_CASE_COUNT) closedCaseCount,
SUM(PROJECT_VIEW_COUNT) projectViewCount,
SUM(VOTE_COUNT) voteCount,
DATE_ID dateId
from screen_kc_project_summary_grid_daily psd
inner join (
select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_project_summary_grid_daily
where CUSTOMER_ID = #{customerId}
) latest on (psd.CUSTOMER_ID = latest.CUSTOMER_ID and psd.DATE_ID = latest.MAX_DATE_ID)
where DEL_FLAG = 0
</select>
<!--网格议题数量排名-->
<select id="getGridProjectCountRank" resultType="com.epmet.dto.result.project.GridProjectCountResultDTO">
select
psd.GRID_ID gridId,
psd.GRID_NAME gridName,
psd.PROJECT_COUNT projectCount
from screen_kc_project_summary_grid_daily psd
inner join (
select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_project_summary_grid_daily
where CUSTOMER_ID = #{customerId}
) latest on (psd.CUSTOMER_ID = latest.CUSTOMER_ID and psd.DATE_ID = latest.MAX_DATE_ID)
where DEL_FLAG = 0
order by psd.PROJECT_COUNT desc
limit 7
</select>
<!--网格的项目平均结案时间分析-->
<select id="getGridProjectAvgClosedTimeAnalysis"
resultType="com.epmet.dto.result.project.ProjectAvgClosedTimeResultDTO">
select pcd.GRID_ID gridId,
pcd.GRID_NAME gridName,
pcd.AVG_CLOSED_CASE_TIME avgClosedCaseTime
from screen_kc_project_summary_grid_daily pcd
inner join (
select t.CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID
from screen_kc_project_summary_grid_daily t
where CUSTOMER_ID = #{customerId}
) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID)
where pcd.DEL_FLAG = 0
order by avgClosedCaseTime asc
</select>
</mapper>

24
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml

@ -4,5 +4,27 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcTopicTrendGridMonthlyDao">
<select id="selectActTrendMonthly" resultType="com.epmet.evaluationindex.screen.dto.result.KcTopicTrendGridMonthlyResultDTO">
SELECT DISTINCT
month_id AS "monthId",
(
select
sum(topic_count)
from
screen_kc_topic_trend_grid_monthly
where
del_flag = '0'
and customer_id = #{customerId}
and month_id = monthId
) "topicCount"
FROM
screen_kc_topic_trend_grid_monthly
WHERE
del_flag = '0'
AND customer_id = #{customerId}
ORDER BY
month_id DESC,
created_time DESC
LIMIT 12
</select>
</mapper>

56
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml

@ -3,6 +3,62 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcUserSummaryDailyDao">
<select id="getUserSummary" resultType="com.epmet.dto.result.project.UserSummaryResultDTO">
select usd.DATE_ID,
sum(usd.VISITOR_COUNT) vistorCount,
sum(usd.REG_USER_COUNT) regUserCount,
sum(usd.PARTY_USER_COUNT) partyUserCount
from screen_kc_user_summary_daily usd
inner join (
select max(DATE_ID) MAX_DATE_ID, CUSTOMER_ID
from screen_kc_user_summary_daily
where CUSTOMER_ID = #{customerId}
) latest on (usd.DATE_ID = latest.MAX_DATE_ID and usd.CUSTOMER_ID = latest.CUSTOMER_ID)
where DEL_FLAG = 0
</select>
<select id="getUserRank" resultType="com.epmet.dto.result.user.KcUserRankResultDTO">
select usd.GRID_ID gridId,
usd.GRID_NAME gridName,
usd.VISITOR_COUNT viewUserCount
from screen_kc_user_summary_daily usd
inner join (
select max(DATE_ID) MAX_DATE_ID, CUSTOMER_ID
from screen_kc_user_summary_daily
where DEL_FLAG = 0
and CUSTOMER_ID = #{customerId}
) latest on (usd.DATE_ID = latest.MAX_DATE_ID and usd.CUSTOMER_ID = latest.CUSTOMER_ID)
order by viewUserCount asc
limit 7
</select>
<select id="getAgeDistribution"
resultType="com.epmet.dto.result.user.KcUserPortrayalResultDTO$AgeDistribution">
select sum(AGE_LEVEL_1) ageLevel1,
sum(AGE_LEVEL_2) ageLevel2,
sum(AGE_LEVEL_3) ageLevel3,
sum(AGE_LEVEL_4) ageLevel4,
sum(AGE_LEVEL_5) ageLevel5,
sum(AGE_LEVEL_6) ageLevel6
from screen_kc_user_summary_daily usd
inner join (
select max(DATE_ID) MAX_DATE_ID, CUSTOMER_ID
from screen_kc_user_summary_daily
where DEL_FLAG = 0
and CUSTOMER_ID = #{customerId}
) latest on (usd.DATE_ID = latest.MAX_DATE_ID and usd.CUSTOMER_ID = latest.CUSTOMER_ID)
</select>
<select id="getGenderDistribution"
resultType="com.epmet.dto.result.user.KcUserPortrayalResultDTO$GenderDistribution">
select sum(MALE_PARTY_USER_COUNT) malePartyUserCount,
sum(FEMALE_PARTY_USER_COUNT) femalePartyUserCount
from screen_kc_user_summary_daily usd
inner join (
select max(DATE_ID) MAX_DATE_ID, CUSTOMER_ID
from screen_kc_user_summary_daily
where DEL_FLAG = 0
and CUSTOMER_ID = #{customerId}
) latest on (usd.DATE_ID = latest.MAX_DATE_ID and usd.CUSTOMER_ID = latest.CUSTOMER_ID)
</select>
</mapper>

13
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml

@ -3,6 +3,15 @@
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcUserTrendGridMonthlyDao">
<select id="getUserTrend" resultType="com.epmet.dto.result.user.KcUserTrendResultDTO">
select utm.MONTH_ID monthId,
sum(utm.REG_USER_COUNT) regUserCount,
sum(utm.PARTY_USER_COUNT) partyUserCount
from screen_kc_user_trend_grid_monthly utm
where utm.DEL_FLAG = 0
and utm.CUSTOMER_ID = #{customerId}
group by utm.MONTH_ID
order by utm.MONTH_ID asc
limit 12
</select>
</mapper>

32
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml

@ -5,21 +5,31 @@
<select id="selectVolunteerSummaryDaily" resultType="com.epmet.evaluationindex.screen.dto.result.AgeDistributionResultDTO">
SELECT
age_level_1 AS "ageLevel1",
age_level_2 AS "ageLevel2",
age_level_3 AS "ageLevel3",
age_level_4 AS "ageLevel4",
age_level_5 AS "ageLevel5",
age_level_6 AS "ageLevel6",
male_count AS "maleCount",
female_count AS "femaleCount"
SUM(age_level_1) AS "ageLevel1",
SUM(age_level_2) AS "ageLevel2",
SUM(age_level_3) AS "ageLevel3",
SUM(age_level_4) AS "ageLevel4",
SUM(age_level_5) AS "ageLevel5",
SUM(age_level_6) AS "ageLevel6",
SUM(male_count) AS "maleCount",
SUM(female_count) AS "femaleCount"
FROM
screen_kc_volunteer_summary_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
ORDER BY
date_id DESC, created_time DESC
LIMIT 1
AND date_id = (
select
date_id
from
screen_kc_volunteer_summary_daily
where
del_flag = '0'
and customer_id = #{customerId}
order by
date_id desc,
created_time desc
limit 1
)
</select>
</mapper>

4
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";

3
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;
}

6
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;
}

2
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岁的党员总人数

2
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);

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java

@ -1,33 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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<ScreenKcUserHeatRankGridDailyEntity> {
}

77
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;

54
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<String, CpcScoreEntity> cpcScoreTotalMap = new HashMap<>();
Map<String, IndexGroupDetailEntity> indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o));
int pageNo = NumConstant.ONE;
int pageSize = IndexCalConstant.PAGE_SIZE;
List<CpcScoreEntity> list = null;
Map<String, CpcScoreEntity> preLastCpcScoreTotalMap = new HashMap<>();
CpcScoreEntity currentLastCpcScore = null;
Map<String, CpcScoreEntity> cpcScoreTotalMap = new HashMap<>();
Map<String, AtomicInteger> 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<CpcScoreEntity> 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<String, List<CpcScoreEntity>> 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<CpcScoreEntity> 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<List<CpcScoreEntity>> partition = ListUtils.partition(values, IndexCalConstant.INSERT_SIZE);
@ -332,7 +331,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
*/
public void insertCpcSubScoreBatch(CalculateCommonFormDTO formDTO, List<CpcSubScoreEntity> 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<List<CpcSubScoreEntity>> 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;

1
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<DeptScoreDao, DeptScor
index.getThreshold(),
// new BigDecimal("-1"), //FOR TEST
index.getWeight(),
IndexCodeEnum.isAvgIndex(index.getIndexCode()),
scoreCalculator);
map.put(index.getIndexCode(), indexInputVO1);
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

@ -494,6 +494,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
index.getThreshold(),
// new BigDecimal("-1"),//FOR TEST
index.getWeight(),
IndexCodeEnum.isAvgIndex(index.getIndexCode()),
scoreCalculator);
map.put(index.getIndexCode(), indexInputVO1);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

@ -129,7 +129,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -155,7 +155,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -202,7 +202,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -228,7 +228,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -275,7 +275,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -300,7 +300,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

@ -127,7 +127,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -153,7 +153,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -200,7 +200,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -219,7 +219,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -268,7 +268,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
SampleValue s = new SampleValue(c.getParentId(), c.getScore());
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -131,7 +131,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -156,7 +156,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldName))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -203,7 +203,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
index1SampleValues.add(s);
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
indexInputVOS.add(index1VO);
});
}
@ -229,7 +229,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -276,7 +276,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}
@ -301,7 +301,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s);
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);
});
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java

@ -211,7 +211,6 @@ public class DimAgencyServiceImpl extends BaseServiceImpl<DimAgencyDao, DimAgenc
return baseDao.selectTopAgency(customerId);
}
@DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true)
@Override
public List<DimAgencyEntity> getAgencyListByCustomerId(String customerId) {
if (StringUtils.isBlank(customerId)){

8
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);

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java

@ -39,5 +39,10 @@ public class IndexInputVO<T extends Number> implements Serializable {
*/
private BigDecimal weight;
/**
* 是否是分数 如果是分数 直接不用计算 乘以权重即可
*/
private boolean isScore;
private ScoreCalculator<T> scoreCalculator;
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml

@ -22,7 +22,7 @@
<delete id="deleteActSummary">
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;
</delete>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml

@ -27,7 +27,7 @@
<delete id="deleteGroupDetailGrid">
delete from screen_kc_group_detail_grid_daily
where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId}
where CUSTOMER_ID = #{customerId}
limit 1000;
</delete>
@ -70,7 +70,7 @@
#{item.groupLeader},
#{item.memberCount},
#{item.topicCount},
#{item.shifitIssueCount},
#{item.shiftIssueCount},
0,
0,
'APP_USER',

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save